Questions tagged [extension-attributes]
The extension-attributes tag has no usage guidance.
143
questions
0
votes
1
answer
28
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 ...
0
votes
1
answer
15
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?
0
votes
2
answers
48
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 ...
0
votes
1
answer
28
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": &...
0
votes
0
answers
20
views
adding shipping price as in customer group in admin Product
Add a custom product level attribute for ‘Shipping_price’ by using schema and new tables, to add multiple custom shipping pricing based on different quantities. (Just like Customer Group Price we have ...
0
votes
0
answers
35
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 ...
0
votes
0
answers
18
views
Magento MSI Source - add custom field to Sources in M2
I want to add custom field in MSI source form. not able to find any documentation or idea on it
anyone can help me to add field in MSI?
I saw same question but not got any proper answer
Magento MSI; ...
0
votes
1
answer
36
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 ...
0
votes
0
answers
126
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,...
0
votes
0
answers
16
views
Adding attributes to OrderItemSearchResult
Sorry for beginner question, but I need to add aggregate field to /V1/orders/items response (2 sum fields) - can you give me a hint how it is usually done?
0
votes
0
answers
62
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 "...
0
votes
0
answers
28
views
Retrieving product collection with all possible data in one call
I'm building a custom API endpoint that produces a product data dataset for a custom front-end application. All works fine, but I want to optimize the code because I still have multiple database ...
0
votes
0
answers
107
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 ...
1
vote
0
answers
59
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-...
0
votes
0
answers
51
views
Magento 2: Getting and save extension attributes in ShippingInformation
I want to display my custom extension attributes that are saved in quote on the ShippingInformation sidebar (underneath shipping method).
I have been able to successfully save my extension attributes ...
0
votes
1
answer
172
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 ...
2
votes
0
answers
35
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 ...
0
votes
1
answer
71
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 ...
0
votes
0
answers
18
views
Add extension attribute to section in checkoutConfig
Hello how i can add extension attribute to discount segment? By default it get discount_lable as title but i wont discount name too.
And how i can get shipping method handling free treshold value?
1
vote
0
answers
107
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 ...
1
vote
2
answers
510
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....
0
votes
1
answer
282
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....
0
votes
0
answers
193
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\...
0
votes
1
answer
94
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.
0
votes
1
answer
198
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->...
0
votes
1
answer
62
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 ...
0
votes
1
answer
86
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, ...
0
votes
1
answer
27
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": ...
0
votes
1
answer
501
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\...
0
votes
1
answer
126
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.
0
votes
1
answer
290
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:
{"...
0
votes
2
answers
608
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="...
1
vote
2
answers
2k
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/...
0
votes
1
answer
461
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 '...
2
votes
3
answers
2k
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.
<...
0
votes
1
answer
75
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 ...
0
votes
1
answer
450
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 ...
1
vote
1
answer
965
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&...
0
votes
1
answer
660
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 ...
1
vote
2
answers
849
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 ...
2
votes
2
answers
1k
views
Magento 2 add extra column in order grid using extension attribute
Thanks! for view this post.
I just want to know if there is any feasibility in which we can add extra columns in grid using extension attributes?
Please share your steps with me.
Thanks!
0
votes
1
answer
184
views
Load Customer Model by Extension Attribute in Magento 2
How can I load the Customer Model and Collection by Extension Attribute in Magento 2?
I've declared an extension attribute in extension_attributes.xml and saved to the Customer Model. Now, How can I ...
-1
votes
1
answer
499
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 ...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
431
views
Magento 2 Extension attribute to Payment method
I want to set Extension attribute to
V1/carts/mine/shipping-information
API response like below.
{
"payment_methods": [
{
"code": "braintree_cc_vault",
"title": ...
2
votes
1
answer
2k
views
Extension attribute error "Call to undefined method Magento\Catalog\Api\Data\ProductExtension: : setDummyAttribute() on ProductExtension"
Error :
Uncaught Error: Call to undefined method Magento\Catalog\Api\Data\ProductExtension: : setDummyAttribute() on ProductExtension in MyCompany\MyModule\Plugin\DummyAttribute"
This is how I have ...
1
vote
1
answer
2k
views
Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed()
I'm getting an error Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed() when running integration tests on my local development environment.
For some reason it ...
0
votes
1
answer
602
views
Save payment interface extension attribute in Magento 2
My extension_attribute.xml file below:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
1
vote
0
answers
234
views
Magento 2: Add extension attributes to product collection
I have added extension attribute to Magento\Catalog\Api\Data\ProductInterface using extension_attrributes.xml and its getting reflected when I get product(s) using ProductRepository's get, getList and ...
1
vote
0
answers
92
views
Extension attribute 'neighborhood' not working when payment method is PayPal standard
I have added an extension attribute via
extension_attributes.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...