Magento, Implement Dropdown attribute filtering
So I am new to Magento and still trying to get my get my head wrapped around it. Basically I have开发者_JAVA技巧 multiple dropdowns and am trying to sort products in a carousel. (See attached screenshot)
My question is how would I do this with Magento and php. I am fairly familiar with the ajax part. But I am unfamiliar with Magento's methods and would like suggestions from the experts here. What would be the best way to go about this using Magento to do this. I could do this with straight php pretty easy by building a dynamic query with the selected attribute. (I'm sure there are other ways too.) But if anyone can point me in the right direction. It would help me get this project done. Thanks in advance.
I made a dropdown filter category
Around line 50 in app/desing/frontend/your/theme/template/catalog/product/list/toolbar.phtml If you replace all the code inside
For
<!--Filter by Categories-->
<?php
$_helper = Mage::helper('catalog/category');
$_categories = $_helper->getStoreCategories();
$currentCategory = Mage::registry('current_category');
?>
<div class="block block-list block-categorys">
<div class="block-content">
<ul class="category_sub">
<?php if (count($_categories) > 0){ ?>
<?php
global $index;
global $data;
?>
<!-- necesary -->
<select onchange="setLocation(this.value)">
<option selected ="selected"><?php echo $this->__('Categories') ?></option>
<?php foreach($_categories as $_category){ ?>
<option value="<?php echo $_helper->getCategoryUrl($_category) ?>"><?php echo $_category->getName();?></option>
<?php } ?>
</select>
<?php } ?>
</ul>
</div>
</div>
hope you find it useful
精彩评论