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.

 

[solved] Virtuemart and mobile view combined

[solved] Virtuemart and mobile view combined

Hello,

I load a module on my front page with this line:
$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = frontpage" ) ) return XXX;

This module also has setting to "hide mobile view" on the module CSS file however the metamod is loading it also on mobile.

Is there a way to load the module except on mobile?

Thank you.

Edited By: metamodguy
06-Nov-13 20:32:14

giladd
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: [solved] Virtuemart and mobile view combined

Sure, try this:

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = frontpage" ) and $core_genius->check("categorizr != mobile") ) return XXX;

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: [solved] Virtuemart and mobile view combined

Hi,

I try this but the module is not loading at all with this code,
I forgot to mention that I use joomla 2.5 if it matters.
Please advice.

Thank you

giladd
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: [solved] Virtuemart and mobile view combined

My mistake, the module is loading with desk top view and in mobile view
Please advice

giladd
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: [solved] Virtuemart and mobile view combined

1 - do you have the system cache plugin enabled? If so, you'll need to disable it as it can't distinguish between mobile and desktop access, and will cache 1 version of both of them.

2 - make sure you test it with 2 different browsers, and clear cookies before testing. Categorizr caches the browser type in the session, so if you just change the user agent in your browser then it will cache the original user agent. Try to use an actual mobile device for your testing, just to be on the safe side.

If it's neither of those things please get back to me.

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: [solved] Virtuemart and mobile view combined

Hi Stephen,

Thank you very mach it work the way you said, same work was needed on my site in order to make it happen

giladd
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10093
Newest User:
lamanaudio
Members Online:
0
Guests Online:
159

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