| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Exclude Certain Categories From Category List | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I saw this thread in the 4.1x forums
http://forum.x-cart.com/showthread.php?t=23766&highlight=Exclude+Certain+C ategories+From+Category+List But I tried it, and it did not on 4.2.2. Basically you assign a category you want to exclude with a high Category ID, like 500. Then you add an "if statement" to the categories.tpl file saying if category ID is > 500 then exclude. Does anyone know how to do this? Here is my categories.tpl Code:
__________________
X-Cart Gold 4.5.4 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Why not make your if
{if $c.categoryid lt 500}
__________________
Richard Williams Rogue Wave Limited Initial Inventory Imports Daily Inventory Updates Daily Inventory Reports Drop Ship Support Order Export to Shipper/Supplier Shopping Feeds That Work Programming for X-Cart richard@roguewavelimited.com http://www.roguewavelimited.com |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() It will be easier to control using the position rather than the categoryid. You can set the position number in the category administration page. Your if/than inside the loop will be based on $c.order_by
---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#4
|
|||||||
|
|||||||
![]() Do you know what the piece of if code should look like?
I tried this: {if $c.order_by < 500} And got a smarty error meesage Code:
__________________
X-Cart Gold 4.5.4 |
|||||||
#5
|
|||||||||
|
|||||||||
![]() Use smarty operators
> - gt < - lt >= - gte <= - lte = - eq != - ne
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() You left the old IF in the code - remove it.
{if $c.avail ne "H"}
__________________
Richard Williams Rogue Wave Limited Initial Inventory Imports Daily Inventory Updates Daily Inventory Reports Drop Ship Support Order Export to Shipper/Supplier Shopping Feeds That Work Programming for X-Cart richard@roguewavelimited.com http://www.roguewavelimited.com |
|||||||||
#7
|
|||||||
|
|||||||
![]() That worked - thanks!
__________________
X-Cart Gold 4.5.4 |
|||||||
|
|||
X-Cart forums © 2001-2020
|