Questions tagged [extension-attributes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9
votes
2answers
9k views

Magento 2 how to save custom field added in the form of customer group?

I've added some custom fields to the form of customer group by using upgradeSchema.php. After that I found that the original fields like customer group code and tax id are saved by using setter ...
6
votes
1answer
5k views

Extension attributes to add product attribute to the order summary on checkout?

I am trying to display a custom product attribute under the order summary list of items on checkout. I think it is fed by the TotalsItemExtensionInterface. I have the following trying to add the ...
18
votes
1answer
21k views

How to use extension_attributes in Magento2

Is there anyone that can give me an example on how to use extension_attributes in Magento2?
7
votes
2answers
9k views

How do the extension attributes work in Magento 2?

I'm not sure what the docs are saying. I know they're used to add attributes (complex or not) via etc/extension_attributes.xml and I managed to make the compilation process create an interface with ...
3
votes
1answer
5k views

How to add extension attribute Magento 2

I'm trying to add an extension attribute to sales_order (\Magento\Sales\Api\Data\OrderInterface), and I have the following extension_attributes.xml: <config xmlns:xsi="http://www.w3.org/2001/...
6
votes
1answer
966 views

Magento 2 REST - SKU to items on cart totals API response is not available, How to get SKU in response API

Magento 2 Rest API of cart totals doesn't provide SKU, Which is necessary for any operation like extension_attributes /rest/V1/carts/mine/totals The return array of Items is array (size=21) ...
3
votes
1answer
893 views

Transferring a bespoke Customer Address attribute to the Customer Address Data layer

I've added a static Customer Address attribute (for some reason, other didn't work, but whatever; another time): $setup->addAttribute('customer_address', 'xxx', [ 'type' => 'static', '...
1
vote
2answers
1k views

Extra column in catalog_product_entity_tier_price not saving/updating in observer

I have added an extra column 'title' to the catalog_product_entity_tier_price table using Setup/UpdateSchema.php and an extra field to the tier price backend by overwriting Magento\Catalog\Ui\...
32
votes
2answers
3k views

How does Magento2 generate the specific ExtensionFactory and ExtensionAttributeInterface?

I would like to wrap my head around using extension attributes, for example for quote items. It is no problem adding a custom attribute to such an entity using a setup class like in Magento 1, this ...
2
votes
2answers
7k views

Magento 2.1.3 : How can I add extension attributes to a product attribute?

I'm trying to add an extension attribute to a product attribute (\Magento\Catalog\Model\ResourceModel\Eav\Attribute). I've tried the documentations' examples and various articles on Magento Stack ...
5
votes
3answers
7k views

Save a custom attribute from shipping method to quote_address

I have created a custom shipping method which allows delivery to a local office of the carrier. I have created a select when the shipping method is selected, so the user picks the office. Now I need ...
6
votes
2answers
4k views

How to use extension attributes for customer EAV attributes?

I've created custom customer attributes via InstallData and want to make them available as extension attributes. But I have trouble with the admin interface and am unsure if I'm doing it right. I've ...
1
vote
0answers
614 views

How is it possible to set an extension_attributes to the orders and have it appear with REST/SOAP API?

I am trying to use extension_attributes in order to add a field in the orders. The thing is, I want that field to appear when we get the orders with API calls (http://monsite.fr/soap/default?services=...
2
votes
1answer
2k views

Extension attribute in quote item

Hello everyone i would like to add an extension_attribute to quote item in magento 2. I create extension attribute: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
2
votes
1answer
7k views

Magento 2: Property does not have accessor method in class "Magento\Checkout\Api\Data\ShippingInformationExtensionInterface

I'm working on get extension attribute through checkout page And i did it correctly(i thing), check this image below, the extension_attribute is rendered. But when i click on "Next" button, it appear ...
2
votes
0answers
547 views

Get orders API does not include custom extension attributes

The reason is in the documentation itself: This call returns an array of objects, but detailed information about each object’s attributes might not be included. What I'm looking for is something to ...
2
votes
2answers
2k views

Magento 2 - Losing data with extension attributes in bundle options collection

I am using Magento 2.1.4 I add a new column required_total on table catalog_product_bundle_option I created the extension_attributes.xmlfile <?xml version="1.0"?> <config xmlns:xsi="...
2
votes
1answer
4k views

How to get Extension Attribute in a model in Magento 2?

I have added an extension attribute by creating extension_attributes.xml file in etc. Its content is: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
2
votes
3answers
12k views

Add extension attribute to Order

I want to add custom field "comment" to the order as an extension attribute. So, the first, I have added this column to following tables in database: "quote" and "sales_order". It's my xml file: &...
1
vote
1answer
93 views

What is the best way to extend Store Group model?

I would like to modify Store Group model to add a few more columns needed by my business logic. Magento 2 document only writes about extending models by EAV but I find that Store Group model does ...
1
vote
1answer
1k views

Adding extension attribute to customer in GraphQL Magento 2

In magento2 - I have created one extension attribute for customer using plugin, it's working fine for Rest API also. How can I include this extension attribute in GraphQL? In createCustomer mutation ...
1
vote
1answer
560 views

How to set data for my extension attribute Magento 2.3

I can't set the value for my extension attribute , how to set the value for extension attribute using json array swagger. And i can't show the data in the order grid. The below attribute and value ...
0
votes
1answer
81 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\...
-1
votes
1answer
110 views

HOw to create more than one extension attribute and how to set data init magento 2.3

How to set the data in the extension attribute which i created and how to create more the one extension attribute in single module. My Following code is in below link. URL : My Following code ...