X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   registered customers country variable... (https://forum.x-cart.com/showthread.php?t=33281)

Lester MacDonald 08-15-2007 04:10 PM

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.

Lester MacDonald 08-15-2007 05:05 PM

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.

balinor 08-15-2007 07:20 PM

Re: registered customers country variable...
 
How are you calling it? In an {if} statement? Post your whole code.

Lester MacDonald 08-15-2007 07:23 PM

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.

Lester MacDonald 08-16-2007 04:13 AM

Re: registered customers country variable...
 
{if $userinfo.b_country == "Canada"}
display info
{else}
display different info
{/if}

balinor 08-16-2007 04:20 AM

Re: registered customers country variable...
 
Try {if $userinfo.b_country eq "Canada"}

Lester MacDonald 08-16-2007 04:25 AM

Re: registered customers country variable...
 
No luck, even if I just try to display {$userinfo.b_country} it shows nothing.

DaveB 09-07-2007 07:40 AM

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}

Lester MacDonald 09-07-2007 07:47 AM

Re: registered customers country variable...
 
Thanks for the reply DaveB, I ended up getting a solution with the x-cart support.

DaveB 09-07-2007 07:57 AM

Re: registered customers country variable...
 
I'd be interested to know if it's similar...


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.