Update a Product.

@route PUT|PATCH /api/v1/products/:sku
@authentication required
344816
public function update($sku)
    {
        if (!Input::has('product')) {
            return $this->jsonErrorResponse('"product" is required.');
        }

        $product = Subbly::api('subbly.product')->update($sku, Input::get('product'), Input::get('locale', null));

        return $this->jsonResponse(array(
            'product' => $this->presenter->single($product),
        ),
        array(
            'status' => array('message' => 'Product updated'),
        ));
    }
790197
public static function updateProduct($e)
    {
        $productService = $e->getTarget();
        $choiceService  = $productService->getChoiceService();

        $where = $e->getParam('where');
        $products = $productService->findMany($where, array('uoms'));

        foreach ($products as $product) {
            $productId = $product->getProductId();
            $enabled   = ($product->getEnabled()) ? 1 : 0;
            $choiceService->update(
                array('enabled'    => $enabled), //data
                array('product_id' => $productId)    //where
            );
        }

        $productIds = $e->getTarget();
    }
443118
public function update(ProductRequest $request, Product $product)
    {
        dd($request->all());
        try {
            //$product = ProductModel::findorfail($id);
            $product->saveProduct($request->all());
        } catch (\Exception $e) {
            throw new \Exception('Error in Saving Product: ' . $e->getMessage());
        }

        return redirect()->route('admin.product.index');
    }
863690
public function store($product_sku)
    {
        $product = Subbly::api('subbly.product')->find($product_sku);

        if (!Input::hasFile('product_image')) {
            return $this->jsonErrorResponse('"product_image" is required.');
        }

        $productImage = Subbly::api('subbly.product_image')->create(array(
            'image' => Input::file('product_image'),
        ), $product);

        return $this->jsonResponse(array(
            'product_image' => $productImage,
        ),
        array(
            'status' => array(
                'code'    => 201,
                'message' => 'ProductImage created',
            ),
        ));
    }
898369
def sku_update(self, product_id, properties, session, **kwargs):
        ''''''
        request = TOPRequest('taobao.fenxiao.product.sku.update')
        request['product_id'] = product_id
        request['properties'] = properties
        for k, v in kwargs.iteritems():
            if k not in ('quantity', 'standard_price', 'agent_cost_price', 'sku_number', 'dealer_cost_price') and v==None: continue
            request[k] = v
        self.create(self.execute(request, session), fields=['result','created'], models={'created':TOPDate})
        return self
471029
protected function updateProduct($product_id)
    {
        if (!$this->isError() && !$this->product->update($product_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
242134
public function update(
        $sku,
        array $attributes,
        array $images = [],
        array $categories = [],
        array $specifications = [],
        array $variations = [],
        array $variationAttributes = []
    ) {
        $transformer = new UpdateTransformer(
            $sku,
            $attributes,
            $images,
            $categories,
            $specifications,
            $variations,
            $variationAttributes
        );

        $body = $transformer->output();

        /** @var \SkyHub\Api\Handler\Response\HandlerInterface $responseHandler */
        $responseHandler = $this->service()->put($this->baseUrlPath($sku), $body);
        return $responseHandler;
    }
375284
public function update($id, $title, $content, $slug, array $tags, $active, $user_id, DateTime $publish_date)
	{
		$post = $this->find($id);

		// Forget the old cache
		if (Config::get('wardrobe.cache'))
		{
			Cache::forget('post-'.$post->id);
		}

		$post->fill(compact('title', 'content', 'slug', 'active', 'user_id', 'publish_date'))->save();

		$post->tags()->delete();

		$post->tags()->createMany($this->prepareTags($tags));

		return $post;
	}
1309578
protected function updateProduct()
    {
        $this->controlAccess('product_edit');

        if ($this->product->update($this->data_product['product_id'], $this->getSubmitted())) {
            $this->redirect('admin/content/product', $this->text('Product has been updated'), 'success');
        }

        $this->redirect('', $this->text('Product has not been updated'), 'warning');
    }
262234
def update(opts)
      opts = opts.merge(:option_id => self.option_id)
      Twocheckout::API.request(:post, 'products/update_option', opts)
      response = Twocheckout::API.request(:get, 'products/detail_option', opts)
      Option.new(response['option'][0])
    end
1190220
def ordersku_update(self, oid, sku_id=None, sku_props=None):
        ''''''
        request = TOPRequest('taobao.trade.ordersku.update')
        request['oid'] = oid
        if sku_id!=None: request['sku_id'] = sku_id
        if sku_props!=None: request['sku_props'] = sku_props
        self.create(self.execute(request)['order'])
        return self
989024
public function update(ProductUpdateEvent $event)
    {
        if (null !== $product = ProductQuery::create()->findPk($event->getProductId())) {
            $con = Propel::getWriteConnection(ProductTableMap::DATABASE_NAME);
            $con->beginTransaction();

            try {
                $prevRef = $product->getRef();

                $product
                    ->setDispatcher($this->eventDispatcher)
                    ->setRef($event->getRef())
                    ->setLocale($event->getLocale())
                    ->setTitle($event->getTitle())
                    ->setDescription($event->getDescription())
                    ->setChapo($event->getChapo())
                    ->setPostscriptum($event->getPostscriptum())
                    ->setVisible($event->getVisible() ? 1 : 0)
                    ->setVirtual($event->getVirtual() ? 1 : 0)
                    ->setBrandId($event->getBrandId() <= 0 ? null : $event->getBrandId())

                    ->save($con)
                ;

                // Update default PSE (if product has no attributes and the product's ref change)
                $defaultPseRefChange = $prevRef !== $product->getRef()
                    && 0 === $product->getDefaultSaleElements()->countAttributeCombinations();
                if ($defaultPseRefChange) {
                    $defaultPse = $product->getDefaultSaleElements();
                    $defaultPse->setRef($product->getRef())->save();
                }

                // Update default category (if required)
                $product->setDefaultCategory($event->getDefaultCategory());

                $event->setProduct($product);
                $con->commit();
            } catch (PropelException $e) {
                $con->rollBack();
                throw $e;
            }
        }
    }
592591
def update(self, product, linked_products, attributes):
        
        return bool(self.call('ol_catalog_product_link.assign',
            [product, linked_products, attributes]))
103454
protected function process()
    {

        // query whether or not, we've found a new SKU => means we've found a new product
        if ($this->hasBeenProcessed($this->getValue(ColumnKeys::SKU))) {
            return;
        }

        // prepare the static entity values
        $product = $this->initializeProduct($this->prepareAttributes());

        // insert the entity and set the entity ID, SKU and attribute set
        $this->setLastRowId($this->persistProduct($product));
        $this->setLastEntityId($product[MemberNames::ENTITY_ID]);
    }
1044412
public function updateAccessoryPositionAction()
    {
        $accessory = AccessoryQuery::create()->findPk($this->getRequest()->get('accessory_id', null));

        return $this->genericUpdatePositionAction(
            $accessory,
            TheliaEvents::PRODUCT_UPDATE_ACCESSORY_POSITION
        );
    }
576714
def update(self, params, path, **kwargs):
        
        self.client.request('POST', params, path, **kwargs)
492202
def account_update(self, data, **kwargs):
        ""
        api_path = "/api/v2/account"
        return self.call(api_path, method="PUT", data=data, **kwargs)