VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: pm4698 on October 12, 2015, 15:06:33 PM

Title: Split asc and dsc prices
Post by: pm4698 on October 12, 2015, 15:06:33 PM
Hello there,

I use joomla 2.5.x and vm 2.6.12.

I noticed that in category view of virtuemart the ordering container shows some options that can be configured through  virtuemart configuration. But, for ascending and descending the list there is a +- button.
I would like to somehow split this +- button and have for example Product price asc and product price des as 2 different values in drop down container and not clicking the same option to ascend or descent the results.

I searched the forum for answers, i only found how to change the default order (asc to dec) but not this one.

Any help would be appreciate it.

P.S. I saw that the file that should be edited is administrator/components/com_virtuemart/models/product.php.
Title: Re: Split asc and dsc prices
Post by: Studio 42 on October 12, 2015, 21:36:12 PM
You can regenerate it from
VmConfig::get ('browse_orderby_fields');
to get valid fields.

Title: Re: Split asc and dsc prices
Post by: pm4698 on October 12, 2015, 21:39:45 PM
Sorry i am at novice xp around this. Can you post solution inside code?
Actually, the idea is to replace the one link with 2. One ascending one descenting
Title: Re: Split asc and dsc prices
Post by: Studio 42 on October 13, 2015, 00:59:05 AM
Hi,

It's  a full function doing this, not 2 lines, else i hade you already write  the code here.
I don't need this and don't have lust to spend 2 hours now only for one user.
This is a forum, not a support center ;)

Thanks for understand,

Patrick
Title: Re: Split asc and dsc prices
Post by: pm4698 on October 13, 2015, 06:12:12 AM
I appreciate your help and i understand your logic. I dont want anyone to spend hours on this. I just posted this in case someone has done this already and wants to share a solution!