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.

 

Virtuemart Page: Hide a module :)

Virtuemart Page: Hide a module :)

Hello All;

First: This is my first post; and really want to say: its a REALLY good project/module!

Alright. I have used metamod for control some modules when i use  the VM webshop. Here is it:

if ($option == "com_virtuemart") {
$category_id = JRequest::getVar("category_id");
if ($category_id == "2") {
return 58;
}
}

It is working though, now is it so; that when i go to a product detail; i want to hide it smile How can i do that?

HRR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Virtuemart Page: Hide a module :)

VirtueMart has a LOT of different types of pages... instead of hiding a module on just one of those pages, it would be better to decide which page(s) you want the modules on, and just include the modules on that/those page(s).

So is it just the main "category" pages that you want the modules on? Any others?

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

Re: Virtuemart Page: Hide a module :)

Hello Metamodguy. You are correct, there are plenty of pages.. Everything is correct, except 1 thing: on the page: shop.product_details i want to hide the module. Thats all smile is that easy to do?

gr

HRR

HRR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Virtuemart Page: Hide a module :)

Sure, no problem. To modify your original recipe:

Code:

if ($option == "com_virtuemart") { 

  $category_id = JRequest::getVar("category_id");
  if ($category_id == "2") {
    $page = JRequest::getVar("page");
    if ($page != 'shop.product_details') return 58;
  }
}

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

Re: Virtuemart Page: Hide a module :)

Totally worked! perfect! Will mention you on the "about the website" page smile

HRR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11577
Newest User:
owens65784
Members Online:
0
Guests Online:
146

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