I want to display an option list for configurable attributes on product list page in magento -


i want display option list configurable attributes on product list page in magento, appears on product view page configurable products.i tried nothing working, looked similar topics useless.please me resolve issue.

<?php     $_productcollection=$this->getloadedproductcollection();     $_helper = $this->helper('catalog/output');     $sidebar=mage::getstoreconfig('buyshoplayout/product_listing/sidebar');     $i=0;     $count=0;     $span=3;     $p_in_row=4;     $type=mage::getstoreconfig('buyshoplayout/product_listing/product_listing_image_size');     if($type=='small')     {         $span=2;         $p_in_row=6;     }     ?> <?php if(!$_productcollection->count()): ?> <div class="category-products aligncenter">     <?php echo $this->getlayout()->createblock('cms/block')->setblockid('buyshop_no_products')->tohtml() ?> </div> <?php else: ?> <div class="category-products">     <?php  echo $this->gettoolbarhtml() ?>      <?php // list mode ?>     <?php if($this->getmode()!='grid'): ?>     <?php foreach ($_productcollection $_product): ?>         <?php         $widthbig=258;         $heightbig=245;         $widthsmall=71;         $heightsmall=65;         $count++;         ?>          <!--product-->         <div class="row product-listing">             <?php echo mage::helper('buyshopconfig')->getproducthtml($_product,$this,$widthbig,$heightbig,$span,false,true,true,false,$this->getpricehtml($_product, true))?>             <div class="span6 product-detailes">                 <h3 class="product-name bottom-line"><a href="<?php echo $_product->getproducturl()?>"><?php echo $this->striptags($_product->getname(), null, true)?></a></h3>                 <div class="bottom-line">                         <?php echo $this->getpricehtml($_product, true) ?>                     <div class="product-review">                         <?php echo mage::helper('buyshopconfig')->getstars($_product)?>                     </div>                 </div>                 <div class="bottom-line"><?php echo $_helper->productattribute($_product, $_product->getshortdescription(), 'short_description') ?></div>                 <div class="product-buttons">                     <?php echo mage::helper('buyshopconfig')->addtocartlink($_product,$this,true)?>                     <div class="add-to-links">                         <ul>                             <?php echo mage::helper('buyshopconfig')->addwishcomplink($_product,$this,true)?>                         </ul>                     </div>                 </div>             </div>         </div>         <!--product eof-->             <?php  endforeach; ?>     <?php else: ?>      <?php // grid mode ?>   <?php if(!empty(mage::registry('current_category')->name)):?>     <h2><?php echo mage::registry('current_category')->name ?></h2> <?php endif; ?>  <?php if($sidebar):?><div class="row big_with_description"><?php endif; ?>     <?php foreach ($_productcollection $_product): ?>         <?php  if(!$_product->issaleable() && !mage::getstoreconfig('cataloginventory/options/show_out_of_stock'))continue; ?>         <?php         $widthbig=258;         $heightbig=245;         $widthsmall=71;         $heightsmall=65;         $count++;         ?>          <?php             if(!$sidebar)             {                 $i++;                 if($i==1)echo '<div class="row big_with_description">';             }             $price=$this->getpricehtml($_product, true);         ?>          <!--product-->         <?php echo mage::helper('buyshopconfig')->getproducthtml($_product,$this,$widthbig,$heightbig,$span,false,true,false,true,$price)?>         <?php echo mage::helper('buyshopconfig')->getproducthover($_product,$this,$widthbig,$heightbig,$widthsmall,$heightsmall,$type,true,true,$price)?>         <!--product eof-->           <?php         if(!$sidebar)         {             if($i==$p_in_row || $count==count($_productcollection))             {                 echo '</div>';                 $i=0;             }         }         ?>      <?php endforeach; ?>  <?php if($sidebar):?></div><?php endif; ?>       <?php endif; ?>      <?php echo $this->gettoolbarhtml() ?>  </div> <?php endif; ?> 


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -