0

Here is the the situation: I created the entire checkout flow using APIs (created empty cart, add products to cart, set shipping/billing address, shipping info, payment info and converting quote to order) I need to change the currency for the quote if I use the Magento site it's very easy using the currency drop down but I need to do the same via API is possible? I tried to save a quote with rest/V1carts/mine setting quote_currency_code to a different one (example EUR) but nothing happens. It's possible what I want? Or I need to customize a new rest API call to do that.

[EDITED]

Here is the code used to update aquote:

url: http://[site-url]/rest/V1/carts/mine

body:

{
    "cartId":1,
    "store_id":1,
    "customer_id":1,
  "quote": {
    "id": 1,
    "is_active": false,

  }
}

This code update successfully the quote. But when I try to update the quote currency code no error and nothing heppend

{
"cartId":1,
"store_id":1,
"customer_id":1,
"quote": {
  "id": 1,
"currency": {
    "quote_currency_code": "EUR"
  }
}  }

Thanks in advance.

  • You can update your code? – Khoa TruongDinh Aug 14 '16 at 0:47
  • @KhoaTruongDinh sure, let me be with the laptop and I can show you how I'm trying to update. Something I didn't mentioned was I successfully updated a quote, changing active from true to false burn when I try to update the currency nothing happen – AleGrinGo Aug 14 '16 at 2:30
  • 1
    @KhoaTruongDinh I updated the answer with the code used to update the quote. Best. – AleGrinGo Aug 15 '16 at 13:54
  • @KhoaTruongDinh how do you think? – AleGrinGo Aug 16 '16 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.