【发布时间】:2010-09-23 13:16:02
【问题描述】:
我有下面的代码,试图让产品返回所有相关属性。
我没有收到任何错误,但在“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
}
【问题讨论】: