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

0
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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.