Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"price_changes" not compatible with "typens:associativeArray" #15

Open
m-schreiber opened this issue Oct 13, 2016 · 0 comments
Open

"price_changes" not compatible with "typens:associativeArray" #15

m-schreiber opened this issue Oct 13, 2016 · 0 comments

Comments

@m-schreiber
Copy link

In the Magento 1.9 wsdl.xml the type "typens:associativeArray" is definend like this:
<complexType name="associativeEntity"> <all> <element name="key" type="xsd:string"/> <element name="value" type="xsd:string"/> </all> </complexType> <complexType name="associativeArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:associativeEntity[]"/> </restriction> </complexContent> </complexType>

So a "associativeArray" has to contain the keys "key" & "value" and this is incompatible with the data-structure the code requires:
'price_changes' => array( array( 'color' => array( 'Red' => '2', 'Blue' => '-10%', ), 'size' => array( 'Large' => '+1', 'Medium' => '-3', ), ), ),

I'am not an expert in WSDL but I think this calls for a new type definition?

An alternative Fix I did quick and dirty is to change the type of "price_changes" to "xsd:string" and do json_encode / serialize before calling the function with the soapclient and then in the api there needs to be the equivalent json_decode / unserialize.

Does anyone still maintain this extension ? Do you accept pull request ? Or is there another way to do this (create and associate configurable products), that i'am not aware of ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant