Magento Forum

Search and display manufacturers list for all nested categories/products. 
Jr. Member
Total Posts:  1
Joined:  2008-07-25

I have a list of manufacters based on this code snippet I found in these forums.  I have pasted it below.  This works fine.  However, to build the links to connect them, I need to provide a category id.

Example: /catalog/category/view/manufacturer/17/id/4/
First integer is the attribute id, so in this case it’s the manufacturer “Dummy”.  The last integer is a category id number.  If I use a specific category id number it works, provided there are products directly under that category.  If I use the root category that all my categories are nested under, I get nothing. 

My question is: Can I somehow create a URL that will display all products matching the attribute value?

$attributes Mage::getResourceModel('eav/entity_attribute_collection'
$attribute $attributes->getFirstItem()->setEntity($product->getResource()); 
            /* @var $attribute Mage_Eav_Model_Entity_Attribute */ 
$manufacturers $attribute->getSource()->getAllOptions(true);
foreach($manufacturers as $brand
echo "<a href=\"catalog/category/view/manufacturer/" . $brand["value"] . "/id/0/\">" $brand["label""</a><br />"


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top