/** * Retrieve item query for Google Content * * @param \Magento\GoogleShopping\Model\Item $item * @return \Magento\Framework\Gdata\Gshopping\ItemQuery */ protected function _buildItemQuery($item) { $storeId = $item->getStoreId(); $service = $this->getService($storeId); $countryInfo = $this->getConfig()->getTargetCountryInfo($storeId); $itemId = $this->_gsData->buildContentProductId($item->getProductId(), $item->getStoreId()); $query = $service->newItemQuery()->setId($itemId)->setTargetCountry($this->getConfig()->getTargetCountry($storeId))->setLanguage($countryInfo['language']); return $query; }
public function testBuildContentProductId() { $result = $this->data->buildContentProductId(2, 5); $this->assertEquals("2_5", $result); }