I have referred this below link.

Magento- Custom Product labels in category view pages

I Have

  1. created 1 static block name : new_sale
  2. Created 1 Attribute : new_sale

My list.phtml Code--


<div class="middle-left">
$collections = Mage::getModel('simplebanner/simplebanner')->getCollection()
->addFieldToFilter('status', array('eq' => 1));
foreach($collections as $collection) { 
echo '<img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'/'.$collection->getImage().'" height="50" width="50" >'; 

How Would I Create My list.phtml ? As Per I Give Link Has A list.phtml But I Wan't To Display My Image.

  • Tell me above code output . – Murtuza Zabuawala Sep 2 '16 at 11:50
  • As per i give a link, link has a one file list.phtml. it has function <?php $_collectionSize = $_productCollection->count() ?> i write this all code in my list.phtml it give me a fetal error – Rushikesh Solanki Sep 2 '16 at 11:52
  • where you get fatal error?? – Murtuza Zabuawala Sep 2 '16 at 11:54
  • At The Front End Product listing Page – Rushikesh Solanki Sep 2 '16 at 11:55
  • Pls, If U See I Give A Link, Link Has A list.phtml Code, – Rushikesh Solanki Sep 2 '16 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.