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]

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

0
votes
3answers
16 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
0answers
20 views

“Can't retrieve entity config: eav/” - After migration 1.3 to 1.7

After the migration from Magento 1.3 to Magento 1.7 I get this error when I open orders, products and customers in the backend. The same happens when I add a product to the cart. Below is the complete ...
0
votes
1answer
13 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
0answers
26 views

How can I have a product attribute with a source model as a swatch?

I have a product attribute that I populate from my own custom table, I have a class that extends from \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource to be able to populate my attribute ...
0
votes
1answer
24 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
0answers
17 views

Magento 2 - get EAV value and display it on admin Grid

I added a new attribute to the product table, using EAV method, this attribute named 'user_id' content the ID of user admin ID who's added the product. Now, I need to get the value of this attribute ...
0
votes
1answer
32 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 ...
1
vote
0answers
73 views

Magento 2 : Custom eav type attribute options returns allow memory size error

I created custom eav attribute and set in custom eav type. This is my attribute code : $attributes['custom_country'] = [ 'group' => 'General', 'type' => 'int', ...
0
votes
0answers
15 views

Add Customer Attributes through Admin Form

I'm trying to build a extension where I can dynamically add new Customer Attributes just like I would do with Product Attributes. The thing is that I'm new to Admin Grid and I'm not finding the a few ...
0
votes
1answer
39 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
18 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
66 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
0answers
66 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....
2
votes
0answers
27 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
79 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
292 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
57 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
92 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 ...
3
votes
0answers
90 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? https://www.youtube.com/watch?v=nr8xuFA_XPU This youtube link is ...
0
votes
3answers
73 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
45 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 ...
0
votes
0answers
30 views

Proper way to set default available options for custom Customer EAV attribute?

I have this basic class that I use in my UpgradeData script class Industry extends AbstractSource { /** * Retrieve All options * * @return array[] */ public function ...
0
votes
0answers
41 views

Magento 1.9.2. - Set Order by position attribute value of associated products

I'm trying to order my foreach for the products associated with the configurable product. I would like the values ​​to be printed in ascending order by position relative to the size attribute. At the ...
1
vote
0answers
86 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
15 views

Magento 1.9.2. - foreach remove duplicate from options attribute value

I'm pulling out all the values ​​of the color attribute of the products associated with the product configurable with this foreach. foreach($simple_collection as $simple_product){ echo $...
0
votes
1answer
220 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
0answers
74 views

how to get all the attributes and values for all product entities from product collection model

i have created a custom attribute user_id of [type => int] for catalog_products_entity in my Install Data script $productSetup = $this->eavSetupFactory->create(['setup' => $setup]); $...
0
votes
1answer
124 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
19 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, ...
0
votes
2answers
570 views

Magento 2 How to add custom attribute to customer address and how to insert value in that attribute?

I want to add a new custom attribute to "customer_address" that I did with an attribute installer script, now I am able to see that field in "eav_attribute" table. I have created a module and I have ...
1
vote
1answer
74 views

Magento 2 How to add new address in 'customer_address_entity' from helper?

I am using helper data function to add the new address in customer_address_entity but it is not working. code as below : <?php namespace Name\Module\Helper; use \Magento\Framework\App\Helper\...
0
votes
1answer
198 views

Magento 2 How to add custom field in customer_address_entity table? which will not use for front end or back end

I want to add one custom field in "customer_address_entity" table, for custom module. I have custom module installed. I am trying with "InstallData" script to add custom field. I do not want to show ...
1
vote
0answers
61 views

Magento 2: Good way to modify a custom attribute field dynamically from admin

I have added a custom customer attribute. I need to enable backend validation for this field in registration form, edit customer form, etc. It needs to be required and unique field. Or not, depending ...
0
votes
1answer
32 views

Magento 2: get all values of an EAV

I have defined a custom attribute for my products, and now would like to get a list of all values I have entered for this attribute, not for a specific product, but in general. It is a text field, it ...
0
votes
0answers
24 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 ...
0
votes
0answers
97 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
121 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
0answers
26 views

Use a Data Grid Table to assign values to an EAV attribute in admin

I have a custom attribute for Catalog Categories that represents the IDs of products associated with the category in question (this is a separate requirement from the usual association of products and ...
1
vote
1answer
739 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?
1
vote
1answer
114 views

Product EAV Index never finishes processing

For some reason my Product EAV index never finishes... Well I have left for over two days and it still says Processing... I have 42,000 products in my catalog and 92 attributes. Is this normal? How ...
0
votes
1answer
27 views

magento 2 lost code for EAV attributes

I use git and composer in my project. My flow: 1 Each module has its own git repository. 2 I use composer and install and update modules to my project update composer.json composer update <module ...
0
votes
1answer
116 views

Product Images force default sort value

This question has been asked before, but the answer to it which was updating a UAV attribute did not help. Product images use default value Is there a way to make all store views always use the ...
1
vote
1answer
17 views

Module with cron job to fetch all products where custom attribute is true

I am brand new to Magento module development, and I need some help getting started. My goal is relatively simple: I'd like to create a module which fetches all products with a custom attribute '...
2
votes
0answers
116 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 ...
1
vote
0answers
28 views

Eav Attributes options

Script below add new eav attribute to product model. But who can explain me what mean everyone option in third paramater from function addAttribute() and where it using or give some links where i can ...
0
votes
0answers
98 views

Get attribute value of custom eav model in magento 2

I made a custom eav model follow this tutorial http://techjeffyu.com/blog/magento-2-creating-new-eav-entity-and-model and I made few attributes for my custom attribute also. I don't know why I can't ...
0
votes
1answer
107 views

How to implement a Customer custom attribute using EAV?

Scenario I'm trying to implement a custom attribute for Magento Customer, that should accept boolean values (True/False, Yes/No...). I'm using Magento CE 2.2.4. This is part of a custom Module ...
0
votes
1answer
62 views

Creating admin grid for custom eav model using ui component

I have created a UI component to represent the data in my custom eav model. But it didn't work at all. The spinning animation didn't disappear and my page looks like this I checked all the log file ...
0
votes
0answers
199 views

Create custom EAV model in magento 2 extension

I checked on the https://mage2gen.com/ . They will release the EAV model code generating function in the future. Is there any way to generate custom EAV model automatically when I create a new ...
2
votes
1answer
497 views

Invalid method Magento\Eav\Model\Entity\Attribute::isAllowedForRuleCondition

I am getting an issue on Magento 2.2 when trying to create promotion rule. This error occurs sometimes and the error disappears if run Magento upgrade command. But it comes again sometime.