| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Exclude Certain Categories From Category List | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Exclude Certain Categories From Category List
I'm wanting to have certain categories not listed in the category list, but still be available (via links elsewhere)...
Any thoughts? Thanks!
__________________
version 4.0.18 |
|||||||||
#2
|
|||||||
|
|||||||
Welcome to X-Cart! Please be sure to post your full version in your signature (i.e. 4.0.1. Each version is different, and this information is very important.
You can use the orderby function to solve your issue. Use an {if} statement like this to only show categories with an orderby under 500: {if $categories[cat_num].order_by < 500} This would go in customer/categories.tpl
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
Thanks!
I'll give that a shot...
__________________
version 4.0.18 |
|||||||||
#4
|
|||||||
|
|||||||
Quote:
Padraic, Could this be one way to generate a static "top-ten/fake bestsellers" list? 1. make a category, let's say POS 990 2. Propagate the category with items that will be in my bestseller list 3. hide the category from the category list using an {if} statement 4. in menu_bestsellers.tpl use the category to generate the list of its products Let me go to work on this... Thanks for the tip... Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#5
|
|||||||
|
|||||||
Yep..exactly. We use it frequently to create 'hidden' categories that we want to target as landing pages for AdWords campaigns or promotions and as Special Offers categories (using the disasterous Special Offers Add-on). Just note that the products will still show up in a search even though the category doesn't show up in the menu.
There is also a 'Hidden Categories' custom mod in the Custom Mod forums which uses a different approach to the problem.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
Quote:
Any idea what var I should use? The .tpl I need to change contains: Code:
I tried {if $c.category[order_by] lt 900 }{/if} -- no good I tired {if $c.category.order_by lt 900 }{/if} -- no good I tired {if $c.categories[order_by] lt 900 }{/if} -- no good I tired {if $c.categories.order_by lt 900 }{/if} -- no good Am I putting the {/if} in th right place? if I were flowcharting this, I'd say, "if the category POS is lt 900, then continue on, otherwise, you're stuck -- don't pass go. I've been staring at the screen too long, I can't think straight... This smarty thing is 3 steps forward 5 steps back. Ugh. Anyone? My goal is to trap any category with a POS greater than 900 to not show up in the categories list. Your assistance is appreciated. Thanks, Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#7
|
|||||||
|
|||||||
You'll need to ask Phil about how to work it with his module, sorry
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||||
|
|||||||||
Quote:
ummm... Not to sound like a complete moron, but where would I place that? Thanks!
__________________
version 4.0.18 |
|||||||||
#9
|
|||||||||
|
|||||||||
anyone?
thanks!
__________________
version 4.0.18 |
|||||||||
#10
|
|||||||||
|
|||||||||
Quote:
Hello ... This is what my file looks like (I'm using v4.1.2) {* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} {* MOD http://forum.x-cart.com/viewtopic.php?t=31058 *} {if $c.order_by < 500} <font class="CategoriesList">{$c.category}</font> {/if} {/foreach} {else} {foreach from=$subcategories item=c key=catid} {* MOD - http://forum.x-cart.com/viewtopic.php?t=31058 *} {if $c.order_by < 500} <font class="CategoriesList">{$c.category}</font> {/if} {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding} Hope this helps. Regards Shafiq :sK
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
|
|||
X-Cart forums © 2001-2020
|