/** * Update Item data in Google Content * * @param Weboffice_GoogleShoppingApi_Model_Item $item * @return Weboffice_GoogleShoppingApi_Model_Service_Item */ public function update($item) { $service = Mage::getModel('googleshoppingapi/googleShopping'); $gItemId = $item->getGoogleShoppingItemId(); // get product from google shopping //$product = $service->getProduct($gItemId,$item->getStoreId()); $product = $item->getType()->convertAttributes($item->getProduct()); $shoppingProduct = $service->updateProduct($product, $item->getStoreId()); $expires = $shoppingProduct->getExpirationDate(); if ($expires) { $expires = $this->convertContentDateToTimestamp($expires); $item->setExpires($expires); } return $this; }