Breaking News
Home / Magento / Display Position on List page Magento 1x

Display Position on List page Magento 1x

If you want to display Category product position on list.phtml please add bellow code for test it

$catArray = Mage::registry('current_category');
$catId = $catArray['entity_id'];
$category = Mage::getModel('catalog/category')->load($catId);
$productPositions = Mage::getResourceModel('catalog/category')->getProductsPosition($category);
echo $productPositions[$_product->getId()];

Hits: 9

Leave a Reply