Questions tagged [eav]

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

Filter by
Sorted by
Tagged with
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 ...
3
votes
1answer
2k 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 ...
19
votes
3answers
4k views

Property does not have corresponding setter in class Magento\Quote\Api\Data\AddressInterface while change checkout step

1 - I add a eav attribute to customer_address $attributesInfo = [ 'reference' => [ 'label' => 'Reference', 'type' => 'varchar', 'input' => 'text', ...
3
votes
1answer
2k views

How to save values in Custom Entity table - Magento 2

I have created a module in Magento 2 which has EAV structured tables. Created the tables and attributes by Install Schema. But I am not able to save values in to these tables. My tables are ...
3
votes
1answer
249 views

EAV default attribute value not taking effect

I'm trying to update an EAV attribute's default value, but the new default is not pulling through. The attribute is 'include_in_menu' => array( 'type' ...
1
vote
1answer
3k views

Magento2: How to remove created eav attribute for which is added through InstallData

I have created one product attribute which is not implemeted correctly giving error while add new product in admin , so I want to remove it , I have uninstalled , deleted the module but attribute is ...
1
vote
0answers
33 views

Magento 2: Should we use API in setup as best practice?

Some time ago I opened an issue on magento2 about a possible problem I've spotted in Magento EavSetup class. In the discussion that follows some Magento devs are saying that for module setup (...
0
votes
2answers
446 views

Magento 2.1 creating attribute through eavSetup gives incorrect data on attribute getData()

I'm creating a catalog_product attribute programmatically; $attributeData = [ 'type' => 'varchar', 'label' => 'Test attribute', 'input' => 'text', ...
4
votes
2answers
1k views

Magento 2: Schema Changes for EE Catalog Staging

Does Magento 2's "EE Catalog Staging" feature rename the entity_id column of the catalog_product_entity_datetime table to row_id? An old client recently reached out to me to say, after upgrading to ...
18
votes
3answers
6k views

Magento 2: What is the difference between the row_id and entity_id in the %_entity tables?

In Magento 1, there wasn't a column called row_id in the entity tables, you just had the entity_id: CREATE TABLE `catalog_category_entity` ( `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT ...
0
votes
2answers
233 views

Categories are not appearing when click on Manage Categories showing Error Source model in the Admin Panel

I'm into big trouble today and for the last 24 hours I'm trying to fix it up with one of my production site. I had uploaded a theme but theme didn't work as expected so I deleted the theme and all its ...
2
votes
0answers
174 views

How enterprise magento2.1 stores product attributes with schedule updates? (row_id)

In Magento2.1 enterprise, schedule updates has been introduced, which changes the table schema of product & other cms page. Take product attributes as example, a column "row_id" has been added to ...
0
votes
1answer
363 views

Why so many tables for single entity in EAV model [duplicate]

In magento EAV model, I want to know why we need to create so many tables depending upon data type? And, how we going to use it?
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 ...
1
vote
1answer
119 views

Why entity values are stored in different tables based on attribute type?

The values of customer entities stored in different tables based on the attribute type ex: customer_entity customer_entity_datetime customer_entity_decimal customer_entity_int customer_entity_text ...
3
votes
2answers
331 views

How to add custom entity from admin in magento

I am working on a project where I need to add a custom user from the magento admin panel. This user cannot purchase the products. He can only login to his section and write reviews on products or ...
0
votes
1answer
264 views

How to change the page title of product list pages

I have a list of titles I want to overwrite the default page title on multiple product list pages with (title tag in the html head). But not on the product view page, only on the 'product list' page. ...
2
votes
0answers
68 views

Non default store_view's product attribute value is not visible on frontend (product list) if store_view 0 EAV value is missing

Scenario: A Magento 1.7 store which has NO default values at all for some product attributes (like short_description). There is no entry in catalog_product_entity_text for store_view==0. (Even NO ...
0
votes
1answer
1k views

How to solve Fatal error: Class 'Mage_Eav_Model_Entity_Setup' not found in /includes/src/Mage_Core_Model_Resource_Setup.php error

Yesterday I changed my index.php file to make it available to the specific IP addresses written in the Developer options of the Admin Panel. I changed if (file_exists($maintenanceFile)) { to if (...
2
votes
1answer
441 views

Prevent saving the default value for category attribute

My module adds a custom dropdown attribute to categories. This attribute has many possible values, but in most cases (~90%) users will leave the default value in the attribute's field. I want to make ...
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; ...
11
votes
3answers
4k views

Right way to implement getExtensionAttributes()

I was wondering, what's the right way to implement an extensible EAV model. I see that in Magento\Catalog\Model\Product, the method getExtensionAttributes() is implemented like this: public function ...
1
vote
2answers
6k views

Magento2 Upgrade Data script for custom module

I am working on installer and upgrade script of Magento 2 In which my InstallSchema, UpgradeSchema and InstallData scripts are working but UpgradeData.php is not working. Please check the following ...
1
vote
1answer
418 views

how magento stores product details in multiple websie store?

how the product details are stored for each store and website? is magento clones product details for every store, websites separately OR it done by field values of the product tables. because we ...
0
votes
1answer
214 views

Can virtual types be used as source models for EAV attributes?

I'm creating my own EAV entity and one of the attributes of my entity has the type select so it requires a source model. But I don't want to create my own class just for this attribute since I already ...
4
votes
2answers
753 views

Difference between position and sort_order in customer install script

I'm trying to understand how the install works for EAV entities in Magento2. I see that in the installEntities method from the Magento\Customer\Setup\CustomerSetup class, the attributes have 2 fields ...
7
votes
2answers
3k views

Attribute property 'system' - what it exactly does

'system' => 0 What that property of (product - only?) does or means? I've noticed that all built-in Magento attribute has it with value 1. So my custom attributes should have 0? is it only for ...
2
votes
1answer
390 views

Removing an EAV entity

I'm creating a CRUD module for Magento2 with an EAV entity. My first step is to install and uninstall the module. My EAV entity is similar to products, categories and customers. The install script ...
3
votes
1answer
5k views

Get `entity_type_id` by `entity_type_code`

As the title, states, how can I get entity_type_id by entity_type_code in Magento 2? I've looked in the source code, and the only thing I found was Magento\Eav\Setup\EavSetup->getEntityTypeId, ...
3
votes
1answer
4k views

Magento2 | How to save EAV attribute in Customer Address?

I want to add 'district' field in customer address. First, I added the EAV attribute in customer_address. UpgradeData.php public function upgrade(ModuleDataSetupInterface $setup, ...
4
votes
4answers
28k 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.
2
votes
1answer
427 views

Customer address attributes of type datetime and decimal cannot be cleared from the admin

I have added custom datetime and decimal attributes to the customer address entity using update scripts such that they can be edited via the admin. Although it is possible to add or update the ...
2
votes
0answers
355 views

How to inject EAV attribute to product model before loading it in Magento 2?

I want to always add a specific EAV attribute to the Product model whenever a Product model is loading. As an example, I always want to include vendor_name and brand_name EAV attributes to my ...
3
votes
2answers
2k views

How to get the value of an EAV attribute from a model class in Magento2

I have got an object of this model magento/catalog/model/product and I want to use one of the EAV attributes values of it. How to access this EAV attribute through model object.There is no issue with ...
1
vote
1answer
1k views

How Can a product model get its eav Attribute in Magento 2

I added a custom field to product in admin panel named vendor_name So I wanna get value of this field by do something like $_product->getVendorName() Like what I can do with non eav attribute (...
2
votes
0answers
739 views

How to set input renderer on attribute for custom entity?

I'm trying to use an input renderer for a text attribute in my custom entity, however it doesn't seem to be working. I'm creating my ambassador entity in my setup file like this: <?php /* @var $...
1
vote
1answer
68 views

Select attributes with numeric labels

I believe this is a core Magento bug, but thought I'd come here to ask for some suggestions anyway. I've got an attribute, let's call it colour_code. It's a select attribute (backend is int) and it's ...
12
votes
1answer
6k views

When we look at an eavSetup what values are available for type and input?

When creating an install script for Magento 2 what values are available for the type and input parts of eavSetup->addAttribute()? Or where could I look to find out? $eavSetup->addAttribute( ...
7
votes
3answers
7k views

What are entities in Magento 2?

Entities in Magento 2 are like: Product is an entity? Order/Sale is an entity? Customer/Users/Clients is an entity? etc?? Where can I find a list of all entities? Are they declarated in the DB? For ...
0
votes
1answer
48 views

Convert flat module to eav module [closed]

I have a flat module on my site, which doesnt have store view switcher on add/edit page. I want to enable store view switcher on these pages so i tried to add a field using tabs ( admin html ) but it ...
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 ...
1
vote
1answer
384 views

Eav Model relationship

I am trying to create an eav attribute model. I create one for blog its working good as long as it has individual entity. Now my question is how I can implement relationships using eav model. for ...
2
votes
1answer
327 views

Is the EAVCleaner Extension safe to Use on my Magento installation?

Project GitHub Repository: https://github.com/magento-hackathon/EAVCleaner Has anyone used these cleaners before? I think this application is excactly what we need, but I am unsure how to know for ...
1
vote
0answers
108 views

Magento2 and custom entity options

I'm trying to add a custom attribute to order entity. I managed to add a column to sales_order, but I cannot save any value while placing the order. I tracked down the problem in: Magento\Framework\...
0
votes
2answers
1k views

Get attribute option value from option_ID [duplicate]

I'm getting the child products of a configurable product through this code $childProducts = Mage::getModel('catalog/product_type_configurable') ->getUsedProducts(null,$...
0
votes
2answers
854 views

How to use expression values in where condition?

How to do that in magento model way Select sum(qty + product_id - any_other_columns) as total from table2 where total>10;
0
votes
2answers
3k views

Magento2 - Can not save value of custom column in table customer_entity

I want to add new column, let's call it test, to customer_entity table. I managed to add the column to the table but values aren't saved for this column when I write something like: $customer->...
1
vote
0answers
721 views

Invalid entity_type specified: opco_planner_theme

I try to create EAV planner module. I am getting this error "Invalid entity_type specified: opco_planner_theme". All i want to understand why. class Opco_Planner_Model_Resource_Theme extends ...
1
vote
3answers
6k views

Get custom category attribute value

I have created a custom category attribute using this tutorial http://gauss-development.com/blog/tutorials/adding-custom-category-attributes-magento/. <?php $installer = $this; $installer->...
5
votes
2answers
2k views

“Undefined Index Notice” in EavAttribute.php when adding a swatch option

I am using Magento 2 and I created an attribute called hair_color that is of a visual swatch input type. I have inputted 140 swatch options for this attribute, but on the 141 I keep getting this error:...

1 2 3
4
5
8