Questions tagged [eav]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
124 views
+100

Magento 2: Keep use default value when Updating product attribute programmatically in store view level

I have a dropdown product attribute in store view level that i need to update programmatically for specific store: I tried to update the product attribute programmatically like this: // \Magento\...
1
vote
2answers
2k views

Magento 2: addAttributeToFilter not returning any results

When I use addAttributeToFilter on Magento\Catalog\Model\ResourceModel\Product\CollectionFactory, with a custom attribute, I always get 0 results. use Magento\Catalog\Model\ResourceModel\Product\...
1
vote
1answer
6k views

Where the actual data of custom attribute is stored in magento 2?

I have added a custom attribute in existing table catalog_category. The following code i have write in InstallData.php. namespace BelVG\AdditionalImageTemplate\Setup; use Magento\Framework\Setup\...
0
votes
0answers
8 views

Custom customer attribute search not working in admin

I added an attribute to customer, but when I try to search values of customer code on the backend, nothing comes up. I can't get my customer attributes to be included in search. What can I do to get ...
1
vote
2answers
1k views

What is the difference between eav/attribute and eav/entity_attribute?

Looking at eav_setup file and trying to understand the difference between the eav/attribute and eav/entity_attribute table. If I have to guess, eav/attribute is the entity that represents the concept ...
2
votes
1answer
801 views

How do you manually create an EAV attribute on Magento 2.2?

I have been fighting with a module with an InstallData.php that will not execute on Magento 2.2.1, but I need to get this task done today. For the meantime, how can I create the needed category ...
0
votes
0answers
19 views

Move Attributes from attribute group to Unassigned Attribute programmatically

Im trying to move attribute from Attribute group to unassigned, (should reflect in all attribute sets) in my controller. I tried below code by its not removing, instead its deleted. $eavSetup = $this-&...
1
vote
2answers
5k views

Set default value for attribute in Setup Script in Magento 2

I have created install script to add an attribute to category. Default value has to be set, thus 'default' => '1', is used. InstallData.php file: public function install(...
0
votes
0answers
21 views

Filter product collection with nested OR/AND statements

I want to make a query as below WHERE manageStock = 0 OR (manageStock = 1 AND productStatus != 0) OR (manageStock = 1 AND backorderStatus = 1) but I can't use $collection->getSelect()->where() ...
0
votes
0answers
18 views

Missed fields at listing page, custom EAV

I've created custom entity (EAV). I could see all fields on edit page. app/code/Klever/ProductPricing/Controller/Adminhtml/WallMaterial/Edit.php public function execute() { // 1. Get ID and create ...
0
votes
1answer
32 views

How to get attribute group name by id

How to get attribute group name by attribute group id <?php $attribute_group_id = 2; /// this is group id echo likeGetnameforthis($attribute_group_id); ?>
29
votes
1answer
1k views

Magento Profiling - Why so many EAV: Magento\Eav\Model\Config::getAttribute?

I'm just reviewing the speed of a store and just wondering if anyone knows more about why I have over 100 EAV: Magento\Eav\Model\Config::getAttribute 0.006978 rows within my profiler. It's just I do ...
0
votes
0answers
18 views

Declare extension_attribute.xml for EAV?

I created some attribute for the customer entity, so I used a data Patch to declare the new attribute (it's then an EAV attribute) and assign the attribute group and attribute set. Everything works ...
10
votes
2answers
16k views

Magento2 Adding Custom Order Attribute

How would I add a custom attribute to an Order in Magento. It seems clear for Product and Customer, but I can't find any info for adding extra attributes to orders.
4
votes
1answer
2k views

How to get custom attributes from customer via SOAP API?

I have a few custom attributes to extend the customer with bank account information. The attributes are stored in mage_eav_attribute table. How can I get them via the SOAP API?
0
votes
1answer
21 views

Magento 2 - Install category attribute not work

I created a custom form for creating some attributes for the category. My code is this but it doesn't work: InstallData.php <?php namespace Create\Attribute\Setup; use Magento\Framework\Module\...
0
votes
1answer
20 views

Filter a collection with a custom attribute

I'm trying to add a custom attribute to the customer_entity table and then sort the collection with that custom attribute. So far I've tried using etc/db_schema.xml to add a column to the table, and ...
2
votes
2answers
3k views

Make Magento 2 Product Attribute Read-Only

In Magento 1, we used the lockAttribute($attributeCode) method from a catalog_product_edit_action observer, and it prevented the admin user from editing that particular attribute. See Read-Only ...
0
votes
0answers
9 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
2answers
2k views

Magento 2 product price different on catalog page and on product page

I made a script for updating the price for a product using simple SQL queries, and I - expectedly - missed something, and now I have different price on catalog page and on the actual product page for ...
0
votes
1answer
65 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
25 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 ...
3
votes
3answers
7k 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 ...
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
1answer
336 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
1k views

Should I disable flat catalog?

My Magento store has around 60,000 products. We use flat tables. We are in the process of separating them into different attribute sets, and are adding lots of new attributes to assist with filtering ...
2
votes
2answers
84 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 ...
7
votes
1answer
779 views

Sales flat order: ext_customer_id, ext_order_id

Does anyone know what the purpose is of the order attributes "ext_customer_id" and "ext_order_id"? The Magento code appears to introduce these attributes and they appear on each order, but never ...
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): ...
3
votes
2answers
2k views

How to create text swatch programmatically?

How to create text swatch programmatically? If, I follow method from saving controller in the product-attribute module (admin) then, I got first and the third field saved but not actual text swatch.
0
votes
1answer
23 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
62 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
27 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
41 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 ...
4
votes
2answers
3k 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?
6
votes
6answers
15k views

Magento 2 - Add custom attribute in customer registration form

I want to add a custom attribute in customer registration form. I write a module with the following InstallData.php <?php namespace vendor\TestModule\Setup; use Magento\Customer\Model\Customer; ...
0
votes
0answers
25 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
46 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
61 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
66 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....
2
votes
1answer
1k 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 ...
1
vote
0answers
80 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 ...
2
votes
3answers
2k 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.
2
votes
2answers
679 views

Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute

I'm facing this message in system.log when I open an oreder from the admin panel: MESSAGE: Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of ...
4
votes
1answer
2k 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 ...
2
votes
1answer
1k 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
1
vote
1answer
139 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. ...
3
votes
1answer
1k views

Magento 2: Join EAV attribute from product attribute set on a custom flat table

Hi fellow programmers, I would like to know how to do a join on my custom flat table (i.e. discountrules), I've implemented a generic Repository based on the Pestle archive, which implements the ...
4
votes
0answers
52 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 ...
19
votes
3answers
6k views

Magento 2: Are Flat Tables Still a Thing?

Are flat tables still a thing we need to worry about in Magento 2? I know there's UI where we can turn the flat tables on, but I'm unsure how well they've been tested, and if they're even needed ...

1
2 3 4 5
8