Skip to content

Instantly share code, notes, and snippets.

@hannesme
hannesme / gist:4593963
Created January 22, 2013 11:37
Magento: Get Products Category Path (for example for tracking stuff)
you can use this in your templae:
Mage::helper('catalog')->getBreadcrumbPath();
Warning: Function returns multidimensional array, not string as noted! So you have to loop a little bit...
@hannesme
hannesme / magento_product_list_sort_order
Last active December 10, 2015 22:28
Magento: Change Category Products Sort Order via Layout
<catalog_category_default>
<reference name="product_list">
<action method="setDefaultDirection">
<dir>DESC</dir>
</action>
</reference>
</catalog_category_default>