/** * @param Google_Service_ShoppingContent_Product $product * @param null|int $storeId * * @return Google_Service_ShoppingContent_Product */ public function insertProduct(Google_Service_ShoppingContent_Product $product, $storeId = null) { $merchantId = $this->getConfig()->getConfigData('account_id', $storeId); $product->setChannel("online"); $expDate = date("Y-m-d", time() + 30 * 24 * 60 * 60); //product expires in 30 days $product->setExpirationDate($expDate); $result = $this->getShoppingService($storeId)->products->insert($merchantId, $product); return $result; }