Created
January 26, 2012 14:55
-
-
Save razbakov/1683127 to your computer and use it in GitHub Desktop.
ProductList in layered navigation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
public function setCollection($collection){ | |
//... | |
$collection->joinAttribute('hohlkammern', 'catalog_product/hohlkammern', 'entity_id', null, 'right'); | |
$collection->joinAttribute('hohlkammern_alt', 'catalog_product/hohlkammern_alt', 'entity_id', null, 'right'); | |
$collection->joinAttribute('ausreissteg', 'catalog_product/ausreissteg', 'entity_id', null, 'right'); | |
$whereStatement = " | |
at_hohlkammern.value = {$hohlkammern} | |
or at_hohlkammern_alt.value = {$value} | |
or (at_hohlkammern.value = {$hohlkammernPlusOne} and at_ausreissteg.value = 1) | |
or (at_hohlkammern_alt.value = {$valuePlusOne} and at_ausreissteg.value = 1) | |
"; | |
$collection->getSelect()->where($whereStatement); | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment