Questions tagged [eav]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Can I have a required field based on a condition?

I created a new EAV attribute for customer called "existing customer". it's a yes/no question. I have an option that comes up if the person clicks on 'no' called "what are you ...
0
votes
1answer
20 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 ...
0
votes
0answers
20 views

Magento2 - Creating custom EAV entity with Use Default Value

I followed this tutorial to create a new custom EAV entity: https://www.rohanhapani.com/create-eav-module-in-magento-2/ However when using the ui-component edit form, it does not include the checkbox ...
2
votes
0answers
11 views

Basic clarity on some magento default function

I had gone through a interview process. They fired some questions below which I don't know answers and couldn't find in google. The questions are below. How to create a object and why we need to ...
1
vote
2answers
74 views

Magento 2 - Update eav attributes in a other attribute automatically

we have a multi brand shop with 60K+ of products. Every brand has it's own way of dimensions. Which results in an attribute list of 500+ entries. Attribute: POS-size Here is a screenshot of this: But ...
0
votes
1answer
9 views

Custom eav category not showing in data front

I have added an attribute to my category. The attribute is working well on backend (it's showing and saving correctly), but I can't get it on the front. Here's how i've added this (install): ...
0
votes
1answer
20 views

productAttributeOptionManagementInterface api not loading attributes

I use \Magento\Catalog\Api\ProductAttributeOptionManagementInterface in my constructor and since Magento 2.3.5 it doesn't load any attributes.
0
votes
1answer
31 views

InstallScripts vs db_schema for new EAV attribute

I'm in the process of adding new fields to my registration page. I know that we're now supposed to use db_schema instead of InstallScripts, but how can I make sure that they're seen as customer ...
0
votes
0answers
20 views

EAV Extension attributes vs repository

What is the point of Extension attributes? As documentation says "They are used to extend functionality and often use more complex data types than custom attributes". Magento provides nice way to use ...
3
votes
1answer
37 views

What is the difference between the customer attribute properties user_defined and system and what are they used for?

How to create a customer attribute is explained in various answers such as this or this. What they all have in common, is that when creating the attribute its properties user_defined and system are ...
0
votes
0answers
22 views

EAV - Static and Varchar Entity - What is the common between both?

I need a help on one of the following question : Q - EAV - Static and varchar entity type what is the similar in between this ? Both values can be identical for single sites Both values can be ...
1
vote
0answers
36 views

Magento 2 - How to hide/remove custom attribute from backend Account Information tab in customer page?

I have a custom attribute showing in the account information tab page. how can I remove them? Right now I can see the following
0
votes
0answers
38 views

Using EAV attribute as foreign key?

What would be the best way to link products and customers. I want that all products are assigned to customers. So customers can create their own products. As I am new to Magento I can think of 2 ways:...
0
votes
0answers
45 views

EavSetupFactory doesn't exist?

Trying to add a attribute to categories. Setting up install script following this guide: https://devdocs.magento.com/guides/v2.3/ui_comp_guide/howto/add_category_attribute.html and https://www....
1
vote
0answers
72 views

Magento2.3.3 Facing Error during Data migration

I am trying to migartion from Magneto1.9.3.10 to Magento2.3.3 but I am facing error during [Eav Step] data migration like: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does ...
1
vote
1answer
92 views

How to make product specific multiselect attributes on Magento 2.3?

We have a table that has data linked to products. MyCustomDataTable { id, product_id, text_value } We want to be able to search for products using the MyCustomDataTable.text_value value. ...
4
votes
0answers
46 views

magento 2: create custom frontend input type

I need a custom frontend input type which I would call "table": The issue at hand is that I have a customer that has a lot of different attribute sets with even more attributes. And he is in a ...
0
votes
1answer
106 views

EAV indexer optimization: cannot find option

There is a section in the Magento 2.3 documentation that is titled EAV indexer optimization. It says that you should basically disable the EAV indexer, if you are not using a MySQL based search ...
1
vote
1answer
151 views

How to add 'switcherConfig' to a Modifier pool on Magento2

I have custom eav table whose attributes I'm getting dynamically on my modifier pool. But I want to add switcherConfig, as one of my fieldset display is dependent on a selected field value. Can anyone ...
0
votes
1answer
104 views

How to list unused attributes options by sql query

I would like to list all attributes options that our products don't uses. I prefer to use SQL to do that to learn how to work with. Right now i use this query to get the ID of my attributs select * ...
1
vote
2answers
33 views

Magento 2 - read and write new customer attribute

I added a new customer attribute n2gEmails: app/code/Fekete/Newsletter2Go/etc/extension_attributes.xml: <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
0
votes
0answers
20 views

Unable to define customer flat columns using source entity

I'm trying to create a customer EAV which is always either 0 or 1, never null. The main issue I'm having is forcing the column in the customer_grid_flat table to be not nullable. $customerSetup->...
0
votes
1answer
102 views

Magento 2: EAV Attribute is not showing on catalog page

I've made an EAV attribute using an external script but the attribute is not showing on catalogue page. The database has created. I tried to put value in EAV Database but nothing works. Ext_Script in ...
0
votes
1answer
46 views

Magento 2: Call to a member function getEntityType() on null

I'm trying to create a new Eav Entity after this instruction post. Then i got this issue: Call to a member function getEntityType() on null I'm still new with Eav Entity, so can some one help me ...
0
votes
2answers
238 views

Magento 2 : Need to perform clean cache programmatically after records save

In admin side, I want to clean "eav" cache type on records save. I added code in afterSave() function and function also call after save records. But, I think it's not working because, parent afterSave(...
2
votes
1answer
793 views

row_id vs entity_id in magento 2.3 EE

In Magento 2.3 EE, entity_id is missing in EAV tables, instead row_id is available Please explain the difference between row_id and entity_id and the removal of entity_id in EAV tables
2
votes
2answers
1k views

Custom Customer attribute not saving Magento 2.3.1

I have the following code to create a custom customer attribute. <?php namespace Vendor\MyModule\Setup\Patch\Data; use Magento\Customer\Model\Customer; use Magento\Customer\Setup\...
0
votes
0answers
59 views

Magento 2 - join using EAV attribute

I created an EAV attribute on product entity, this attribute named user_id and has the ID of the user who's added the product. After works, I crashed on this point, I need to join tables to get ...
1
vote
1answer
40 views

How is a product name retrieved if the query does not return it in the result set?

I'm trying to get data from catalog_product EAV tables with the following code: $productCollection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToFilter('...
1
vote
1answer
49 views

Needed short explanation

I have read many blogs to understand some of the topics in Magento 2 but still not clear about them. They are as follows EAV Dependency Injection Could anyone please explain them shortly? Thanks ...
0
votes
3answers
208 views

custom table left join with catalog/product

I have a custom table called flagged_products which lists flagged products like this: +-----------+------------+---------------------+ | entity_id | product_id | flagged_on | +-----------+---...
0
votes
1answer
48 views

Can't create custom attribute for order_address

I need to create a custom attribute on the order address to stock my ERP id of the address for a syncing purpose. I've tried to create a Eav in Maru3l/SyncOrchestra/Setup/InstallData.php. I don't see ...
0
votes
1answer
282 views

Magento 2 - Hide/Show custom EAV attribute after if condition

I created a new EAV attribute using this code : 'information', [ 'group' => 'Content', 'type' => 'int', 'default' => null, 'global' => \Magento\Eav\...
0
votes
1answer
40 views

Magento 2 : How to know who admin_user added a product?

I created a new admin_user role, this role has access to the products page and can add a new product. So, I want to save the ID of the current admin_user to know who's added the product. The first ...
0
votes
1answer
200 views

Should Magento\Eav\Model\AttributeRepository save 'used_in_forms' attribute value?

I add EAV attribute to a customer address. I can use \Magento\Customer\Model\ResourceModel\Attribute $attributeResource to save the attribute. According to Magento DevDocs https://devdocs.magento.com/...
1
vote
0answers
65 views

Magento2 Create extra column in eav_attribute and eav_attribute_option table

I have created one extra column in the eav_attribute and eav_attribute_option table. Now I want to store values in those tables when I will create new attributes. Please suggest options.
4
votes
2answers
320 views

Magento 2.3 - Add custom customer entity attribute with service contract

I have some problem to save custom customer entity attribute in database. I've created a Patch to add this attribute to the customer entity. The attribute is shown correctly in the backend, but when I ...
2
votes
1answer
477 views

Magento 2 : Invalid method Magento\Eav\Model\Entity\Attribute::isScopeStore

I am getting an issue on Magento 2.2.6 when trying to save my module record. This error occurs sometimes and the error disappears if run Magento upgrade command. But it comes again sometime. system....
3
votes
0answers
50 views

EAV Model Product - Loading too heavy

Our website's using Magento 2 platform. Number of product and number of product's attributes keep growing faster.It leads to heavy loading when getting product's information(using EAV Model).In ...
1
vote
1answer
324 views

How this InstallData works each line in Magento 2?

My questions: I want know how this works by each and every line of code I want to add new attribute here Difference between InstallData and InstallSchema Here is InstallData.php <?php ...
2
votes
1answer
2k 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 ...
0
votes
2answers
393 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
397 views

Magento 2 : Eav module record can't save in custom module table

I create custom EAV module. app/code/VendorName/ModuleName/Model/ResourceModel/Mainpage/Collection.php <?php namespace VendorName\ModuleName\Model\ResourceModel\Mainpage; class Collection ...
4
votes
1answer
1k views

Magento 2 : How to create an EAV entity module?

I want to create EAV entity module. I refer these below links. I want to do the same in Magento 2. How to create an EAV entity? How to do it in Magento 2? Please help me. Thanks. UPDATE: I can ...
0
votes
3answers
156 views

Set programmatically added attributes to product

I'm writing cron module to import products (Magento 2). In this module I'm adding attribute, attribute value and assign this new attribute value to product. It sounds easy but new added attributes and ...
0
votes
1answer
109 views

Magento 2 - Add a new product attribute with values from DB

I'm looking for creating a custom attribute for products, already have a CRUD module, with name and descriptions fields, so the names from my DB should be options of that attribute. How do I need to ...
1
vote
1answer
737 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
1answer
685 views

How to create a custom tab with custom attributes in Customer admin

I am a beginner in Magento (version 2.3). I am looking for a solution to create a form with custom attributes, which would be displayed by clicking on a custom tab in Customer admin. I have ...
0
votes
1answer
433 views

Magento 1.9.2. - Get Admin value of attribute option in frontend

I'm trying to recall in my configurable product the value of the 'color' attribute of the products associated with the foreach method: foreach($simple_collection as $simple_product){ echo "$...
0
votes
1answer
33 views

Could a hybrid data model, like using JSON in fields, allow us to eliminate the need for EAV within something like magento 2?

I was reading about EAV, and what options are available to avoid the pain caused by it, and stumbled upon using JSON in fields. This mariadb feature page shows an example like, SELECT name, ...

1
2 3 4 5
8