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)

Jon 06-28-2004 08:37 AM

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

Jon 06-28-2004 06:34 PM

NOTE: A small edit has been made to the categories.tpl modification. It needs to be implemented twice, once for the categories and once for the subcategories.

If your using this, please let me know so I know posting these mods isn't a waste of my time. Thanks :)

thundernugs 06-29-2004 11:13 AM

is there any way this can work in conjunction with fancy categories?

Jon 06-29-2004 11:16 AM

I don't have the fancy categories module. I imagine it's just a matter of putting in the if statement. If you send me the module files I will have a look and see if I can implement for you.

Can I see what the fancy categories look like on your site? I'm not even really sure what they are.

thundernugs 07-07-2004 02:29 PM

jon, any luck on making this work with fancy cats?

thx :)

Jon 07-07-2004 02:36 PM

None yet. Haven't had the chance to really get into it though, I should have a chance before the weekend.

thundernugs 07-07-2004 02:42 PM

nice!

no rush of course. i think there are a lot of folks who could use this mod.

mike

thundernugs 08-10-2004 02:19 PM

jon,

any progress?

Jon 08-10-2004 03:01 PM

Sorry I haven't had any time to address this.

I opened up the fancy categories code and it looks complex. Haven't had any time to go any further than that. Don't know if I will.

elitedimension 08-19-2004 12:04 AM

Thanks Jon! I was just about to write this but luckily found your post.

Jon 10-13-2004 09:31 AM

For 4.0 the code is basically the same. Here's the code for the categories.php

Open include/categories.php

$categories_data = func_query("select $sql_tbl[categories].*, SUBSTRING_INDEX($sql_tbl[categories].category, '\/', -1) as 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 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"));

delphi 11-02-2004 02:48 PM

Jon,
I am trying to apply hidden category to my XCart 4.0 but I could not find any code from include/categories.php. This is the code of categories.php

Code:

<?php
/*****************************************************************************\
+-----------------------------------------------------------------------------+
| X-Cart                                                                      |
| Copyright (c) 2001-2004 Ruslan R. Fazliev <rrf@rrf.ru>                      |
| All rights reserved.                                                        |
+-----------------------------------------------------------------------------+
| PLEASE READ  THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" |
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE  |
| AT THE FOLLOWING URL: http://www.x-cart.com/license.php                    |
|                                                                            |
| THIS  AGREEMENT  EXPRESSES  THE  TERMS  AND CONDITIONS ON WHICH YOU MAY USE |
| THIS SOFTWARE  PROGRAM  AND  ASSOCIATED  DOCUMENTATION  THAT  RUSLAN  R. |
| FAZLIEV (hereinafter  referred to as "THE AUTHOR") IS FURNISHING  OR MAKING |
| AVAILABLE TO YOU WITH  THIS  AGREEMENT  (COLLECTIVELY,  THE  "SOFTWARE").  |
| PLEASE  REVIEW  THE  TERMS  AND  CONDITIONS  OF  THIS  LICENSE AGREEMENT |
| CAREFULLY  BEFORE  INSTALLING  OR  USING  THE  SOFTWARE.  BY INSTALLING, |
| COPYING  OR  OTHERWISE  USING  THE  SOFTWARE,  YOU  AND  YOUR  COMPANY |
| (COLLECTIVELY,  "YOU")  ARE  ACCEPTING  AND AGREEING  TO  THE TERMS OF THIS |
| LICENSE  AGREEMENT.  IF  YOU    ARE  NOT  WILLING  TO  BE  BOUND BY THIS |
| AGREEMENT, DO  NOT INSTALL OR USE THE SOFTWARE.  VARIOUS  COPYRIGHTS  AND |
| OTHER  INTELLECTUAL  PROPERTY  RIGHTS    PROTECT  THE  SOFTWARE.  THIS |
| AGREEMENT IS A LICENSE AGREEMENT THAT GIVES  YOU  LIMITED  RIGHTS  TO  USE |
| THE  SOFTWARE  AND  NOT  AN  AGREEMENT  FOR SALE OR FOR  TRANSFER OF TITLE.|
| THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT.      |
|                                                                            |
| The Initial Developer of the Original Code is Ruslan R. Fazliev            |
| Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2004          |
| Ruslan R. Fazliev. All Rights Reserved.                                    |
+-----------------------------------------------------------------------------+
\*****************************************************************************/

#
# $Id: categories.php,v 1.64 2004/07/12 06:50:34 max Exp $
#

if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }

#
# Functions definition
#

#
# This function builds the categories list within specified category ($cat)
#
function func_get_categories_list($cat=0, $short_list=true, $flag=NULL) {
        global $current_area, $sql_tbl, $shop_language;
       
        $cat = intval($cat);
       
        $all_categories = array();
        $categories = array();
        $subcategories = array();

        $search_condition = "1";
       
        if ($flag == "root")
                $search_condition .= " AND parentid='0'";
        elseif ($flag == "level")
                $search_condition .= " AND parentid='$cat'";
               
        if ($current_area == "C") {
                global $user_account;
                $customer_search_condition = " AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
                $search_condition .= $customer_search_condition;
                if ($flag == "all" || $flag == NULL)
                        $sort_condition = " ORDER BY category";
                else
                        $sort_condition = " ORDER BY order_by, category";
        }
       
        if ($short_list)
                $to_search = "categoryid,parentid,categoryid_path,category,product_count,avail,order_by";
        else
                $to_search = "*";
       
        if (defined('NEED_PRODUCT_CATEGORIES')) {
                global $productid;
                $to_search = explode(",", $to_search);
                foreach ($to_search as $k=>$v)
                        $to_search[$k] = $sql_tbl["categories"].".".$v;
                $to_search = implode(",", $to_search);
                $_categories = func_query("SELECT $to_search, $sql_tbl[products_categories].productid, $sql_tbl[products_categories].main FROM $sql_tbl[categories] LEFT JOIN $sql_tbl[products_categories] ON $sql_tbl[categories].categoryid=$sql_tbl[products_categories].categoryid AND $sql_tbl[products_categories].productid='$productid' GROUP BY $sql_tbl[categories].categoryid");
        }
        else
                $_categories = func_query("SELECT $to_search FROM $sql_tbl[categories] WHERE ".$search_condition.$sort_condition);

        if (is_array($_categories)) {
               
                $_category_names = array();
                if ($flag == "all" || $flag == NULL) {
                        foreach ($_categories as $k=>$v) {
                                $_category_names[$v["categoryid"]] = $v["category"];
                        }
                }
               
                foreach ($_categories as $k=>$category) {

                        if ($flag == "all" || $flag == NULL) {
                        #
                        # Get the full path for category name
                        #
                                $path = explode("/", $category["categoryid_path"]);
                                $category_path = array();
                                $continue = false;
                                foreach ($path as $i=>$catid) {
                                        if (empty($_category_names[$catid])) {
                                                $continue = true;
                                                break;
                                        }
                                        $category_path[] = $_category_names[$catid];
                                }
                                if ($continue)
                                        continue;
                                $category["category_path"] = implode("/",$category_path);

                        }
       
                        if ($current_area == "C") {
                        #
                        # Get the international category name
                        #
                                $int_res = func_query_first("SELECT category FROM $sql_tbl[categories_lng] WHERE code='$shop_language' AND categoryid='$category[categoryid]'");
                                if (!empty($int_res["category"]))
                                        $category["category"] = $int_res["category"];
                        }
               
                        #
                        # Count the subcategories for "root" and "level" flag values
                        #
                        if ($flag == "level" || $flag == "root" || $flag == NULL)
                                $category["subcategory_count"] = array_pop(func_query_first("SELECT COUNT(*) FROM $sql_tbl[categories] WHERE 1 $customer_search_condition AND categoryid!='$category[categoryid]' AND categoryid_path LIKE '$category[categoryid_path]/%'"));
                       
                        $all_categories[] = $category;
                        if (($flag == "root" || $flag == NULL) && $category["parentid"] == 0)
                                $categories[] = $category;
                        if (($flag == "level" || $flag == NULL) && $category["parentid"] == $cat)
                                $subcategories[] = $category;
                }

                if (($flag == "all" || $flag == NULL) and !empty($all_categories)) {
                        function func_categories_sort($a, $b) {
                                return strcmp($a["category_path"], $b["category_path"]);
                        }
                        usort($all_categories, "func_categories_sort");
                }
        }
       
        $return["all_categories"] = $all_categories;
        $return["categories"] = $categories;
        $return["subcategories"] = $subcategories;

        return $return;
}

#
# This function gathering the current category data
#
function func_get_category_data($cat) {
        global $current_area, $sql_tbl, $shop_language;
        global $xcart_dir, $current_location, $config;

        $cat = intval($cat);

        if ($current_area == "C")
                $search_condition = "AND avail='Y' AND (membership='".addslashes($user_account["membership"])."' OR membership='')";
       
        $category = func_query_first("SELECT * FROM $sql_tbl[categories] WHERE categoryid='$cat' $search_condition");

        if (!empty($category)) {

                #
                # Get the array of all parent categories
                #
                $_cat_sequense = explode("/", $category["categoryid_path"]);

                #
                # Generate category sequence, i.e.
                # Books, Books/Poetry, Books/Poetry/Philosophy ...
                #
                foreach ($_cat_sequense as $k=>$v) {
                        $_cat_name = array_pop(func_query_first("SELECT category FROM $sql_tbl[categories] WHERE categoryid='$v'"));
                        if ($current_area == "C") {
                        #
                        # Get the international category name for category location
                        #
                                $int_res = array_pop(func_query_first("SELECT category FROM $sql_tbl[categories_lng] WHERE code='$shop_language' AND categoryid='$v'"));
                                if (!empty($int_res["category"]))
                                        $_cat_name = $int_res["category"];
                        }

                        $category["category_location"][] = array($_cat_name, "home.php?cat=$v");
                }

                if ($current_area == "C") {
               
                        #
                        # Check if all parent categories are enabled
                        #
                        if (func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[categories] WHERE categoryid IN (".implode(",", $_cat_sequense).") AND avail='N'") > 0) {
                                return false;
                        }
                       
                        #
                        # Get the international category name and description
                        #
                        $int_res = func_query_first("SELECT * FROM $sql_tbl[categories_lng] WHERE code='$shop_language' AND categoryid='$cat'");
                        if (!empty($int_res["category"])) {
                                $category["category_name_orig"] = $category["category"];
                                $category["category"] = $int_res["category"];
                        }
                        if (!empty($int_res["description"]))
                                $category["description"] = $int_res["description"];
                }       
               
                if ($config["Images"]["icons_location"] == "FS")
                        $image_field = "image_path";
                else
                        $image_field = "image";
                       
                $_cat_sequense = array_reverse($_cat_sequense);
                foreach ($_cat_sequense as $k=>$v) {
                        $category_icon = func_query_first("SELECT $sql_tbl[icons].$image_field, $sql_tbl[categories].image_x, $sql_tbl[categories].image_y FROM $sql_tbl[icons], $sql_tbl[categories] WHERE $sql_tbl[icons].categoryid='$v'");
                        if (!empty($category_icon[$image_field])) {
                                $category["image_x"] = $category_icon["image_x"];
                                $category["image_y"] = $category_icon["image_y"];
                                break;
                        }
                }

                if ($config["Images"]["icons_location"] == "FS") {
                #
                # Correct the icon URL or path if icon is located in File system
                #
                        $category["image_path"] = $category_icon[$image_field];
                        if (eregi("^(http|ftp)://", $category["image_path"])) {
                        # image_path is an URL
                                $category["icon_url"] = $category["image_path"];
                        }
                        elseif (!strncmp($xcart_dir, $category["image_path"], strlen($xcart_dir))) {
                        # image_path is an locally placed image
                                $category["icon_url"] = $current_location.substr($category["image_path"], strlen($xcart_dir));
                        }
                }

                #
                # Count the subcategories
                #
                $category["subcategory_count"] = array_pop(func_query_first("SELECT COUNT(*) FROM $sql_tbl[categories] WHERE categoryid!='$cat' AND categoryid_path LIKE '$category[categoryid_path]/%' $search_condition"));
               
                return $category;
        }

        return false;
}

#
# Main code
#

$cat = intval($cat);


if ($cat > 0) {
#
# Get the current category data
#
        if ($current_category = func_get_category_data($cat))
                $smarty->assign("current_category", $current_category);
        else {
                if ($current_area == "A") {
                        $top_message["content"] = func_get_langvar_by_name("msg_category_not_exist");
                        $top_message["type"] = "E";
                        func_header_location("categories.php");
                }
                else
                        func_header_location("home.php");
        }
}


#
# Gather the array of categories and extract into separated arrays:
# $all_categories, $categories and $subcategories
#
if ($current_area == "C" or defined('MANAGE_CATEGORIES'))
        $_categories = func_get_categories_list($cat);
else
        $_categories = func_get_categories_list($cat, true, "all");

extract($_categories);


#
# Prepare data for FancyCategories module
#
if ($current_area == "C" and !empty($active_modules["Fancy_Categories"]))
        @include $xcart_dir."/modules/Fancy_Categories/fancy_categories.php";


$smarty->assign("allcategories", $all_categories);

$smarty->assign("categories", $categories);

if ($cat == 0)
        $subcategories = $categories;

if (!empty($subcategories))
        $smarty->assign("subcategories", $subcategories);

$smarty->assign("cat", $cat);

?>


Could you show me where to replace the code?

eleven 12-01-2004 08:19 PM

4.0.7
 
This is the categories.php code for version 4.0.7

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='')";

Nice little mod. Thanks!

GM 12-02-2004 10:51 PM

Very Nice Jon... Thank You

GM 12-25-2004 10:56 AM

I think this mod should be standard XCart issue, however, there is one bug. If you try to search by price in v.4.09 you will get a four mile long SQL error :(

skyking 01-16-2005 09:30 PM

that should be handy for seperating some products out of the normal categories list. Thanks!

markwhoo 01-18-2005 07:24 PM

Jon

I am trying to do something like this but with embedded pages.

I would like to create a few embedded pages to link via hyperlinks, but not be visable under the help section.

Is there something that could achive this as you have done here with the catagories?

Thanks in advance

Jon 01-19-2005 03:43 PM

I don't use embedded pages so I can't say for sure.

You could probably edit your help menu template file and put a conditional to now show a certain page id #.

markwhoo 01-19-2005 03:56 PM

Quote:

Originally Posted by Jon
I don't use embedded pages so I can't say for sure.

You could probably edit your help menu template file and put a conditional to now show a certain page id #.


Thanks for the reply,

I will look at the template and see how it is called and see what I can do.

I thought there was a thread that actually spoke of this, and I cannot find it to save my life.

Thanks again

Stephen Hatton 01-19-2005 04:11 PM

Hidden is the word you need to use - Hidden Static Pages
 
Hi All

Nice MOD Jon. I will look into trying it soon.

To Markwhoo and others:
Hidden Static Pages.

Here are some links on this topic:
http://forum.x-cart.com/viewtopic.php?t=13705&highlight=hidden+pages+hatto n

http://forum.x-cart.com/viewtopic.php?t=11602&highlight=

Note: Follow the links and view the examples. If you or anybody else is interested in my mods - email/pmail me and I will give you the details.

Regards
Ing. Stephen Hatton
:idea:

DogByteMan 01-19-2005 04:50 PM

I wonder if hidden categories could be the answer to MAP pricing.

Does hidden catagories get added to the HTML catalog?

Do the products in a hidden category get added to a froogal feed?

If the answer to my 2 questions is no... we have the makings of an excellent MAP Mod.

markwhoo 01-19-2005 07:37 PM

Re: Hidden is the word you need to use - Hidden Static Pages
 
Quote:

Originally Posted by Stephen Hatton
Hi All

Nice MOD Jon. I will look into trying it soon.

To Markwhoo and others:
Hidden Static Pages.

Here are some links on this topic:
http://forum.x-cart.com/viewtopic.php?t=13705&highlight=hidden+pages+hatto n

http://forum.x-cart.com/viewtopic.php?t=11602&highlight=

Note: Follow the links and view the examples. If you or anybody else is interested in my mods - email/pmail me and I will give you the details.

Regards
Ing. Stephen Hatton
:idea:


This is it!

These were the pages I have been looking for. I think this search engine in the forum is useless sometimes. I have used some of the same words in the titles for searches and have come up blank or other off topic items.

Thanks so much and a PM is on the way!

ghhoz 01-24-2005 11:15 PM

Hello Jon,

Firstly I would like to thank you for sharing such a wonderful mod and to Elleven for adding the mod for Version 4.07

Could you please help me with a little something from this mod that is stumping me 8O

I have followed your mod steps (thanks Jon) but with the one change of using the categories.php suitable for V4.0.7 as provided by Elleven.

I have created some 25 hidden categories as I want to use these for a Alpha Image Map. For some reason when I view any of the the hidden categories the Category name appears the same. They all show the name of the very first Hidden Category I created regardless fo the link being different.

Basically I have 25 Hidden categories being A to Z starting from home.php?cat=300 up to home.php?cat=325

Here are a few to see what I mean.

http://www.giftandhomewarehouse.com.au/home.php?cat=300

http://www.giftandhomewarehouse.com.au/home.php?cat=312

http://www.giftandhomewarehouse.com.au/home.php?cat=302

http://www.giftandhomewarehouse.com.au/home.php?cat=321

I hope someone can see past what I see as I am so stumpped with why this is occurring.

Thanks for looking.

DogByteMan 02-15-2005 03:34 PM

Quote:

Originally Posted by DogByteMan
I wonder if hidden categories could be the answer to MAP pricing.

Does hidden catagories get added to the HTML catalog?

Do the products in a hidden category get added to a froogal feed?

If the answer to my 2 questions is no... we have the makings of an excellent MAP Mod.


Jon,

Do you know if the products in hidden categories are created in the HTML catalog?

Are they added to a froogle feed when using MM 3.0?

Thanks

Jon 02-15-2005 03:41 PM

Sorry to say I'm not sure about either of those scenerios. You can easily test to see if the products of hidden categories are created.

As for MM3 you'd have to ask groovico.

Alltribes 03-22-2005 12:05 PM

FYI, you don't need to modify categories.tpl in 4.0.12, the same is probably true of all 4.x.

I noticed after I applied this mod into my cart that I had forgoten to exclude the hidden categories in the horizontral category menu I have at the bottom of my pages.

When I looked, the hidden categories weren't being displayed. The code is almost identical to the side menu, so I took the if statements out of categories.tpl.

However I now have a problem, how the hell do you display ONLY the hidden categories? Or even display them at all? Is hardcoding the only option?

Jon 03-22-2005 01:58 PM

Sorry I can't provide support for this modification, I don't use the 4.x branches of x-cart and have a hard enough time just keeping my paid modules up to speed with the variety of x-cart releases.

Alltribes 03-22-2005 03:17 PM

I'm sure I'll figure it out. I think it's only loading available categories into the $categories variable.

*edit*
I figured it out. In categories.php I commented out:
Code:

$search_condition[] = "$sql_tbl[categories].avail='Y'";

I wouldn't do that if you have disabled categories though. I have no idea where else $search_condition is used. But for me, it fits my needs.

I had to put back the if statements in categories.tpl.

Jonathan501 03-28-2005 07:21 PM

did anyone figure out how to get the name to change?

ghhoz 04-28-2005 04:35 PM

Hello,

Sorry as yet I have not been able to get the name of the categories to work right with this mod. I too would love to know if anyone has this working on the same xcart versions as I use.

Cheers

jackson 05-08-2005 12:20 PM

4.0.8
 
Has anyone got this to work on 4.0.8? I made the changes to category_modify.tpl but can't find the code mentioned in catagories.tpl

Would be great if I could get this working.

balinor 05-08-2005 12:22 PM

That is because you need to edit categories.php, not categories.tpl. Totally different file :)

jackson 05-08-2005 12:33 PM

Cheers
 
What a doofis! Thanks again!

jackson 05-08-2005 07:58 PM

Just doesn't want to work.
 
As Alltribes said, "didn't need to modify categories.tpl" as I am 4.0.8. But i canged the code in category_modify.tpl to:

Code:

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


It still isn't working

Just to make sure I'm being clear in what I want to achieve, I want to be able to disable the catagory in admin and still be able to access it via direct URL.

What I have done is taken the url then disabled the catagory, gone back and pasted url directly into address bar, but it just takes me to my shop index.

What am I doing wrong?

martin242 07-28-2005 07:10 PM

That mod is not working on X-Cart 4.0.14 :(
Anyone can help me?
I can post my categories.php if needed.
Thanks!

Martin

balinor 07-29-2005 03:52 AM

Read the thread carefully...there are solutions for 4.0 posted within the thread. I have it working fine on multiple versions of 4.0.x, including .14.

HWT 08-03-2005 04:52 AM

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?

martin242 08-04-2005 06:45 PM

You are right, the same happens on 4.0.14
This mod is not working properly :(
Anyone has a solution?

HWT 08-07-2005 06:37 AM

OK, this seems to be working all right on my site now.

Check it out at www.heritagetoys.com

On the right, you will see a "Shop by Age" tab like menu. Each link in this menu goes to a hidden category.

How I did this was by following the mod instructions in this thread. Then I created a category (I named it Shop by Age), and made it hidden. I created sub categories that I wanted to be the "hidden categories" (0-18 months, 1-2 years, etc.) and set them to "active" status, and just hard coded the links in to the tab.

Results: If I move categories around in the admin, occassionally some of the categories (never know which!?) will display "Shop by Age" in the bread crumb and title. After a little while (minutes to hours) it goes back to it's own title/breadcrumb. Why? I don't know, but it seems to work in general.

martin242 08-07-2005 06:53 AM

Seems like this Mod is still very buggy.
I couldn't find a solution to make it work properly yet.


All times are GMT -8. The time now is 09:47 AM.

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