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 [eav-attributes]

Questions about Magento's Entity Attribute Value (EAV) implementation

3
votes
1answer
28 views

Magento 2 - Add Customer Attribute with Select Field

I'm trying to insert a customer attribute in magento 2 This is the InstallData script: use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use ...
0
votes
0answers
38 views

Export functionality not working properly with EAV UI Grid

I have added Export button on UI grid in my custom module. Module is create with EAV structure. But when i try to export in CSV only ID Column's data is export, Other column's data are missing. I ...
2
votes
1answer
23 views

How to update existing entity type values in Magento 2?

I created custom entity type which existing in eav_entity_type table. But, I want to update value of entity_model, attribute_model & etc. How to update it? Any help would be appreciated.
2
votes
0answers
24 views

Magento 2: Custom product attribute in FinalPrice afterGetValue

I have created a plugin to modify the final price with afterGetValue. <type name="Magento\Catalog\Pricing\Price\FinalPrice" shared="false"> <plugin name="my_module_plugin_product_price" ...
2
votes
1answer
82 views

Magento 2 : addAttributeToFilter, addAttributeToSelect, addFieldToFilter not working

I created eav entity module. But, when I use this addAttributeToFilter, addAttributeToSelect, addFieldToFilter function in my custom module collection. It's not working. My collection file : I ...
5
votes
1answer
35 views

How to use custom source model in eav_attribute

Ho can I use a custom source in the source_model of the eav_attribute table? Thats my source * * @category Mcas * @package Mcas_Industries * @copyright Copyright (c) 2019 * @license http://...
0
votes
2answers
41 views

How to set value for radio button in EAV attribute of product type?

We can add simple boolean Radio buttons as EAV attribute in install schema by this code: "type" => "int", "backend" => "", "label" => "Test", "input" => "...
2
votes
1answer
28 views

Adding data to EAV attribute deprecated

I have an existing module with code like this: $attribute = $customerUpgrade->getEavConfig()->getAttribute(Customer::ENTITY, 'my_custom_attribute') ->addData([ 'attribute_set_id' ...
1
vote
1answer
118 views

Attempt to load value of nonexistent EAV attribute for entity type Magento\Catalog\Api\Data\ProductInterface magento 2.3

Actually i am getting this error while editing products from product grid magento2.3 Actually i deleted some custom attribute using code as well as manually from backend after this i got ...
0
votes
1answer
50 views

Error after creating boolean attribute magento2

I have created a boolean attribute using below code. $setup = $this->_objectManager->get('Magento\Framework\Setup \ModuleDataSetupInterface'); $eav_setup_factory = $this->...
3
votes
2answers
86 views

Which entity allows scoped attributes?

/vendor/magento/module-eav/Model/Entity/Attribute/ScopedAttributeInterface.php There are 3 defined scopes /** * @api * @since 100.0.2 */ interface ScopedAttributeInterface { const ...
0
votes
0answers
47 views

Magento2 - category update attribute and add attribute not working together?

I need to change existing category attribute code from "thumbnail" to "thumbnail_migration" and just after that create a new category attribute with name "thumbnail". In upgrade data I have ...
1
vote
0answers
46 views

Error with Magento\Eav\Model\Entity\Attribute how to fix?

I have this error, 1 exception(s): Exception #0 (Exception): Item (Magento\Eav\Model\Entity\Attribute) with the same ID "87" already exists. it seems to me that there must be a duplicate row ? But ...
0
votes
0answers
22 views

“Custom Attribute” is a required field Error Message - Custom customer Attribute on register user

Hello I added an custom customer attribute "kndnumber" to my register page. Attribute is successfully created in DB. My Problem is when I submit the user register request the error Messsage "...
0
votes
0answers
22 views

Attribute Filter Not Working in Magento 2

I have two attributes option_id. 141, 633. I need to get the attribute_id for those attribute option id value and get attribute_code. when I loop the one option id at a time the below code is working ...
1
vote
0answers
14 views

Is it possible to reduce the default varchar size in catalog_product_flat? (M2)

I have a seemingly common problem. With too many custom attributes that are necessary and no way to change them in a way that would make the use of the default flat catalog possible I am searching for ...
0
votes
1answer
195 views

Update attribute Option label with id magento2

I am trying to update attribute option label with attribute optionid. Used below code. class Attribute { protected $eavAttributeFactory; public function __construct( \Magento\Eav\Model\...
0
votes
0answers
20 views

How can I get rows from the eav_attribute_option_swatch table

How can get some rows from the eav_attribute_option_swatch table ? Is there a model that I can use, if so how do i use it. Maybe there is something like get entity by id. (I have the option_id of ...
2
votes
2answers
223 views

Migration : Incompatibility in data. Source document: eav_attribute_group

I face issue when migrate from Magento 1 to Magento 2.3 Incompatibility in data. Source document: eav_attribute_group. Field: attribute_group_name. Error: The product attribute set "Testing" does ...
0
votes
0answers
72 views

Call to a member function isStatic() on boolean in vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:483

Whenever I run bin/magento indexer:reindex I'm faced with the following error: PHP Fatal error: Uncaught Error: Call to a member function isStatic() on boolean in /var/www/public/vendor/magento/...
1
vote
1answer
83 views

How to change the Scope of a product system attribute like Status from website to global - Magento 2.2.5?

In my Magento 2.2.5 store, how can I change the scope of one of the product system attributes e.g. Status. There is a is_global field in the table catalog_eav_attribute. Do I have to change is_global ...
1
vote
1answer
460 views

Magento 2 attribute backend_type static vs varchar

Is Magento attribute value saved in database table static and varchar identical? when and why to use static backend_type instead of varchar?
2
votes
2answers
277 views

Customer custom attribute not being saved

I'm using magento v2.5 and i tried to create customer programmatically from frontend and backend, i share the same code between frontend and backend, after customer being save then i try to save the ...
2
votes
1answer
311 views

get eav attribute collection Code format in Magento2

I am migrating m1 code to m2, below is the code i used in m1 to get eav collection. $customerattrs = Mage::getModel('eav/entity_attribute')->getCollection(); $customerattrs->...
2
votes
0answers
63 views

Add one more data to the magento 2 eav_entity_type table

I am trying to add quote_address resource model to the eav_entity_type table, and add two eav_attribute to it, but not being able to do it. Following is my UpgradeData file under the setup folder of ...
2
votes
0answers
103 views

How to use modifier in product_action_attribute Form?

I have created an eav attribute and modified the field inside edit product form, that was easy. But in products mass action (Update attributes) page, the field I have created, by eav Attribute and ...
0
votes
1answer
98 views

Magento 2 Where is Product attribute Website_id stored in DB?

In Magento 2, when editing a product, we can choose which website this product belongs to. But I can't find where is this information stored in the database. I have checked eav_attribute, and I found ...
1
vote
1answer
294 views

Custom customer attribute not saving

I have created a custom customer attribute using the following code: <?php namespace MyNamespace\AccountActivated\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; ...
1
vote
1answer
532 views

Magento2 custom attribute default value

Are default values for custom attributes taken into account at all? Create a yes-no/dropdown/text attribute, set a defautl value, add it to an attribute set. Open a poduct to edit it. Expected ...
1
vote
2answers
1k views

Magento2 : user define customer attribute not save value while create / save from admin

I have created two customer attribute one "abc" and second is "xyz" this two attribute display properly in customer admin. also attributes are created in database table "eav_attribute". But while save ...
0
votes
2answers
180 views

Magento 2.2 - Load eav attribute data for every product on collection load

I've created a multiselect custom eav attribute based on a flat table, so I used a dataSource, for a product everything is working fine, API (SOAP & REST), display on the product page etc but I'd ...
0
votes
2answers
101 views

Magento error : when creating attribute

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bikeplus`.`eav_attribute`, CONSTRAINT `...
0
votes
1answer
455 views

Pull custom customer attribute and send in email? Magento 2.2

I am working in Magento 2.2 and I am using an extension which allows the site admin to confirm new accounts before they are active. The extension can be found here: https://github.com/enrico69/...
3
votes
3answers
1k views

Set custom address attribute value programmatically

I'm using Magento v2.1.6 and I have created a custom attribute for customer address like this: $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer_address'); $...
1
vote
1answer
337 views

Magento2 How to get the default attribute set id for Customer?

How to retrieve default attribute set ID for the customer? And also is it possible in the practical scenario to have multiple attribute sets for EAV entity type Customer? I know in the case of entity ...
1
vote
1answer
207 views

Hide EAV custom field

I've create a custom attribute for the customer_address. It is at backend: $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]); $customerSetup->addAttribute('...
1
vote
1answer
129 views

SQL query: getting customer attributes (M1) - This type of clause was previously parsed

I'm trying to output customer information: total sales number of orders email dob phone firstname lastname country state zip code I am using this to create custom reports using this plugin: https://...
0
votes
0answers
121 views

Custom attribute on address but only for shipping address

What I need to do is add a custom text input to the shipping address. To create a layout/template for this task is not works, because shipping_address not call getChildHtml method. Now I've added a ...
1
vote
0answers
222 views

Magento 2 - How to create custom EAV entity with backend crud operations

I want to create custom EAV entity module with back-end crud operations like in Magento default Product Attributes functionalities. So i can create new attribute multiselect, dropdown, text and etc.. ...
0
votes
1answer
270 views

Magento 2 : How to get product attributes in my module block function which are visible on frontend?

Issue is I am getting all the attribute collection not the attributes which are visible on frontend I am unable to filter them as the data which is coming is from Table: eav_attribute from there we ...
0
votes
1answer
29 views

Create an auto reference number for every magento order id (for courier billing purposes )

I want to create a reference number for every Magento order that comes, which I want to use for courier billing purposes. A reference number will be additional security for me for courier billing ...
1
vote
2answers
640 views

Magneto2 : Add color swatch attribute option with colorcode value programmatically

I am working on Magento 2 and want to add custom color in color swatch attribute option programmatically. I have gone through this post but unable to add options Can anyone helps me to add custom ...
1
vote
0answers
85 views

Missing eav attribute options in collection

I miss some custom attribute options in my collection. I'm using the standard "\Mage_Catalog_Model_Product_Type_Grouped::getAssociatedProducts" method. When I debug the collection inside that method ...
1
vote
3answers
7k views

magento 2 Get attribute option label by attribute option Id?

magento 2 I would like to get an attribute option label by attribute option id. For Example:- attribute option value : 53, attribute option label/text/name : green from the above scenario i want ...
5
votes
1answer
2k views

Magento 2 : How to know “used_in_forms” param of eav attribute for a form?

I was wondering if there is a full proof method for finding all used_in_forms params of eav attribute which is specified in InstallData.php to create all kind of attributes for a form or maybe ...
0
votes
3answers
1k views

Magento 2 Can't add Attribute option upto 100 ? Is there any limit for the option?

I have an issue with the product options. There are 500 option for the attribute but can't add after 100 options. Can you please let me know about this issue? The Product Attribute is successfully ...
5
votes
2answers
565 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; ...
0
votes
1answer
141 views

Resolved - M2: user creation fails with “class does not exit”

Magento 2 site, that had data transferred from a Magento 1.9 site. When attempting to create a user, it fails with: Class Magento\Eav\Model\Attribute\Data\Datetime does not exist There are no ...
1
vote
0answers
115 views

Magento2 custom EAV in ui component listing

I created a custom EAV for my module. Now I want to show all the columns in my **ui_component** listing. But only the field from my **main** table can be displayed. How do I get all the other field ...
1
vote
0answers
50 views

Add internal code to Eav Attribute option?

I am new to Magento 2. All my data comes from an external db. Before importing my products into Magento, I want to prepare the environment. I am currently trying to set up custom EAV attributes with ...