Magento 1.4 productIdentifierType

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:16:00

问题


i am having problems with retrieving my products, in 1.3 it worked and i just added some products on 1.4 but there is a new function in the capalogProductInfo called the product identifier, i don't know what to put in there, i tried passing down product type form list but i keep getting a error that says that the product does not exit.

can anyone help?

catalogProductInfo(sessionId, Product_id, CurrentStore, attributes, productIdentifierType)

回答1:


Before I defined the attributes I wanted back, I kept getting the same error (product does not exit):

catalogProductRequestAttributes attrib = new catalogProductRequestAttributes();
attrib.attributes = new string[] { "description", "name" };

catalogProductInfo(sessionId, Product_sku, CurrentStore, attrib, null)

Don't know about the productIdentifierType, but booth null and "sku" worked for me.




回答2:


If you are talking about the Magento API Catalog Product Info, that function requieres 3 arguments

  • mixed product - product ID or Sku
  • mixed storeView - store view ID or code (optional)
  • array attributes - list of attributes that will be loaded (optional)

The 1.4 version seems to work the same way. Try to debug this class Mage_Catalog_Model_Product_Api_V2

/**
 * Retrieve product info
 *
 * @param int|string $productId
 * @param string|int $store
 * @param stdClass $attributes
 * @return array
 */
public function info($productId, $store = null, $attributes = null, $identifierType = null){}


来源:https://stackoverflow.com/questions/2339476/magento-1-4-productidentifiertype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!