Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Hidden Categories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 08-31-2005, 06:15 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

I don't know if this will help anyone, but in version 4.014 I wanted to be able to access a category via a link, but not have it visible in the Categories list.

So I worked in some code from one of Carrie's posts.

In skin1/categories.tpl
After:
{section name=cat_num loop=$categories}

add:
{if $categories[cat_num].order_by < 500}

Then close the {/if} right before you close that {/section}

And of course in admin, make any categories you want hidden have an order number above 500.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #42  
Old 08-31-2005, 06:26 AM
  HWT's Avatar 
HWT HWT is offline
 

eXpert
  
Join Date: Jan 2005
Location: Massachusetts, USA
Posts: 392
 

Default

Thanks pauldodman,

That works perfectly for what we want to do in version 4.0.13
__________________
x-cart 4.0.13 and 4.1.7 and 4.1.10
Reply With Quote
  #43  
Old 10-26-2005, 08:33 AM
 
harrismichael harrismichael is offline
 

Senior Member
  
Join Date: Sep 2005
Location: New York
Posts: 107
 

Default

Any ideas if this will be in Xcart 4.1? I am rather hesitant to modify my code since it seems to be a hit an miss.

Would it be worth spending money on to get the Xcart dev's do custom coding ??
__________________
www.harrismichaeljewelry.com X-Cart version 4.1.18



Mods

DSEFU PRO
Auction Manager for XCART
X-cart Customer Reward Points
Customer Review Management for X-cart
Recently Viewed Products X-cart Modification
X-RMA
X-AOM
Customers Also Bought Modification
Recently Viewed Products X-cart Modification
Hidden Categories
Product Options Copier
Multiple Upselling Links for X-cart
Reply With Quote
  #44  
Old 10-31-2005, 12:37 PM
 
fablot fablot is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 2
 

Default

is the include/search.php code for version 4.0.16

Change:

Code:
$search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."') AND $sql_tbl[categories].avail = 'Y'";

to:

Code:
$search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."') AND ($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail='H')";


to see the products
it is corrected?
Reply With Quote
  #45  
Old 12-02-2005, 10:32 AM
  More-Japan's Avatar 
More-Japan More-Japan is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 107
 

Default Hidden Categories for 4.0.17

Here is the code that I have been able to successfully use on my fresh install of 4.0.17. Some of the code and file locations are different on 4.0.17, but it seems to be stable-- search is functioning properly, as well as HTML catalog, etc.

I'm not a programmer, but understand the logic.. so if there is anything left out, best left to the pros.

This is a great mod that should have been integrated into the cart from the beginning.


Change include/categories.php
There are two instances of code that need to be changed:
This makes the newly added 'Hidden' option get translated as an 'Available' item


Instance 1:

Change:
Code:
$search_condition[] = "$sql_tbl[categories].avail='Y'";
To:
Code:
$search_condition[] = "$sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H'";

Instance 2:

Change:
Code:
$search_condition = "AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";

To:
Code:
$search_condition = "AND avail='Y' OR $sql_tbl[categories].avail='H' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";



Change skin1/admin/main/category_modify.tpl
This adds the option to the backend admin


Find this code:
Code:
<SELECT name="avail"> <OPTION value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>{$lng.lbl_enabled}</OPTION> <OPTION value='N' {if ($current_category.avail eq 'N')} selected {/if}>{$lng.lbl_disabled}</OPTION>

And add this to the bottom:
Code:
<OPTION value='H' {if ($current_category.avail eq 'H')} selected {/if}>{$lng.lbl_hidden}</OPTION>



Change /skin1/customer/categories.tpl
This tells the cart to hide the 'Hidden' categories from the lefthand category nav.


Change:
Code:
<FONT class="CategoriesList">{$categories[cat_num].category}</FONT>

To:
Code:
{if $categories[cat_num].avail ne "H"}<FONT class="CategoriesList">{$categories[cat_num].category}</FONT> {/if}


There is a second instance of this code 2 lines down that looks similar, but not sure if it is necessary, since it is for the subcategories.
__________________
Version 5.2.13

http://www.more-japan.com/
Reply With Quote
  #46  
Old 12-15-2005, 06:33 PM
 
pwd88 pwd88 is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 80
 

Default

The very above mod is still not quite right, if you type in a URL with a non-exist cat number, the hidden cat always shown up, if you have 2 hidden cat configured, all 2 hidden cat links all point to the first hidden cat, the 501 position approach works, but with less flexibilty
__________________
XCart 4.0.18 Gold
X-Giftregistry
Neon light
Fashion mosaic
Tabbed product menu
Reply With Quote
  #47  
Old 01-08-2006, 04:24 AM
 
neroag neroag is offline
 

Senior Member
  
Join Date: May 2005
Location: UK
Posts: 171
 

Default

Hi Guys not sure if theres a fix for this but ....
I have installed the Hidden Categories and all works a treat Until ...

If i add another Hidden cat with a different name it only goes to the 1st Hidden Cat and wont find the new one, any suggestions anyone ??

Many thanx
__________________
X-cart Gold - 4.0.18 - 4.1.9 - 4.1.10 - 4.3.0
Reply With Quote
  #48  
Old 01-14-2006, 01:55 AM
 
civictuner civictuner is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 44
 

Default

I have the problem that some of my categories' title are the same as the hidden categorie??

anyone who has a solution for this?

thnx
__________________
www.tuningstation.be
Reply With Quote
  #49  
Old 01-20-2006, 10:04 AM
 
civictuner civictuner is offline
 

Advanced Member
  
Join Date: Jun 2005
Posts: 44
 

Default

nobody?
__________________
www.tuningstation.be
Reply With Quote
  #50  
Old 01-24-2006, 03:04 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Commercial Hidden Categories Mod

We have created a commercial mod for this which will be fully supported:

http://www.websitecm.com/customer/product.php?productid=136
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:19 PM.

   

 
X-Cart forums © 2001-2020