| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to use an "and" statement for 3 category menus | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi, I have created 3 category menus
1st menu displays categories with a POS between 1 and 10 2st menu displays categories with a POS between 11 and 99 3rdt menu displays categories with a POS between 100 and 999 Menu 1 & 3 are working fine. Just need some help on how to use an "and" statement for menu 2 to only show products between 11 and 99 for Category Position. Code I have is below: What I really want is something like : {if $c.order_by gt 10 and lt 100 } But doesn't seem to work - any hints from a Guru? HTML Code:
Cheers Zane
__________________
Version 4.7.7 |
|||||||
#2
|
|||||||
|
|||||||
![]() Managed to get it to work using two if statements. Is this the best way?
{if $c.order_by lt 100 } {if $c.order_by gt 10 }
__________________
Version 4.7.7 |
|||||||
#3
|
|||||||
|
|||||||
![]() You were close. Try:
{if $c.order_by gt 10 and $c.order_by lt 100 }
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
#4
|
|||||||
|
|||||||
![]() For 4.0x I'm looking to add a header to each of the broken out categories (Only if there are categories listed between the $categories[cat_num].order_by). Any ideas?
Here's my current code: <p><font class="VertMenuTitleGold">Category Name One</font></p> {section name=cat_num loop=$categories} {if $categories[cat_num].order_by gt 200 AND $categories[cat_num].order_by lt 299} <FONT class="CategoriesListCaps"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItemsWht">{$categories[cat_num].category}</A></FONT><BR> {/if} {/section} <p><font class="VertMenuTitleGold">Category Name Two</font></p> {section name=cat_num loop=$categories} {if $categories[cat_num].order_by gt 300 AND $categories[cat_num].order_by lt 399} <FONT class="CategoriesListCaps"><A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItemsWht">{$categories[cat_num].category}</A></FONT><BR> {/if} {/section} Thanks...
__________________
4.0x - 4.5x |
|||||||
|
|||
X-Cart forums © 2001-2020
|