Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [extension-attributes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Custom Attribute not saving into the Sales_Order Table

This is my PLugin : <?php namespace Vendor\Module\Plugin; use Magento\Sales\Api\Data\OrderItemExtensionFactory; use Magento\Sales\Api\Data\OrderItemInterface; use Magento\Sales\Api\Data\...
Rana Zain's user avatar
  • 676
0 votes
0 answers
18 views

Issue with custom extensible entity and getList method from repository

I have a custom extensible entity: interface that extends ExtensibleDataInterface with get and set; model that extends AbstractExtensibleModel with get and set; My GetList method from repository: ...
Dramorian's user avatar
0 votes
0 answers
26 views

How to set data in custom option filed which is created progrmatically in Magneto 2

I have created a custom field "Plan Identifier" in custom option for products. Now, I want this field to be updated when we create a product using REST API and also the data of this filed ...
Nit's user avatar
  • 101
0 votes
2 answers
385 views

How we can get extension attribute of product in GraphQL Magento 2

I want Stock_id in graphql. We can get this via REST API but I need this in graphql. Can anyone help me with this? Please refer to the attached link and screenshot here I really appreciate any help ...
Ila Makwana's user avatar
2 votes
0 answers
167 views

How to add a custom order field to checkout?

I'm looking for the best (i.e. recommended) way to add a custom order field in the billing step of the checkout page. Requirements In particular, I'd like to add a fast delivery option. If the ...
rmoestl's user avatar
  • 123
0 votes
3 answers
1k views

Difference between Extension Attributes and Custom Attributes magento 2

I have a question in my mind what is the exact difference between Extension Attributes and Custom Attributes with the example? Is anyone here who can provide me with some ideas ?!
Rana Zain's user avatar
  • 676
0 votes
2 answers
1k views

How to add extension attributes to Product Model and Collection

At PriceRenderer we have \Magento\Framework\Pricing\Render\PriceBox::getSaleableItem It returns \Magento\Framework\Pricing\SaleableInterface which is implemented in \Magento\Catalog\Model\Product. ...
Sebas's user avatar
  • 27
0 votes
1 answer
784 views

Adding an Extension Attribute to Sales Order Items - Magento 2

I have created some custom attributes for products and using these attributes in order view in customer account orders section. I have deleted few products. When I view the customer orders, it gives ...
Hafiz Muzamal's user avatar
0 votes
0 answers
251 views

Magento 2.4 : How to save delivery comment in order and in database?

I'm using Magento 2.4.4 and PHP 8.1 . How can i use the order comment as show in screenshot but use it in shipping method as delivery comment and save comment in sales_order &quote table? I have ...
Bayzel's user avatar
  • 187
0 votes
1 answer
267 views

Override `extension_attributes.xml` in extending custom module (which targets ShippingInformationInterface/ShippingInformationExtension)

The question is specifically about ./Magento/Checkout/Api/Data/ShippingInformationExtension.php and adding extra columns via extension_attributes.xml. Modules: Source module: Vendor_Module Overriding/...
CvRChameleon's user avatar
4 votes
2 answers
1k views

Extension Attributes not storing data in database

I am working through the Add a new field in the address form tutorial. I've copied the tutorial, and the custom field is appearing on my Checkout page. However the fields are not stored when ...
dotancohen's user avatar
  • 1,115
1 vote
0 answers
183 views

How to update the payload using store selection click event in magento 2 checkout?

I have store selection option in the checkout. Customer can choose the store to pickup. When customer choosing after, i want to update the store id to payload. I have one step checkout. When the ...
Mujahidh's user avatar
  • 2,813
1 vote
0 answers
255 views

How to save extension_attributes from checkout for guesst user?

I have created a custom checkout field to choose the store to pickup the orders. This extension attribute is saved only for Logged In Customers, Not for Guest checkout. I created the attribute using ...
Mujahidh's user avatar
  • 2,813
0 votes
1 answer
203 views

Can't get extension attribute in a plugin

I am trying to create a module that uploads Category image (as Category extension attribute) via REST API. The problem is that I can't even fetch extension attributes in afterSave method of my Plugin ...
slavikusq75's user avatar
0 votes
1 answer
194 views

Magento 2: How To Add Extension Attribute To order item only Order API

How To Add Extension Attribute To order item Order API Place order: [POST] /rest/V1/carts/mine/payment-information
Ravindrasinh Zala's user avatar
1 vote
0 answers
303 views

Magento 2.3.7-p3 Unable to save extension attribute to Quote Item

I want to show customers how many 'points' they could be making, per quote item, on each item row of the basket. Using extension attributes, this is what I have: di.xml <type name="Magento\...
Surreal Disco's user avatar
0 votes
1 answer
282 views

How can I intercept a sale order created from within the admin panel in Magento 2?

I need to write data to an extension attribute after the order is created from within the admin panel. The extension attribute is the admin user's first and last name. How do I intercept this the ...
Justin Collins's user avatar
1 vote
1 answer
282 views

How to intercept customer order in Magento 2?

When an order is submitted, I need to write data to extension attributes. I need to either create an event observer or plugin. How do I do this the right way?
Justin Collins's user avatar
0 votes
2 answers
1k views

Send Custom Data to quote table

I am new to magento 2. I have created a custom checkout step where user can select delivery day and time via dropdown. Dropdown options are coming from system.xml via customConfigProvider after seller ...
Muhammad Uzair Aziz's user avatar
0 votes
1 answer
732 views

Magento 2: Get extension attributes data before customer address is saved

We have created an extension attribute which we would be accepting via customer address REST API Endpoint: PUT customers/:customerId Request body: { "customer": { "email": &...
GenZ Dev's user avatar
  • 600
1 vote
0 answers
872 views

how to include extension attributes in rest API call of products?

I have made a drop-down named test_attribute and multi_attribute for products and I want to show that into API call of products as well I have made extension_attributes.xml but nothing in ...
Syeda's user avatar
  • 13
0 votes
1 answer
221 views

Magento2 override core interface class to add extra functions

Magento2 override core interface class to add extra functions, Magento\Catalog\Api\Data\CategoryTreeInterface To extend the core interface class to add ExtensibleDataInterface to the interface Can ...
Arjun's user avatar
  • 3,586
0 votes
0 answers
165 views

Best way to implement a own datamodel in magento or is it needed?

i have a magento 2.4 shop where i should import many attibutes, so for each product i need to know in which car the part is usable. The car has 4 important values i need to know. Those are make, model,...
memic's user avatar
  • 21
0 votes
0 answers
841 views

ExtensionAttribute does not have accessor method getXYZ in class

currently i'm facing the Problem that an extension attribute wont work as expected. On our test setup i get the Property has no accessor Error, while my local setup runs fine. Message: Property "...
Philipp's user avatar
0 votes
0 answers
399 views

Save extension attribute without plugin

I have created an extension_attribute for "Magento\Quote\Api\Data\CartInterface". Have a custom table to save that extension_attribute. How I can save the extension_attribute attribute to a ...
Pawan's user avatar
  • 5,906
1 vote
0 answers
236 views

Why are extension attributes not loaded during this integration test?

I have a module that adds two extension attributes to Magento\Sales\Api\Data\OrderAddressInterface: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Daniel's user avatar
  • 2,239
0 votes
1 answer
900 views

Custom Order API Extension Attribute Not Saving

I am trying to create a new extension attribute for the order API but I keep getting "does not have accessor method getRepeatOrder" error when I call the API endpoint. This is how I ...
SNAFU's user avatar
  • 196
2 votes
0 answers
153 views

Magento 2 : Extension attributes & Eav Attributes

Few question based on extension attributes & eav attributes. Answers to this question will clear the concept of this topic. What are extension & eav attributes in magento ? What is the ...
NewDeveloper's user avatar
1 vote
1 answer
261 views

Order custom attribute, extension attribute or EAV attribute | Magento 2

I want to add custom attribute for Order From what I have learned, there are two ways this attribtue can be associated to Order entity Having extension_attributes.xml + custom repository (and ...
Lubos Zapotocny's user avatar
1 vote
0 answers
884 views

Get Extension attributes from \Magento\Quote\Api\Data\PaymentInterface via Quote

I have a subscribe at checkout checkbox that subscribes customers to newsletters at checkout if a checkbox is checked however having issues with some custom payment methods. Most payment methods are ...
harri's user avatar
  • 5,495
3 votes
3 answers
1k views

Create extension attribute to inventory source

I have a requirement to add the custom attribute (delivery_time) to each inventory source. my-vendor/module/etc/di.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3....
Quasar M's user avatar
  • 409
0 votes
1 answer
1k views

Magento 2 get address extension attribute value in carrier collect rate model

I successfully pass the extension attribute value to estimate-shipping-method,like this: etc/extension_attributes.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3....
blue's user avatar
  • 128
0 votes
0 answers
457 views

Magento 2 Adding extension attributes to Magento\Sales\Api\Data\ShipmentTrackInterface

I'm trying to add a custom track url to the trackings, using extension attributes, i added these in extension_attributes.xml <extension_attributes for="Magento\Sales\Api\Data\...
Long M K Nguyễn's user avatar
0 votes
1 answer
226 views

Magento2: How to add extension attribute to rest/V1/products/attribute-sets/4/attributes

I want to add extension attribute to the default API to identify the visual and text swatches http://localhost/m2.4/rest/V1/products/attribute-sets/4/attributes API.
adi maheshwary's user avatar
0 votes
1 answer
1k views

Add custom product attribute to Order API

I have added a custom product attribute via code, using InstallData.php public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $eavSetup = $this->...
Mr Pablo's user avatar
  • 131
0 votes
1 answer
194 views

Trying to extend a 3rd party extension_attribute

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 ...
ActionJackson's user avatar
0 votes
1 answer
172 views

Module Disable/Uninstall Issue - Magento 2.4.0

I installed a module, But that was conflicting with the account dashboard, So I uninstalled that module and remove that extension folder from Code. But now my account dashboard is still not working, ...
Wajahat Bashir's user avatar
0 votes
1 answer
132 views

Get extension_attributes in Plugin

In my API response (all orders) I get this extension_attributes "extension_attributes": { "my_attributes": { "order_id": null, "company_id": ...
hardy123480's user avatar
0 votes
1 answer
972 views

Payment interface extension attribute not saved in order table

I am trying to add an extension attribute in the Payment API. but value not saved in sales_order table. etc/extension_attributes.xml <extension_attributes for="Magento\Quote\Api\Data\...
Devidas's user avatar
  • 3,368
0 votes
1 answer
354 views

Magento 2 add custom checkbox after payment method

In checkout page, after payment methods I want to add custom checkbox and save it's value in sales_order and quote table when click on placeorder button.
krishna's user avatar
  • 43
0 votes
1 answer
1k views

Extension_attribute value save in DB in magento 2

I am using Magento 2.3.4, and i created custom attibute in quote_item 'up_flag'. and throgh rest api i am passing the value of "up_flag": Post request Body for V1/carts/mine/items: {"...
sam's user avatar
  • 489
0 votes
2 answers
2k views

Shipment Extension Attributes

I'm trying to set shipment extension attributes with the following XML; <extension_attributes for="Magento\Sales\Api\Data\ShipmentInterface"> <attribute code="...
Nick G's user avatar
  • 1
3 votes
2 answers
5k views

Where is the extensions attribute magento 2 actually save in Database?

For example, I've added an extension attribute to order <!-- etc/extension_attributes.xml --> <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
hkguile's user avatar
  • 2,221
0 votes
1 answer
793 views

Magento 2.3.5-P2 : Method 'getExtensionAttributes' must be overridden in the interfaces

Recently we upgraded magento version from 2.3.2 to 2.3.5-p2. We are getting error while placing an order after update. In 2.3.2 version there is no issue. Error : report.CRITICAL: Method '...
balu's user avatar
  • 315
2 votes
3 answers
5k views

Magento 2 how add extension attribute to order item

I need to save the extension attribute for Order item. I have tried using plugin with below code, but it is not working for me. I have placed a log inside the method but the method is not working. <...
Antony's user avatar
  • 63
0 votes
1 answer
397 views

Order Extension Attribute

I have added a custom extension attribute following this guide. However, I am struggling to understand it's purpose. By what I can see they are setting their extension attribute on the order every ...
Kieran's user avatar
  • 98
0 votes
1 answer
1k views

Difference between catalog_attributes.xml vs eav_attributes.xml vs extension_attributes.xml

In the Magento_Catalog module i have seen there are three different configuration (xml) files related to the catalog attributes, those three files are catalog_attributes.xml vs eav_attributes.xml ...
Zeeshan Khuwaja's user avatar
1 vote
1 answer
2k views

Magento 2 API: Extension Attribute with null value not showing

I'm retrieving from the Magento API an order by its increment_id attribute like this: http://mystore.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=increment_id&...
Paloma Martinez's user avatar
1 vote
1 answer
1k views

Magento 2.x.x extension attributes API add object array

Have added custom attribute to order API with following info here: https://www.atwix.com/magento-2/adding-custom-attribute-to-api-response-in-magento-2/ It adds the "customer_feedback": "this is my ...
Juliano Vargas's user avatar
1 vote
2 answers
2k views

magento 2 extension attribute value is coming null

I an creating a customer address attribute using this code <?php namespace Ansh\CustomAddressAttribute\Setup; use Magento\Customer\Model\Customer; use Magento\Customer\Setup\CustomerSetup; use ...
Adarsh Shukla's user avatar