VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: hk on April 26, 2014, 12:05:58 PM

Title: Number of products and Sort By options
Post by: hk on April 26, 2014, 12:05:58 PM
Hi,

I am using VM 2.0.26d in test region.

I have removed the Sort By in Category page using Override and using the below code instead in orderby-displaynumber:
<div class="pagesort">
  <div class="clear"></div>
  <ul>
    <li>
      <strong>Sort by </strong>
    </li>

    <?php 
     $hklink 
JRoute::('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' $this->category->virtuemart_category_id,FALSE); 
    
?>

    <li><a id="hk" href="<?php echo $hklink?>">Product Name A-Z</a></li>
    <li><a href="<?php echo $hklink?>/dirDesc">Product Name Z-A</a></li>
    <li><a href="<?php echo $hklink?>/by,product_price">Price low-high</a></li>
    <li><a href="<?php echo $hklink?>/by,product_price/dirDesc">Price high-low</a></li>
  </ul>
  <div class="clear"></div>
</div>


This is to give user friendly for Sorting fields.
Looks like the Sort by Price works fine, but Sort by Product Name is not working properly.
I works fine in my live site which is using VM 2.0.18a

I also removed the Pagination & LimitBox from the category page, but the issue is in all the pages 10 products are listed. How do I change such that 9 products are shown.
In my live site, 9 products are shown for each category page.


[attachment cleanup by admin]
Title: Re: Number of products and Sort By options
Post by: hk on May 17, 2014, 09:18:29 AM
Not sure if this is a bug, any comments please.
Title: Re: Number of products and Sort By options
Post by: balai on May 17, 2014, 10:47:36 AM
QuoteI also removed the Pagination & LimitBox from the category page, but the issue is in all the pages 10 products are listed. How do I change such that 9 products are shown.

Removing the pagination does not change the products per page. I think that you can change that from the VM configuration
Title: Re: Number of products and Sort By options
Post by: GJC Web Design on May 17, 2014, 13:08:33 PM
isn't it  Frontend default items per list view ?
Title: Re: Number of products and Sort By options
Post by: hk on May 20, 2014, 17:50:18 PM
I figured out the number of items in a page.
However, there is still issue in Order By options.
The Sort by Price works fine, but Sort by Product Name is not working properly.