Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Is it possible to get a list of all manufacturers? 
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Is there a way to get a list of all manufacturers (and for which I’d ultimately use to show all products for each manufacturer)?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shpigford
Sr. Member
 
Avatar
Total Posts:  171
Joined:  2007-09-03
Denver, CO
 

Anyone have an idea on how to do this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

add your manufacturers in the Manufacturer Attribute’s label option.

In the Properties, change Manufacturer Attribute for the following if it hasn’t already done so:
Use in Layered Navigation: Filterable (with result) if it has already been set.
Catalog Input Type for Store Owner: Dropdown

 
Magento Community Magento Community
Magento Community
Magento Community
 
pluc
Jr. Member
 
Total Posts:  27
Joined:  2008-01-11
 

That’s all nice and dandy, but how do you output the actual dropdown on a custom template?

 
Magento Community Magento Community
Magento Community
Magento Community
 
shopwoc
Member
 
Total Posts:  45
Joined:  2008-10-07
 

I see this question everywhere but not a solution.  If it can’t be done let us know.  Please, someone with Magento show us how to echo a list of all the Manufacturers so people can shop our catalog by Manufacturer without picking a category.  I like the list of Categories and then right below that a list of all the Manufacturers.  This is imperative to my shop as many users like to shop by Brand/Designer.  Help please!

 
Magento Community Magento Community
Magento Community
Magento Community
 
pluc
Jr. Member
 
Total Posts:  27
Joined:  2008-01-11
 

// In the Block
  public function getAllManu()
    
{
      $product 
Mage::getModel('catalog/product');
      
$attributes Mage::getResourceModel('eav/entity_attribute_collection')
                  ->
setEntityTypeFilter($product->getResource()->getTypeId())
                  ->
addFieldToFilter('attribute_code''manufacturer');
      
$attribute $attributes->getFirstItem()->setEntity($product->getResource());
      
$manufacturers $attribute->getSource()->getAllOptions(false);
      return 
$manufacturers;
    
}

//In the template:
                                   
<select name="manufacturer" style="" >

                    <
option selected="selected">

                        
<?php echo $this->__('Select Manufacturer'?>

                    
</option>

                    
<?php foreach ($this->getAllManu() as $manufacturer): ?>

                        
<option value="<?php echo $manufacturer['value'] ?>"><?php echo $manufacturer['label'] ?></option>

                    
<?php endforeach; ?>

                
</select>
 
Magento Community Magento Community
Magento Community
Magento Community
 
shopwoc
Member
 
Total Posts:  45
Joined:  2008-10-07
 

Thank you soo much!  This is exactly what I’ve been searching for.  I will go ahead and distribute this code around the forum where I’ve seen it needed.  Again, thank you so much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
shopwoc
Member
 
Total Posts:  45
Joined:  2008-10-07
 

I was wondering how to make each manufacturer a link and in turn show all the products by that manufacturer.  Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dyne
Jr. Member
 
Total Posts:  5
Joined:  2008-08-06
Montréal, Canada
 

Did you find ? I need to link manufacturer with a page that list all products with manufacturer attribute selected, please…

 
Magento Community Magento Community
Magento Community
Magento Community
 
shopwoc
Member
 
Total Posts:  45
Joined:  2008-10-07
 

Still no luck. I haven’t found anyone that can help us out.  I hope something comes up soon.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Naresh Vajawat
Member
 
Total Posts:  47
Joined:  2008-09-22
India
 

showc : Were you able to implement this. If you were you can see how magento creates the link when you click on the manufacturer and replicate it. I want to be able to do this from my home page where the customers choose a manufacter and all products in all categroies get listed. Let me know if any body was able to implement the same.

Thanks,
Naresh

 
Magento Community Magento Community
Magento Community
Magento Community
 
jklina
Sr. Member
 
Avatar
Total Posts:  82
Joined:  2008-06-12
Philadelphia PA
 

http://www.magentocommerce.com/boards/viewthread/19982/

 
Magento Community Magento Community
Magento Community
Magento Community
 
akaghzi
Jr. Member
 
Total Posts:  6
Joined:  2008-11-20
 

what files need to be changed? I am using 1.1.8 and 1.2.1 versions.

pluc - 08 October 2008 09:25 AM

// In the Block
  public function getAllManu()
    
{
      $product 
Mage::getModel('catalog/product');
      
$attributes Mage::getResourceModel('eav/entity_attribute_collection')
                  ->
setEntityTypeFilter($product->getResource()->getTypeId())
                  ->
addFieldToFilter('attribute_code''manufacturer');
      
$attribute $attributes->getFirstItem()->setEntity($product->getResource());
      
$manufacturers $attribute->getSource()->getAllOptions(false);
      return 
$manufacturers;
    
}

//In the template:
                                   
<select name="manufacturer" style="" >

                    <
option selected="selected">

                        
<?php echo $this->__('Select Manufacturer'?>

                    
</option>

                    
<?php foreach ($this->getAllManu() as $manufacturer): ?>

                        
<option value="<?php echo $manufacturer['value'] ?>"><?php echo $manufacturer['label'] ?></option>

                    
<?php endforeach; ?>

                
</select>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 
dyne - 14 October 2008 05:21 AM

Did you find ? I need to link manufacturer with a page that list all products with manufacturer attribute selected, please…

Here you are: Improved Navigation
Shop By Brand, attributes images, links from product page to brand pages and many more

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