Author Topic: Split asc and dsc prices  (Read 747 times)

pm4698

  • Jr. Member
  • **
  • Posts: 156
Split asc and dsc prices
« 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.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Split asc and dsc prices
« Reply #1 on: October 12, 2015, 21:36:12 pm »
You can regenerate it from
Code: [Select]
VmConfig::get ('browse_orderby_fields');to get valid fields.


pm4698

  • Jr. Member
  • **
  • Posts: 156
Re: Split asc and dsc prices
« Reply #2 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Split asc and dsc prices
« Reply #3 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

pm4698

  • Jr. Member
  • **
  • Posts: 156
Re: Split asc and dsc prices
« Reply #4 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!