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.

 

Display a module based on user credentials and VM page

Display a module based on user credentials and VM page

Hi,

Sorry PHO newbie!

My customer has asked to display a module to explain that he will calculate shipping costs post purchase.

Could you point me to a receipe that will display module (98) on teh shipping page of VM when the user registration country details equals 'US'

Many Thanks

Jon

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

Re: Display a module based on user credentials and VM page

Hi Jon, Yes I'll work on this and will get you a recipe in the next day or 2. (weekend here in New Zealand).

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

Re: Display a module based on user credentials and VM page

Hi Jon, sorry for the delay.

Use this recipe:

Code:

$ship_to = JRequest::getVar('ship_to_info_id');

if ($ship_to != '') {
  $my_id = $db->Quote( $db->getEscaped( $ship_to ) );
  $sql = "select country from #__vm_user_info where user_info_id = $my_id";
  $db->setQuery( $sql, 0, 1 );
  $row = $db->loadObject();
  $country = @$row->country;
  if ($country == 'USA') return XXX; /* replace XXX with the module id to use for USA shipping addresses. */
}

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10727
Newest User:
solza2
Members Online:
1
Guests Online:
98

Online: 
solza2

Forum Legend:

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