Jump to content

Add order by webservice forcing product prices


gusman126

Recommended Posts

Hello everyone.

I am trying to add an order through webservice, but forcing the prices of the products.

I have been able to add everything, customer, address, cart, and order,

When I am going to send the order I add the product lines forcing the price:

<order_rows>
	<order_row>
	<id>0</id>
	<product_id>8510</product_id>
	<product_attribute_id>0</product_attribute_id>
	<product_quantity>1</product_quantity>
	<product_name>GORMITI S2 - BLISTER HERALDS VALUE PACK</product_name>
	<product_reference>GRE06000</product_reference>
	<product_ean13>8056379082132</product_ean13>
	<product_isbn></product_isbn>
	<product_upc></product_upc>
	<product_price>17.35</product_price>
	<unit_price_tax_incl>20.990000</unit_price_tax_incl>
	<unit_price_tax_excl>17.350000</unit_price_tax_excl>
	</order_row>
</order_rows>

The problem is that when sending the order, the response and therefore when saving in the store, they are saved with the internal prices of prestashop

<order_rows nodeType="order_row" virtualEntity="true">
	<order_row>
	<id>37</id>
	<product_id>8510</product_id>
	<product_attribute_id>0</product_attribute_id>
	<product_quantity>1</product_quantity>
	<product_name>GORMITI S2 - BLISTER HERALDS VALUE PACK</product_name>
	<product_reference>GRE06000</product_reference>
	<product_ean13>8056379082132</product_ean13>
	<product_isbn/>
	<product_upc/>
	<product_price>13.214876</product_price>
	<unit_price_tax_incl>15.990000</unit_price_tax_incl>
	<unit_price_tax_excl>13.214876</unit_price_tax_excl>
	</order_row>
</order_rows>

I can add the "total paid and total products"

<total_paid>20.990000</total_paid>
	<total_paid_tax_incl>20.990000</total_paid_tax_incl>
	<total_paid_tax_excl>17.350000</total_paid_tax_excl>
	<total_paid_real>0.000000</total_paid_real>
	<total_products>17.350000</total_products>
	<total_products_wt>20.990000</total_products_wt>

And that does respect me

<total_paid>20.990000</total_paid>
	<total_paid_tax_incl>20.990000</total_paid_tax_incl>
	<total_paid_tax_excl>17.350000</total_paid_tax_excl>
	<total_paid_real>0.000000</total_paid_real>
	<total_products>17.350000</total_products>
	<total_products_wt>20.990000</total_products_wt>

The problem I have is that the store gives a payment error

image.png.9607d693f6da8d42495f078e0409703d.png

Any solution??

Link to comment
Share on other sites

  • 1 year later...
On 6/24/2020 at 1:03 PM, gusman126 said:

Fixed, but this shouldn't be this way
Solution>
Generate csv file
Upload using FTP to prestashop store
Add code to read CSV file and update order data
A botch, bad prestashop job, that should be fixed by Webservice

 

We're facing the same issue, wondering if there really isn't a better way to deal with this

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...