Zen Cart Logo

hideCategories

Views: 104,788

Results 381 to 400 of 487
25 May 2012, 14:24
#381
curt_l avatar

curt_l

New Zenner

Join Date:
Dec 2007
Posts:
12
Plugin Contributions:
0

hideCategories

You do have the original file 'includes/modules/pages/advanced_search_result/header_php.php' , correct?

First I tried Ajeh's solution here: http://www.zen-cart.com/showthread.php?166062-Hide-category-from-search

However, I have >100 hidden subcategories like this and growing daily:
Top Level = Customer's Baskets (hidden)
SubCategory = A (hidden)
SubCategory = AAA Company (hidden)
SubCategory = AAA Company Project1 (hidden)
Products = Product with Company name (active)

Since each subcategory only has one parent_id, I couldn't figure out how to exclude an entire "top-level" category and have it recurse through all the subcategories and products, and i didn't want to add ...AND p.master_categories_id != '27'... every time I made a new folder.

Then I noticed that I have category images for all my visible categories, but no images for my hidden categories, so my work-around is:

Change:

$where_str = " WHERE (p.products_status = 1
               AND p.products_id = pd.products_id
               AND pd.language_id = :languagesID
               AND p.products_id = p2c.products_id
               AND p2c.categories_id = c.categories_id ";

to exclude categories without an image:

$where_str = " WHERE (p.products_status = 1
               AND p.products_id = pd.products_id
               AND pd.language_id = :languagesID
               AND p.products_id = p2c.products_id
               AND p2c.categories_id = c.categories_id
	       AND c.categories_image != 'NULL'";
25 May 2012, 15:13
#382
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

This isn't a general "hide Categories" thread, this is the support thread for the hideCategories add-on.. So I'm curious if you are you suggesting this solution to those using the hideCategories add-on (which is the purpose of this support thread)??? Because it sure doesn't sound like you are using the hideCategories add-on..

curt_l:

You do have the original file 'includes/modules/pages/advanced_search_result/header_php.php' , correct?

First I tried Ajeh's solution here: http://www.zen-cart.com/showthread.php?166062-Hide-category-from-search

However, I have >100 hidden subcategories like this and growing daily:
Top Level = Customer's Baskets (hidden)
SubCategory = A (hidden)
SubCategory = AAA Company (hidden)
SubCategory = AAA Company Project1 (hidden)
Products = Product with Company name (active)

Since each subcategory only has one parent_id, I couldn't figure out how to exclude an entire "top-level" category and have it recurse through all the subcategories and products, and i didn't want to add ...AND p.master_categories_id != '27'... every time I made a new folder.

Then I noticed that I have category images for all my visible categories, but no images for my hidden categories, so my work-around is:

Change:

$where_str = " WHERE (p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languagesID
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id ";

> to exclude categories without an image:
> ```
$where_str = " WHERE (p.products_status = 1
               AND p.products_id = pd.products_id
               AND pd.language_id = :languagesID
               AND p.products_id = p2c.products_id
               AND p2c.categories_id = c.categories_id
           AND c.categories_image != 'NULL'";
11 Jul 2012, 10:39
#383
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

Hi
forgive me if this issue is already posted but I just wanted to help anyone who may experience similar problem...
I have Hide Categories installed and working just fine (thank you s_mack) yet I have had troubles creating sitemap.xml for my store, the bug is solved here http://www.zen-cart.com/showthread.php?87093-Done-1-3-9-noindex-nofollow-mistakenly-appears-on-home-page-in-certain-situation
yet in the module file includes/init_includes/overrides/init_add_crumbs.php it needs to be updated to close out the bug giving you the following on line 41...

} // hideCategories code
} else**if(SHOW_CATEGORIES_ALWAYS == 0)** {
// if invalid, set the robots noindex/nofollow for this page
$robotsNoIndex = true;
break;
}
}
}
/**

  • add get terms (e.g manufacturer, music genre, record company or other user defined selector) to breadcrumb
    */
    $sql = "select *
    from " . TABLE_GET_TERMS_TO_FILTER;
    $get_terms = $db->execute($sql);
    while (!$get_terms->EOF) {

I hope this helps someone :hug:

11 Jul 2012, 14:47
#384
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

To be clear, is your fix if for stores running 1.3.9?????

picandnix:

Hi
forgive me if this issue is already posted but I just wanted to help anyone who may experience similar problem...
I have Hide Categories installed and working just fine (thank you s_mack) yet I have had troubles creating sitemap.xml for my store, the bug is solved here http://www.zen-cart.com/showthread.php?87093-Done-1-3-9-noindex-nofollow-mistakenly-appears-on-home-page-in-certain-situation
yet in the module file includes/init_includes/overrides/init_add_crumbs.php it needs to be updated to close out the bug giving you the following on line 41...

} // hideCategories code
} else[B]if(SHOW_CATEGORIES_ALWAYS == 0)[/B] {
// if invalid, set the robots noindex/nofollow for this page
$robotsNoIndex = true;
break;
}
}
}
/**

  • add get terms (e.g manufacturer, music genre, record company or other user defined selector) to breadcrumb
    */
    $sql = "select *
    from " . TABLE_GET_TERMS_TO_FILTER;
    $get_terms = $db->execute($sql);
    while (!$get_terms->EOF) {
> 
> I hope this helps someone :hug:

Also wanna suggest that make when posting code on the forum, make sure you put it inside the "code" forum tags.. It keeps the forum from accidentally parsing your code incorrectly and doing things like inserting a smilie when one wasn't meant to be.. Plus it makes the code easier to read..
11 Jul 2012, 23:28
#385
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

Sorry. 1.3.9 yes. I tried to paste the code inside php tags but it would also display the bold and colour change tags that I placed the additional code within. I figured that would confuse people more so than me simply pasting the code directly into my post.

12 Jul 2012, 04:36
#386
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

picandnix:

Sorry. 1.3.9 yes. I tried to paste the code inside php tags but it would also display the bold and colour change tags that I placed the additional code within. I figured that would confuse people more so than me simply pasting the code directly into my post.
It's supposed to work that way (like a code editor will color code), and I don't think anyone would be confused by that at all..:smile: It's actually harder to read inside the post body IMHO

25 Jul 2012, 10:08
#387
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

I have been successfully using this mod on 1.3.9. I am looking to upgrade to ZC 1.5. Does anyone have this working fully on 1.5 yet, or perhaps have started to update the mod? I am happy to help where possible even if it's just testing.

07 Aug 2012, 02:56
#388
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: hideCategories

Hi could someone please give me a link to the version which is suitable for 1.3.8a on PHP Version: 5.2.14 (Zend: 2.2.0)
This would be much appreciated.
Many Thanks
Renz

07 Aug 2012, 05:25
#389
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

Renz:

Hi could someone please give me a link to the version which is suitable for 1.3.8a on PHP Version: 5.2.14 (Zend: 2.2.0)
This would be much appreciated.
Many Thanks
Renz

Not quite the answer you were hoping for but first things first you need to use this link http://www.zen-cart.com/content.php?148 and escape the clutches of 1.3.8a, the hackers goldmine. Upgrade to 1.3.9J and you can install the most current version of Hide Categories.

07 Aug 2012, 15:30
#390
s_mack avatar

s_mack

Totally Zenned

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

Re: hideCategories

I (the original author of this cursed mod) am going to say again: I'm not doing any updates for this, nor am I providing any support, and I really don't suggest you use it. It was purpose-built for a specific scenario and it involves too many core modifications to be really useful. As popular as it was, I regret ever releasing it.

07 Aug 2012, 16:36
#391
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

picandnix:

Not quite the answer you were hoping for but first things first you need to use this link http://www.zen-cart.com/content.php?148 and escape the clutches of 1.3.8a, the hackers goldmine. Upgrade to 1.3.9J and you can install the most current version of Hide Categories.

Oops! A typo, H not J :blush:

07 Aug 2012, 23:11
#392
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

picandnix:

I have been successfully using this mod on 1.3.9. I am looking to upgrade to ZC 1.5. Does anyone have this working fully on 1.5 yet, or perhaps have started to update the mod? I am happy to help where possible even if it's just testing.I've been working on a Zen Cart v1.5 version of it (I have a client who needs this mod so I spent some time on it..). I haven't released it yet, and when I do I'll update this thread and probably start a new support thread for it altogether.. I'm on vacation, and when I get home I'll put a copy of it (sans an updated readme) on my site if you want it..

08 Aug 2012, 05:22
#393
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: hideCategories

DivaVocals:

I've been working on a Zen Cart v1.5 version of it (I have a client who needs this mod so I spent some time on it..). I haven't released it yet, and when I do I'll update this thread and probably start a new support thread for it altogether.. I'm on vacation, and when I get home I'll put a copy of it (sans an updated readme) on my site if you want it..

That'll be great, thank you. Enjoy your vacation...and leave the laptop at home!! :P

08 Aug 2012, 14:03
#394
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

picandnix:

That'll be great, thank you. Enjoy your vacation...and leave the laptop at home!! :PThat's a 10-4!! Laptop is for Facebook activities.. NOT work!!!:laugh:

16 Oct 2012, 19:37
#395
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: hideCategories

How is that update coming? I could really use this feature!!

Thank you for your contributions!

17 Oct 2012, 01:05
#396
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

southshorepizza:

How is that update coming? I could really use this feature!!

Thank you for your contributions!

Haven't really had a chance to finish this up.. Been busy on other projects.. Dunno when I'll get back to this.. I do intend to get back to it.. and when I do I'll update this thread..

17 Oct 2012, 23:59
#397
southshorepizza avatar

southshorepizza

Zen Follower

Join Date:
Sep 2012
Posts:
253
Plugin Contributions:
0

Re: hideCategories

:( sigh I wish I knew more about the programing side. I'm slowly learning but updating this is beyond my reach at this point. Thanks for the update. I subscribed to the thread.

05 Nov 2012, 15:32
#398
hezz avatar

hezz

New Zenner

Join Date:
Sep 2012
Posts:
5
Plugin Contributions:
0

Re: hideCategories

southshorepizza:

:( sigh I wish I knew more about the programing side. I'm slowly learning but updating this is beyond my reach at this point. Thanks for the update. I subscribed to the thread.

I wish I knew more programming too. I hope this plug-in will be updated for version 1.5 soon. It is exactly what I need.

05 Nov 2012, 15:35
#399
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: hideCategories

hezz:

I wish I knew more programming too. I hope this plug-in will be updated for version 1.5 soon. It is exactly what I need.I do plan to submit an update, and I will start a new support thread at that time too.. I have been very busy so this has not been a high priority for me.. Appreciate everyone's patience..

09 Nov 2012, 21:33
#400
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: hideCategories

I've installed the latest version of this mod (2.1) and it looks like it includes the changes below. However, when I search, I get no results, even for categories that are not hidden. If I put back the original advanced_search_result/header_php.php file, the products all show up, but it includes the products from the hidden categories. I have checked and rechecked all the files and I just don't know what is causing this problem.

kamelion0927:

Alrighty, I think I've got it.

MAKE A BACKUP BEFORE YOU MAKE THIS CHANGE BECAUSE THIS ISN'T AN OVERRIDE FILE and it worked for me, but I'm not 100% sure it is correct.

In includes/modules/pages/advanced_search_result/header.php, find

$from_str = "FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m
USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd
ON mtpd.products_id= p2c.products_id
AND mtpd.language_id = :languagesID";

> and change to
> ```php
$from_str = "FROM (" . TABLE_HIDE_CATEGORIES . " h, " . TABLE_PRODUCTS . " p
             LEFT JOIN " . TABLE_MANUFACTURERS . " m
             USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
             LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd
             ON mtpd.products_id= p2c.products_id
             AND mtpd.language_id = :languagesID";

Then find

// Notifier Point
$zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

$where_str = " WHERE (p.products_quantity > 0
AND p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languagesID
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id ";

> and change to
> ```php
// Notifier Point
$zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

$where_str = " WHERE (p.products_quantity > 0
               AND p.products_status = 1
               AND p.products_id = pd.products_id
               AND pd.language_id = :languagesID
               AND p.products_id = p2c.products_id
			   and (p.master_categories_id = h.categories_id and h.visibility_status !=2)
               AND p2c.categories_id = c.categories_id ";

All I did was utilize the code from hideCategories/includes/modules/sideboxes/my_template/whats_new.php and adapted it to fit the search code.

Hopefully it will continue to work and not cause issues with any of my other mods but I would appreciate feedback from someone who knows code as to whether it is the appropriate way to handle this situation.

Thanks!