1

I'm sure there is a simple solution for this, however, having searched, I can't find one.

I need to list out all the configurable product skus for the current category on the catalog/category/view.phtml so i can include it in a tracking pixel.

Any help would be gratefully appreciated.

Thanks

4

1 回答 1

0

Put this code in the view.phtml file

<?php
$productCollections=$_category->getProductCollection()->addAttributeToFilter('type_id','configurable');
foreach($productCollections as $p)
{
        echo $p->getSku();
}
?>
于 2012-06-19T06:14:56.997 回答