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.

 

Recipe: Display unique module on each Virtuemart category page.

Recipe: Display unique module on each Virtuemart category page.

Joomla Version: V 1.54
VirtueMart: V 1.13
Host: LocalHost

I am currently working on a shop that is made made in Virtuemart. The shop has 3-categories , again build from within Virtuemart. Each category has products in it that have particular parameters. I have recently purchased a module from Ledgloeilamp.com that allows me to filter the products in a category according to parameters. One of my categories is International Literature, and it has 100-products. These products in the International Literature category, can be filtered by installing the new module from Ledgloeilamp. However, the problem is that the module is a Joomla module and I want to customize and decide not to display the module in another category such as International Foods which has different parameters and so I want to display the parameter and module filter for those parameter only on one category page and its products in Virtuemart. I checked the recipe from MetaMod at:

http://www.metamodpro.com/support/recip … mart-pages

This recipe looks nice, but I am not sure which file I have to edit and where I have to insert these changes. I am new to PhP/Joomla/Virtuemart. How can I make it so that I can decide which module to show on which category page and its associate product pages.

Please help. I am stuck....I've installed the Metamod but I am not sure where to make these changes in the recipe.

Thanks,

Ovais

ovaisshah
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Recipe: Display unique module on each Virtuemart category page.

Also, I forgot to mention. The filter module for parameters is available in a demo format on this website:

http://www.ledgloeilamp.nl/

(Just go to the site and browse to bottom and check out the left-hand side you will see filter)

I have a filter like that solely applied to International Literature that narrows the products in the category to parameters such as language of origin/cost denominations/literary genre. Now, I want to prevent this module to show up on the page such as "International Food" for which I have re-installed this same module under a different name, and give it parameters such as Food Ingredients/Cost/National Region etc.

I hope I clarify. I want to display these numerous modules only on its respective category page and the pages of products that are associated with that category.

Thanks,

Ovais

(Just wanted to clarify)

ovaisshah
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Recipe: Display unique module on each Virtuemart category page.

Hi Ovais,

Thanks for bringing up the module from Ledgloeilamp.nl. It looks really interesting and quite useful.

In order to be able to target certain categories of products, MetaMod will need to be able to identify which product or category of products are being displayed on a certain page.

Once MetaMod can get hold of a category id, then it can make the decisions about what to display (or not).

From the demo page at ledgloeilamp.nl I can't make out the underlying URL structure for some of the pages, because they have search engine friendly (SEF) URLs turned on.

Therefore, can I ask you to turn off SEF URLs on your site (if they are currently turned on), then go through a number of pages where the module should be displayed, and some where it should not be displayed, and make a list of the URLs for each of the pages? Then post the list here.

Hopefully, this will reveal a pattern in the URLs. The best thing would be if in each of the URLs where the module *should* be displayed, that there's a parameter in the URL something like : &category_id=XXX

If so, it will be very easy to make a rule that catches that parameter and uses it to control the module inclusion.

Once the rule is set up, then it's fine to turn on the SEF URLs again. Amazingly, MetaMod will still be able to pick up that URL parameter even if it is not being displayed to the user for that page.

Hope that 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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Recipe: Display unique module on each Virtuemart category page.

Update: the latest version of MetaMod, v2, has a cool mode where it can auto generate some PHP code which can help to identify a particular page. With VM you'll probably have to edit that code a bit, but it's a great help. And, it works even with SEF URLs turned on.

Hope that 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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
1
User Info:
 
Total Users:
5355
Newest User:
titus87954
Members Online:
3
Guests Online:
115


Forum Legend:

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