New Zenner
- Join Date:
- Jan 2007
- Posts:
- 82
- Plugin Contributions:
- 0
hideCategories
Finally see the hide option after I reupload all the files again.
:)
Views: 105,228
New Zenner
Finally see the hide option after I reupload all the files again.
:)
New Zenner
Hi Steven,
I installed this add-on and works well. (zen cart v1.3.7, hideCategories v1.00) Thanks!
Just minor thing that in
admin\includes\modules\category_product_listing.php
there're
<?php echo '<a href="' . zen_href_link(FILENAME_STOCK_MANAGER, 'cPath=' . $cPath . '&product_type=' . $products->fields['products_type'] . '&pID=' . $products->fields['products_id'] .'&action=stock_manager' ) . '">' . zen_image(DIR_WS_IMAGES . 'icon_stock_manager.gif', ICON_STOCK_MANAGER) . '</a>'; ?>
<?php echo '<a href="' . zen_href_link(FILENAME_IMAGE_HANDLER, 'products_filter=' . $products->fields['products_id'] . '¤t_category_id=' . $current_category_id) . '">' . zen_image(DIR_WS_IMAGES . 'icon_image_handler.gif', ICON_IMAGE_HANDLER) . '</a>'; ?>
I don't use stock manager and image handler so I guess it's safe to remove these lines.
Cheers
Totally Zenned
That is correct!
I'll remove those lines in the future. They shouldn't be there.
New Zenner
Nice contribution.. thanks. I was actually looking for a "members only" type of hidden category, so not exactly what I'm looking for.. Someday I'll learn enough to do this myself.
Thanks for the efforts.
Figster
Totally Zenned
You know what... that wouldn't be a hard modification of this at all I don't think. You'd just have another table in the db that lists all the "members" by customers_id and then add one or two lines to this contrib checking to see if the current user is on the list.
New Zenner
Thanks S-mack, I think I even see where you would do the check.. in functions_hidecategories.php under the comment "// show based on status" a query for the customer id after log on show hidden categories. Just like that, once the log in they will be able to see the category. That's exactly what I am looking for... many others are too.
Cool! I will see if I can FIGure out how to get this added onto your contribution.. Thanks for the point in a direction!
Figster
New Zenner
Thanks S-mack, I think I even see where you would do the check.. in functions_hidecategories.php under the comment "// show based on status" a query for the customer id after log on show hidden categories. Just like that, once the log in they will be able to see the category. That's exactly what I am looking for... many others are too.
Cool! I will see if I can FIGure out how to get this added onto your contribution.. Thanks for the point in a direction!
Figster
New Zenner
Actually, I was just looking at this. Could we just add a query to the customer data base to check if logged in, if so, show hidden categories? Then we don't need the new table, and when they create the account, they are able to see the "members only" categories.. or is there something in the hidden categories that would stop this?
Thanks.
Totally Zenned
This Is a great Mod, thank you for your contribution!
Everything works great!
I was wondering if it was possible to alter a line of code somewhere to allow products to be searchable yet not listed in the "All Products link" when using "Hidden from main menus"
But, still leave the "Hidden" (Direct-link only) as it is (unsearchable/unlisted)
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
Totally Zenned
Figster - that's even easier! I thought you wanted only certain members to see it... not just anyone with an account.
But its not quiet as easy as you think. You'll need to make a few more changes.
Basically, you'll probably have to change every file listed in the readme (or most any of them) so that the HideCategories code is only executed if $_SESSION['customer_id'] is set. Something like```
if (!$_SESSION['customer_id']) {
hope that helps!
Dharma - Possible, yes! I'm not sure that I fully follow what you want though.
i'm sorry folks, but I don't have the time right now to customize this contrib at all. it is what it is! Code-wise, its a very simple contrib once you can wrap your head around the logic... so it should be fairly simple to customize to your needs!
Good luck! I'll poke my head in here when I can and try to lend a hand.
- Steven
New Zenner
Yes Yes Yes.. that's what I'm talkin about S-Mack! I was already looking at tying into the customer_id- show category. Or maybe if logged in show category.. kinda like the MY Account links only show when you log in. That's what I'm looking for.. Your contribution hides the Categories, and all I need to do is set the parameters to show the hidden ones.. I should be able to do that with some if statements...
You got me thinking.. go FIGure.
Thanks,
Figster
Totally Zenned
Dharma - Possible, yes! I'm not sure that I fully follow what you want though.
I am trying to create a hidden (Out of Stock) category in which products can be found in a search but not found in "All products" with "Hidden from main menus"
But Still Leave the functionality of your "Hidden" (Direct-link only) as is for custom packages.
I suppose I can achieve this using both hideCategories and this thread (if I ever figure it out)
http://www.zen-cart.com/forum/showthread.php?t=38293
In Which Case, whats the skinny with hideCategories and Google? If I create a product in ZC and turn off the meta tags (new product type), then have it be a "Hidden" product, will people find it in a google search?
Sorry if this an obvious newbie question, I am trying to come up to speed as fast as I can..
Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41
Totally Zenned
Not obvious at all. And actually a very good question that I never thought of. Hmm.. Google.... Let's see....
When you hide the category, it will be hidden from search engines as well. If the category's products can be seen from the All Products link, then Google should still find them. If you hide them from All Products as well, then Google has no way at all of ever finding those pages. Unless you create a page that links to those products perhaps, but then you need to link to that page for Google's sake, and that might become clumsy for your human visitors.
I really hadn't thought of Search Engine effects, so thank you for bringing that up!
Zen Follower
Yikes, i was just getting ready to post about this -- I have hidden categories which are by direct link only. The direct link is only available from a 'member's only' area of the PHPBB forum. It is not cheap to become a member... I looked today, and we had more downloads than members - then I noticed several who downloaded were not members. Yikes. I googled the items, and they come up in the search results, second hit down. :(
I have had to disable these items until we can figure it out. I am the one who posted earlier that I am running the mod on an earlier cart, so I am not sure if that is the problem. My new cart install is mostly complete. Just thought I would let you know... will post updates as i figure out what to do. :dontgetit
Lori
Zen Follower
Oh, FYI... my metatags had been left undefined on purpose... these items have only been available since the 12th. Google is fast. :blink:
New Zenner
Sounds like you need to update your robots text, and your .htaccess. Disallow the robots access to that file name, or maybe you need a password protected directory.
Zen Follower
Figster:
Sounds like you need to update your robots text, and your .htaccess. Disallow the robots access to that file name, or maybe you need a password protected directory.
I have written to several of the people asking how they found these resources --that will be telling.
In the meantime, do you mean a password protected directory for the shop, the items, or the category?
Perhaps in my panic I am missing some duh step, but I am not sure I am not sure how the above steps would relate to the problem I am having with peole seeing hidden categories via a google search? They are not going directly to the download, the google search comes up with the category or product listing in the shop (which I currently have disabled and will have to move once I figure this out, so cached pages cannot load it) not the file itself.
This is all internal cart stuff, so which file name would you block? What htaccess would you block? I will look into the robots text issue.
Thanks in advance for any ideas... this is NOT in my schedule for today - LOL
Lori - off to change my avatar so I can tell which posts are mine
;-)
New Zenner
This product sounds like it is down loadable, is it a membership fee, or do they pay by the download? What product type are you listing it under? Is the file for download stored in your zen cart media file? Do you have virtual product checked in your admin product listing, do you have Admin>configuration>Attribute Settings> Download options set correctly?
Do you have admin>configuration>sessions>prevent spider sessions set to true?
Zen cart can handle download products.
Figster
Totally Zenned
Ok, it looks like we need to make clear what HideCategories is NOT!!
It was NOT developed to hide things from Google (although, that seems to be a logical extension but it depends on how you set things up)
It was most definately NOT developted to prevent users from accessing pages! Quite the opposite! It is intended to VISUALLY hide the pages from links and such, but still be available by direct link. Using that as a way to prevent non-paying customers from reaching the page... well, that's just not going to happen.
In fact, its quite likely that one person could have paid for the membership and then passed around the link to a million others. Its just a link. It seems like it would be far better for you to take advantage of Zen's built-in downloadable products features (of which I have zero experience).
HideCategories is a layout tool more than anything. Not a security measure.
Zen Follower
s_mack:
In fact, its quite likely that one person could have paid for the membership and then passed around the link to a million others. Its just a link. It seems like it would be far better for you to take advantage of Zen's built-in downloadable products features (of which I have zero experience).
HideCategories is a layout tool more than anything. Not a security measure.
- Steven
Understood that this mod is not a panacea to my self-created membership issues - LOL.
I will clarify what is happening. Peope are not sharing the link, as that is taken care of via the downloadable products features (which I use a LOT). I was able to see which of my customers downloaded the items, all throught their own accounts (they were not members of the forum which has the link). I cannot pretend peope never share links or logins, and I will never try to - LOL.
Google did find the items, thought I could not figure out how it would have found the items if the only links were direct links from a password-protected forum. So to find out where the links were coming from...
Customer to the rescue... I heard back from a customer concerning how they reached these items. What happened is that a customer purchased an item and then got the little 'people who purchased this item also purchased' box (which I am turning off). and they clicked to add these items to their cart. I had already turned off 'new items' and 'all products' boxes, thinkning I had efectively hidden the items.
I was using the mod as a way to set up members-only items. My bad. Now, I have already set up 200+ people to access certain files this way, and I do not want anyone else to be able to access these files. I have disabled these items, but people have already paid for access. Need to grant access to certain items/categories to certain people only... How to accomplish that... if anyone knows, feel free to speak up - LOL. :lookaroun
Lori - off to read the forums from A-Z again... LOL
Tell staff why this post should be reviewed.