Product List Attribute Filter QueryMagento 1.9.2 addAttributeToFilter function not working default themeHow to filter dropdown in custom gridUpgrade from 1.9.1 to 1.9.2 ErrorMagento computed column value in 'filter_index'Magento 1.9.2.1 Column not foundMagento Admin Panel Returns 404 ErrorError Upgrade Magento 1.6 to 1.9How to add Email address in sales orders admin grid?sales order grid custom column filter QLSTATE[42S22]: Column not found: 1054 Unknown columnMagento vs manually added column into eav tableCould not filter product collection in Mage_Catalog_Block_Product_List by a custom attribute in magento 1.9

A ​Note ​on ​N!

Rivers without rain

Which big number is bigger?

How to stop co-workers from teasing me because I know Russian?

Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?

With a Canadian student visa, can I spend a night at Vancouver before continuing to Toronto?

Pass By Reference VS Pass by Value

simple conditions equation

How could Tony Stark make this in Endgame?

Why do Computer Science majors learn Calculus?

Why does nature favour the Laplacian?

Is there any limitation with Arduino Nano serial communication distance?

Sci-fi novel series with instant travel between planets through gates. A river runs through the gates

What do the phrase "Reeyan's seacrest" and the word "fraggle" mean in a sketch?

What route did the Hindenburg take when traveling from Germany to the U.S.?

Do I have an "anti-research" personality?

Why was Germany not as successful as other Europeans in establishing overseas colonies?

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

Meaning of Bloch representation

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

Will a top journal at least read my introduction?

Why do games have consumables?

How come there are so many candidates for the 2020 Democratic party presidential nomination?

Examples of subgroups where it's nontrivial to show closure under multiplication?



Product List Attribute Filter Query


Magento 1.9.2 addAttributeToFilter function not working default themeHow to filter dropdown in custom gridUpgrade from 1.9.1 to 1.9.2 ErrorMagento computed column value in 'filter_index'Magento 1.9.2.1 Column not foundMagento Admin Panel Returns 404 ErrorError Upgrade Magento 1.6 to 1.9How to add Email address in sales orders admin grid?sales order grid custom column filter QLSTATE[42S22]: Column not found: 1054 Unknown columnMagento vs manually added column into eav tableCould not filter product collection in Mage_Catalog_Block_Product_List by a custom attribute in magento 1.9






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








10















I have added one filter in Method _getProductCollection() of the class Mage_Catalog_Block_Product_List as follows.



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection->getSelect()->joinInner(
array('cpe' => 'catalog_product_entity'),
'e.entity_id = cpe.entity_id'
)
->where("cpe.type_id = 'simple'");
...



The above code is working fine as of Magento Version 1.7. But whenever I write the following code, it gives




Column not found: 1054 Unknown column 'e.type_id' in 'where clause'




error.



The code (which is not working).



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Now the Questions.



  1. Will there be any performance impact if I use the first working
    code?

  2. is there any other way to get around to have a proper product
    filter?

UPDATE:



Whenever I apply the following code and use rwd theme, I am not getting any error. But whenever I user default theme, I get the below error,



Code



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Error




SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.type_id' in
'where clause', query was: SELECT FLOOR((ROUND((e.min_price) * 1, 2))
/ 10) + 1 AS range, COUNT(*) AS count FROM
catalog_product_index_price AS e INNER JOIN
catalog_category_product_index AS cat_index ON
cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND
cat_index.visibility IN(2, 4) AND cat_index.category_id = '3' WHERE
(e.type_id IN('simple')) AND ( e.website_id = '1' ) AND (
e.customer_group_id = 0) AND (e.min_price IS NOT NULL) GROUP BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ORDER BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ASC











share|improve this question
















bumped to the homepage by Community 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • which magento version u have use?? *& have applied magento patches

    – Amit Bera
    Dec 24 '15 at 8:19







  • 1





    wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

    – MauroNigrele
    Dec 29 '15 at 6:33











  • Exactly, the view theme creates problem. thanks. The code should be independent of a theme

    – Magento Learner
    Dec 29 '15 at 6:36


















10















I have added one filter in Method _getProductCollection() of the class Mage_Catalog_Block_Product_List as follows.



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection->getSelect()->joinInner(
array('cpe' => 'catalog_product_entity'),
'e.entity_id = cpe.entity_id'
)
->where("cpe.type_id = 'simple'");
...



The above code is working fine as of Magento Version 1.7. But whenever I write the following code, it gives




Column not found: 1054 Unknown column 'e.type_id' in 'where clause'




error.



The code (which is not working).



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Now the Questions.



  1. Will there be any performance impact if I use the first working
    code?

  2. is there any other way to get around to have a proper product
    filter?

UPDATE:



Whenever I apply the following code and use rwd theme, I am not getting any error. But whenever I user default theme, I get the below error,



Code



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Error




SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.type_id' in
'where clause', query was: SELECT FLOOR((ROUND((e.min_price) * 1, 2))
/ 10) + 1 AS range, COUNT(*) AS count FROM
catalog_product_index_price AS e INNER JOIN
catalog_category_product_index AS cat_index ON
cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND
cat_index.visibility IN(2, 4) AND cat_index.category_id = '3' WHERE
(e.type_id IN('simple')) AND ( e.website_id = '1' ) AND (
e.customer_group_id = 0) AND (e.min_price IS NOT NULL) GROUP BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ORDER BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ASC











share|improve this question
















bumped to the homepage by Community 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • which magento version u have use?? *& have applied magento patches

    – Amit Bera
    Dec 24 '15 at 8:19







  • 1





    wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

    – MauroNigrele
    Dec 29 '15 at 6:33











  • Exactly, the view theme creates problem. thanks. The code should be independent of a theme

    – Magento Learner
    Dec 29 '15 at 6:36














10












10








10








I have added one filter in Method _getProductCollection() of the class Mage_Catalog_Block_Product_List as follows.



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection->getSelect()->joinInner(
array('cpe' => 'catalog_product_entity'),
'e.entity_id = cpe.entity_id'
)
->where("cpe.type_id = 'simple'");
...



The above code is working fine as of Magento Version 1.7. But whenever I write the following code, it gives




Column not found: 1054 Unknown column 'e.type_id' in 'where clause'




error.



The code (which is not working).



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Now the Questions.



  1. Will there be any performance impact if I use the first working
    code?

  2. is there any other way to get around to have a proper product
    filter?

UPDATE:



Whenever I apply the following code and use rwd theme, I am not getting any error. But whenever I user default theme, I get the below error,



Code



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Error




SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.type_id' in
'where clause', query was: SELECT FLOOR((ROUND((e.min_price) * 1, 2))
/ 10) + 1 AS range, COUNT(*) AS count FROM
catalog_product_index_price AS e INNER JOIN
catalog_category_product_index AS cat_index ON
cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND
cat_index.visibility IN(2, 4) AND cat_index.category_id = '3' WHERE
(e.type_id IN('simple')) AND ( e.website_id = '1' ) AND (
e.customer_group_id = 0) AND (e.min_price IS NOT NULL) GROUP BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ORDER BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ASC











share|improve this question
















I have added one filter in Method _getProductCollection() of the class Mage_Catalog_Block_Product_List as follows.



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection->getSelect()->joinInner(
array('cpe' => 'catalog_product_entity'),
'e.entity_id = cpe.entity_id'
)
->where("cpe.type_id = 'simple'");
...



The above code is working fine as of Magento Version 1.7. But whenever I write the following code, it gives




Column not found: 1054 Unknown column 'e.type_id' in 'where clause'




error.



The code (which is not working).



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Now the Questions.



  1. Will there be any performance impact if I use the first working
    code?

  2. is there any other way to get around to have a proper product
    filter?

UPDATE:



Whenever I apply the following code and use rwd theme, I am not getting any error. But whenever I user default theme, I get the below error,



Code



protected function _getProductCollection()

...
$this->_productCollection = $layer->getProductCollection();
$this->_productCollection
->addAttributeToSelect('type_id')
->addAttributeToFilter('type_id','simple');
...



Error




SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.type_id' in
'where clause', query was: SELECT FLOOR((ROUND((e.min_price) * 1, 2))
/ 10) + 1 AS range, COUNT(*) AS count FROM
catalog_product_index_price AS e INNER JOIN
catalog_category_product_index AS cat_index ON
cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND
cat_index.visibility IN(2, 4) AND cat_index.category_id = '3' WHERE
(e.type_id IN('simple')) AND ( e.website_id = '1' ) AND (
e.customer_group_id = 0) AND (e.min_price IS NOT NULL) GROUP BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ORDER BY
FLOOR((ROUND((e.min_price) * 1, 2)) / 10) + 1 ASC








magento-1.9 product-attribute performance






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 16 '17 at 10:58









sv3n

10.1k62557




10.1k62557










asked Dec 24 '15 at 8:11









Magento LearnerMagento Learner

439731




439731





bumped to the homepage by Community 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 5 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • which magento version u have use?? *& have applied magento patches

    – Amit Bera
    Dec 24 '15 at 8:19







  • 1





    wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

    – MauroNigrele
    Dec 29 '15 at 6:33











  • Exactly, the view theme creates problem. thanks. The code should be independent of a theme

    – Magento Learner
    Dec 29 '15 at 6:36


















  • which magento version u have use?? *& have applied magento patches

    – Amit Bera
    Dec 24 '15 at 8:19







  • 1





    wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

    – MauroNigrele
    Dec 29 '15 at 6:33











  • Exactly, the view theme creates problem. thanks. The code should be independent of a theme

    – Magento Learner
    Dec 29 '15 at 6:36

















which magento version u have use?? *& have applied magento patches

– Amit Bera
Dec 24 '15 at 8:19






which magento version u have use?? *& have applied magento patches

– Amit Bera
Dec 24 '15 at 8:19





1




1





wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

– MauroNigrele
Dec 29 '15 at 6:33





wtf? now has sense... i was trying over a EE 1.14 on RWD, that is just unacceptable, how can a view theme change an entire query even worst how can change the main table... this couldn't be anything but a bug. Well done @Magento Learner!

– MauroNigrele
Dec 29 '15 at 6:33













Exactly, the view theme creates problem. thanks. The code should be independent of a theme

– Magento Learner
Dec 29 '15 at 6:36






Exactly, the view theme creates problem. thanks. The code should be independent of a theme

– Magento Learner
Dec 29 '15 at 6:36











1 Answer
1






active

oldest

votes


















0














I think that:



$collection->addAttributeToFilter('type_id', array('eq' => 'simple');


Should works, you don't need to add type_id to select since is a catalog_product_entity column and it's retrieved by default. I always suggest to log the final query in order to get a best idea of what is happen:



Mage.:log($collection->getSelectSql(true));


BTW: The first code block has no sense at all since you are joining the main table (catalog_product_entity) to itself.






share|improve this answer

























  • " in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

    – Magento Learner
    Dec 24 '15 at 8:54












  • sohu.io/questions/886200/…

    – Magento Learner
    Dec 24 '15 at 8:54






  • 1





    wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

    – MauroNigrele
    Dec 24 '15 at 9:02











  • @MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

    – MauroNigrele
    Dec 24 '15 at 9:17






  • 1





    mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

    – MauroNigrele
    Dec 24 '15 at 9:34











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/3.0/"u003ecc by-sa 3.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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f94963%2fproduct-list-attribute-filter-query%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









0














I think that:



$collection->addAttributeToFilter('type_id', array('eq' => 'simple');


Should works, you don't need to add type_id to select since is a catalog_product_entity column and it's retrieved by default. I always suggest to log the final query in order to get a best idea of what is happen:



Mage.:log($collection->getSelectSql(true));


BTW: The first code block has no sense at all since you are joining the main table (catalog_product_entity) to itself.






share|improve this answer

























  • " in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

    – Magento Learner
    Dec 24 '15 at 8:54












  • sohu.io/questions/886200/…

    – Magento Learner
    Dec 24 '15 at 8:54






  • 1





    wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

    – MauroNigrele
    Dec 24 '15 at 9:02











  • @MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

    – MauroNigrele
    Dec 24 '15 at 9:17






  • 1





    mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

    – MauroNigrele
    Dec 24 '15 at 9:34















0














I think that:



$collection->addAttributeToFilter('type_id', array('eq' => 'simple');


Should works, you don't need to add type_id to select since is a catalog_product_entity column and it's retrieved by default. I always suggest to log the final query in order to get a best idea of what is happen:



Mage.:log($collection->getSelectSql(true));


BTW: The first code block has no sense at all since you are joining the main table (catalog_product_entity) to itself.






share|improve this answer

























  • " in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

    – Magento Learner
    Dec 24 '15 at 8:54












  • sohu.io/questions/886200/…

    – Magento Learner
    Dec 24 '15 at 8:54






  • 1





    wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

    – MauroNigrele
    Dec 24 '15 at 9:02











  • @MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

    – MauroNigrele
    Dec 24 '15 at 9:17






  • 1





    mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

    – MauroNigrele
    Dec 24 '15 at 9:34













0












0








0







I think that:



$collection->addAttributeToFilter('type_id', array('eq' => 'simple');


Should works, you don't need to add type_id to select since is a catalog_product_entity column and it's retrieved by default. I always suggest to log the final query in order to get a best idea of what is happen:



Mage.:log($collection->getSelectSql(true));


BTW: The first code block has no sense at all since you are joining the main table (catalog_product_entity) to itself.






share|improve this answer















I think that:



$collection->addAttributeToFilter('type_id', array('eq' => 'simple');


Should works, you don't need to add type_id to select since is a catalog_product_entity column and it's retrieved by default. I always suggest to log the final query in order to get a best idea of what is happen:



Mage.:log($collection->getSelectSql(true));


BTW: The first code block has no sense at all since you are joining the main table (catalog_product_entity) to itself.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 24 '15 at 8:39









Manashvi Birla

6,55751841




6,55751841










answered Dec 24 '15 at 8:31









MauroNigreleMauroNigrele

2,625926




2,625926












  • " in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

    – Magento Learner
    Dec 24 '15 at 8:54












  • sohu.io/questions/886200/…

    – Magento Learner
    Dec 24 '15 at 8:54






  • 1





    wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

    – MauroNigrele
    Dec 24 '15 at 9:02











  • @MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

    – MauroNigrele
    Dec 24 '15 at 9:17






  • 1





    mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

    – MauroNigrele
    Dec 24 '15 at 9:34

















  • " in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

    – Magento Learner
    Dec 24 '15 at 8:54












  • sohu.io/questions/886200/…

    – Magento Learner
    Dec 24 '15 at 8:54






  • 1





    wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

    – MauroNigrele
    Dec 24 '15 at 9:02











  • @MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

    – MauroNigrele
    Dec 24 '15 at 9:17






  • 1





    mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

    – MauroNigrele
    Dec 24 '15 at 9:34
















" in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

– Magento Learner
Dec 24 '15 at 8:54






" in Magento 1.7 they did an optimization on the select sql that is used for the price filtering options. They remove the FROM sql part (which is product entity - which contains type_id attribute) and make the price_index related table the main one - the one that is used in the FROM part of the query. So basically the table from which the data is selected is not the product entity table anymore (you lose all products base attributes) the main table becomes the product index. This is an core update that the Magento team added starting 1.7 versions." Refer the following

– Magento Learner
Dec 24 '15 at 8:54














sohu.io/questions/886200/…

– Magento Learner
Dec 24 '15 at 8:54





sohu.io/questions/886200/…

– Magento Learner
Dec 24 '15 at 8:54




1




1





wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

– MauroNigrele
Dec 24 '15 at 9:02





wooow my fault folk, for some reason, i was thinking in backend block getCollection method, so in this scenario your first code it's ok I'm not sure if it is the best solution but seems to be ok. Sorry

– MauroNigrele
Dec 24 '15 at 9:02













@MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

– MauroNigrele
Dec 24 '15 at 9:17





@MagentoLearner are you sure about that post? i've just re-checked on a EE1.14 i have installed and still using catalog_product_entity as main table, except when you set to use flat catalog (absolutely recommended) but in both cases you have type_id present in the select. Can you log the query as i've wrote in the original Answer?

– MauroNigrele
Dec 24 '15 at 9:17




1




1





mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

– MauroNigrele
Dec 24 '15 at 9:34





mmmm interesting... i Also check the query in a search case and is using catalog_product_entity as main table, maybe the "magento team" have decided to rollback that changes. I can't found any 1.7 installed to check it but the idea of change the main table of an entity sounds like a very bad architectural decision... Well note that you just ruined my weekend, now i need to find and install a CE1.7 and look this crap with my own eyes... my wife will not be happy with this :)

– MauroNigrele
Dec 24 '15 at 9:34

















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f94963%2fproduct-list-attribute-filter-query%23new-answer', 'question_page');

);

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







Popular posts from this blog

Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

Aasi (pallopeli) Navigointivalikko