Doubt about attributes (getting the brand)Validate email using MAGENTO 1.9 (not way)Problem when flat catalog product option 'yes/no' on getting brand attributesHelp with 2 sets of prices for single productSub-attributes of a product attributeadding addFieldsToFilter() does INNER JOIN on eav tables, removing all products which don't have that attributeSQL Query to get actual name of custom attribute valueQuestion(s) about custom attributesHow to get products filtering by category and attributes?Doubt about observer in magento 1.9
Linear Programming with additional "if-then"/"Default to zero" constraints?
Is there any way to land a rover on the Moon without using any thrusters?
Were Roman public roads build by private companies?
Are there any non-WEB re-implementation of TeX Core in recent years?
What are uses of the byte after BRK instruction on 6502?
Do my friendships grow, even if I cannot progress the story?
Where can I get an anonymous Rav Kav card issued?
Why island and not light?
Job offer without any details but asking me to withdraw other applications - is it normal?
Leaving out pronouns in informal conversation
The Planck constant for mathematicians
Modify width of first column in file with a variable number of fields, using awk
What is a realistic time needed to get a properly trained army?
Do they still use tiger roars in the 2019 "Lion King" movie?
How seriously should I take a CBP interview where I was told I have a red flag and could only stay for 30 days?
How to work with a technician hired with a grant who argues everything
Where to disclose a zero day vulnerability
Can I disable a battery powered device by reversing half of its batteries?
My research paper filed as a patent in China by my Chinese supervisor without me as inventor
When was the earliest opportunity the Voyager crew had to return to the Alpha quadrant?
Eccentric keepers
Do all humans have an identical nucleotide sequence for certain proteins, e.g haemoglobin?
Maintenance tips to prolong engine lifespan for short trips
How to help my 2.5-year-old daughter take her medicine when she refuses to?
Doubt about attributes (getting the brand)
Validate email using MAGENTO 1.9 (not way)Problem when flat catalog product option 'yes/no' on getting brand attributesHelp with 2 sets of prices for single productSub-attributes of a product attributeadding addFieldsToFilter() does INNER JOIN on eav tables, removing all products which don't have that attributeSQL Query to get actual name of custom attribute valueQuestion(s) about custom attributesHow to get products filtering by category and attributes?Doubt about observer in magento 1.9
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am a little confused about attributes whether they are simple eav attributes or not.
I dont fully understand when an attribute has option or option value. How can i check it?
So, for example in this case i am trying to obtain the brand name so i did this query:
SELECT main.sku, option_value_ez_catalog_product_brand.value AS ez_catalog_product_brand, code_status.value AS code_status
LEFT JOIN eav_attribute attribute_code_status ON attribute_code_status.attribute_code = 'status' and attribute_code_status.entity_type_id = 4
LEFT JOIN eav_attribute attribute_ez_catalog_product_brand ON attribute_ez_catalog_product_brand.attribute_code = 'ez_catalog_product_brand' and attribute_code_status.entity_type_id = 4
LEFT JOIN catalog_product_entity_int code_status ON main.entity_id = code_status.entity_id and code_status.attribute_id = attribute_code_status.attribute_id
LEFT JOIN catalog_product_entity_int ez_catalog_product_brand ON main.entity_id = ez_catalog_product_brand.entity_id and ez_catalog_product_brand.attribute_id = attribute_ez_catalog_product_brand.attribute_id
LEFT JOIN eav_attribute_option option_ez_catalog_product_brand on option_ez_catalog_product_brand.attribute_id = ez_catalog_product_brand.attribute_id and option_ez_catalog_product_brand.option_id = ez_catalog_product_brand.value
LEFT JOIN eav_attribute_option_value option_value_ez_catalog_product_brand on option_ez_catalog_product_brand.option_id = option_value_ez_catalog_product_brand.option_id
Is that okay? How can i know if an attribute is simple or not?
What about other attributes like : manufacturer, volume, description, prices and so on?
Could you please help me?
magento-1.9 product-attribute eav-attributes
add a comment
|
I am a little confused about attributes whether they are simple eav attributes or not.
I dont fully understand when an attribute has option or option value. How can i check it?
So, for example in this case i am trying to obtain the brand name so i did this query:
SELECT main.sku, option_value_ez_catalog_product_brand.value AS ez_catalog_product_brand, code_status.value AS code_status
LEFT JOIN eav_attribute attribute_code_status ON attribute_code_status.attribute_code = 'status' and attribute_code_status.entity_type_id = 4
LEFT JOIN eav_attribute attribute_ez_catalog_product_brand ON attribute_ez_catalog_product_brand.attribute_code = 'ez_catalog_product_brand' and attribute_code_status.entity_type_id = 4
LEFT JOIN catalog_product_entity_int code_status ON main.entity_id = code_status.entity_id and code_status.attribute_id = attribute_code_status.attribute_id
LEFT JOIN catalog_product_entity_int ez_catalog_product_brand ON main.entity_id = ez_catalog_product_brand.entity_id and ez_catalog_product_brand.attribute_id = attribute_ez_catalog_product_brand.attribute_id
LEFT JOIN eav_attribute_option option_ez_catalog_product_brand on option_ez_catalog_product_brand.attribute_id = ez_catalog_product_brand.attribute_id and option_ez_catalog_product_brand.option_id = ez_catalog_product_brand.value
LEFT JOIN eav_attribute_option_value option_value_ez_catalog_product_brand on option_ez_catalog_product_brand.option_id = option_value_ez_catalog_product_brand.option_id
Is that okay? How can i know if an attribute is simple or not?
What about other attributes like : manufacturer, volume, description, prices and so on?
Could you please help me?
magento-1.9 product-attribute eav-attributes
add a comment
|
I am a little confused about attributes whether they are simple eav attributes or not.
I dont fully understand when an attribute has option or option value. How can i check it?
So, for example in this case i am trying to obtain the brand name so i did this query:
SELECT main.sku, option_value_ez_catalog_product_brand.value AS ez_catalog_product_brand, code_status.value AS code_status
LEFT JOIN eav_attribute attribute_code_status ON attribute_code_status.attribute_code = 'status' and attribute_code_status.entity_type_id = 4
LEFT JOIN eav_attribute attribute_ez_catalog_product_brand ON attribute_ez_catalog_product_brand.attribute_code = 'ez_catalog_product_brand' and attribute_code_status.entity_type_id = 4
LEFT JOIN catalog_product_entity_int code_status ON main.entity_id = code_status.entity_id and code_status.attribute_id = attribute_code_status.attribute_id
LEFT JOIN catalog_product_entity_int ez_catalog_product_brand ON main.entity_id = ez_catalog_product_brand.entity_id and ez_catalog_product_brand.attribute_id = attribute_ez_catalog_product_brand.attribute_id
LEFT JOIN eav_attribute_option option_ez_catalog_product_brand on option_ez_catalog_product_brand.attribute_id = ez_catalog_product_brand.attribute_id and option_ez_catalog_product_brand.option_id = ez_catalog_product_brand.value
LEFT JOIN eav_attribute_option_value option_value_ez_catalog_product_brand on option_ez_catalog_product_brand.option_id = option_value_ez_catalog_product_brand.option_id
Is that okay? How can i know if an attribute is simple or not?
What about other attributes like : manufacturer, volume, description, prices and so on?
Could you please help me?
magento-1.9 product-attribute eav-attributes
I am a little confused about attributes whether they are simple eav attributes or not.
I dont fully understand when an attribute has option or option value. How can i check it?
So, for example in this case i am trying to obtain the brand name so i did this query:
SELECT main.sku, option_value_ez_catalog_product_brand.value AS ez_catalog_product_brand, code_status.value AS code_status
LEFT JOIN eav_attribute attribute_code_status ON attribute_code_status.attribute_code = 'status' and attribute_code_status.entity_type_id = 4
LEFT JOIN eav_attribute attribute_ez_catalog_product_brand ON attribute_ez_catalog_product_brand.attribute_code = 'ez_catalog_product_brand' and attribute_code_status.entity_type_id = 4
LEFT JOIN catalog_product_entity_int code_status ON main.entity_id = code_status.entity_id and code_status.attribute_id = attribute_code_status.attribute_id
LEFT JOIN catalog_product_entity_int ez_catalog_product_brand ON main.entity_id = ez_catalog_product_brand.entity_id and ez_catalog_product_brand.attribute_id = attribute_ez_catalog_product_brand.attribute_id
LEFT JOIN eav_attribute_option option_ez_catalog_product_brand on option_ez_catalog_product_brand.attribute_id = ez_catalog_product_brand.attribute_id and option_ez_catalog_product_brand.option_id = ez_catalog_product_brand.value
LEFT JOIN eav_attribute_option_value option_value_ez_catalog_product_brand on option_ez_catalog_product_brand.option_id = option_value_ez_catalog_product_brand.option_id
Is that okay? How can i know if an attribute is simple or not?
What about other attributes like : manufacturer, volume, description, prices and so on?
Could you please help me?
magento-1.9 product-attribute eav-attributes
magento-1.9 product-attribute eav-attributes
edited Apr 15 at 6:45
HelgeB
3,7332 gold badges4 silver badges23 bronze badges
3,7332 gold badges4 silver badges23 bronze badges
asked Apr 15 at 4:53
programming_amazingprogramming_amazing
676 bronze badges
676 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
You can identify the type of an EAV attribute from its settings in the eav_attribute
table:
backend_type = int
means that the attribute is of type integer and the value is stored in the table [entity_type_code]_entity_int
, in case of a product attribute from catalog_product_entity_int
. (For other backend types there are corresponding tables, backend_type = varchar
has catalog_product_entity_varchar
etc. backend_type = static
attributes are stored in the entity_table catalog_product_entity
- e.g. sku
).
If an integer attribute has frontend_type = select
that means that some kind of integer key is stored in [entity_type_code]_entity_int
and there is a related value to that key.
For this type of attributes there is usually a setting in the source_model
column. Attributes with option values usually have source_model = eav/entity_attribute_source_table
. Other types of backend models store the data in other tables - where and how exatly the data is stored can be seen in the corresponding Magento class (i.e. in case of eav/entity_attribute_source_table
Mage_Eav_Model_Entity_Attribute_Source_Table
).
Regarding your select:
To get the option values of an product attribute with options you will have to join 4 tables:eav_attribute
,catalog_product_entity_int
,eav_attribute_option
andeav_attribute_option_value
and you will have to do that for every attribute. You may shortcut that by hardcoding the attribute_id
in your statement and skip the table eav_attribute
, but the other 3 tables need to be there.
Your statement is correct, you have just a little copy & paste error:
In the second join you use attribute_code_status.entity_type_id = 4
instead of attribute_ez_catalog_product_brand.entity_type_id = 4
.
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270043%2fdoubt-about-attributes-getting-the-brand%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can identify the type of an EAV attribute from its settings in the eav_attribute
table:
backend_type = int
means that the attribute is of type integer and the value is stored in the table [entity_type_code]_entity_int
, in case of a product attribute from catalog_product_entity_int
. (For other backend types there are corresponding tables, backend_type = varchar
has catalog_product_entity_varchar
etc. backend_type = static
attributes are stored in the entity_table catalog_product_entity
- e.g. sku
).
If an integer attribute has frontend_type = select
that means that some kind of integer key is stored in [entity_type_code]_entity_int
and there is a related value to that key.
For this type of attributes there is usually a setting in the source_model
column. Attributes with option values usually have source_model = eav/entity_attribute_source_table
. Other types of backend models store the data in other tables - where and how exatly the data is stored can be seen in the corresponding Magento class (i.e. in case of eav/entity_attribute_source_table
Mage_Eav_Model_Entity_Attribute_Source_Table
).
Regarding your select:
To get the option values of an product attribute with options you will have to join 4 tables:eav_attribute
,catalog_product_entity_int
,eav_attribute_option
andeav_attribute_option_value
and you will have to do that for every attribute. You may shortcut that by hardcoding the attribute_id
in your statement and skip the table eav_attribute
, but the other 3 tables need to be there.
Your statement is correct, you have just a little copy & paste error:
In the second join you use attribute_code_status.entity_type_id = 4
instead of attribute_ez_catalog_product_brand.entity_type_id = 4
.
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
add a comment
|
You can identify the type of an EAV attribute from its settings in the eav_attribute
table:
backend_type = int
means that the attribute is of type integer and the value is stored in the table [entity_type_code]_entity_int
, in case of a product attribute from catalog_product_entity_int
. (For other backend types there are corresponding tables, backend_type = varchar
has catalog_product_entity_varchar
etc. backend_type = static
attributes are stored in the entity_table catalog_product_entity
- e.g. sku
).
If an integer attribute has frontend_type = select
that means that some kind of integer key is stored in [entity_type_code]_entity_int
and there is a related value to that key.
For this type of attributes there is usually a setting in the source_model
column. Attributes with option values usually have source_model = eav/entity_attribute_source_table
. Other types of backend models store the data in other tables - where and how exatly the data is stored can be seen in the corresponding Magento class (i.e. in case of eav/entity_attribute_source_table
Mage_Eav_Model_Entity_Attribute_Source_Table
).
Regarding your select:
To get the option values of an product attribute with options you will have to join 4 tables:eav_attribute
,catalog_product_entity_int
,eav_attribute_option
andeav_attribute_option_value
and you will have to do that for every attribute. You may shortcut that by hardcoding the attribute_id
in your statement and skip the table eav_attribute
, but the other 3 tables need to be there.
Your statement is correct, you have just a little copy & paste error:
In the second join you use attribute_code_status.entity_type_id = 4
instead of attribute_ez_catalog_product_brand.entity_type_id = 4
.
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
add a comment
|
You can identify the type of an EAV attribute from its settings in the eav_attribute
table:
backend_type = int
means that the attribute is of type integer and the value is stored in the table [entity_type_code]_entity_int
, in case of a product attribute from catalog_product_entity_int
. (For other backend types there are corresponding tables, backend_type = varchar
has catalog_product_entity_varchar
etc. backend_type = static
attributes are stored in the entity_table catalog_product_entity
- e.g. sku
).
If an integer attribute has frontend_type = select
that means that some kind of integer key is stored in [entity_type_code]_entity_int
and there is a related value to that key.
For this type of attributes there is usually a setting in the source_model
column. Attributes with option values usually have source_model = eav/entity_attribute_source_table
. Other types of backend models store the data in other tables - where and how exatly the data is stored can be seen in the corresponding Magento class (i.e. in case of eav/entity_attribute_source_table
Mage_Eav_Model_Entity_Attribute_Source_Table
).
Regarding your select:
To get the option values of an product attribute with options you will have to join 4 tables:eav_attribute
,catalog_product_entity_int
,eav_attribute_option
andeav_attribute_option_value
and you will have to do that for every attribute. You may shortcut that by hardcoding the attribute_id
in your statement and skip the table eav_attribute
, but the other 3 tables need to be there.
Your statement is correct, you have just a little copy & paste error:
In the second join you use attribute_code_status.entity_type_id = 4
instead of attribute_ez_catalog_product_brand.entity_type_id = 4
.
You can identify the type of an EAV attribute from its settings in the eav_attribute
table:
backend_type = int
means that the attribute is of type integer and the value is stored in the table [entity_type_code]_entity_int
, in case of a product attribute from catalog_product_entity_int
. (For other backend types there are corresponding tables, backend_type = varchar
has catalog_product_entity_varchar
etc. backend_type = static
attributes are stored in the entity_table catalog_product_entity
- e.g. sku
).
If an integer attribute has frontend_type = select
that means that some kind of integer key is stored in [entity_type_code]_entity_int
and there is a related value to that key.
For this type of attributes there is usually a setting in the source_model
column. Attributes with option values usually have source_model = eav/entity_attribute_source_table
. Other types of backend models store the data in other tables - where and how exatly the data is stored can be seen in the corresponding Magento class (i.e. in case of eav/entity_attribute_source_table
Mage_Eav_Model_Entity_Attribute_Source_Table
).
Regarding your select:
To get the option values of an product attribute with options you will have to join 4 tables:eav_attribute
,catalog_product_entity_int
,eav_attribute_option
andeav_attribute_option_value
and you will have to do that for every attribute. You may shortcut that by hardcoding the attribute_id
in your statement and skip the table eav_attribute
, but the other 3 tables need to be there.
Your statement is correct, you have just a little copy & paste error:
In the second join you use attribute_code_status.entity_type_id = 4
instead of attribute_ez_catalog_product_brand.entity_type_id = 4
.
answered Apr 15 at 6:39
HelgeBHelgeB
3,7332 gold badges4 silver badges23 bronze badges
3,7332 gold badges4 silver badges23 bronze badges
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
add a comment
|
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Excellent!, i told you before but you rock :)
– programming_amazing
Apr 16 at 2:04
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
Hey dude, could you please take a look at this: magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:30
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
magento.stackexchange.com/questions/285837/…
– programming_amazing
Aug 19 at 14:35
add a comment
|
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f270043%2fdoubt-about-attributes-getting-the-brand%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown