VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: sui_page on February 27, 2014, 02:27:20 AM

Title: Sorting product category list alphabetically
Post by: sui_page on February 27, 2014, 02:27:20 AM
I have a select option which displayes a certaing product category. How can I change this so it displays alphabetically?

<?php
$product = array();
$product[]= JHTML::_('select.option','','-select-');
echo $lists['product']= JHTML::_('select.genericList',$product,'product','class="inputbox" size="1"''value''text'); 
?>
Title: Re: Sorting product category list alphabetically
Post by: mowlman on March 05, 2014, 18:05:52 PM

For Product ordering, have you looked under VM config  - Product Ordering Tab?   This appears to allow for product ordering.

/administrator/index.php?option=com_virtuemart&view=config

If you are able to get things sorted by using the settings here, then no code changes are needed.
Title: Re: Sorting product category list alphabetically
Post by: sui_page on March 05, 2014, 22:40:02 PM
Quote from: mowlman on March 05, 2014, 18:05:52 PM

For Product ordering, have you looked under VM config  - Product Ordering Tab?   This appears to allow for product ordering.

/administrator/index.php?option=com_virtuemart&view=config

If you are able to get things sorted by using the settings here, then no code changes are needed.

I did try that method but it didn't work. I was using a custom application which was displaying the list at runtime so the solution involved a bit of AJAX work.
Title: Re: Sorting product category list alphabetically
Post by: balai on March 06, 2014, 10:01:08 AM
If you want to avoid hacking you can use Custom Filters. Its in the Free version
http://breakdesigns.net/extensions/custom-filters