Jump to content

[webservice] Cart / Order association on the same product with different attributes


Makio64

Recommended Posts

Hello everyone,

 

I manage to create a cart / order by webservices but when i push the xml with 2 product with same id but different attributes, only one is add to the cart / order.

 

Exemple de xml :

 

<order_rows virtual_entity="true" node_type="order_row">
    <order_row>
        <product_id>
            <![CDATA[184]]>
        </product_id>
        <product_attribute_id>
            <![CDATA[28006]]>
        </product_attribute_id>
        <product_quantity>
            <![CDATA[1]]>
        </product_quantity>
        <product_id>
            <![CDATA[184]]>
        </product_id>
        <product_attribute_id>
            <![CDATA[28007]]>
        </product_attribute_id>
        <product_quantity>
            <![CDATA[1]]>
        </product_quantity>
    </order_row>
</order_rows>

PS : 2 product with different id works well so i m pretty sure it s a bug from the WebserviceRequest.php  class around the line 1546 but I dont find it..

 

https://github.com/PrestaShop/PrestaShop/blob/d6702cf28a9f84fc0169c7c9d0dafda10f5c6c8f/classes/webservice/WebserviceRequest.php

 

ps: I plane to write a complete article about creating a full app with webservices for prestashop once its done.

 

Thanks by advance for helping

 

Cheers,

David

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...