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

2
votes
2answers
6k views

Magento 2: Set Custom product attribute value programmatically on product save

how to set custom attribute to a product on save. i have used the event/observer way but nothing works.
3
votes
4answers
19k views

Find the table for custom attribute values

I’ve installed magento edition version 1.9.2.0 and added a custom attribute catalog_special_name (text field) and i want to know which table stores the custom attribute values for each product.
19
votes
2answers
15k views

How to add a customer custom-attribute in the customer address edit form?

I added a customer custom attribute as customer_address type and it runs correctly in the admin and in onepagecheckout as well as in shipping & billing address. I created: my_namespace/my_module/...
10
votes
2answers
15k views

Add Custom attributes to Custom attribute set programmatically

Hi Could someone help me with this? I created a custom attribute set and custom attribute as $installer = $this; /* @var $installer Mage_Eav_Model_Entity_Setup */ $installer->startSetup(); //...
5
votes
1answer
5k views

Magento 2 How to add custom product relations?

I am needing to add another related products attribute to associate multiple other products. I have found a solution for Magento 1: http://inchoo.net/magento/how-to-add-custom-product-relations-in-...
3
votes
1answer
3k 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/...
1
vote
2answers
3k views

Magento2 custom attribute for specific product type

When creating attribute I notice that in magento2 no option for the select product type. i.e I want my attribute will available for configurable product only. But that attribute is visible for all ...
3
votes
1answer
1k views

What model to use to query customer_entity_varchar table in Magento 2?

I have a custom varchar attribute stored on customers. I've been struggling to find the proper way to query for a specific attribute value without going straight to SQL joins. What is the right way to ...
1
vote
1answer
1k views

Need to add custom attribute along with order

I need to set custom attribute along with order, This attribute will have random values with each order, I need to show this value on the sales/order grid in admin.
0
votes
2answers
2k views

Magento 2 csv import : How to escape commas in additional_info?

I am importing products via .csv import. I have an additional_attribute field that contains commas. Commas are the delimiter within additional_attributes, and when i try to import my products, all ...
8
votes
2answers
6k views

Magento2 REST Update custom attributes

How can I update the custom attributes such as description? The following code properly update price and product name, but not custom attributes (unchanged). The new product is created properly with ...
2
votes
2answers
2k views

Magento2 How to add row pattern/dynamic rows to the custom product attribute

Magento2 How to add row pattern/dynamic rows to the custom product attribute. Here is the sample output
5
votes
5answers
5k views

Magento2 : How to update attribute option programmatically?

How to update attribute option (update label for a store) programmatically?
5
votes
1answer
2k views

Custom EAV model in magento 2

How we can create custom Eav entity and model in magento2. I want to create a custom module where new attributes/fields can be created by user. I will use it to show the details in the grid in admin ...
1
vote
2answers
2k views

How to check if custom product attribute exists

I want to check if my custom product attributes exist before I attempt to utilize it in any way. Whats the best way to check it in Magento 2. Note that I don't want to check if specific product has ...
11
votes
5answers
20k views

Magento 2: How to display custom attribute in catalog?

I’ve created a new textfield attribute, with the following settings set to yes: Visible on Catalog Pages on Storefront Used in Product Listing The attribute is assigned to an attribute set and it ...
6
votes
2answers
658 views

Magento 2: Create customer attributes programatically, without install script

How to create customer attributes magento 2 so it works in running script without install script:- /** * @var \Magento\Eav\Setup\EavSetupFactory */ protected $eavEavSetupFactory; ...
4
votes
2answers
3k views

Customer custom attribute not showing in admin form

I successfully add customer custom attribute for magento 2.2.5 like this: $setup->startSetup(); $insertArray = array( 'profile_picture' => array("type" => "varchar", "label" =&...
3
votes
0answers
423 views

Display Custom Attribute in Custom Tab [closed]

I have a module which use to add a custom tab in customer section in admin. I have created custom tab successfully. Now I want to add some custom attributes that I have added through installation file ...
3
votes
1answer
1k views

Magento 2.1: Add custom category attribute to topmenu classes

I have created a custom category attribute and it saves correctly in the database. I am now trying to add this attribute's value to the topmenu. So I have created Topmenu.php in my module (...
2
votes
5answers
8k views

Set value to created customer custom attribute in magento 2

I have created custom attribute for customer using below code. setup/installData.php class InstallData implements InstallDataInterface { const LEGALITY_DOCUMENT_1 = 'user_legality_document_1'; ...
2
votes
1answer
3k views

Display custom attribute on “Customer's Dashboard ” and “Edit Account” in Magento 2.0

I know this might have been probably asked before but through out the net I didn't get a single proper working post to my problem. Hence thought of asking it myself. I have created a custom field "...
1
vote
3answers
4k views

How do you add a custom attribute to the customer grid in adminhtml (Magento2)

Seriously why is this such an exercise in frustration? I've added my custom customer attribute using the EAV model, the PROPER way. I'm able to save this attribute when I save a customer. I've ...
0
votes
1answer
2k views

Magento2: Category Select Attribute Not Saving?

I've registered a custom select option to my categories using the files below in my module. The select option appears in the backend with my custom options however it doesn't save the selected option ...
0
votes
1answer
927 views

join customer custom attribute to order collection

I'd created a custom attribute for customer and in order collection I need to show that attribute. How could I do that? for now I'd got the order collection as $collection = Mage::getModel('sales/...
4
votes
4answers
6k views

Product custom attribute import with CSV Magento 2.2

I am trying to import product with CSV in Magento2. In first case all attributes are default attributes so import works fine. Now In second case I have added some custom attribute in my Magento 2.2 ...
4
votes
3answers
3k views

Magento2 : Custom Category Attribute value Not Saving?

I've create a module to add a custom attribute to my categories, however my code doesn't seem to be creating the attribute in my eav_attribute table, the field shows on my category pages but it doesn'...
4
votes
2answers
4k views

How to create a customer programmatically with custom attributes in Magento 2?

I would like to create a customer account programmatically in Magento 2.0.4. I just have one problem. I don't know how to persist custom attributes. With following code, I got response that my ...
4
votes
2answers
3k views

How to save custom attribute value in customer entity table using controller

I want to save value in customer entity table in this table. I created one custom field & I want to save value in custom field using controller. But it is not working. How is it possible? ...
3
votes
1answer
5k views

Magento 2 - Save additional data to order

I am trying to build an extension that will check if a specific cookie exists at the time an order is being placed. If the cookie does exist, I would like to save its value to the order in the ...
3
votes
2answers
89 views

Magento 2 Plugin Not Extending Model - Finally Solved It

I'm trying to use a plugin from the answer on this question Add additional select attributes to grouped product's child collection I would go back and ask the person who answered but I don't ...
3
votes
2answers
616 views

Customer Registration Custom attribute value not saving in database

I was trying to add new custom attribute in customer registration. Field's value do not save in database. Please can anyone help me?
3
votes
1answer
2k views

The configuration parameter “formElement” is a required for custom attribute product field

I just add custom attribute to my product like this: <?php namespace Namespace\Module\Setup; use Magento\Customer\Model\Customer; use Magento\Customer\Setup\CustomerSetup; use Magento\Eav\Setup\...
2
votes
1answer
996 views

Issues with adding image attribute to category - Magento 2

I've added attribute to my category following this guide (https://belvg.com/blog/how-to-add-image-attribute-to-a-category-in-magento-2.html). Looks like I am on right way, but when I try to upload ...
1
vote
1answer
872 views

Magento 2: How to add a custom attribute column to the child products grid view in configurable product in backend

I need to add a custom attribute column to the child products grid view in configurable products in backend. My initial findings: Added 2 custom attributes(similar to the sku) to the products and ...
1
vote
0answers
367 views

Unable to save Created attribute

When trying to create and save a new Attribute set. I am presented with a message saying "ATTENTION Sorry, we're unable to complete this request." when trying to save. Preconditions: Magento CE 2.1....
1
vote
1answer
390 views

How to add href to custom attribute in customer grid?

I have created the custom attribute to upload the business proof file during registration. I am able to store the file in /pub/media and file name in Database and the file name also displaying in ...
0
votes
1answer
133 views

Which Attribute Type for layered nav and filterable numeric value

I would like to put an Attribute called "Volume" to my Magento Online Shop. Products should be sorted by this attribute and it should be filterable through the layered navigation. since text ...
0
votes
2answers
2k views

Show brand attribute in product listing

I would like to show the Brand attribute under the product name on the listing page. Attached is a screenshot for reference.
0
votes
0answers
149 views

Magento Customer Grid Custom attribute can't export csv and export xml

Magento Customer Grid Custom attribute can't export csv and export xml, Showing error, how to add custom attributes to the customer export. PHP Fatal error: Uncaught TypeError: Argument 2 passed ...
0
votes
1answer
478 views

How to move products Attributes block after price

How do I move or show the product attributes currently showing at More Information to after the Price and Availability In Stock. Here is the piece that shows the product attributes under More ...
0
votes
5answers
110 views

For each loop running only once

In the below code, where I am trying to update a custom attribute called branding. The for loop is running only for one iteration and stopping. It is updating only the first product in the list and ...
0
votes
1answer
345 views

problem in retrieving custom customer attribute

I created a custom attribute for customer module using below install script: <?php $installer = $this; $installer->startSetup(); $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $...
0
votes
1answer
83 views

How to save serilized data in product's text backend_type custom attribute

I'm working in Magento 2.2.5. Basically, I have created a custom product attribute serilized_data with text as backend_type by using below file and want to save custom options of product in this ...