X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Hidden Categories (https://forum.x-cart.com/showthread.php?t=8276)

Learner 09-10-2009 09:02 AM

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.

mrerotic 09-21-2009 11:22 PM

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 :)

Learner 09-22-2009 10:39 PM

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...???

mrerotic 09-28-2009 09:41 AM

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.

Learner 09-28-2009 08:58 PM

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.

mrerotic 09-28-2009 09:17 PM

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. :(

Learner 09-28-2009 09:36 PM

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 !!!!

gatordp 03-01-2011 03:44 AM

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?

ScrapOrchard 06-27-2011 06:25 PM

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?

carlisleglass 06-29-2011 04:12 AM

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


All times are GMT -8. The time now is 12:30 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.