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
  #71  
Old 09-10-2009, 09:02 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Hidden Categories

Quote:
Originally Posted by 01bodyjewellery
Take out some points with Qualiteam - they will fix it for you

Why support from Qualiteam?Though it is a complete custom mods, but it is not complete!!!

I want support from forum members.There are many X-cart experts for these smart coding.

Thanks to all.
__________________
4.6.1 Platinum


Reply With Quote
  #72  
Old 09-21-2009, 11:22 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Hidden Categories

Anyone who want this working on 4.2 do the following. The only difference is I made it so you can change the status on the admin categories page without going into each category one at a time and modifying them to be hidden.
Hope this helps someone.


----------------------------------------------------

1) Open skin1/admin/main/categories.tpl

Find:
Code:
<option value="N"{if $c.avail eq "N"} selected="selected"{/if}>{$lng.lbl_no}</option>

Add Below:
Code:
<option value='H'{if $c.avail eq 'H'} selected="selected"{/if}>Hidden</option>

2) Open skin1/admin/main/category_modify.tpl

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

Add under:
Code:
<option value='H' {if ($current_category.avail eq 'H')} selected="selected"{/if}>Hidden</option>


3) Open include/func/func.category.php

NOTE: REPLACE ALL INSTANCES!!

Find All:
Code:
$sql_tbl[categories].avail = 'Y'

Replace With:
Code:
($sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H')

4) Open skin1/customer/categories.tpl

Find:
Code:
<li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li>

Replace With:
Code:
{if $c.avail ne "H"} <li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li> {/if}

5) Open admin/process_category.php

Find:
Code:
"avail" => ($v["avail"] == "Y" ? "Y" : "N")

Replace with:
Code:
"avail" => $v["avail"]

6) Open include/search.php

Find:
Code:
$sql_tbl[categories].avail = 'Y'

Replace with:
Code:
($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail = 'H')


Thats it - THANKS FOR THE MOD BTW
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #73  
Old 09-22-2009, 10:39 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Hidden Categories

Quote:
Originally Posted by Learner
In this codes the products added to the hidden category would not appear while trying to view the hidden category.I want to see the products when I click in the hidden category on URL ( but the category will remain invisible in the store front).
Also I need proper code for 4.1.9 and 4.1.11?Actually I want Hidden but available for sale option.

Can anyone help me?

Is it possible for 4.1.9 and 4.1.11? Any help from forum member...???
__________________
4.6.1 Platinum


Reply With Quote
  #74  
Old 09-28-2009, 09:41 AM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Hidden Categories

Should be possible. Looks for similiar coding in areas all of us have specified. Mine are available for sale even though the category is hidden. I just link to it with an advertisement link. Update 4.1.9 and 4.1.11 accordingly.
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #75  
Old 09-28-2009, 08:58 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Hidden Categories

Quote:
Originally Posted by mrerotic
Should be possible. Looks for similiar coding in areas all of us have specified. Mine are available for sale even though the category is hidden. I just link to it with an advertisement link. Update 4.1.9 and 4.1.11 accordingly.

No mrerotic these codes are not properly written for 4.1.9 and 4.1.11 !!! I can not find the features hidden but available for sale here.

Can you help me ?

Thank you.
__________________
4.6.1 Platinum


Reply With Quote
  #76  
Old 09-28-2009, 09:17 PM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Hidden Categories

Sorry I dont have those versions. You simply need to search through your coding and between everyones postings you should be able to find the fields you need to edit. I'm not saying there going to be exact since mine is a different version, but between mine and theirs before posted you should be able to figure it out. Just be patient spend some time and search it out. Sorry, if I had it it I would help you.
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote
  #77  
Old 09-28-2009, 09:36 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Hidden Categories

I have already posted to forum-
In this codes the products added to the hidden category would not appear while trying to view the hidden category.I want to see the products when I click in the hidden category on URL (but the category will remain invisible in the store front).
Also I need proper code for 4.1.9 and 4.1.11?Actually I want Hidden but available for sale option.

But the reply from forum is-

Quote:
Originally Posted by 01bodyjewellery
Take out some points with Qualiteam - they will fix it for you
But mrerotic you said that

Quote:
Originally Posted by mrerotic
Should be possible. Looks for similiar coding in areas all of us have specified. Mine are available for sale even though the category is hidden. I just link to it with an advertisement link. Update 4.1.9 and 4.1.11 accordingly.


If the codes will not work for all versions then how it is completed mods !!!!

Any response !!!!
__________________
4.6.1 Platinum


Reply With Quote
  #78  
Old 03-01-2011, 03:44 AM
 
gatordp gatordp is offline
 

Advanced Member
  
Join Date: Aug 2009
Posts: 72
 

Default Re: Hidden Categories

Quote:
Originally Posted by mrerotic
Anyone who want this working on 4.2 do the following. The only difference is I made it so you can change the status on the admin categories page without going into each category one at a time and modifying them to be hidden.
Hope this helps someone.


----------------------------------------------------

1) Open skin1/admin/main/categories.tpl

Find:
Code:
<option value="N"{if $c.avail eq "N"} selected="selected"{/if}>{$lng.lbl_no}</option>

Add Below:
Code:
<option value='H'{if $c.avail eq 'H'} selected="selected"{/if}>Hidden</option>

2) Open skin1/admin/main/category_modify.tpl

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

Add under:
Code:
<option value='H' {if ($current_category.avail eq 'H')} selected="selected"{/if}>Hidden</option>


3) Open include/func/func.category.php

NOTE: REPLACE ALL INSTANCES!!

Find All:
Code:
$sql_tbl[categories].avail = 'Y'

Replace With:
Code:
($sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H')

4) Open skin1/customer/categories.tpl

Find:
Code:
<li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li>

Replace With:
Code:
{if $c.avail ne "H"} <li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li> {/if}

5) Open admin/process_category.php

Find:
Code:
"avail" => ($v["avail"] == "Y" ? "Y" : "N")

Replace with:
Code:
"avail" => $v["avail"]

6) Open include/search.php

Find:
Code:
$sql_tbl[categories].avail = 'Y'

Replace with:
Code:
($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail = 'H')


Thats it - THANKS FOR THE MOD BTW



I followed your steps exactly. However, it doesn't seem to be working. When I check a category as "hidden" in admin, it deactivates it instead and returns a 404 error page when I try to visit the category URL. Then if I check "enable" it works fine again.

I am using 4.2.2 -- any thoughts on what went wrong?
__________________
X-Cart Gold 4.5.4
Reply With Quote
  #79  
Old 06-27-2011, 06:25 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default Re: Hidden Categories

I was able to install this mod successfully, for the most part, on my version 4.3.2. The only problem I am seeing is all the hidden categories show up on the search result page(s). Do you know how to fix this?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #80  
Old 06-29-2011, 04:12 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Hidden Categories

Quote:
Originally Posted by gatordp
I followed your steps exactly. However, it doesn't seem to be working. When I check a category as "hidden" in admin, it deactivates it instead and returns a 404 error page when I try to visit the category URL. Then if I check "enable" it works fine again.

I am using 4.2.2 -- any thoughts on what went wrong?

I am using 4.4.3 and was having the same problem but I have found out the error.

Look in 'include/func/func.category.php' for :

Code:
$search_condition = "AND $sql_tbl[categories].avail='Y' AND ($sql_tbl[category_memberships].membershipid = '".$user_account["membershipid"]."' OR $sql_tbl[category_memberships].membershipid IS NULL)";

and change to ...

Code:
$search_condition = "AND ($sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H') AND ($sql_tbl[category_memberships].membershipid = '".$user_account["membershipid"]."' OR $sql_tbl[category_memberships].membershipid IS NULL)";

Hopefully its the same coding within v4.2
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
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 04:21 AM.

   

 
X-Cart forums © 2001-2020