Questions tagged [eav]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
63 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 '...
3
votes
2answers
925 views

EAV (Entity, Attribute and Value) confusion ..?

I have some doubt in EAV. As for as I know EAV is should only be used when you are not sure about number of fields in a table which can vary in future. So eav_attribute table holds the attribute's and ...
1
vote
0answers
34 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
1answer
156 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
1answer
337 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 ...
11
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( ...
4
votes
2answers
648 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 ...
0
votes
0answers
23 views

How to create a new eav attribute in Magento 1 [duplicate]

How can I create a new EAV attribute for customer in Magento 1 using SQL script.
1
vote
1answer
694 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 ...
2
votes
0answers
1k views

How to disable postcode, city and street as required fields in checkout [closed]

We developed a Magento module for creating simple landing-pages for free downloadable products. We programmatically create an order model and save it to the database. As long as we populate street, ...
1
vote
1answer
292 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://...
1
vote
1answer
510 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('...
2
votes
0answers
464 views

Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute

I'm having problems with the VAT field after a customer placed an order and entered a VAT number. Everything appears to be working except when opening an order with a VAT number filled in. The ...
3
votes
0answers
360 views

What is the distinction between defining a customer attribute as “system” versus not “user defined”?

General Context When adding custom attributes to EAV-storage data types such as customers and customer_addresses, two seemingly redundant configuration values are allowed to be passed in: // File: ...
18
votes
3answers
5k 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
1answer
172 views

Special price time dependent on frontend

I am trying to make special price dependent to time on frontend. I have already managed to save the date with time on backend and inside data table catalog_product_entity_datetimethanks to this post ...
0
votes
0answers
485 views

Foreign key constraint fails Entity_Type_ID

Transferring my website database from 1.9.2.2 to 2.2.3 is successful. However if I then export and import again my database with foreign key checks enabled the below error is displayed. -- ...
0
votes
1answer
384 views

Magento 2.2.2 How to implement EAV database structure

Up till now i had been working in (Simple)flat database structure in my custom modules, but now i have to use EAV database structure but i don't have any idea, how to implement EAV structure. Any ...
2
votes
1answer
2k 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
1answer
152 views

How to create an adminhtml grid with custom category attribute?

I am starting my adventure with Magento 2.2.2, so my question may be considered stupid by most of you. I'm trying to write a module, which adds custom category attribute and then displays it on ...
4
votes
1answer
4k views

Add custom field to order in admin backend and allow to change it

I want to add a custom checkbox to all orders that is by default deactivated, allow the admins to change the value of this field in the backend and filter the grid by this! What I have so far is: ...
2
votes
1answer
523 views

Why Magento2 set entity_type_id statically at CategorySetup, CustomerSetup

I am trying to create a custom Eav entity in Magento 2. I have gone through two core eav entity modules in Magento which are Catalog and Customer. There are a couple of things which I found strange ...
0
votes
1answer
368 views

add product attribute from external script

I'm working on a custom import script and I want to check if the product I'm going to import has an attribute that does not exist in Magento, the script will create the attribute use Magento\...
1
vote
0answers
113 views

Magento2 Custom EAV attribute text in layered navigation

Im having multiple custom EAV Attributes which only contain numbers and I want them to be used for filtering in the layered navigation. I got an extra plugin for the layered navigation but I have to ...
2
votes
1answer
596 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
1answer
349 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 ...
5
votes
1answer
625 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 ...
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 ...
1
vote
0answers
180 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 ...
0
votes
2answers
859 views

How to Create custom increment id like sales order increment_id for custom module

I want custom increment_id field in custom module. Like sales_flat_order increment_id. Is EAV table format is best solution?
1
vote
0answers
312 views

Magento 2: Query For Product Attributes, SKU, SetID, AttributeID

I need a full table query of all my SKUs in the following structure. I feel I am pretty close but can't seem to figure out the relationships: valueID = eav_attribute_option_value.value ...
0
votes
1answer
136 views

Why magento 2 Setup/Uninstall Script ONLY deletes modules installed through Composer?

Why Magento 2 Setup/Uninstall Script ONLY deletes modules installed through Composer? I am not able to understand the reason behind this!
3
votes
0answers
266 views

How to create Entity in magento 2?

We have customers,orders,products etc has Entity in magento. similarly i want to create custom Entity Called XYZ. Any Help will be appreciable!!
0
votes
1answer
443 views

Get a value from table 'eav/config' by client id

Code $users = Mage::getModel('customer/address')->getCollection(); $i = 1; foreach ($users as $key => $user) { $id = $user->getId(); $customerObj = Mage::getModel('customer/address')->...
0
votes
1answer
338 views

Steps to change from flat structure to EAV

We're having problems with indexing and I want to see if switching from the flat structure to EAV resolves it. I can't find anything online that deals with switching like this (lots going from EAV to ...
1
vote
1answer
1k views

Magento 2 : EAV Tutorial Needed

In magento 1.9 I created a custom module with EAV models with the help of following tutorial. How to create an EAV entity? Is there any equivalent in magento 2.
0
votes
1answer
88 views

Magento 2: upgrade module with EAV attributes

I am working on a custom module with EAV attributes / models. I have added some attribute in my setup script and the module is installed and working. Now as the requirement changed, I need to add a ...
4
votes
2answers
3k views

Error when creating or editing Products: magesetup/source_revocationProductType not found for attribute “revocation_product_type”

I have the following error when creating / editing Products: a:5:{i:0;s:120:"Quellen-Modell "magesetup/source_revocationProductType" not found for attribute "revocation_product_type" in app/code/...
1
vote
2answers
322 views

Magento 2.1.5 How to create Module which can use Eav functionalities (addAttribute in my case)

I want to make module that creates magento products from xml file. So I have module with command php bin/magento LCB:import path/to/xml. It loads xml file with custom attributes which need to be ...
3
votes
1answer
588 views

Magento 2.1 Dynamic Drop-downs 2 models with UI component

Having 2 Drop-downs where the second one should load options according to the first one selections, but both come from the EAV models, I want to make them work in the admin but I can understand how to,...
2
votes
1answer
973 views

Join eav attributes

Im trying to join attributes in my collection on my grid view of "supply needs" from my ERP (Erp boost my shop) The collection is loaded like this: $collection = Mage::getModel('Purchase/SupplyNeeds'...
35
votes
6answers
6k views

How to create an EAV entity?

How to create an EAV entity? This is a question that pops up a lot on the web. There are some good blog articles that explain how to do that, but none of them are satisfying for me. So I decided to ...
0
votes
2answers
2k 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
1answer
305 views

What are the use of getExtensionAttributes() and getCustomAttribute() in Eav Attribute in Magento2

Using Magento-2.1.3 CE For a purpose,have created a Customer attribute which are using at time of Customer Registration and customer edit page in frontend. On the edit page,i got the error when i ...
0
votes
1answer
576 views

eav_attributes not adding to database with setup:upgrade

I am trying to add some custom attributes to my Category page, without success. I created a custom module with its own setup script, after running: php bin/magento setup:upgrade There are no ...
0
votes
1answer
29 views

Magento2: Eav atrribute magento2 equivalent

What is the equivalent Magento 1 : $tmp = new Mage_Catalog_Model_Resource_Eav_Attribute(); in Magento 2?
1
vote
2answers
108 views

Getting EAV setup to not recreate existing attribute options

Currently I have something similar to the following that creates attributes : // $this->_catalogSetup -> Mage_Catalog_Model_Resource_Setup $this->_catalogSetup->addAttribute( ...
9
votes
4answers
5k views

Why do attribute codes have a maximum length?

When trying to create attributes, I've discovered that the maximum length of an attribute code is 30 characters. Turns out though, that this is NOT actually some sort of real restriction - it is a ...
4
votes
4answers
25k 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.
0
votes
0answers
164 views

Can I use \Magento\Eav\Setup\EavSetupFactory outside of setup install scripts?

Can I instantiate Magento\Eav\Setup\EavSetup outside of setup install scripts in Magento 2? I specifically want to use the function Magento\Eav\Setup\EavSetup::addAttributeToGroup to programmatically ...

1 2
3
4 5
8