| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Pulling User Information into product.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi all - been bashing my head about this for about 4 hours now and can't seem to get it straight - wondering if somebody out there is experiencing the same or has a fix -
I've added an extra field into the xcart_customers table - "wishlist_only" - and I've marked people with a "Y" or null. I'm trying to write an if/then so that if this field contains a "Y" I don't display the "add to cart" button in product.tpl. So...this is how it worked in 3.5.8 - but now that I'm on 4.0.4 - it doesn't work. {if $user_wishlist_only ne ""} do this {/if} Doesn't work on product.tpl anymore - and I"m assuming if I was trying to pull address information or something into that template that wouldn't work either without correcting my syntax somehow above. Anybody know what the correct syntax is for pulling user info into that template? I've tried $user. - $userinfo. - $user_ - $userinfo_ - all sorts of combos and can't seem to find anything that will work anymore. ?? Any help is greatly appreciated ;o) Instinctual Colorado X-Cart 3.5.x - 4.0.4 |
|||||||
#2
|
|||||||
|
|||||||
![]() Ok, so with help from my good friend Carrie @ BCS - here is how it works:
You must edit auth.php - add these lines in at the end before the ?> $user_wishlist_only=array_pop(func_query_first("se lect wishlist_only from $sql_tbl[customers] where login='$login'")); $smarty->assign("user_wishlist_only",$user_wishlist_only); Then, in most templates, this variable will work to pull customer info: {$user_b_address} for example. Cheers ![]() Instinctual Colorado X-Cart Versions 3.5.x - 4.0.4 |
|||||||
|
|||
X-Cart forums © 2001-2020
|