| ||||||||||
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 |
#41
|
|||||||
|
|||||||
Dan - can't you accomplish that by simply specifying that certain categories are available to only certain membership levels in the backend? In that manner, if you're registered as a membership level, you'll see those categories and products, and if you're not, you'll only see products in categories that are specified for "all".
Lemme know - not exactly clear on what yer doin'
__________________
Instinctual 8,000 feet up in the Rocky Mountains of Colorado X-Cart Versions 3.5.x - 4.0.x IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind. |
|||||||
#42
|
|||||||
|
|||||||
Ideally what I would like is when people first come to the site and are not registered or logged in to see the Retail group items. After they log in then they would see either the retail group or wholesale group depending on their membership level. All I see available right now for unregistered members is the "All" group. Unless I am missing this setting somewhere. The problem with the "All" group is that it appears to the Wholesale group when they are logged in and I don't want the items in that group available when Wholesale group members are shopping. Is this possible?
Thanks
__________________
Dan XCart 4.1.6 Pro XCart 4.1.6 Gold Redhat 7.2 Perl 5.006001 PHP 4.1.2 |
|||||||
#43
|
|||||||
|
|||||||
Ok, this has been a helpful thread and it demonstrates some good examples in using IF statements in smarty.
What I don't understand is how to find out about all of the variables that I have at my disposal with smarty? Is there a list somewhere?
__________________
Clients using X-Cart 4.0.14 |
|||||||
#44
|
|||||||
|
|||||||
Quote:
A list i found interesting http://www.php-editors.com/smarty_manual/
__________________
|
|||||||
#45
|
|||||||
|
|||||||
In the customer proile page/registration page,
Have the label and field box for COUNTY invisble (not part of the form), but {IF } billing STATE is CALIFORNIA, then show the label and field box. (they appear like magic). I have tried editing with if statements the register_billing.tpl county.tpl and state.tpl I've been unsuccessful. I have a feeling it can be done. [/img]
__________________
X-Cart 4.0.18 DBest |
|||||||
#46
|
|||||||
|
|||||||
bump
__________________
X-Cart 4.0.18 DBest |
|||||||
#47
|
|||||||||
|
|||||||||
Re: common if/then modifications I make to x-cart...
I have a quick question in regards to #8
Quote:
Can this be set to a range of categories instead of one specific category? example: I want categories 250 - 290 to use a different subcategories.tpl in customer/home_main.tpl I have: Code:
is there any way to shorten that {elseif . . .} up to include the whole range? TIA
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#48
|
|||||||||
|
|||||||||
Re: common if/then modifications I make to x-cart...
I don't know smarty at all but.....
{elseif $cat > "249" and $cat < "291"} would may do want you want rather than {elseif $cat eq "250" or $cat eq "251" or $cat eq "252" or $cat eq "253" etc etc etc Where '>' represents 'gt' (greater than) and '<' represents 'lt' or (less than). Whatever is the correct syntax for smarty. Just a thought.
__________________
Version = X-Cart 4.1.3 Gold Status - Closed Addon: Magnifier OS = Windows Western Australia |
|||||||||
#49
|
|||||||||
|
|||||||||
Re: common if/then modifications I make to x-cart...
Quote:
Worked perfectly. Thank you for the great explanation. That really helps with my thought process that I can apply in other circumstances. Lack of experience with some of the simpler ideas is the problem with being a self taught (or forum taught ) smarty code editor.
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10 |
|||||||||
#50
|
|||||||||
|
|||||||||
Re: common if/then modifications I make to x-cart...
Your very welcome.
As I said I don't know smarty, but if that code worked for you it is is worth bearing in mind that if it is part of a more complex if/then or elseif/then coding it is always a good idea to isolate that type of expression by enclosing it in brackets. By that I mean your argument would look more like:- {elseif ($cat > "249" and $cat < "291") [more code here]} For example :- {elseif ($cat > "249" and $cat < "291") or ($cat >= "300" and $cat <= "340") } Cheers
__________________
Version = X-Cart 4.1.3 Gold Status - Closed Addon: Magnifier OS = Windows Western Australia |
|||||||||
|
|||
X-Cart forums © 2001-2020
|