Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Change product sort by virtumart

Change product sort by virtumart

Hi.
Can i use metamod to change product sort by in virtuemart depenting on category?
For example with using javascript code for specific categories ids.

Thank you

patben
Beginner Modder
ranks
useravatar
Offline
12 Posts
Administrator has disabled public posting

Re: Change product sort by virtumart

Hi Patben,

it MAY be possible but that all depends on what method is used for creating the product list in the first place.

1 - if the product list is a standard VM category page then there's not going to be an easy way to do it (i.e. it's not a built-in action in Chameleon or MetaMod).

However, there's an outside chance that someone clever with JS (that's not me!) could code some JS that can sort the items on the page in an arbitrary order, based on the raw listing on the page. i.e. the page outputs the list of items in whatever order it uses, then the JS detects the list of items and sorts them post-page-load.

MetaMod or Chameleon can definitely help to output that JS code onto the page based on category. Both products give you methods for detecting the VM category. In Chameleon you would then add the desired JS code to one of the boxes in the "Succeed Action". In MetaMod you just write a little code to echo the JS directly into the page, or use a Joomla method for outputting the JS into the head section of the HTML.

2 - If the list of items is produced via a module, then MetaMod MAY be able to change the sort order. If the module has a parameter that you would normally manipulate in the Module Manager that controls sort order, then MetaMod can manipulate that parameter on the fly when it loads that module onto the page. See this page for details: http://www.metamodpro.com/metamod/contr … parameters

I trust this helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5912
Total Posts Today:
4
User Info:
 
Total Users:
11504
Newest User:
toko solo
Members Online:
0
Guests Online:
165

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked