0

i have tried this solution Add Custom Field in Order and Quote Table To be Used in REST API. But still the custom field values are not setting in quote table. Here is my payload for POST request

<base_url>/rest/V1/carts/mine/items

Payload:

{
 "cart_item": {
 "sku": "H6S4K461FDD192",
 "qty": 1,
 "quote_id": "256",
 "product_option": {
 "extension_attributes": { 
 "custom_options": [
 {
 "option_id":"374",
 "option_value":"1522"
 },
 {
 "option_id":"373",
 "option_value":"898"
 },
 {
 "option_id":"372",
 "option_value":"895"
 }
 ],
 "configurable_item_options": [
 {
 "option_id": "93",
 "option_value": "110"
 }
 ]
 }
 },
 "extension_attributes": { 
 "layaway":"1",
 "downpayment":"1838.00",
 "finalpayment":"1444.50",
 "duration":"30",
 "bank_name":"Bank Name",
 "layaway_multipay":"0",
 "multi_pay_initial":"0"
 }
 }
}

i want to set values of layaway,downpayment finalpayment duration bank_name layaway_multipay multi_pay_initial in quote table

i have also added extension_attributes.xml

asked Mar 9, 2021 at 7:23
0

1 Answer 1

0

Check that you have your custom attributes as columns in the quote table AND also you have a typo in your request :)

As per https://magento.redoc.ly/2.4.2-admin/#operation/quoteCartItemRepositoryV1SavePost, the key is 'cartItem', not 'cart_item'

enter image description here

answered Mar 9, 2021 at 9:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.