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

Product order in list or grid view
 
madog32
Jr. Member
 
Total Posts:  10
Joined:  2008-03-30
 

Is it possible to order your products in the list view by their SKU number? we are using Magento as a catalogue and want certain products at the top of the page. Does anyone know how it is done now?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Falk
Jr. Member
 
Total Posts:  17
Joined:  2008-03-31
 

I would also like to have products in grid view in a custom order.  Anyone find a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vofka
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2008-06-19
 

to madog32:
go to your mage/catalog/block/product/list.php
and find something like that

if ($this->getCategoryId()) {
$category = Mage::getModel(’catalog/category’)->load($this->getCategoryId());
$layer->setCurrentCategory($category);
}
$this->_productCollection = $layer->getProductCollection()
}
return $this->_productCollection;
change $this->_productCollection = $layer->getProductCollection()
on
$this->_productCollection = $layer->getProductCollection()->setOrder(’sku’, ‘asc’);

 
Magento Community Magento Community
Magento Community
Magento Community
 
madog32
Jr. Member
 
Total Posts:  10
Joined:  2008-03-30
 

Vofka,

Thank you for your response, I also found this thread very useful.

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

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