我有下面的代碼,嘗試獲取帶有所有相關屬性的產品。C#.Net中的Magento API:catalogProductRequestAttributes問題
我沒有得到任何錯誤,但在「prod」變量中沒有看到任何屬性。
private void frmProductDetail_Load(object sender, EventArgs e)
{
MagentoService service = new MagentoService();
MagentoServiceHelper help = MagentoServiceHelper.Instance;
catalogAttributeEntity[] attributes = service.catalogProductAttributeList(help.SessionID, AttributeSet); //AttributeSet is a property of the form
catalogProductRequestAttributes att = new catalogProductRequestAttributes();
string[] attlist = new string[attributes.Length];
for (int i = 0; i < attributes.Length; i++)
{
attlist[i] = attributes[i].code;
}
att.attributes = attlist;
catalogProductReturnEntity prod = service.catalogProductInfo(help.SessionID,
ProductId, "default", att, "sku"); //ProductId is a property of the form
}
不,這不起作用。我得到完全相同的結果。 – 2010-09-28 16:06:57
http://code.google.com/p/csharlibformagexmlrpcapi/可以幫忙嗎? – B00MER 2010-09-29 01:21:44
你的意思是「空」而不是「空」嗎? – codeulike 2011-05-09 16:04:40