我已經建立了一個Magento 1.7版的網上商店,我的下一個任務是使用v2 Soap api導入產品。到目前爲止,除了一件事外,一切似乎都奏效:所創建產品的所有自定義屬性都保持爲空。其他一切正常 - 名稱,SKU,價格,描述等等。 我的腳本使用asp.net運行,所以我沒有任何PHP代碼,但我認爲它看起來或多或少相似。這裏就是屬性分配給一個產品,我用一個片段:Magento 1.7 SOAP v2 Api - 創建具有附加屬性的產品
dim create as new catalogProductCreateEntity
create.name = "Test"
create.price = "11.1100"
create.description = "test description"
dim additional(0) as associativeEntity
dim attribute as new associativeEntity
attribute.key = "manufacturer"
attribute.key = "xyz"
additional(0) = attribute
create.additional_attributes = additional
在這種情況下,一個簡單的文本字段應獲得的價值「XYZ」。 我在過去設置的其他Magento商店中使用的程序非常相似,並且工作得很好。唯一的區別是這些商店使用Magento 1.5版。 這可能是api中的錯誤嗎?