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)

pauldodman 08-31-2005 06:15 AM

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.

HWT 08-31-2005 06:26 AM

Thanks pauldodman,

That works perfectly for what we want to do in version 4.0.13

harrismichael 10-26-2005 08:33 AM

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

fablot 10-31-2005 12:37 PM

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?

More-Japan 12-02-2005 10:32 AM

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.

pwd88 12-15-2005 06:33 PM

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

neroag 01-08-2006 04:24 AM

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

civictuner 01-14-2006 01:55 AM

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

civictuner 01-20-2006 10:04 AM

nobody?

Jon 01-24-2006 03:04 PM

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

hansmoen 03-08-2006 07:10 AM

Quote:

Originally Posted by civictuner
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


http://forum.x-cart.com/viewtopic.php?p=128691

If you did the modification in categories.php you are probably only missing a '(' and a ')'

Where it used to say
Quote:

$search_condition = "AND avail='Y' AND (membership=blabla

it should now say
Quote:

$search_condition = "AND (avail='Y' OR avail = 'H') AND (membership=blabla

If not the SQL query will always return more than 1 row, including the hidden category, and if the hidden category was created before the category you're viewing, the title will reflect the hidden category.



HK

stevebag 04-11-2006 03:11 AM

Quote:

Originally Posted by fablot
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?


I found I had to add an 'if' too. Without it if you mark a category as hidden, then products in this category can be searched for.

Try changing

FROM:
if($current_area == 'C') {
$search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."') AND $sql_tbl[categories].avail = 'Y'";
}

TO:
if($current_area == 'C' and !empty($condition)) {
$search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."') AND ($sql_tbl[categories].avail = 'Y' )";
}
else
{
$search_condition .= " AND $sql_tbl[categories].membership IN ('','".addslashes(@$user_account['membership'])."') AND ($sql_tbl[categories].avail = 'Y' OR $sql_tbl[categories].avail='H')";
}

-- Basically, only show 'H'idden category products if the search string is empty... ie; not searched for.

MOC 04-21-2006 12:08 PM

Hi,
i installed this mod for version 3.5.14

How can the Hidden categories be excluded out of the Drop down menu (Category) in the advance search?

TIA
Saskia

hansmoen 04-23-2006 01:28 PM

Good questions and questions
 
Quote:

Originally Posted by MOC
Hi,
i installed this mod for version 3.5.14

How can the Hidden categories be excluded out of the Drop down menu (Category) in the advance search?

TIA
Saskia


Hmmm... Thats a good question Saskia. As you see I'm a bit of a newbie, and I was introduced to xcart in version 4.0.17.
In this version they do not show up (as you can see on http://www.pchealth.ie ).

Hopefully some of the oldboys can help you out.


Hasse

DataViking 03-09-2007 12:25 PM

Re: Hidden Categories
 
can you hide category in v 4.1.6

Jerrad 04-19-2007 04:31 AM

Re: Hidden Categories
 
Quote:

Originally Posted by HWT
An extension of the page title "bug", the description also gets taken only from the 1st hidden category. Tried to work around by giving the first hidden category a general name, and use the description to differentiate the categories. Didn't work. Every category (hidden or not) displays the same title and description as the 1st hidden category. Anyone figured it out yet?


Anybody ever found a solution for that page title "bug"?
I've got everything working with the exception of the category title & page title.
All the hidden categories display the category & page title of the first hidden category... 8O


Any help would be very welcomed! :D
Thanks in advance!

UPDATE: I fixed it by changing line 179 from include/categories.php from

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

to

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

Page and category title of hidden categories are now displaying correctly :D/

Jon 04-20-2007 03:52 PM

Re: Hidden Categories
 
Just piping in to confirm that the "brackets" are the solution to the title issue.

sakeena 05-04-2007 09:57 AM

Re: Hidden Categories
 
I want to apply the 501 solution but cant find that code to replace in my categories.tpl (this is in "the customer directory correct?)
here is my code can someone explain what to change
Quote:

{* $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"}
<div class="categories">
{foreach from=$categories item=c}
<a href="home.php?cat={$c.categoryid}">{$c.category}< /a>
{/foreach}
</div>
{else}
<div class="categories">
{foreach from=$subcategories item=c key=catid}
<a href="home.php?cat={$catid}">{$c.category}</a>
{/foreach}
</div>
{/if}
{/if}
{/capture}
{ include file="menu_cat.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}

nfc5382 05-05-2007 05:59 AM

Re: Hidden Categories
 
This works good. I'm using it for MAP pricing (one distributor complained that the only way to discount is with "entering an email address to see products"). MAP for other products are not displayed until the customer logs in.

So I modified my cart so that the customer can enter their email address, then an automated email is sent with the direct link to the hidden category (with hidden products in it).

delphi 05-20-2007 08:27 PM

Re: Hidden Categories
 
Quote:

Originally Posted by Jon
3.5.8-3.5.9 but may work on others

In the older version of x-cart, disabled categories were still viewable so you could have hidden categories. This was good for hidden categories, not so good if you actually wanted to disable the category.

In the newer x-carts I've noticed they actually disable the category, but you can't have hidden categories.

This mod just allows you to create a hidden category using the admin section. The category won't show up in the navigation, and will still accessible by direct link.

Mod is pretty basic, was just difficult finding where the exclusion took place :)

-----

First lets get it to allow the hidden categories.
Open up /include/categories.php

FIND:
$categories_data = func_query("select $sql_tbl[categories].*, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', -1) as category_name, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', 1) as root_category_name from $sql_tbl[categories] ".($current_area=="C"?"where $sql_tbl[categories].avail='Y' $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "order_by" : "category"));

REPLACE WITH:
$categories_data = func_query("select $sql_tbl[categories].*, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', -1) as category_name, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', 1) as root_category_name from $sql_tbl[categories] ".($current_area=="C"?"where $sql_tbl[categories].avail='Y' OR $sql_tbl[categories].avail='H' $membership_condition ":"")." group by $sql_tbl[categories].categoryid order by ".($current_area=="C" ? "order_by" : "category"));

The key here is just adding the: OR $sql_tbl[categories].avail='H'

-----

Lets make hidden categories creatable from the admin
Open /skin1/admin/category_modify.tpl

FIND:
<select name=avail>
<option value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>Enabled</option>
<option value='N' {if ($current_category.avail eq 'N')} selected {/if}>Disabled</option>
</select>

REPLACE WITH:
<select name=avail>
<option value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>Enabled</option>
<option value='N' {if ($current_category.avail eq 'N')} selected {/if}>Disabled</option>
<option value='H' {if ($current_category.avail eq 'H')} selected {/if}>Hidden</option>
</select>

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

Everything is working now, except they are still on the side navigation, so lets remove them.
Open /skin1/customer/categories.tpl

FIND BOTH INSTANCES OF:
<font class=CategoriesList>{$categories[cat_num].category_name}</font>


CHANGE TO:
{if $categories[cat_num].avail ne "H"}<font class=CategoriesList>{$categories[cat_num].category_name}</font>
{/if}

NOTE: There are two links in this file, the categories and the subcategories. The modification needs to be made to both.
-------------------------

That should do it. Feel free to paypal a donation to jon@hitemup.com if you feel this mod has saved you cost of some development time :)


Has anyone used this for 4.1.17? I tried to follow the codes, but the codes are not there anymore in this latest version

LoveHurts 02-09-2008 03:45 AM

Re: Hidden Categories
 
nobody code for this? 4.1.6.

just want to hide one category. thanks yves

Learner 07-14-2009 03:57 AM

Re: Hidden Categories
 
Anyone for 4.1.9 & 4.1.11?

Learner 07-23-2009 02:36 AM

Re: Hidden Categories for 4.0.17
 
Quote:

Originally Posted by More-Japan
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.


Will it work on 4.1.9 and 4.1.11?

alec.thomas 07-30-2009 06:52 AM

Re: Hidden Categories
 
This is a nice mod, has anyone successfully done this for 4.2? This seems like the harder way to do things...

Freakmode 08-07-2009 02:08 AM

Re: Hidden Categories
 
1 Attachment(s)
Is everyone just wanting to disable a cat but still wanting to access products in it?

I use X-Configurator to build jewellery items from components that I do not sell on their own so they are all in hidden cats.

I have this working for 4.1.8

Here is my search.php

alec.thomas 08-07-2009 04:59 AM

Re: Hidden Categories
 
no, not necessarily, what i'm trying to do is to add a category that does not show up in the category list, but is still accessible through URL ( http://www.mystore.com/hiddencategory/

Plucky Pear 08-12-2009 11:47 AM

Re: Hidden Categories
 
Is there a good code for this on 4.2 ?

Learner 08-13-2009 10:16 PM

Re: Hidden Categories
 
Anyone for 4.1.9 and 4.1.11?

Learner 09-10-2009 04:28 AM

Re: Hidden Categories
 
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?

Freakmode 09-10-2009 06:20 AM

Re: Hidden Categories
 
Take out some points with Qualiteam - they will fix it for you

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 01:23 AM.

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