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.

 

Can I display a module during checkout according to selected language?

Can I display a module during checkout according to selected language?

Hi Stephen,

I have tried to use the advanced debug but can't figure out myself.

In the standard VM shopping cart, there are 4 steps during checkout.
I want to display a module (image banner) under the shopping cart module during step 2 when the visitor is using Chinese langugae.

I turned on the advanced debug mode, go to page of step 2, but no string of "lang" is there in the box of page identification.  What can I do?

Thanks and Regards,
Savio

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Re: Can I display a module during checkout according to selected language?

Dear Stephen,

Tell you what?  I love MetaMod.

Not only because it solves my problems.  It brings me fun, and makes me proud of myself!

Thank you Thank you Thank you,
Savio

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Re: Can I display a module during checkout according to selected language?

Hi Savio,

the advanced debug only works for "GET" requests, so the extra steps in checkout (which use POST requests) don't show anything - sorry.

You can however include language checks using the variable "$language_code". This variable is set according to either the front-end language of the site (e.g. the default language, or the language chosen with Joom!Fish), or the browser language. You can choose which of those you want to use, using the "$language handling" option in MetaMod.

Here's an example:

if ( $language_code == "zh" ) return XXX;
if ( $language_code == "en" ) return YYY;

Hope that helps,
Stephen

ps. glad it makes you happy!

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: Can I display a module during checkout according to selected language?

Hi Stephen,

"Chinese" is something strange, and I can't use the language code.  In fact, the lower part of MetaMod's debug message stick to the browser language (or the OS language, system language, ... I don't know) which is not used/defined in Joom!fish (strange? yes), and is a "constant" no matter what lanuguage is selected thru Joom!fish.

The trick MetaMod enabled is somehow it captures the text of the submit button and show it in the debug box.  From here I differentiate what launguage the visitor is using.  Simple and reliable.

Cheers,
Savio

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Re: Can I display a module during checkout according to selected language?

Hi Savio,

did you remember to switch the "$language handling" radio buttons to "Joomla front-end language"? The default is "Browsers preferred language" which won't change when JoomFish does.

Theoretically this should be a better solution (but if the other one works, that's great!)

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

Re: Can I display a module during checkout according to selected language?

Oh, sorry I didn't aware of it.

Is there any page on your site that explain more about the options under "$language handling" radio button?

Cheers,

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Re: Can I display a module during checkout according to selected language?

The Configuration page:

http://www.metamodpro.com/metamod/configuration

It's in the MetaMod menu on this site.

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

Re: Can I display a module during checkout according to selected language?

Oops, I had read it.  But I can't catch the meaning / implication behind.  I think it is my problem, being a newbie.

BTW, does the selection of $language-handling affect the behaviour of MetaMod?

Thanks,

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Re: Can I display a module during checkout according to selected language?

Yes, the "$language handling" affects MetaMod, simply because it changes the way that $language, $language_code and $language_region are calculated for you to use in the PHP code. It can either be set to front end language (i.e. the language set for the site, or the language that the user is using in JoomFish), or Browser language, or "most preferred language from browser". That's a kind of complicated one but is similar to the browser language thing. There's more about it in the documentation.

Most people use the Browser Language, or the Front-end language options.

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

Re: Can I display a module during checkout according to selected language?

You are so kind, considerate and helpful.  You've answered the "question" that I don't know how to ask - for front_end_language = the one using_in_JoomFish.

Many Thanks,
Savio

savio
Beginner Modder
ranks
useravatar
Offline
14 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5940
Total Posts Today:
1
User Info:
 
Total Users:
5186
Newest User:
Totosite
Members Online:
0
Guests Online:
140

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