I'm having a hard time wrapping my brain around how these extension attributes works. I sorta get how they work for an extension, but what I'm trying to do is extend a 3rd party extension's model to include a new database field that I've added to a table that the extension uses.

I have an extension that has the following in its etc/extension_attributes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <extension_attributes for="Magento\Quote\Api\Data\CartInterface">
        <attribute code="aw_ctq_quote" type="Aheadworks\Ctq\Api\Data\QuoteInterface">
            <join reference_table="aw_ctq_quote" reference_field="id" join_on_field="entity_id">

Like I said, I added a column to the the "aw_ctq_quote" table via an upgrade schema script in my custom module, and that added just fine. I have changed the PHTML template where this data gets entered by the backend user, and it does POST just fine. I'm trying to have the model update the data set now, but I have no idea how to tell Magento to also include this other field. I can't update the example XML because it's a composer extension.

How can I update the model to include this other field? I'm not sure how I can tell Magento to also include this other column. I started looking into extending interfaces but I'm not sure if I have to specify a new model or what exactly I need to be looking for. Every search I do turns up how to make your own interface with new extension attributes but no mention of extending/overriding an existing one.

Any pointers here would be fantastic. Thanks so much

  • Any success solving this problem?
    – xpoback
    Apr 26, 2022 at 15:42

1 Answer 1


you can use an after plugin on the method (about your entity, for example \Magento\Sales\Model\Order) and getting the $order->getExtensionAttributes(). After this, you can your extension attributes and save order.

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.