Zen Cart Logo

hideCategories

Views: 104,787

Results 201 to 220 of 487
22 Feb 2009, 21:36
#201
limazita avatar

limazita

New Zenner

Join Date:
Feb 2009
Posts:
4
Plugin Contributions:
0

hideCategories

bumpspt:

Love this mod Steven. This is exactly what I needed for my site.

Like a couple others on this thread, I use the top category tab and wanted a way to hide the categories there as well. I came up with this solution that is working for me....

copy: /includes/modules/categories_tab.php
to: /includes/modules/YOURTEMPLATE/categories_tab.php

around line 31, replace the code:

$categories_tab_query = "select c.categories_id, cd.categories_name from " .

TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd

                      where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1'" .
> 
> 
> with new code:
> ```php
$categories_tab_query = "select c.categories_id, cd.categories_name from " .

TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd," . TABLE_HIDE_CATEGORIES . " cde

                          where c.categories_id=cd.categories_id and c.categories_id=cde.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1' and cde.visibility_status='0'" .

This adds an argument to the query to check the visibility status and hide any category that is not set to normal.

As with another post I read in this thread, this does require that all of your categories have a hide_categories value in the database. The other post noted this could be done through editing the database to add the value. Being a novice, I don't like to directly edit the database and found a different solution. For new categories, or categories that were created before installing the hide mod, edit the category to be hidden, save, then re-edit to normal. This creates the record needed in the database.

Hope this helps.

I installed the original hide categories mod alright. I followed the above instructions to install your mod, but the zen cart page become blank (only head banner is displayed) after the mod is installed, what might the problem be? Thanks

09 Mar 2009, 13:59
#202
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: hideCategories

Hi :) . I've used this mod before and never had trouble, but with this particular site, I am. Two things. First, they're using the Best Sellers box and I'm getting this error with your bestsellers.php in the modules/sideboxes/custom folder:

1146 Table '(removed for security purposes)_zc2.products_description' doesn't exist
in:
[select distinct p.products_id, pd.products_name, p.products_ordered from zen_products p LEFT JOIN zen_hide_categories h ON (p.master_categories_id = h.categories_id), products_description pd WHERE (h.visibility_status < 2 OR h.visibility_status IS NULL) AND p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '1' order by p.products_ordered desc, pd.products_name limit 10]

Second, I just took that file out and thought it was working, but when I clicked on the manufacturer for the product, the product still showed up.

Any help is appreciated :) .

10 Mar 2009, 14:07
#203
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: hideCategories

Hi, I'm back. I have installed this again in a different shop and the best sellers sidebox is not a problem, but the product is not hidden. The category is, I chose hidden, direct link only, but the product is showing up everywhere.

10 Mar 2009, 19:53
#204
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: hideCategories

Okay, figured out the sql error, but in both shops I have installed this in in the last two days, it isn't hiding them from the displays. They're showing up in new products (bottom of the page) and also when I browse by manufacturer. Sorry to keep posting, am not trying to bump, just giving updates on what is happening. Any help is appreciated.

15 Mar 2009, 15:44
#205
tinadad avatar

tinadad

New Zenner

Join Date:
Apr 2008
Posts:
39
Plugin Contributions:
0

Re: hideCategories

Well I installed this mod a week or so ago and it appears to be functioning to the point it is not creating any errors, but have one issue that is driving two of us crazy. The cats do appear to be hidden in the edit screen, but no matter what I do they still show up in the breadcrumbs on the main page. I have called myself double checking the files but nothing seems to help. Our cart is driven by direct links on after the completion of registration type forms. But if a user stumbles on to the main menu the required form will be bypassed. I have had to point the main menu to one of the cats for the time being but would like to be able to go back to the standard for one cat but until I can hide the others that is not feasible. Of course being older than dirt makes me a bit slow.
Mel

15 Mar 2009, 17:56
#206
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

This is a response to your post, but also a reminder/suggestion in general.

This contribution, as initially stated, was done for a specific site so the categories are hidden from the modules/boxes/pages that the specific site used and ignored the ones that it didn't use. It is up to the user to find and fix... or eliminate... any page elements, sideboxes, etc that aren't used by this mod. Hints are provided in the readme. So in general, if you aren't up to snuff with PHP programming and aren't intimately familiar with zen cart, then my suggestion is you not use this contribution. It is probably more headache then it is ultimately worth to you.

If I had the time... and I don't... to do this contrib over again with more general use in mind (rather than just the site that was paying me) I would probably go about it entirely different, making use of the hooks available in recent zen versions if at all possible. With new major versions of Zen on the horizon... I doubt I'd undertake it even if I had the time (and I don't) until they were released and stable. I'm talking about zen v4 whenever it is ready, because it should give even better ways to interact with your data.

  • Steven
31 Mar 2009, 22:17
#207
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: hideCategories

For me, they're showing up in the sideboxes and in the New Products on the main page...I have the Category Tabs disabled. This is happening on two sites...can't figure it out. I understand you wrote it for a particular purpose, but I think what I'm trying to do is within that realm and don't understand why it isn't working...

31 Mar 2009, 23:34
#208
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

Hi.

Advice #1 - read the readme file that came with the contrib.
Advice #2 - look for something else if #1 + your php knowledge doesn't = a solution.

Steve

17 Apr 2009, 14:12
#209
nsabaits avatar

nsabaits

New Zenner

Join Date:
Oct 2008
Posts:
53
Plugin Contributions:
0

Re: hideCategories

Hi all,

I've recently migrated to a new server host and prior to this move the hide categories mod worked perfectly. However now the store is on the new server the mod is still there i.e. I have the hide options when editing a category. But when I choose to hide a category it does nothing and the category is still visible.

Any ideas?

17 Apr 2009, 15:14
#210
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

Just guesses.

My top guess is when you backed up and restored the DB that somehow the new entries got trashed? Try uninstalling the mod and installing it fresh.

Otherwise perhaps an incompatibility with the version of PHP and/or MySQL on your new server?

Dunno.

Steve

20 Apr 2009, 12:51
#211
nsabaits avatar

nsabaits

New Zenner

Join Date:
Oct 2008
Posts:
53
Plugin Contributions:
0

Re: hideCategories

Already tried that route Steve.

PHP & MySQL are the same on both servers

20 Apr 2009, 13:41
#212
digidiva_kathy avatar

digidiva_kathy

Zen Follower

Join Date:
May 2006
Posts:
323
Plugin Contributions:
0

Re: hideCategories

Could this overall be related to the PHP version? It seems I'm not the only one with this problem recently and I've installed this on other sites and had it work fine...and I didn't do anything different this time. Your response didn't really help me as I've looked over everything more than once and there's nothing different about the two installations I had problems with than any others I've done before...except maybe the PHP version.

20 Apr 2009, 14:51
#213
nsabaits avatar

nsabaits

New Zenner

Join Date:
Oct 2008
Posts:
53
Plugin Contributions:
0

Re: hideCategories

OK it looks like a MOD conflict on my install. The strange thing is that I had the same MODs on the old server and they worked fine. I again removed the hide categories thread and re-installed and it worked fine (last time I removed it I must have missed one or more files :oops:) I re-installed the hide categories MOD and it worked like before with no issues with the MOD. However I also use the categories dressing MOD which then ceased to work.

Categories Dressing mod:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=609

I re-installed the categories dressing MOD and the hide categories MOD then stopped working again. Strange since they both worked happily on my old server and using the same version of ZC.

Any ideas Steve?

20 Apr 2009, 14:53
#214
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

Don't use both, or use Winmerge to figure out what the two have in common and figure out a way to merge the code.

21 May 2009, 20:04
#215
origel avatar

origel

New Zenner

Join Date:
May 2009
Posts:
1
Plugin Contributions:
0

Re: hideCategories

Ok, I went through all the posts, and nothing helped.

I'm using Zen Cart v1.3.8a, clean install, i actually installed it twice. Ran through the hideCategories Installation successfully, installed the sql with no errors, I see the radio buttons with the options to hide the categories and everything...:clap:

But here's where i'm confused, The categories that I have listed as hidden, still show up under the categories listing regardless if they are hidden from main menus, or hidden (direct link only), What did i do wrong if anything, is anyone else experiencing this, as far as what I read, everything works well right off the bat...I don't knwo what I did, this is not my first time installing scripts or using sql, so i'm LOST... :lamo:

I"m sorry if anyone could assist....i'm going to reinstall zencart again, and create a new sql table just for this, hopefully it will work...

Thank you guys............

21 May 2009, 20:10
#216
decostyle avatar

decostyle

Zen Follower

Join Date:
Mar 2008
Posts:
336
Plugin Contributions:
0

Re: hideCategories

As I recall, this only hides it from the main menu but it still shows up on product listing. Thats the reason why I didnt use this module afterall.

origel:

Ok, I went through all the posts, and nothing helped.

I'm using Zen Cart v1.3.8a, clean install, i actually installed it twice. Ran through the hideCategories Installation successfully, installed the sql with no errors, I see the radio buttons with the options to hide the categories and everything...:clap:

But here's where i'm confused, The categories that I have listed as hidden, still show up under the categories listing regardless if they are hidden from main menus, or hidden (direct link only), What did i do wrong if anything, is anyone else experiencing this, as far as what I read, everything works well right off the bat...I don't knwo what I did, this is not my first time installing scripts or using sql, so i'm LOST... :lamo:

I"m sorry if anyone could assist....i'm going to reinstall zencart again, and create a new sql table just for this, hopefully it will work...

Thank you guys............

21 May 2009, 20:21
#217
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

It hides categories, not products. If you want to hide products its easy... don't add them to your store :)

Origel - read the readme. It hides categories from the modules it is works with. If you're using a module that we didn't use when we set it up then you have to modify that module. The reason this module will NEVER be a right-for-everyone thing is the way Zen handles its product/category calls. It isn't centralized so every module that makes the call has to be modified instead of just making one change to the central call (which doesn't exist).

There would be loads of benefits and possibilities if they had done it more centralzied... but ce la vie.

Steven

04 Jun 2009, 00:56
#218
wizzard308 avatar

wizzard308

New Zenner

Join Date:
May 2009
Posts:
24
Plugin Contributions:
0

Re: hideCategories

I used this mod and had some problems so I went back and replaced the over written files with my original files now its killed my categories section. I try to log into the categories and it says

**Error 500 - Internal server error

An internal server error has occured!
Please try again later.
**
I removed all the files this mod installed, deleted the table on the DB and it still screwed it up :frusty:

04 Jun 2009, 04:29
#219
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: hideCategories

Clearly you didn't then :)

PHP isn't some magic virus. You put something in, then you take it back out and you're exactly where you were. So either you had that problem before you installed the mod, or you introduced it after (most likely) or you haven't fully removed it.

Its a learning process. Keep at it. Unmodded Zen is pretty simple... once you start modding you see how complex it can be. Once you start to understand... it is satisfying. Before then, it is frustrating.

Have fun.

(consider starting from scratch with a fresh install and CAREFULLY and SLOWLY make changes, fully testing step by step along the way)

  • Steven
10 Jun 2009, 17:03
#220
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: hideCategories

Lovely Mod!

Thanks Steven!

One minor thing. The hidden category shows up on the top horizontal category bar. I really don't care much for that bar - how can I disable it?

Thanks!

Gabstero