All Questions

Tagged with
1
vote
0answers
22 views

row_id vs entity_id in magento 2.3 EE

in magneto 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 enity_id in EAV tables
0
votes
3answers
43 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
17 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
56 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
1answer
20 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
0answers
324 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
250 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 ...
1
vote
0answers
249 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
544 views

Possible to change backend_type of multiselect from varchar to text?

We have a very large multiselect with over 1200 options. If more than a certain number are selected (around 70, give or take the id numbers length), no more additional attribute options can be ...
1
vote
2answers
761 views

Update single attribute value

I'm a Magento newbee so please forgive me if there is ... a crap in the code ... Sending Ajax request with Brand ID and current state "status = 1 or 0" and would like to update state in table: public ...
1
vote
0answers
5k 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\...
6
votes
3answers
234 views

What is the use of the is_data_sharing field in eav_entity_type?

I am looking in the Magento database structure and found the is_data_sharing field in the table eav_entity_type. I want to know what the use of this field is.
0
votes
2answers
46 views

Saving EAV Model Causes SQL 1452 Error

I've recently started learning about creating EAV models. It's been quite the ride so far. Although I feel I'm very close right now. Currently I have created a "Vendor" EAV Model, but when I try to ...
0
votes
1answer
33 views

What is real use of vendor/magento/module-eav/Model/Entity/Increment/ classes

I have found some classes under vendor/magento/module-eav/Model/Entity/Increment/, which use I am not sure. Do they serve for incrementing id's values of new rows in EAV tables? Or this process is ...
0
votes
2answers
3k views

Delete category attribute from the database

In Magento 1 when I wanted to delete a category attribute, I could delete theattribute directly in the database in the eav_attribute table. I've done that many times without any problems. Can I ...
16
votes
3answers
4k 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 ...
1
vote
1answer
116 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 ...
2
votes
1answer
345 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 ...
1
vote
1answer
298 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 ...
6
votes
3answers
5k 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 ...
2
votes
1answer
248 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 ...
16
votes
6answers
33k views

Magento 2 - How to get attribute options value of eav entity?

How can I get the attribute options values of eav entity? I found solution only for magento 1.x but M2 I don't know. M1: $attr = Mage::getResourceModel('eav/entity_attribute_collection')->...
4
votes
4answers
3k views

Magento attribute change backend_type from varchar to text

My product attribute exceeded the 255 character limit of varchar, so I came across the solution to change its backend_type to text. Should this operation be considered safe (in the terms that it will ...
2
votes
4answers
2k views

get the deleted attribute back to the live site

we missly deleted the attribute : "age" from live site. attribute code : "age" attribute label : Age group we assigned this attribute to thousands of products. is there any option to get that ...
0
votes
1answer
374 views

Proper method of adding column to table? [duplicate]

I am extending promo coupon labels so that I can define a failed label that would display when coupons fail to apply. So far I have been able to add the fields using: class ...
2
votes
3answers
119 views

How to Delete data From eav database?

i am trying to delete record from database is there any opposite methode of setdata to delete record from DB $postModel = Mage::getModel('brainvire_brand/post'); $image=$data['image']; $bname=...
2
votes
0answers
208 views

Saving values to new EAV Entity Magento [closed]

I posted this question the other day and I've successfully created a new EAV entity with other Entities as Attributes. This new Entity is called Result and has Championship, Event, Athlete, Brand, ...
7
votes
1answer
413 views

Use Entity as Attribute of another Entity in Magento

I'm going to follow this tutorial but my question is.. is it possible to use an EAV Entity as attribute of a new EAV Entity? Thanks. EDIT: The tutorial that I originally posted is quite messed up ...
1
vote
3answers
10k views

EAV attribute values stored in database

I have an attribute in use on Magento where the data has been split between catalog_product_entity_varchar and catalog_product_entity_decimal due to the datatype being changed in the database. The ...
3
votes
3answers
4k views

Change increment customer ID from 1 to 00001 with zero padding

Is there a way to change the customer ID to start with 00001. Now it's just 1. I need this for importing into a different system. So each customer number starting with 00001, 00002 and so on...
0
votes
1answer
37 views

Upgrade script looking for a false table?

I have a custom module that I need to update adding a couple of columns in one of the tables. The task is very easy but for some reason Magento is adding a prefix on my table name. Let me show you. ...
7
votes
2answers
1k views

Why attributes of bundle items of a bundle product are also saved to the bundle product itself? (database-wise)

Recently I was studying how the options of the layered navigation filter on the category page are determined and retrieved. I have dug a bit into the models and database for it, and there I found the ...
0
votes
1answer
594 views

Where is entity_model => sales/quote? from eav_entity_type table

I think magento saving all eav entity information From eav_entity_type table. But where is sales/quote entity information? This eav_entity_type attribute_id is linked with eav_attribute table right? ...
0
votes
1answer
1k views

Magento direct SQL query for coupon based orders?

I am trying to write a SQL query for Magento that will show orders which were paid (non-zero total) and those which were coupon based (zero total). The Coupon-based orders should be divided by the ...
7
votes
1answer
566 views

Magento Too many tables error bulk updating products

This morning while selecting and enabling some one hundred products in magento i got this mysql too many table error Below is the snippet from the log file a:5:{i:0;s:92:"SQLSTATE[HY000]: General ...
0
votes
3answers
1k views

quickly update an attribute value for number of products belonging to a particular attribute set

i would like to update attribute_value="integer" for all products where attribute_set_id = "x" This might be a quick sql command, but i'm not actually able to figure out what tables need to be update....
21
votes
2answers
1k views

Magento Each New Invoice Increment Id Increment By 5?

I need to increment each new invoice id by 5, i have tried below code. But changed all invoices, shipments, orders and credit memos. I need each new invoice id increment by 5, shipments increment by ...
1
vote
3answers
6k views

How to completely delete EAV attribute and all its data from the database?

What is the correct way to completely remove category attributes from the database? Attributes were added this way using setup script: $setup->addAttribute('catalog_category', 'seo_text', array( ...
1
vote
1answer
413 views

Creating a new entity with existing entity type

I am fairly new with Magento and not sure if answer to this is very trivial, but looking at available help through search. I was not able to figure out the right way. For a solution, I am building ...
0
votes
1answer
2k views

custom EAV model saving attributes

I have a custom EAV model that uses custom tables for comments that can be set on either products or categories. I have created an admin for these using the standard EAV admin form. In my controller, ...
1
vote
2answers
991 views

How to fix deleted manufacturer attribute

A client was adding manufacturer values to the respective attribute in the backend and accidentally deleted the attribute. Immediately they noticed the site was giving error messages, noticed us and ...
1
vote
1answer
3k views

What's the better way to set an initial customer increment id?

This SO Question has two answers: Set the AUTO_INCREMENT for the customer_entity table. Set the increment_prefix and increment_last_id for the customer entity in the entity_store table. The second ...
19
votes
3answers
1k views

The purpose of 'eav_' tables

I've always wondered what is the meaning of the tables : eav_entity eav_entity_datetime eav_entity_decimal eav_entity_int eav_entity_store eav_entity_text They are always empty. They are created ...
4
votes
2answers
5k views

Add new column to an EAV table `catalog_product_entity`

I tried to add new column to the table catalog_product_entity via a setup resource. But when i try to save a value to table (using setMyColumnName()), the value is not reflected in the underlying ...
2
votes
1answer
542 views

Mysql joins 'e' v 'main_table' - flat v eav

When you guys are doing mysql joins on product and category collections how do you plan/deal with the differences in eav and flat collection? The main thing i see is that eav using 'e' for the column ...
9
votes
4answers
4k 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 ...
28
votes
3answers
30k views

Delete custom EAV attributes from the database

I want to remove unused EAV attributes directly from the database before I move my store live. Attributes can be found in eav_attribute table, can I delete attributes from this table? Is it safe? Or ...
5
votes
2answers
2k views

How do I add additional options to customer gender?

I have a client who would like to add the option 'Transgender' in addition to Male and Female in the gender field. Can I do this directly in the database? Would I need to update anything beyond the ...
4
votes
1answer
9k views

Adding a new eav attribute type “file upload”

I need to have the ability to add a file upload at the admin site and process the files after these have been uploaded. As a first step I like to extend Magento eav attributes with a new custom type "...
0
votes
1answer
525 views

How to add a custom field to Magento catalog_product_option_type_value table

I'm just wondering if there is an easier way? What I was going to do is create my own custom table with a reference to the option_type_id from the catalog_product_option_type_value because I don't ...