Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom-attributes]

Denotes questions regarding Magento custom attributes

0
votes
0answers
5 views

How to get/pass a custom product in cart, custom attributes value to a PHP file in Model folder

I created a custom text attribute for all the products I created in the backend. It is called freight class. I want to pass the value of the freight class attribute of the item in the cart to a PHP ...
1
vote
0answers
14 views

Filter a custom attribute in Order Grid

I added new attribute and new column to Order Grid : [vendor]\[module]\view\adminhtml\ui_component\sales_order_grid.xml <?xml version="1.0" encoding="UTF-8"?> <listing xmlns:xsi="http://www....
0
votes
1answer
25 views

Magento 2 Can not save custom attribute for customer

I am getting following error while register customer with API. It happen when i am try to save Company field. "Property \"Company\" does not have accessor method \"getCompany\" in class I have use \...
0
votes
0answers
8 views

Prevent Media Attribute from defaulting on image

I'm using Magento 2.2.8. We've created a module for displaying a sizing guide which works wonderfully. My issue though is the sizing guide works by tagging an image on the product with a custom ...
0
votes
0answers
9 views

Partial attribute Set's detail on custom product are not showing

Here is a setting of a particular attribute set: Crowdfunding item The focus on (Dimension parameter is missing) ts_dimension_xxx I will use it on a custom product type called donation (Not simple ...
2
votes
3answers
42 views

How to edit custom customer group attribute (column) in Magento 2?

Bonjour ! I try to edit some custom customer group fields in my Magento 2.3 but I don't know how to start. I already have added some columns and displayed it in admin back-office with a module. ...
1
vote
0answers
17 views

Magento2 How to add custom attribute to billing information of order rest api response

I want to add a custom attribute to the billing information section of order rest API response instead of showing in extension attribute section. please anyone can help me in this. Thanks in advance
0
votes
1answer
23 views

How to filter attribute by its option value in magento2.2.5?

I want to filter attribute by its option value in Magento2.2.5. I have tried with this: $collection->addAttributeToFilter('collections', 258); But it doesn't seem to work. Any help would be ...
0
votes
0answers
22 views

custom_attributes not returning from Magento 2 REST API

Using the Magento 2 REST API, I was able to successfully create a new product attribute sending a PUT request to V1/products/attributes/{attribute_code}. In the request, I added a value in the ...
-1
votes
0answers
35 views

How to get custom attribute front end value / label in Magento 2?

I am trying to get the frontend value of a custom customer attribute. I have the following code protected $_customerRepositoryInterface; public function __construct( .... \Magento\Customer\...
0
votes
1answer
29 views

Calculate attribute value in indexer or cron?

This is my observer and its updating my custom attribute every time when I save attributes on catalog_product_attribute_update_before event. namespace MyVendor\MyModule\Observer; class ...
1
vote
0answers
26 views

How to add new custom field in checkout/shipping page and save it in db in Magento2.2.5?

I want to add new custom field in checkout/shipping and want to save them in the following tables in Magento 2.2.5: sales_order sales_order_address sales_order_grid I have referred this link https://...
0
votes
1answer
20 views

Magento2 Showing a custom attribute on category listing page

I have a magento2 based website and I am wanting to show a custom attribute on the category listing page. My issue seems to be that on desktop and tablet the products are shown 3 across and on mobile ...
2
votes
2answers
48 views

Customers custom attribute with dropdown is not working

I need to create a custom attribute for customer entity with the Yes/No. I tried to use boolean type and also select method. But nothing has worked. Below are my work: Try 1: (Type as select) $...
1
vote
1answer
33 views

Efficient method to load/get and assign multiple custom options/attributes from quote item?

Is there a more efficient way to load and assign quote item custom options/attributes? This is code in my Observer: public function MyFunction(Varien_Event_Observer $observer) { $QuoteObject = Mage::...
1
vote
0answers
42 views

Magento 2 : Custom attribute create with “Use default value” checkbox and that functionality

I created custom attribute under custom eav_entity_type. Attribute was created successfully and display also in admin. But, it's not display "Use default value" checkbox when, I switch to other store....
0
votes
0answers
15 views

Get custom customer address attribute on email

I have a module with which I create my attribute. I can get it and show it in the admin panel, but not when the data is recibed on checkout process. This is my installer code: public function ...
2
votes
0answers
31 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. ...
0
votes
0answers
13 views

How to Add Wishlist Custom Attribute in Magento1?

I want to add customer attribute in magento wishlist in order to save additional field in wishlist table.
0
votes
1answer
36 views

How to get the custom attribute of products from the cart?

There is an attribute in the product AllowSameDayDelivery how can I get it out of the product? I got the products ids from the cart, But how do I get the attribute now? <?php namespace Ronis\...
2
votes
2answers
45 views

Show Delivery Time over or under Availability on Products Page

I am completely new to magento. I use Magento 2.3 and I created an attribute Lieferzeit under Stores->Attributes->Product and set visibility to yes. Further, I set the Attribute to a group in Stores-...
1
vote
0answers
26 views

How to add attribute advance properties in magento 2.2.7

How to add attribute for product attribute advance properties in magento 2.2.7 I want to implement yes/no attribute for product and second attribute for image attribute for Product Attribute
0
votes
1answer
40 views

Get custom attribute value in Magento2 product page

I have created one custom attribute through code, in admin product edit page,but i wolud like to display that value in product detail page, How to get the custom attribute collection in product ...
0
votes
0answers
32 views

Boolean attributes not displaying any options when used as part of conditions or actions in a promo rule

I've got a couple of boolean custom attributes which I'm having an issue using in cart or catalog price rules. These attributes appear correctly on the product edit pages and can be used successfully ...
1
vote
1answer
75 views

check if product attribute exists in upgradeData.php

I have a custom product attribute named additional_cost. Now I want to delete this additional_cost attribute or I want to update it. In order to do this both I need to first check if this attribute ...
0
votes
0answers
14 views

layer navigation using custom attributes in magento 2

i have to create filters with products attributes in magento 2,from where i can filter my results on category page, as i have already side bar but i want to create something which should be in drop ...
2
votes
1answer
34 views

How can I add State and Country attribute for customer in Admin, Magento2

I need to create State and Country attribute for customer registration and Admin. How can I Achieving State and Country field functionality in Admin under customer Account Information
0
votes
0answers
9 views

Change UI when changing product custom attribute

I just created several custom attributes for my products and added them to the corresponding attribute set. Is there a way to change how the layout of my custom attributes when I try to edit them ...
0
votes
1answer
68 views

Multiselect attribute not showing on frontend when two or more options selected

I have a custom product attribute that uses a multiselect input to select one or more product stockists. The data is being stored correctly, and selecting 1 option adds the information to the "More ...
1
vote
2answers
144 views

Magento 2 product custom attribute source_model outerset attribute not showing in product collection and not working in addAttributeToFilter()

I am creating a custom product attribute in Magento 2 by custom module InstallData.php code following <?php namespace Awa\Brand\\Setup; use Magento\Eav\Setup\EavSetupFactory; use Magento\...
0
votes
1answer
39 views

Magento 2 : Custom module - Shipping per product

I have created custom shipping method named ad My Shipping Method and have created custom attribute named my_Shipping_charge. Both are working fine without any error. Now I want to set condition if ...
0
votes
1answer
10 views

How to hide custom product description tab based on product attribute value?

I've made global product description tab as well as global attribute with yes/no values. Attribute default settings is set to "no". I want to show this additional tab only for products whose attribute ...
1
vote
0answers
27 views

Magento 2 : How to keep the custom form fields filled in case of validation error Magento 2

How to keep the custom form field filled values in registration page. created one customer custom attribute from magento admin (input text field accountnumber). showing this attribute in frontend, ...
0
votes
1answer
43 views

Magento 2 show custom checkout step based on custom product attribute

I'm trying to show a custom checkout step when a product has a boolean attribute that I created. My attribute is showing 'undefined' when I check it with console.log on the step view js. The name of ...
2
votes
1answer
145 views

How custom attribute of “sales_order_item” table will be save also in “sales_order”

I am using plugin for converting "quote_item" to "sales_order_item" from below give code it work. public function aroundConvert( \Magento\Quote\Model\Quote\Item\ToOrderItem $subject, \...
0
votes
1answer
45 views

Attribute not showing category

I am using Magento 2.2 for my store. I have created a custom attribute. I have modified list.phtml and catalog_product_view.xml and I have created a myatrribute.phtml. I have also enabled visible in ...
0
votes
0answers
21 views

how can i update custom attribute value from customer [duplicate]

i need to update custom customer attribute value programmatically, i tried this: public function userapprove($id){ $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ...
0
votes
1answer
42 views

adding custom attribute to category

I'm trying to add a new custom image attribute for category, following the guide here "https://webkul.com/blog/add-custom-image-attribute-category-magento-2/comment-page-1/#comment-16835" However, ...
1
vote
2answers
24 views

Custom Customer Attribute not being read from Request

I'm trying to add a new Custom attribute to the Magento customer model, and I think that I've set everything up correctly from what I've been able to scour off of this website & google, but I'm ...
0
votes
1answer
106 views

How to Filter a Custom Column in Product Listing?

I have created a custom column in Product gird by a module, which shows Parent product's SKU there. It's working fine but when I try to filter it Magento gives "Something went wrong with processing ...
0
votes
0answers
90 views

Product drop down attribute with custom source model not display in layered navigation Magento 2

I have created a product's attribute select type (dropdown) source model of this attribute from custom table. Everything is fine but when I set this display in layered navigation, It's not showing in ...
0
votes
0answers
20 views

Magento2 Product Custom Attribute needs load()

Q1. Why does getData() return null, I need to do load() first? They seem to be the same class type.. function (Magento\Catalog\Model\Product $product): $product->getData('my_attribute_1'); //...
0
votes
0answers
19 views

Magento 2 custom address attribute

I have created custom address attribute "extension" as varchar type through InstallData. I have also added Extension field in customer registration form. Since I want customers to enter some value ...
0
votes
1answer
66 views

How to have 2 different registration forms in one module in magento 2 (B2B, B2C)

Trying to add different attributes to 2 different registration forms. If anyone can advise where i can make this change please ? see below for the file structure that i Currently have: 1. module....
0
votes
0answers
100 views

Magento 2.2 Display Product Custom Attribute in products in Home Page

I have custom attribute called "hasgift" and its Boolean (yes, No), and trying to display it's value in products tab Module in homepage. But Its Only Give Me (No) Vaue. I have Used Same Code in ...
0
votes
1answer
76 views

Magento 2 plugin change price of products that have a custom attribute with

I'm trying to change the prices of products with a plugin. And it works, basically. The problem is this: i only need to change the price of products that have a specific attribute, not the price of ...
0
votes
0answers
10 views

Is it possible to Extract Attributes with its all Values and their value Id's using My SQL in Magento 2

Is it possible to Extract Attributes with it's all Values and their value Id's using My SQL in Magento 2?
0
votes
1answer
26 views

What new tables need to be created when building module for custom attributes?

Magento 2.2 -- I am trying to build a module that would allow for custom attributes to be created in the admin panel. At this point, I'm stuck on what tables need to be created to allow for that ...
0
votes
1answer
23 views

Unable to get custom customer data in a standard manner? [duplicate]

I have added few custom attributes and one of them is is_mobile_verified while registering I dont set any value for this however, while creating the attribute I set default value as 0. now after ...
1
vote
2answers
97 views

Magento 2 get custom attribute of a single product inside a plugin

Hello Everyone :) I'm in a bit of an empasse now: I'm building a module to edit the price of products that have a custom attribute by multiplying their weight by a variable. Now, almost everything ...