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.

 

Control Modules when virtuemart is set as your homepage

Control Modules when virtuemart is set as your homepage

Please help,
I have been trying to find a solution for this for as long as I can remember.
I have VM set as the home page on my site, so the product categories show on the home page.

I have a module position called 'mass-top', with a module published in this position and is set to appear only on the home page.

Because I have VM set as my home page, the module appears on the checkout process, how do I stop this happening?

I have installed MetaMod.
and used the line,

if ($option == "com_virtuemart" and JRequest::getVar("page") == null) return 137;

To only show this module on the homepage.

What am I doing wrong?

Regards,
Sean R.

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

Re: Control Modules when virtuemart is set as your homepage

Hi Sean,

Ah, it looks like the recipe needs to be a bit different when VM is the default page of the site. Thanks for reporting this!

The recipe would need to be:
$page = JRequest::getVar("page");
if ($option == "com_virtuemart" and ( $page == null or ( $page == "shop.index" and JRequest::getVar("category_id") == "" ) ) ) return 137;

Also: did you follow all the instructions on the Quick Start guide? http://www.metamodpro.com/metamod/quick-start

In particular you need to remember to unpublish the "target" module so that it doesn't show up unless/until the MetaMod includes it.

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

Re: Control Modules when virtuemart is set as your homepage

Hi MetaModGuy,
Thanks for the quick reply,

I have used the code you recommended and it does not work, I get the error:

Fatal error: Cannot redeclare processimage() (previously declared in /MYSERVERPATH/modules/mod_jaslideshow/mod_jaslideshow.php:262) in /MYSERVERPATH/modules/mod_jaslideshow/mod_jaslideshow.php on line 272

This error only appears when you try and access the homepage of the site.
If you continue through the checkout process the modules still appear.

Any Ideas?

I am using the JA MesoliteII template from Joomlart?

You can view the site at

http://www.s285981493.websitehome.co.uk … mak.co.uk/

I have removed the code you recommended, but am still using metamod to publish the module in the position 'mass-top'.

Regards,
Sean R.

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

Re: Control Modules when virtuemart is set as your homepage

Hi Sean,

with that particular error, it looks like the mod_jaslideshow module is being loaded twice on that page. Is there any chance that you have another copy of that module assigned to that page?

If you're really stuck, if you PM me a password I'll have a look on the backend of your site and see if there's something simple that can be done about it (or at least find out what's going on)

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

Re: Control Modules when virtuemart is set as your homepage

Hi Stepehn,
I've just sent you the login details wink

Regards,
Sean R.

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

Re: Control Modules when virtuemart is set as your homepage

Hi Sean,

The problem was quite simple in the end - you had added the target module (77) inside the "quick module id include" box. Then, when it was also returned from the PHP rule, it got included a second time. This slideshow module can only be on the page once otherwise it causes the errors you saw.

Also, originally you wanted to return "137" from the rule. 137 was actually the ID of the MetaMod, so it was trying to include itself including itself including itself etc...

I noticed that there was a slideshow, product scroller and "welcome" all in a row that you only wanted on the front page. So I unpublished all of them, and added them to the rule.

The new rule is:

$page = JRequest::getVar("page");
if ($option == "com_virtuemart" and ( $page == null or ( $page == "shop.index" and JRequest::getVar("category_id") == "" ) ) )
  return "77,88,135";

And as far as I can see, it's all working nicely now, on the checkout pages (i.e. not appearing on these) as well as the front page of the site (where they do appear).

Best regards,
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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: Control Modules when virtuemart is set as your homepage

Hi Stephen,
I have to say a massive thankyou wink

I have been trying to solve this problem for months and even went down the road of paying a Vietnamese developer to hack joomla.

I will be blogging about you mod in the next few days and make a donation.

Again Many Thanks, by the way if you don't mind could you take a look at my website www.red-fern.co.uk and fan my facebook, just trying to build my social media side of things up.

Again Many Thanks.
Regards,
Sean R.

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

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10137
Newest User:
lexispoker1
Members Online:
1
Guests Online:
223

Online: 
liaskas

Forum Legend:

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