Marie76 Posted August 9, 2016 Share Posted August 9, 2016 (edited) Bonjour à tous, J'utilise l'API pour créer des clients, des paniers, des commandes. Tout se passe bien sauf la modification des prix unitaire sur les lignes de commande. En effet je souhaite, en envoyant la commande sur mon presta, modifier certain tarif de commande ligne. Voici un XML utilisé pour créer ma commande : <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <order> <id/> <id_address_delivery>47</id_address_delivery> <id_address_invoice>47</id_address_invoice> <id_cart>602</id_cart> <id_currency>1</id_currency> <id_lang>1</id_lang> <id_customer>26</id_customer> <id_carrier>43</id_carrier> <current_state>10</current_state> <module>bankwire</module> <invoice_number>0</invoice_number> <invoice_date>0000-00-00 00:00:00</invoice_date> <delivery_number>0</delivery_number> <delivery_date>0000-00-00 00:00:00</delivery_date> <valid>1</valid> <date_add>2016-08-09 13:45:52</date_add> <date_upd>2016-08-09 13:45:52</date_upd> <shipping_number></shipping_number> <id_shop_group>1</id_shop_group> <id_shop>1</id_shop> <secure_key></secure_key> <payment>Virement bancaire</payment> <recyclable>0</recyclable> <gift>0</gift> <gift_message></gift_message> <mobile_theme>0</mobile_theme> <total_discounts>0</total_discounts> <total_discounts_tax_incl>0</total_discounts_tax_incl> <total_discounts_tax_excl>0</total_discounts_tax_excl> <total_paid>10</total_paid> <total_paid_tax_incl>10</total_paid_tax_incl> <total_paid_tax_excl>8.33</total_paid_tax_excl> <total_paid_real>10</total_paid_real> <total_products>10</total_products> <total_products_wt>8.33</total_products_wt> <total_shipping>0</total_shipping> <total_shipping_tax_incl>0</total_shipping_tax_incl> <total_shipping_tax_excl>0</total_shipping_tax_excl> <carrier_tax_rate>20</carrier_tax_rate> <total_wrapping>0</total_wrapping> <total_wrapping_tax_incl>0</total_wrapping_tax_incl> <total_wrapping_tax_excl>0</total_wrapping_tax_excl> <round_mode>2</round_mode> <round_type>2</round_type> <conversion_rate>1</conversion_rate> <reference>MAR080913</reference> <associations> <order_rows> <order_row> <product_id>205</product_id> <product_quantity>1</product_quantity> <product_price>4.17</product_price> <unit_price_tax_incl>5</unit_price_tax_incl> <unit_price_tax_excl>4.17</unit_price_tax_excl> </order_row> <order_row> <product_id>206</product_id> <product_quantity>2</product_quantity> <product_price>2.08</product_price> <unit_price_tax_incl>2.5</unit_price_tax_incl> <unit_price_tax_excl>2.08</unit_price_tax_excl> </order_row> </order_rows> </associations> </order> </prestashop> La commande se crée bien dans le prestashop mais les 2 références ci-dessus (id 206 et 205) n'arrivent pas dans la commande au prix mentionné dans le XML mais au prix défini dans la base produit. Je souhaite "forcer" ces tarifs à la création de commande mais je ne vois pas comment faire... Merci pour votre aide ! Cordialement, Marie Edited August 10, 2016 by Marie76 (see edit history) Link to comment Share on other sites More sharing options...
Marie76 Posted August 24, 2016 Author Share Posted August 24, 2016 Un petit up du sujet. Si l'api de Presta ne permet pas de modifier les tarifs des lignes de commande la solution serait de créer son propre webservice? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now