$cat_id = 345;
$category = Mage::getModel('catalog/category')->load($cat_id);
$collection = $category->getProductCollection()->addAttributeToSort('position');
Mage::getModel('catalog/layer')->prepareProductCollection($collection);
foreach ($collection as $product) {
var_dump( $product->getName() );
}
you can get images
<a href="#"><img src="http://buylifeionizers.com/media/catalog/product<?php echo $product->getThumbnail();?>" alt="img"/></a>
<?php echo $product->getThumbnail();?> you can get the content using get method
make sure after get the first letter must be capital
for example(thumbnail as getThumbnail() )
Comments
Post a Comment