Questions tagged [extension-attributes]

The tag has no usage guidance.

0
votes
1answer
22 views

Extension attribute on order make a column error

I'm trying to add an extension attribute to my order entity. I've follewed this link : https://www.rakeshjesadiya.com/extension-attribute-in-order-data-magento-2/ But I can see my extension ...
0
votes
1answer
15 views

Magento 2.3 - How add new column/field to sales_shipment table

I need to add a new column/field (total_volume) to sales_shipment table. I know that I can use two approaches to do this, but what is the best? The first approach is to use the "Extension Attributes"....
0
votes
0answers
13 views

Storing & retriving a Customer extension attribute using Magento 2 REST API?

What I'm trying to do is associating a my_attribute extension attribute to any customer. Plus, I have to use the Magento API. Storing a Customer would be done by calling POST /V1/customers and ...
0
votes
1answer
11 views

EntityManager is trying to insert an existing row instead of updating the row

I have an extension property on Magento's Invoice class, and I'm trying to make an API method that sets the value of my extension attribute for a specific invoice. I'm using my class as an extension ...
0
votes
1answer
22 views

How to override the GroupInterface by creating extension attributes in magento 2

I wish to override Magento\Customer\Api\Data\GroupInterface to add my custom fields. Custom fields are 1.custom_terms 2.handling_fee I have created the below file in etc/extension_attribues.xml &...
2
votes
1answer
86 views

Magento 2 - How get extension attributes from product collection

I need to get the product collection with all extension attributes, specifically I need then to get the stockItem object with $product->getExtensionAttributes()->getStockItem(). So I have ...
2
votes
0answers
50 views

Magento 2 Save custom customer address attribute in customer edit form using extension attributes

I want to save custom customer address attribute in Customer Edit Form under My Account section. I have created an attribute using Setup script and save that attribute using extension attributes. ...
1
vote
1answer
33 views

How do I query on an extension attribute through the API?

I added an extension attribute to the Invoice class, and I want to be able to query the Invoice database data by my extension attribute. My extension attribute (ExportedFlag) has these properties ...
0
votes
0answers
22 views

How do I save a string extension attribute to the database

I'm trying to add a string extension attribute called exportedFlag to the Invoice class. I have the attribute added successfully when I'm retrieving data, but I'm struggling with how to save the ...
1
vote
0answers
14 views

Error on set method of extensionAttributes

I realize this question is kind of vague, but I'm hoping that someone with more knowledge of Magento than me can give me an idea of where to look. I'm trying to add an extension attribute called ...
1
vote
0answers
24 views

API error when adding an extension attribute

I'm trying to follow Magento's tutorial for adding an extension attribute. I want to add an extension attribute called "exportedFlag" to the Invoice class, and have it returned through the V1/...
0
votes
0answers
96 views

How to get the extension attributes in shipping info and order/{id} APi magento2?

I have created a sales attribute "port" in sale_order table. I want to POST this post attribute in shipping information API payload and get it in response as extension attribute. I also want to save ...
4
votes
0answers
142 views

How to display and save extension attributes on Magento 2 Admin create order page

I have created extension attributes to order for rest API services. Also, I'm able to display the attributes on the order grid. How can I display the same attributes on admin create order form and ...
0
votes
0answers
22 views

Magento 2 soap api issue

I need to insert extension attributes into api. I have created extension attributes file and I have added it to api but when I change /** * Sets the tax relief state for the order payment. * * @...
1
vote
0answers
72 views

Unable to create extension attribute for billing address in Magento 2

I have added custom field in magento checkout billing form, to get the value for field, I have added extension attribute <extension_attributes for="Magento\Quote\Api\Data\AddressInterface"> ...
4
votes
1answer
204 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) ...
0
votes
0answers
22 views

How to get Image data in Magento\Quote\Api\CartTotalRepositoryInterface using extension_attributes?

GET V1/carts/mine/totals This API Returns information for the cart totals a specified customer. How to get Item Images using extension_attributes on get function of Magento\Quote\Api\...
1
vote
0answers
19 views

Magento 2: Extension Attributes for Total Model

I added custom total(discount row) model in cart and checkout summary but it is not getting saved in quote and order. So how to use extension attribute for such total model that works in order, ...
1
vote
1answer
56 views

Magento2 Extension-Attribute of type \DateTime?

I'am trying to add an extension-attribute to Magento_Customer like this: <extension_attributes for="Magento\Customer\Api\Data\CustomerInterface"> <attribute code="some_attribute" type="\...
0
votes
1answer
1k 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 ...
0
votes
1answer
201 views

Magento 2 order REST Api append Custom Attribute

I want to get Custom Attribute value which is already saved in database table, i just want to append it to my Sales order REST APi, i have tried adding extension attribute , i am able to get set and ...
2
votes
0answers
257 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 ...
1
vote
2answers
632 views

Adding extension attribute to category api response

The default response from magento 2 category api endpoint /rest/V1/categories/3 is { "id": 3, "parent_id": 2, "name": "Gear", "is_active": true, "position": 4, "level": 2, "children": "4,5,6", "...
1
vote
0answers
315 views

Order item extension attributes are always last database entry

I have added extension attributes to order items, and values are successfully saved to table, when I get an order from rest API, extension attributes always show the value of last order item row for ...
0
votes
0answers
81 views

Add extension attribute in Product Custom Option Value

I would like add extension_attribute field in ProductCustomOptionValue entity. My idea is to use extension_attribute.xml to create news attributes to this entity liking with a new table.
0
votes
1answer
1k views

Magento 2 - Save Extension Attribute afterSave() returns void

I've been looking into extension attributes from various articles and tutorials: https://store.fooman.co.nz/blog/an-introduction-to-extension-attributes.html https://devdocs.magento.com/guides/v2.2/...
2
votes
1answer
358 views

Extension attribute for shipping method in Magento 2

I want to display some custom message from admin in front of my custom shipping method. in extension attribute not set individually in shipping method for custom shipping method of cart and checkout. ...
0
votes
0answers
70 views

Adding get and set methods for increment_id of customer_entity table

How to add get and set methods for increment_id of customer_entity table in magento2. i have added in extension_attribute and added plugin for customerinterface class but it is not effecting core ...
0
votes
0answers
52 views

Magento 2 - Add admin user to order

I created an external WebApp that communicates via REST API to my Magento instance (Magento version installed is 2.1.13). This WebApp will be used by shop's operators to sell the same shop products to ...
1
vote
1answer
377 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\...
1
vote
1answer
50 views

Extension attribute on admin page

I've successfully created a new field on the frontend with an extension_attribute by this documentation. My problem is that where should I hook the extension attributes on the admin page? The ...
9
votes
2answers
1k views

Magento 2 : What is difference between Extension Attributes and Custom Attributes?

I have question in my mind what is exact difference between Extension Attributes and Custom Attributes ? Any one here who can provide me some ideas ?!
1
vote
1answer
422 views

Magento 2 extension attribute issue for Magento\Quote\Api\Data\AddressInterface

i am trying to add extension attribute for Magento\Quote\Api\Data\AddressInterface but i am facing below issue. Message: Property "Addressfiled" does not have corresponding setter in class "Magento\...
1
vote
0answers
132 views

Generation of Extension interfaces

What is the code that generates the ExtensionInterface suffixed classes ? For example, there is this file that declares extension attribute on the product options (and others). Magento/Catalog/etc/...
1
vote
0answers
70 views

Magento 2 add extension attribute to invoice_item

I need to put the shipment number for the item in 'sales_invoice_item' table from Rest Api, How to add extension attribute for invoice item?
1
vote
1answer
88 views

Adding extention_attributes to Oder not working

There's an extension in my project and I want to include one of its attributes in the Order object so that Zapier can see that field. I don't have to save that field, it's saved somewhere else, so I ...
1
vote
1answer
421 views

Adding custom column data to extension attribute in magento's default V1/orders API

I have a custom delivery_date column in quote table which I want to pass to V1/orders , I have passed this in extension_attribute.xml as following ; <?xml version="1.0"?> <config xmlns:xsi="...
3
votes
1answer
301 views

Magento 2 extension attributes

I'm a bit lost regarding the Magento 2 extension attributes. It's clear they offer a flexible way to extend the API/interfaces with your own attributes, but what I don't get is how to save the value ...
1
vote
0answers
577 views

Magento 2 Adding Extension Attribute to Quote_Item

I am trying to add an extension attributes to quote_item. I have a plugin that works perfectly well when I add a simple item to quote_item, converting it from quote_item to order_item, and when I an ...
2
votes
1answer
358 views

Magento2: Custom ExtensionAttributes for Customer_Address not saved into database

I am stuck. I hope someone had already solved my problem. The magento docu does not help me any further. I added some new ExtensionAttributes for Customer_Address entity. These fields are correctly ...
0
votes
1answer
316 views

Create extension attribute to quote_item table

I am trying to create extension attribute to quote_item table but in module-quote I haven't seen any QuoteItemInterface, but there is CartItemInterface. I tried with that extension_attributes.xml ...
0
votes
1answer
323 views

Saving order extension attribute to database

What is the process for saving an extension attribute to the database, when passed over using the REST API? How does it know which table / field to save the value to? the method are being generated in ...
1
vote
0answers
70 views

extension attributes

I'm trying to extend Magento 2 api, I found this (https://github.com/magento-south/magento2-samples/tree/MAGETWO-55017/sample-external-links) but its not working.. After some fixes I got an error ...
3
votes
3answers
3k 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 ...
0
votes
3answers
5k 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: &...
3
votes
0answers
419 views

Magento 2.1 Rest API - Adding to Extension Attributes for VI/Orders/?searchcriteria

I have some custom data that I gather on checkout. Using etc/extension_attributes.xml, I was able to add this data to the extension_attributes output on VI/Order/#id, but when I use VI/Order?...
3
votes
2answers
1k views

Trying to understand EAV attributes and extension attributes in Magento 2

I'm trying to figure out how to achieve a simple task that in magento 1 was very simple, adding an attribute to an entity. In my case an attribute to customer_address, so in magento tutorial only ...
1
vote
1answer
76 views

Creating Magento-attributes using Magento-Extension

Need help to create Magento attributes using Magento Extension. Here are the instructions: I have to create a new Yes/No attribute for products. The code should be display_product. The code should ...
4
votes
2answers
2k 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 ...
0
votes
1answer
567 views

Magento2: How to add custom attributes into CustomerGroups

I've already added some custom attributes into order and customer, now, I'm trying to do the same with CustomerGroups and it's not working. I'm failling on the first step, the setup script: class ...