| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
common if/then modifications I make to x-cart... | ||||
|
|
Thread Tools | Search this Thread |
#61
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
Please, i know this should be easy, but help! I want to show an image ONLY if customer is in SEARCH.PHP
{if $smarty.get.section eq "search.php"}SHOW THIS {/if} Thanks!!
__________________
4.1.8 Gold (Unix) |
|||||||
#62
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
{if $main eq "search"}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#63
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
What about an if/then function for the welcome page?
I want to have a JS code but only for the main page. Can anyone help me?
__________________
X-Cart version 4.1.8 (given up, for now, on 4.1.9 upgrade) |
|||||||
#64
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
{if $main eq "catalog" and $current_category.category eq ""}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#65
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
Thank you Balinor -- worked great!
__________________
X-Cart version 4.1.8 (given up, for now, on 4.1.9 upgrade) |
|||||||
#66
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
Hi
In a 4.017 cart of mine I used this to show content only to a CLUB member {if $membershiplevel eq 'Seriously Gourmet CLUB'} Text Here {/if} I am working on a 4.19 cart The above does not work. I think 4.19 now refers to id numbers so then I tried {if $membershipid eq '2'}Text Here<br>{/if} This did not work either. Any ideas what I could be doing wrong? Thanks
__________________
Chris G Humble web designer Version 4.07 - 4.45 |
|||||||
#67
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
This works for 4.019 for me - got tech help from xcart
You should use the following part of code for the 4.1.9 version of x-cart: if ($user_account['membershipid'] == '2') { <necessary code here> } in php scripts, but if you want the variable be accessible in smarty templates please follow the instructions below: 1. add the following part of code to the end of your '<x-cart root directory>/auth.php' file: $smarty->assign("current_customer_membershipid", $user_account['membershipid']); after the following strings: $smarty->assign("printable", $printable); $smarty->assign("logout_user", $logout_user); 2. then the following part of code can be used in templates: {if $current_customer_membershipid eq '2'} Text Here {/if} Cheers Chris
__________________
Chris G Humble web designer Version 4.07 - 4.45 |
|||||||
#68
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
Would anyone know how to do this in the cart section:
If (subtotal is smaller than $75), then (code here). Mario
__________________
X-Cart version 4.1.8 (given up, for now, on 4.1.9 upgrade) |
|||||||
#69
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
{if $cart.subtotal <75}
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#70
|
|||||||
|
|||||||
Re: common if/then modifications I make to x-cart...
Thank you carpeperdiem!
__________________
X-Cart version 4.1.8 (given up, for now, on 4.1.9 upgrade) |
|||||||
|
|||
X-Cart forums © 2001-2020
|