All Questions
Tagged with eav-attributes magento2
95 questions
2
votes
3
answers
3k
views
Magento 2 : get custom attribute value display blank
In Magento2 , I need to get eav attribute value in category data. I used this below code. But, it's not working.
/** \Magento\Catalog\Model\CategoryFactory $categoryFactory**/
$category = $this->...
0
votes
2
answers
336
views
Magento 2.4.7 Customer Custom Attribute Value no Change
When I created one Customer Custom Attribute and changed its value website-wise from Admin-> Edit Customer Information so did not change it.
<?php
namespace Vendor\Extension\Setup\Patch\...
2
votes
2
answers
1k
views
How to create an extra field in attribute information
I am trying to add a field to the attribute information section. This should be an text field for multistore ( just like the manage titles section).
Magento version: 2.2.6
Here's what I got now:
I ...
6
votes
1
answer
9k
views
Magento 2 : How to know "used_in_forms" param of eav attribute for a form?
I was wondering if there is a full proof method to find all used_in_forms params of eav attribute which is specified in InstallData.php to create all kind of attributes for a form or maybe someone ...
0
votes
1
answer
47
views
How to fix duplicate id's in multiselect options
Via the api, multi select options were accidentally inserted as duplicates.
So instead of 11111,22222 being stored in catalog_product_entity_text.value it was submitted as 11111,22222,11111,22222 and ...
0
votes
1
answer
394
views
Getting an EAV option's value (eav_attribute_option_value) instead of ID when fetching products using GraphQL
I should preface this by saying I know nothing about Magento 2 development, and barely anything about GraphQL, yet I've been added to this project so I have to learn both of them at the same time. I'...
0
votes
2
answers
2k
views
custom attribute value not save in the Database
<?php
declare(strict_types=1);
namespace Vendor\Module\Setup\Patch\Data;
use Magento\Eav\Model\Config;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Eav\...
1
vote
1
answer
198
views
EAV_ATTRIBUTE auto increment issue
I am trying to save product attributes in my Magento2 system and there may be 100 thousands of attributes.
However, I see that the value specified as auto increment in the eav_attribute table is ...
0
votes
1
answer
283
views
Magento 2 - join using EAV attribute
I created an EAV attribute on product entity, this attribute named user_id and has the ID of the user who's added the product.
After works, I crashed on this point, I need to join tables to get ...
1
vote
2
answers
1k
views
($callback) must be a valid callback
My extension is failing varnish test over and over again and the only visible error i have found in the error reports is
call_user_func(): Argument #1 ($callback) must be a valid callback, class "...
2
votes
1
answer
249
views
Filter by attribute is slow for customer collection using addAttributeToFilter() function
I have created a custom attribute called username for Customer which is searchable in admin grid. But whenever I search by username for SSO it takes much time (2-3 sec). Below are the code:
$...
1
vote
2
answers
1k
views
how to enable/disable custom attribute showing on product page
I created an attribute switch, but how do I get it to work? Also I created an attribute - which I want enable/disable
<?php
namespace ivan\ProductAtrr\Setup\Patch\Data;
use Magento\...
2
votes
0
answers
34
views
Why can't I display anything on the product page? product.info.main
app/module/vendor/View/layout
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:
noNamespaceSchemaLocation=
&...
1
vote
3
answers
676
views
My sql query to get product count for Attribute
I need the mysql query for the following magento code. Need to get the count of products with the given brand option id.
count($this->productCollectionFactory->create()
->...
1
vote
3
answers
6k
views
Magneto2 : Add color swatch attribute option with colorcode value programmatically
I am working on Magento 2 and want to add custom color in color swatch attribute option programmatically. I have gone through this post but unable to add options
Can anyone helps me to add custom ...
0
votes
1
answer
804
views
Magento 2 - where to find "confirmation" attribute for customer?
Where is the status of "Confirmed email" saved in the database?
How can I change the value directly in the database for this customer?
I searched everywhere, but I can't find the table ...
0
votes
1
answer
608
views
Magento 2.4, How to autofill value of Page Builder/textarea instead of Page Builder(form details) initialized as blank
In admin Catalog->Category->content
I would like this Form detail:Page Builder to have Layout->Row and Element->HTML Code="Default Value" at setup.
<?php
namespace Justins\...
0
votes
1
answer
651
views
Attribute value not showing properly in admin form
I have created a custom 'Forme' product attribute select type based on option value
class FormeOptions extends AbstractSource
{
/**
* Get all options
*
* @return array
*/
...
1
vote
1
answer
825
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
1
vote
1
answer
2k
views
Magento 2 : Remove Mandatory Validation for Customer Fields eg. firstname, lastname
I want to remove the mandatory validation for customer fields eg. firstname, lastname (both for frontend and admin).
I tried using UpgradeData to change the value of is_required field to 0 in the ...
9
votes
2
answers
5k
views
Which entity allows scoped attributes?
/vendor/magento/module-eav/Model/Entity/Attribute/ScopedAttributeInterface.php
There are 3 defined scopes
/**
* @api
* @since 100.0.2
*/
interface ScopedAttributeInterface
{
const ...
2
votes
0
answers
162
views
Magento 2 : Extension attributes & Eav Attributes
Few question based on extension attributes & eav attributes.
Answers to this question will clear the concept of this topic.
What are extension & eav attributes in magento ?
What is the ...
1
vote
1
answer
280
views
Order custom attribute, extension attribute or EAV attribute | Magento 2
I want to add custom attribute for Order
From what I have learned, there are two ways this attribtue can be associated to Order entity
Having extension_attributes.xml + custom repository (and ...
3
votes
2
answers
5k
views
get eav attribute collection Code format in Magento2
I am migrating m1 code to m2, below is the code i used in m1 to get eav collection.
$customerattrs = Mage::getModel('eav/entity_attribute')->getCollection();
$customerattrs->...
1
vote
0
answers
298
views
How to get the unused attributes from the table Magento 2 using SQL Query
I need to get the unused attributes from Magento DB that is not assigned to the Attribute set and not assigned to the production. Also i need to get the unused attribute sets. from Magento table
0
votes
1
answer
670
views
what is the purpose of eav_entity_attribute table
in Magento i have seen entity table, eav_attribute table and attribute table, which has links.
But i don't find any link to eav_entity_attribute. I want to know the purpose of the table
0
votes
2
answers
374
views
Removing a custom module doesn't remove it from the database
I created a customer EAV attribute to collect the users postcode on registration. I realized Magento already has this feature, so I removed the module. The problem is the module does not seem to be ...
0
votes
1
answer
133
views
entity_type_code_entity table is empty in magento2
I am trying to insert data into the EAV tables, but my main entity table isn't saving any data but the value tables data is inserted.
My Entity Type code is vinay_employee, my table ...
0
votes
1
answer
170
views
Duplicated Eav attribute in Product Edit form
I want to add a new attribute to the product edit form using the UI components, so I created a product_form.xml file in my module, and added the attribute with the code below:
<field name="...
3
votes
4
answers
29k
views
magento 2 Get attribute option label by attribute option Id?
magento 2 I would like to get an attribute option label by attribute option id.
For Example:-
attribute option value : 53,
attribute option label/text/name : green
from the above scenario i want ...
0
votes
1
answer
557
views
Magento 2 how to add eav attribute for store information?
How can I add an eav attribute for store? I practically need to add a post code but storeview scope. The problem is that the post code for store information has website scope.
I have addedd eav ...
0
votes
1
answer
2k
views
Pull custom customer attribute and send in email? Magento 2.2
I am working in Magento 2.2 and I am using an extension that allows the site admin to confirm new accounts before they are active.
The extension can be found here:
https://github.com/enrico69/magento2-...
0
votes
2
answers
124
views
Can not open "Admin -> Customers -> All customers" after Magento 1 to 2 data migration
I have a similar issue like this one here, after migrating from Magento 1 to 2.
But the report is a little bit different and the provided solution in the thread did not help me at all.
I already ...
2
votes
0
answers
1k
views
Notice: Undefined index: magento_eav_attribute_set in/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152
bin/magento setup:upgrade
Notice: Undefined index: magento_eav_attribute_set in /vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152
If I understand correctly this is ...
0
votes
1
answer
627
views
Magento 2 customer attribute not working in Magento 2.3.3
I have created a module for adding a customer attribute and show it in create account form on frontend and account edit in backend, the thing is that it worked in Magento 2.2 but not on Magento 2.3.3, ...
0
votes
1
answer
670
views
Magento 2 customer attribute not saved in database
So I have created an attribute for customer entity, used it in frontend create account form, but it's not showing anything in customer_entity_varchar table, it's empty. However, in eav_attribute table ...
1
vote
2
answers
598
views
Magento 2 how to add custom attribute to register form?
I have created an attribute ZipCode just for the registration of a new customer.
In eav_attribute table it exists and it's created correctly. However I have not managed to put the attribute in the new ...
1
vote
1
answer
1k
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
2
answers
29
views
What is the query readers here i can't understand magento 2.3
I can't find the what query rendes here and i can't it is not readable so any can to find what query renders hear please tell what are the table involved here
public function getCount(\Magento\...
1
vote
0
answers
194
views
Magento 2 - Data Migration Tool - Triggers
Intro
Regarding the Data Migration Tool (M1 to M2), the migration creates m2_cl_ trigger tables that I can eventually run bin/magento migrate:delta will only update those triggered tables, or do they ...
5
votes
3
answers
6k
views
Set custom address attribute value programmatically
I'm using Magento v2.1.6 and I have created a custom attribute for customer address like this:
$customerEntity = $customerSetup->getEavConfig()->getEntityType('customer_address');
$...
2
votes
1
answer
835
views
How to create product attribute and assign it to specific attribute set and attribute set group? Magento 2.3
I have an attribute set with name Gold and attribute set group with name Ring, i want to add a boolean product attribute with name biodynamic like this:
namespace Vendor\Module\Setup\Patch\Data;
use ...
0
votes
1
answer
146
views
Magento Fatal Error on Running Installation
I am facing below Fatal Error on Magento Running installation,
Fatal error: Uncaught Error: Class 'MagentoEavModelEntityAttributeSourceTable' not found in /var/www/magento/vendor/magento/framework/...
0
votes
1
answer
339
views
How to filter bestseller collection with a product attribute
You can addAttributeToFilter for product collection;
$this->_productCollectionFactory->create()->addAttributeToFilter('att_x', ['eq', $att_x_value]);
How can we do this with bestseller ...
1
vote
1
answer
2k
views
Is there a way to update a eav custom attribute?
My eav is:
$eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY,'bid_target',
[
'type' => 'int',
'backend' => '',
'frontend' => '',
...
4
votes
2
answers
4k
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?
2
votes
2
answers
874
views
Customer custom attribute not being saved
I'm using magento v2.5 and i tried to create customer programmatically from frontend and backend, i share the same code between frontend and backend, after customer being save then i try to save the ...
0
votes
1
answer
67
views
Magento 2 Attempt to load value of nonexistent EAV attribute with CategoryInterface after migration
after 1.x to 2.3
I am getting error as following in my System.log file.
[2020-02-06 13:29:01] main.WARNING: Attempt to load value of nonexistent EAV attribute '903'
for ...
3
votes
1
answer
2k
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 ...
3
votes
0
answers
87
views
Magento 2 Edit Product page Error: Every derived table must have its own alias
I'm using magento 2.2.5 and when i opened the edit product page the product name, price,etc doesnt load at all, and when i checked the var/log/exception.log i got the following error:
...