Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



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

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

Beginner Modder
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 Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3330 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Posts this week:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky