コード例 #1
0
 /**
  * Return an array of CSV row data.
  * @param  Mage_Catalog_Model_Product $product
  * @param  int $storeId
  * @return array returns an empty array if the image is not valid
  */
 protected function _getDataRow(Mage_Catalog_Model_Product $product, $storeId)
 {
     // if we don't have an image URL return an empty array so we can skip this product in the feed
     $resized = $this->_getResizedImage($product, $storeId);
     if (empty($resized)) {
         return array();
     }
     return array($product->getSku(), $this->_helper->cleanString($product->getName()), $this->_helper->cleanStringForFeed($product->getShortDescription()), $product->getPrice(), $this->_getValidSpecialPrice($product, $storeId), $resized, $product->getProductUrl(), $product->getAvailableInventory());
 }