| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Catergories set-up to not display if no products in category | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I have a client that is running x-cart 3.5.3 and wants to have the categories set-up so they do not display on the customer front end if there are no avail products in that particular category.
I am still very much learning (and teaching myself) programming. I think I should be able to do this with a if/else statement but dont quite know what the rest of the code should be. Anyone give me a hand with this? This would be a nice mod to come standard with x-cart (hint, hint) ![]()
__________________
Web site design - Custom Programming - Upgrades - Marketing www.netvisionwebdesign.com Follow on twitter: http://twitter.com/netvisionweb Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419 |
|||||||||
#2
|
|||||||
|
|||||||
![]() which cats? The side bar or the one in the middle which list sub cats also? Thats products.tpl
Anyway, find the code that shows the # of products inside the tpl I am too lazy to look, maybe someone can post the code. for example sake, lets just call it $productcount or whatever {if $productcount eq 0}   (if you run a table or whatever) blank {elseif $productcount ne 0} category name here (original section which shows the categories name) {/if} I am using elseif because I think there is already an else call somewhere in there already. |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Well, here is the categories.tpl.....any specific suggestions?
Code:
BTW I am just looking for the side bar categories to be disabled if no products under that category/sub-category. Come to think of it, I guess if there are no sub-categories being used just the main category in the side bar should be disabled automatically, but, if he is using sub-categories, then just that sub-category should be automatically disabled. This my be tougher that I thought ![]()
__________________
Web site design - Custom Programming - Upgrades - Marketing www.netvisionwebdesign.com Follow on twitter: http://twitter.com/netvisionweb Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|