Zen Cart Logo

hideCategories

Views: 104,789

Results 341 to 360 of 487
25 Oct 2011, 6:15 AM
#341
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

hideCategories

getyler2:

This is a great add-on if I could just finish merging the two /includes/templates/mytheme/sideboxes/tpl_categories.php files I have. My original version from a template I'd bought, and the new Hidden Category version. Replacing the original file with the Hidden version strips out the formatting of my Category menu, but hides the hidden category. Using the original version gets my styling back but obviously the hidden category is shown. When a fix attempt doesn't work, all that gets shown is the top banner.

I downloaded the 1.10 version because I built the cart in 1.3.8a with tons of edits I didn't keep track of, so I'm stuck in 1.3.8 for now. I've tried for 4 days cutting and pasting here and there to no avail. Tried going from the new version to the old, and vice versa. Anybody have any guidance? The two php files are zipped. My php capabilities suck and I'm out of ideas. Many thanks!

The hidden version turns the Categories sidebox formatted text into Times Roman, single line breaks, flush left... no formatting.

One of the files zipped was wrong. Revised the attachment. I see a guy 5 posts or so before me having a similar issue. Trying WinMerge as well without any luck yet.

25 Oct 2011, 3:00 PM
#342
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

You need to go back to who ever you got your template from.. (sounds like a typical Template Monstrosity template)

The categories sidebox in your template likely has the styling hardcoded into the sidebox versus using the stylesheet to manage the sidebox styling.. Your issue is you need to get the styling to match your template and that is not an issue caused by this mod at all..

getyler2:

This is a great add-on if I could just finish merging the two /includes/templates/mytheme/sideboxes/tpl_categories.php files I have. My original version from a template I'd bought, and the new Hidden Category version. Replacing the original file with the Hidden version strips out the formatting of my Category menu, but hides the hidden category. Using the original version gets my styling back but obviously the hidden category is shown. When a fix attempt doesn't work, all that gets shown is the top banner.

I downloaded the 1.10 version because I built the cart in 1.3.8a with tons of edits I didn't keep track of, so I'm stuck in 1.3.8 for now. I've tried for 4 days cutting and pasting here and there to no avail. Tried going from the new version to the old, and vice versa. Anybody have any guidance? The two php files are zipped. My php capabilities suck and I'm out of ideas. Many thanks!

The hidden version turns the Categories sidebox formatted text into Times Roman, single line breaks, flush left... no formatting.

getyler2:

One of the files zipped was wrong. Revised the attachment. I see a guy 5 posts or so before me having a similar issue. Trying WinMerge as well without any luck yet.

1 Nov 2011, 2:17 PM
#343
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

You are correct Sir, it is a Template Monster template. From what I can tell, they're only wrapping the categories list in an <ul> then applying a style to that <ul> from the stylesheet. That's not a lot of local formatting. Regardless, thanks for pointing me to the stylesheet as now I've got it close the original styling. No mouseover treatment though and the separator lines are on the top and bottom item as well. Not as pretty but at least it works. Hopefully the owner won't care.

1 Nov 2011, 5:56 PM
#344
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

Okay, I've got the stylesheet edited to where it's acceptable. Now the issue is how the product listing components are laid out. Everything's out of order compared to the rest of the product listings and I'm not sure which file to edit. Can you advise?

Hidden product listing
http://server27.lfchosting.com/fiesta/texastamale2/store3/index.php?main_page=document_product_info&cPath=47&products_id=222

Normal product listing
http://www.texastamale.com/store/index.php?main_page=product_info&cPath=1&products_id=190

Many thanks!

1 Nov 2011, 6:13 PM
#345
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

When I go to Catalog / Product Types and edit Product-Hidden, I can see the handler page is document_product. This is probably it but don't know what php file to edit.

1 Nov 2011, 6:52 PM
#346
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

Your issues have NOTHING to do with support for the hideCategories add-on.. You need to create a new thread and post your formatting questions there..

getyler2:

Okay, I've got the stylesheet edited to where it's acceptable. Now the issue is how the product listing components are laid out. Everything's out of order compared to the rest of the product listings and I'm not sure which file to edit. Can you advise?

Hidden product listing
http://server27.lfchosting.com/fiesta/texastamale2/store3/index.php?main_page=document_product_info&cPath=47&products_id=222

Normal product listing
http://www.texastamale.com/store/index.php?main_page=product_info&cPath=1&products_id=190

Many thanks!

getyler2:

When I go to Catalog / Product Types and edit Product-Hidden, I can see the handler page is document_product. This is probably it but don't know what php file to edit.

1 Nov 2011, 7:19 PM
#347
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

Really? Wow. My sincere apologies for irritating you but yes it does have everything to do with the hidden category add-on. Otherwise I wouldn't be posting this here.

I've installed all the files according to spec (for release 1.10), successfully created a hidden category, and an initial product within that hidden category...

http://server27.lfchosting.com/fiesta/texastamale2/store3/index.php?main_page=document_product_info&cPath=47&products_id=222

The category is hidden as expected, but the hidden product page has the page elements mixed up so I just need to find the php page that's controlling it so I can move things around. The order of things as it is...

Category name
Product photo
Product name
Price
Description
Add to cart quantity box
Add to cart button
Model (item) number
Manufacturer
Attributes

I just need to reorder things to match products in unhidden categories...

http://www.texastamale.com/store/index.php?main_page=product_info&cPath=1&products_id=190

Thanks again!

1 Nov 2011, 7:39 PM
#348
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

getyler2:

Really? Wow. My sincere apologies for irritating you but yes it does have everything to do with the hidden category add-on. Otherwise I wouldn't be posting this here.

I've installed all the files according to spec (for release 1.10), successfully created a hidden category, and an initial product within that hidden category...

http://server27.lfchosting.com/fiesta/texastamale2/store3/index.php?main_page=document_product_info&cPath=47&products_id=222

The category is hidden as expected, but the hidden product page has the page elements mixed up so I just need to find the php page that's controlling it so I can move things around. The order of things as it is...

Category name
Product photo
Product name
Price
Description
Add to cart quantity box
Add to cart button
Model (item) number
Manufacturer
Attributes

I just need to reorder things to match products in unhidden categories...

http://www.texastamale.com/store/index.php?main_page=product_info&cPath=1&products_id=190

Thanks again!

Found it...
/includes/templates/template_default/tpl_document_product_info_display.php

Thanks for the help!

1 Nov 2011, 7:41 PM
#349
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

Not irritated as you assume... Simply responding to you and trying to help..

If you used the optional files in the add-on zip file for using the document product type for your hidden products, this uses the default layout for the document product type.. What you are asking about is how to change the document product layout to match the default product layout.. That's not "truly" a support question (the mod does indeed work) as it is a layout issue.. Hence why I suggested asking this question in one of the layout support forums..

getyler2:

Really? Wow. My sincere apologies for irritating you but yes it does have everything to do with the hidden category add-on. Otherwise I wouldn't be posting this here.

I've installed all the files according to spec (for release 1.10), successfully created a hidden category, and an initial product within that hidden category...

http://server27.lfchosting.com/fiesta/texastamale2/store3/index.php?main_page=document_product_info&cPath=47&products_id=222

The category is hidden as expected, but the hidden product page has the page elements mixed up so I just need to find the php page that's controlling it so I can move things around. The order of things as it is...

Category name
Product photo
Product name
Price
Description
Add to cart quantity box
Add to cart button
Model (item) number
Manufacturer
Attributes

I just need to reorder things to match products in unhidden categories...

http://www.texastamale.com/store/index.php?main_page=product_info&cPath=1&products_id=190

Thanks again!

1 Nov 2011, 9:21 PM
#350
getyler2 avatar

getyler2

New Zenner

Join Date:
Jul 2011
Posts:
44
Plugin Contributions:
0

Re: hideCategories

DivaVocals:

Not irritated as you assume... Simply responding to you and trying to help..

If you used the optional files in the add-on zip file for using the document product type for your hidden products, this uses the default layout for the document product type.. What you are asking about is how to change the document product layout to match the default product layout.. That's not "truly" a support question (the mod does indeed work) as it is a layout issue.. Hence why I suggested asking this question in one of the layout support forums..

I actually didn't need to edit that tpl_document_product_info_display.php file... if I COPY an existing product to the new hidden category, the formatting comes across just fine. What was different is I'd created a NEW product in the hidden category, entered the duplicate info, and THAT product page was jacked. If you instead copy a product into the hidden category, all is well.

Took me awhile to figure it out, but thanks for a great add-on!

:clap:

1 Nov 2011, 10:01 PM
#351
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

getyler2:

Found it...
/includes/templates/template_default/tpl_document_product_info_display.php

Thanks for the help!You should NEVER edit any of the files inthe template_default folder.. You would instead create an OVERRIDE file..

getyler2:

I actually didn't need to edit that tpl_document_product_info_display.php file... if I COPY an existing product to the new hidden category, the formatting comes across just fine. What was different is I'd created a NEW product in the hidden category, entered the duplicate info, and THAT product page was jacked. If you instead copy a product into the hidden category, all is well.

Took me awhile to figure it out, but thanks for a great add-on!

:clap:Glad you figured this all out, but any further questions on product page layout should be posted in a more appropriate thread.. I know you don't think that your questions are unrelated to support for the hideCategories support thread, but they really are.. You confirmed the add-on worked as it should. ALL of your page product layout questions (the order in which items appear on the product page) are OFF TOPIC for this support thread.. Therefore the layout of the product pages is a separate topic that has nothing to do with support/troubleshooting this add-on and going forward should be posted in a more appropriate place on the forum....

2 Nov 2011, 2:28 PM
#352
uncharted avatar

uncharted

New Zenner

Join Date:
Oct 2011
Posts:
68
Plugin Contributions:
0

Re: hideCategories

Hi,

Anyone have this working for 1.5.0?

Thx

3 Nov 2011, 3:32 AM
#353
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: hideCategories

Hide Categories is just what we need to be able to manage the update of huge numbers of products from multiple vendors and hide new categories while they are being worked on. I see that several sideboxes have been fixed so that hide categories will work with them. I need to try to make it work with the CSS dropdown menu and the CSS flyout menu.
Would someone of you coding gurus give me the exact editing to make the hidden categories work with the dropdown menu? :smartalec:

13 Dec 2011, 11:47 PM
#354
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

Discovered that the new products centerbox that appears on the main page of Zen Cart doesn't "hide" products in hidden categories... This is something that I never realized was happening because I always turn this showing new products on the main page.

I'll be submitting an update to hideCategories with the correction (don't ask when.. It's the holiday season and I'm crazy busy.. I'll post the update when I get some time..), but in the meantime it's an easy fix to make yourself if you like..

FIRST create an override. Copy includes/modules/new_products.php to includes/modules/YOUR_TEMPLATE

Starting around line 23 in the **includes/modules/YOUR_TEMPLATE/****new_products.php **file find this:

  $new_products_query = "select distinct p.products_id, p.productsi_image, p.products_tax_class_id, pd.products_name,
                                p.products_date_added, p.products_price, p.products_type, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                           where p.products_id = pd.products_id
                           and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                           and   p.products_status = 1 " . $display_limit;
```Replace that entire block with this:

// Begin hideCategories modifications - this hides hidden categories from the New Products centerbox on main page
$new_products_query = "select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name,
p.products_date_added, p.products_price, p.products_type, p.master_categories_id
from (" . TABLE_HIDE_CATEGORIES . " h, " . TABLE_PRODUCTS . " p
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.master_categories_id = h.categories_id and h.visibility_status !=2)
and p.products_status = 1 " . $display_limit;
// End hideCategories modifications - this hides hidden categories from the New Products centerbox on main page

13 Dec 2011, 11:51 PM
#355
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

ideasgirl:

Would someone of you coding gurus give me the exact editing to make the hidden categories work with the dropdown menu? :smartalec:
Missed your post..:hug: Dunno the answer to this, but the code I posted above I figured out by looking at other hideCategories files.. I imagine that this should be similarly easy.. BUT if I recall I think someone posted the answer to your question in the dropdown menu support thread.. If I get a chance I'll see if I can find that post..

14 Dec 2011, 3:15 AM
#356
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: hideCategories

Dunno the answer to this, but the code I posted above I figured out by looking at other hideCategories files..
Don't worry, I found it somewhere and fixed it.

Have fun and Merry Christmassssss! :cheers:

14 Dec 2011, 3:23 PM
#357
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

ideasgirl:

Don't worry, I found it somewhere and fixed it.

Have fun and Merry Christmassssss! :cheers:Cool.. Ahhh X-Mas in Puerto Rico.. sigh Gonna get back there one day.. I LOVE Puerto Rico..:hug:I need some *Mofongo... *:yes:

Perhaps I'll include the link to the post with the instructions for modifying the dropdown menu in the next update of this mod..

14 Dec 2011, 3:40 PM
#358
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: hideCategories

Perhaps I'll include the link to the post with the instructions for modifying the dropdown menu in the next update of this mod..
Yes, you should, could be very useful (or maybe just the code):
Post #328 http://www.zen-cart.com/forum/showpost.php?p=1054010&postcount=328

BOF OFF TOPIC

Cool.. Ahhh X-Mas in Puerto Rico.. sigh Gonna get back there one day.. I LOVE Puerto Rico..I need some Mofongo...
Yes, you have to!

Christmas in Puerto Rico! So pretty, so good, the Christmas in Puerto Rico. The song talks about our traditions, music, horses, mountains, cities, history and of course our great food. Anyone that comes to Puerto Rico falls in love with our country and our people.
http://www.youtube.com/watch?v=8SUx14pc5BM

EOF OFF TOPIC

14 Dec 2011, 4:08 PM
#359
divavocals avatar

divavocals

Totally Zenned

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

Re: hideCategories

Need to do two things..

  1. Post clearer instructions for anyone needing this code..
  2. Post a link to this post in the menu support threads since adowty never did this (as I suggested -- sigh). It will make it easy for others using one of these menus with hideCategories to find the required instructions..
    Modification posted below is required to use hideCategories with the following menu mods:
    CSS Horizontal Drop Down Menu
    CSS Horizontal Dropdown Menu With jquery
    CSS Flyout Menu

If you are using "CSS Horizontal Drop Down Menu" or "CSS Horizontal Dropdown Menu With jquery":
Around line 43 in includes/classes/categories_ul_generator.php find this:

        $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
                                        from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                        where c.categories_id = cd.categories_id
                                        and c.categories_status=1 " .
                                        " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                                        " order by c.parent_id, c.sort_order, cd.categories_name";

If you are using "CSS Flyout Menu"
Around line 47 in includes/classes/categories_ul_generator.php find this:

  $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
                      from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                       where c.categories_id = cd.categories_id
                       and c.categories_status=1 " .
//                             "and c.categories_id = ptc.category_id " .
//                             "and ptc.category_id = cd.categories_id " .
//                             "and ptc.product_type_id not in  " . $this->document_types_list . "
                       " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                         order by c.parent_id, c.sort_order, cd.categories_name";

Regardless of which menu you use replace the code above with this:

        $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
                                        from " . TABLE_CATEGORIES . " c LEFT JOIN "
                                        . TABLE_HIDE_CATEGORIES . " h ON (c.categories_id = h.categories_id), "
                                        . TABLE_CATEGORIES_DESCRIPTION . " cd
                                        where (h.visibility_status < 2 OR h.visibility_status IS NULL)
                                        and c.categories_id = cd.categories_id
                                        and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                        and c.categories_status != '0'
                                        order by c.parent_id, c.sort_order, cd.categories_name";

This should hide your hidden categories from the menu.

adowty:

...so for anyone else who needs to do this.

I found the correct syntax in the site map file.

$categories_query = "select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c LEFT JOIN "
. TABLE_HIDE_CATEGORIES . " h ON (c.categories_id = h.categories_id), "
. TABLE_CATEGORIES_DESCRIPTION . " cd
where (h.visibility_status < 2 OR h.visibility_status IS NULL)
and c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and c.categories_status != '0'
order by c.parent_id, c.sort_order, cd.categories_name";

Yee-Haw

DivaVocals:

You should also post this in the support threads for the mod you are modifying as this is code to modify two menu modules to work with hideCategories and as such, it will probably be more useful posted there..

14 Dec 2011, 4:48 PM
#360
jkalland avatar

jkalland

New Zenner

Join Date:
Dec 2011
Posts:
1
Plugin Contributions:
0

Re: hideCategories

Also, if you want the menu bar to hide categories flagged as "hidden from main menus" instead of just "hidden", change the < 2 to < 1 as such:

$categories_query = "select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c LEFT JOIN "
. TABLE_HIDE_CATEGORIES . " h ON (c.categories_id = h.categories_id), "
. TABLE_CATEGORIES_DESCRIPTION . " cd
where (h.visibility_status < 1 OR h.visibility_status IS NULL)
and c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and c.categories_status != '0'
order by c.parent_id, c.sort_order, cd.categories_name";