Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

registered customers country variable...

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-15-2007, 04:10 PM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default registered customers country variable...

Hi all, i am trying to create an {if} statement based on the current registered customer's country in there profile, does anyone know what this variable name is.
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #2  
Old 08-15-2007, 05:05 PM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default Re: registered customers country variable...

I think this is the var $userinfo.b_country but it wont display, do I need to wrap something around it? Any help would be greatly appreciated.
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #3  
Old 08-15-2007, 07:20 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: registered customers country variable...

How are you calling it? In an {if} statement? Post your whole code.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 08-15-2007, 07:23 PM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default Re: registered customers country variable...

Thanks for the reply Balinor but I have tried this, I thought maybe there was something else that needed to wrap around that. I am trying to display this as an if statement in products_t.tpl which from what i can tell can not call these variables.
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #5  
Old 08-16-2007, 04:13 AM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default Re: registered customers country variable...

{if $userinfo.b_country == "Canada"}
display info
{else}
display different info
{/if}
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #6  
Old 08-16-2007, 04:20 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: registered customers country variable...

Try {if $userinfo.b_country eq "Canada"}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 08-16-2007, 04:25 AM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default Re: registered customers country variable...

No luck, even if I just try to display {$userinfo.b_country} it shows nothing.
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #8  
Old 09-07-2007, 07:40 AM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Default Re: registered customers country variable...

I got this to work to show specific messages in the checkout for different countries.
This example is for Germany and based on the shipping address, not billing.

{if $userinfo.s_country eq "DE"}{$lng.lbl_shippingadvice}{else}{/if}
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
  #9  
Old 09-07-2007, 07:47 AM
 
Lester MacDonald Lester MacDonald is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 8
 

Default Re: registered customers country variable...

Thanks for the reply DaveB, I ended up getting a solution with the x-cart support.
__________________
X-Cart Version: 4.0.19
--Lester
Reply With Quote
  #10  
Old 09-07-2007, 07:57 AM
 
DaveB DaveB is offline
 

Senior Member
  
Join Date: May 2004
Location: UK
Posts: 121
 

Default Re: registered customers country variable...

I'd be interested to know if it's similar...
__________________
Xcart 4.0.19 Pro
mySQL 5.5.44
PHP 5.3.27
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:44 PM.

   

 
X-Cart forums © 2001-2020