php - How To Show "Shop By" left sidebar attribute list in "Dropdown" like as "Sort By" Toolbar? -


how show "shop by" left sidebar attribute list in "dropdown" "sort by" toolbar?

i want show attribute list same "sort by" toolbar dropdown list.

my toolbar.phtml code is

    <?php /**  * magento  *  * notice of license  *  * source file subject academic free license (afl 3.0)  * bundled package in file license_afl.txt.  * available through world-wide-web @ url:  * http://opensource.org/licenses/afl-3.0.php  * if did not receive copy of license , unable  * obtain through world-wide-web, please send email  * license@magentocommerce.com can send copy immediately.  *  * disclaimer  *  * not edit or add file if wish upgrade magento newer  * versions in future. if wish customize magento  * needs please refer http://www.magentocommerce.com more information.  *  * @category    design  * @package     base_default  * @copyright   copyright (c) 2012 magento inc. (http://www.magentocommerce.com)  * @license     http://opensource.org/licenses/afl-3.0.php  academic free license (afl 3.0)  */ ?> <?php /**  * product list toolbar  *  * @see mage_catalog_block_product_list_toolbar  */ ?> <?php /**  * - pager moved after sorter. show pager if there pages.  * - amount , limiter moved inside sorter  * - changed order of main elements  */ ?> <?php if($this->getcollection()->getsize()): ?> <div class="toolbar">      <?php if( $this->isexpanded() ): ?>     <div class="sorter">          <p class="amount">             <?php if($this->getlastpagenum()>1): ?>                 <?php echo $this->__('items %s %s of %s total', $this->getfirstnum(), $this->getlastnum(), $this->gettotalnum()) ?>             <?php else: ?>                 <strong><?php echo $this->__('%s item(s)', $this->gettotalnum()) ?></strong>             <?php endif; ?>         </p>          <div class="sort-by">             <label><?php echo $this->__('sort by') ?></label>             <select onchange="setlocation(this.value)">             <?php foreach($this->getavailableorders() $_key=>$_order): ?>                 <option value="<?php echo $this->getorderurl($_key, 'asc') ?>"<?php if($this->isordercurrent($_key)): ?> selected="selected"<?php endif; ?>>                     <?php echo $this->__($_order) ?>                 </option>             <?php endforeach; ?>             </select>             <?php if($this->getcurrentdirection() == 'desc'): ?>                 <a class="category-desc ic ic-arrow-up" href="<?php echo $this->getorderurl(null, 'asc') ?>" title="<?php echo $this->__('set ascending direction') ?>"></a>             <?php else: ?>                 <a class="category-asc ic ic-arrow-down" href="<?php echo $this->getorderurl(null, 'desc') ?>" title="<?php echo $this->__('set descending direction') ?>"></a>             <?php endif; ?>         </div>          <div class="sort-by">             <label><?php echo $this->__('sort by') ?></label>             <select onchange="setlocation(this.value)">             <?php foreach($this->getavailableorders() $_key=>$_order): ?>                 <option value="<?php echo $this->getorderurl($_key, 'asc') ?>"<?php if($this->isordercurrent($_key)): ?> selected="selected"<?php endif; ?>>                     <?php echo $this->__($_order) ?>                 </option>             <?php endforeach; ?>             </select>             <?php if($this->getcurrentdirection() == 'desc'): ?>                 <a class="category-desc ic ic-arrow-up" href="<?php echo $this->getorderurl(null, 'asc') ?>" title="<?php echo $this->__('set ascending direction') ?>"></a>             <?php else: ?>                 <a class="category-asc ic ic-arrow-down" href="<?php echo $this->getorderurl(null, 'desc') ?>" title="<?php echo $this->__('set descending direction') ?>"></a>             <?php endif; ?>         </div>          <div class="limiter">             <label><?php echo $this->__('show') ?></label>             <select onchange="setlocation(this.value)">             <?php foreach ($this->getavailablelimit()  $_key=>$_limit): ?>                 <option value="<?php echo $this->getlimiturl($_key) ?>"<?php if($this->islimitcurrent($_key)): ?> selected="selected"<?php endif ?>>                     <?php echo $_limit ?>                 </option>             <?php endforeach; ?>             </select><span class="per-page"> <?php echo $this->__('per page'); ?></span>         </div>          <?php if( $this->isenabledviewswitcher() ): ?>         <p class="view-mode">             <?php $_modes = $this->getmodes(); ?>             <?php if($_modes && count($_modes)>1): ?>                 <label><?php echo $this->__('view as') ?>:</label>                 <?php //removed spaces foreach loop improve layout of buttons ?>                 <?php foreach ($this->getmodes() $_code=>$_label): ?><?php $codetolower = strtolower($_code); if($this->ismodeactive($_code)): ?><span title="<?php echo $_label ?>" class="<?php echo $codetolower; ?> ic ic-<?php echo $codetolower; ?>"></span><?php else: ?><a href="<?php echo $this->getmodeurl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo $codetolower; ?> ic ic-<?php echo $codetolower; ?>"></a><?php endif; ?><?php endforeach; ?>             <?php endif; ?>         </p>         <?php endif; ?>      </div> <!-- end: sorter -->     <?php endif; ?>      <?php //show pager if there pages ?>     <?php if ($pagerhtml = trim($this->getpagerhtml())): ?>     <div class="pager">         <?php echo $pagerhtml; ?>     </div>     <?php endif; ?>  </div> <?php endif ?> 

list.phtml code

<?php /**  * magento  *  * notice of license  *  * source file subject academic free license (afl 3.0)  * bundled package in file license_afl.txt.  * available through world-wide-web @ url:  * http://opensource.org/licenses/afl-3.0.php  * if did not receive copy of license , unable  * obtain through world-wide-web, please send email  * license@magentocommerce.com can send copy immediately.  *  * disclaimer  *  * not edit or add file if wish upgrade magento newer  * versions in future. if wish customize magento  * needs please refer http://www.magentocommerce.com more information.  *  * @category    design  * @package     base_default  * @copyright   copyright (c) 2011 magento inc. (http://www.magentocommerce.com)  * @license     http://opensource.org/licenses/afl-3.0.php  academic free license (afl 3.0)  */ ?> <?php /**  * product list template  *  * @see mage_catalog_block_product_list  */ ?>  <?php     $_productcollection=$this->getloadedproductcollection();     $_collectionsize = $_productcollection->count(); ?>  <?php if ($_collectionsize && $tmphtml = $this->getchildhtml('block_category_above_collection')): ?>     <div class="block_category_above_collection std"><?php echo $tmphtml; ?></div> <?php endif; ?>  <?php if(!$_collectionsize): ?>     <?php if ($tmphtml = $this->getchildhtml('block_category_above_empty_collection')): ?>         <div class="block_category_above_empty_collection std"><?php echo $tmphtml; ?></div>     <?php else: ?>         <p class="note-msg empty-catalog"><?php echo $this->__('there no products matching selection.') ?></p>     <?php endif; ?> <?php else: ?>  <?php     $_helper = $this->helper('catalog/output');     $theme = $this->helper('ultimo');     $helplabels = $this->helper('ultimo/labels');     $helptemplate = $this->helper('ultimo/template');     $helpimg = $this->helper('infortis/image');      //default image size     $imgwidth = 295;     $imgheight = 295;      //aspect ratio settings     if ($theme->getcfg('category/aspect_ratio'))         $imgheight = 0; //height computed automatically (based on width) keep aspect ratio      //hide toolbar     $hidetoolbar = false;     if ($this->gethidetoolbar())     {         $hidetoolbar = true;     } ?>  <div class="category-products">     <?php if (!$hidetoolbar): ?>         <?php echo $this->gettoolbarhtml() ?>     <?php endif; ?>     <?php if($this->getmode()!='grid'): //list mode ?>      <?php         //get list configuration array         $lc = $theme->getcfggroup('category_list');          //list classes         $listclasses = '';         if ($lc['hover_effect'])             $listclasses = ' hover-effect';       ?>      <?php $_iterator = 0; ?>     <ul class="products-list<?php if($listclasses) echo $listclasses; ?>" id="products-list">     <?php foreach ($_productcollection $_product): ?>         <li class="item<?php if( ++$_iterator == sizeof($_productcollection) ): ?> last<?php endif; ?>">              <?php //product image ?>             <div class="product-image-wrapper grid12-4 mobile-grid-half">                  <a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $this->striptags($this->getimagelabel($_product, 'small_image'), null, true) ?>" class="product-image" style="max-width:<?php echo $imgwidth; ?>px;">                     <img src="<?php echo $helpimg->getimg($_product, $imgwidth, $imgheight, 'small_image'); ?>" alt="<?php echo $this->striptags($this->getimagelabel($_product, 'small_image'), null, true) ?>" />                      <?php if ($theme->getcfg('category/alt_image')): ?>                         <?php echo $theme->getaltimghtml($_product, $imgwidth, $imgheight); ?>                     <?php endif; ?>                      <?php echo $helplabels->getlabels($_product); //product labels ?>                 </a>              </div> <!-- end: product-image-wrapper -->              <?php //product description ?>             <div class="product-shop grid12-5 mobile-grid-half">                 <div class="product-shop-inner">                     <?php $_productnamestripped = $this->striptags($_product->getname(), null, true); ?>                     <h2 class="product-name"><a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $_productnamestripped; ?>"><?php echo $_helper->productattribute($_product, $_product->getname() , 'name'); ?></a></h2>                     <?php if($_product->getratingsummary()): ?>                         <?php echo $this->getreviewssummaryhtml($_product, 'short') ?>                     <?php endif; ?>                      <div class="desc std">                         <?php echo $_helper->productattribute($_product, $_product->getshortdescription(), 'short_description') ?>                         <a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $_productnamestripped ?>" class="link-learn"><?php echo $this->__('learn more') ?></a>                     </div>                 </div>             </div>              <div class="right-column grid12-3 mobile-grid-half">                 <?php echo $this->getpricehtml($_product, true) ?>                 <?php if($_product->issaleable()): ?>                     <p><button type="button" title="<?php echo $this->__('add cart') ?>" class="button btn-cart" onclick="setlocation('<?php echo $this->getaddtocarturl($_product) ?>')"><span><span><?php echo $this->__('add cart') ?></span></span></button></p>                 <?php else: ?>                     <p class="availability out-of-stock"><span><?php echo $this->__('out of stock') ?></span></p>                 <?php endif; ?>                  <?php                 if ($lc['addtolinks_simple'])                     echo $helptemplate->getcategoryaddtolinks($_product, $this->getaddtocompareurl($_product), 'addto-gaps-right');                 else                     echo $helptemplate->getcategoryaddtolinkscomplex($_product, $this->getaddtocompareurl($_product), 'addto-gaps-right');                 ?>             </div>          </li>     <?php endforeach; ?>     </ul>     <script type="text/javascript">decoratelist('products-list', 'none-recursive')</script>      <?php else: //grid mode ?>      <?php         //get grid configuration array         $gc = $theme->getcfggroup('category_grid');          //get number of columns (from parameter or theme config)         $columncount = 3;         if ($this->getgridcolumncount())         {             $columncount = $this->getgridcolumncount();         }         else         {             $columncount = $gc['column_count'];         }          //grid classes         $gridclasses = '';         $productnameclasses = '';         if ($gc['display_name'] == 2 && $gc['display_name_single_line'] == true)             $gridclasses .= ' single-line-name';         if ($gc['display_name'] == 1)             $productnameclasses .= ' display-onhover';         if ($gc['centered'])             $gridclasses .= ' centered';         if ($gc['hover_effect'])             $gridclasses .= ' hover-effect';         if ($gc['equal_height'])             $gridclasses .= ' equal-height';          //size of grid elements         if ($gc['elements_size'])         {             $gridclasses .= ' size-' . $gc['elements_size'];         }         else         {             //calculate size based on number of columns             if ($columncount >= 6)             {                 $gridclasses .= ' size-xs';             }             elseif ($columncount >= 4)             {                 $gridclasses .= ' size-s';             }         }          //container "actions" @ bottom of grid item stores button , add-to links         //if @ least 1 of elements set "display on hover" no element set "display":         //apply appropriate classes container.         $actionsclasses = '';         if ($gc['display_addtocart'] == 1 || ($gc['display_addtolinks'] == 1 && !$gc['addtolinks_simple']))         {             $actionsclasses = ' display-onhover';         }         if ($gc['display_addtocart'] == 2 || ($gc['display_addtolinks'] == 2 && !$gc['addtolinks_simple']))         {             $actionsclasses = '';         }     ?>      <ul class="products-grid category-products-grid itemgrid itemgrid-adaptive itemgrid-<?php echo $columncount; ?>col<?php if($gridclasses) echo $gridclasses; ?>">         <?php foreach ($_productcollection $_product): ?>             <li class="item">                  <div class="product-image-wrapper" style="max-width:<?php echo $imgwidth; ?>px;">                      <a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $this->striptags($this->getimagelabel($_product, 'small_image'), null, true); ?>" class="product-image">                         <img src="<?php echo $helpimg->getimg($_product, $imgwidth, $imgheight, 'small_image'); ?>" alt="<?php echo $this->striptags($this->getimagelabel($_product, 'small_image'), null, true); ?>" />                          <?php if ($theme->getcfg('category/alt_image')): ?>                             <?php echo $theme->getaltimghtml($_product, $imgwidth, $imgheight); ?>                            <?php endif; ?>                          <?php echo $helplabels->getlabels($_product); //product labels ?>                     </a>                      <?php //add-to links                         if ($gc['display_addtolinks'] != 0 && $gc['addtolinks_simple'])                         {                             if ($gc['display_addtolinks'] == 1) //display on hover                                 echo $helptemplate->getcategoryaddtolinksicons($_product, $this->getaddtocompareurl($_product), 'addto-links-icons addto-onimage display-onhover');                             else //always display                                 echo $helptemplate->getcategoryaddtolinksicons($_product, $this->getaddtocompareurl($_product), 'addto-links-icons addto-onimage');                         }                     ?>                  </div> <!-- end: product-image-wrapper -->                  <?php if ($gc['display_name'] != 0): ?>                     <h2 class="product-name<?php echo $productnameclasses; ?>"><a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $this->striptags($_product->getname(), null, true) ?>"><?php echo $_helper->productattribute($_product, $_product->getname(), 'name') ?></a></h2>                 <?php endif; ?>                  <?php if ($_product->getratingsummary()): ?>                     <?php if ($gc['display_rating'] == 1): //display on hover ?>                         <div class="display-onhover ratings-wrapper"><?php echo $this->getreviewssummaryhtml($_product, 'short') ?></div>                     <?php elseif ($gc['display_rating'] == 2): //always display ?>                         <?php echo $this->getreviewssummaryhtml($_product, 'short') ?>                     <?php endif; ?>                 <?php endif; ?>                  <?php if ($gc['display_price'] == 1): //display on hover ?>                     <div class="display-onhover"><?php echo $this->getpricehtml($_product, true); ?></div>                 <?php elseif ($gc['display_price'] == 2): //always display ?>                     <?php echo $this->getpricehtml($_product, true); ?>                 <?php endif; ?>                  <?php                     //if @ least 1 element set "display on hover" no element set "display":                     //aggregate classes elements , apply them "actions" container.                     $actionsclasses = '';                     if ($gc['display_addtocart'] == 1 || ($gc['display_addtolinks'] == 1 && !$gc['addtolinks_simple']))                     {                         $actionsclasses = ' display-onhover';                     }                     if ($gc['display_addtocart'] == 2 || ($gc['display_addtolinks'] == 2 && !$gc['addtolinks_simple']))                     {                         $actionsclasses = '';                     }                 ?>                  <div class="actions clearer<?php echo $actionsclasses; ?>">                     <?php //cart button ?>                     <?php if ($gc['display_addtocart'] != 0): ?>                         <?php if ($_product->issaleable()): ?>                             <button type="button" title="<?php echo $this->__('add cart') ?>" class="button btn-cart" onclick="setlocation('<?php echo $this->getaddtocarturl($_product) ?>')"><span><span><?php echo $this->__('add cart') ?></span></span></button>                         <?php else: ?>                             <p class="availability out-of-stock"><span><?php echo $this->__('out of stock') ?></span></p>                         <?php endif; ?>                     <?php endif; ?>                      <?php //add-to links                         if ($gc['display_addtolinks'] != 0 && !$gc['addtolinks_simple'])                         {                             echo $helptemplate->getcategoryaddtolinks($_product, $this->getaddtocompareurl($_product), 'addto-gaps-right');                         }                     ?>                 </div> <!-- end: actions -->             </li>         <?php endforeach; ?>         </ul>     <?php endif; //end: if grid mode ?>      <?php if (!$hidetoolbar): ?>         <div class="toolbar-bottom">             <?php echo $this->gettoolbarhtml() ?>         </div>     <?php endif; ?> </div> <?php endif; ?>  <?php if ($_collectionsize && $tmphtml = $this->getchildhtml('block_category_below_collection')): ?>     <div class="block_category_below_collection std"><?php echo $tmphtml; ?></div> <?php endif; ?> 


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -