Thread: hidden product

Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    36
    Plugin Contributions
    0

    Default hidden product

    I was reading about hidden products in this post. http://www.zen-cart.com/showthread.p...Hidden-Product I got to reply #8 by Limelites and wanted to try that idea. It was this.
    "The simplest way to create a hidden product is to firstly create a unique category, call this HIDDEN CATEGORY. Then disable the category from admin so it's showing the red square.

    Then, click into the category and create the products you want to hide. You can still access and purchase these products if you know the URL. No one browsing your store will be able to access these products as they don't know the URL's.

    Simple as that really. Works a treat for me."

    My question is this, how do you know the URL without being able to nav to that item. So obviously by turning that Category "on" then finding the item and copying the URL, then turning the category "off" works. But is there an easier way to know the URL? I may be potentially adding tons of items to this hidden category and turning the category on/off all the time isn't a great idea. I read about the hidden cat mod, but I wanted to try this first before messing with that.

    Thanks
    J

  2. #2
    Join Date
    Oct 2007
    Posts
    146
    Plugin Contributions
    0

    Default Re: hidden product

    if i'm understanding your question correctly, basically you would just change the product id for each product. For example, if the link to a product in your store is http://www.yourdomain.com/index.php?...oducts_id=6867 - you would just substitute the category id and product id (which can be viewed from admin), to create the link for that product. if they're all in the same "hidden category", the cPath will stay the same - but the products_id would change for each.

    so if your 2nd product has an id of 6868, the link would be http://www.yourdomain.com/index.php?...oducts_id=6868

    and so on

  3. #3
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    34
    Plugin Contributions
    0

    Default Re: hidden product

    Careful with this. I did this for sales tool items I only wanted my sales consultants to see & not customers, so I sent them a direct link... however even though the category was disabled, and the items were enabled... customers were still able to search and find these items. Sure, they don't show up in the category menu, but I had customers ordering these items as they still came up in searches.
    Goodnite Lingerie & Adult Toys
    www.goodnite.com.au

  4. #4
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,146
    Plugin Contributions
    0

    Default Re: hidden product

    Quote Originally Posted by rainbows View Post
    Careful with this. I did this for sales tool items I only wanted my sales consultants to see & not customers, so I sent them a direct link... however even though the category was disabled, and the items were enabled... customers were still able to search and find these items. Sure, they don't show up in the category menu, but I had customers ordering these items as they still came up in searches.

    With a small line of code you can eliminate any product or category coming up in any searches.

    Go into phpmyadmin and into your database and make the id of your hidden product any number over 50,000

    Then in modules/pages/advanced_search_result/header.php

    Add the line in bold..

    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str = " WHERE (p.products_status = 1
    AND p.products_id < 50000
    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 ";

    This will make any product with an ID number higher than 50000 not show up in searches.

    Its a bit crude and any new product you add after this will be over 50,000 and not show up, so bare this in mind and change the details. Im sure there's a better way of doing it, or even hiding a specific product number on its own.
    Last edited by dgent; 3 May 2012 at 11:53 AM.

  5. #5
    Join Date
    Oct 2007
    Posts
    146
    Plugin Contributions
    0

    Default Re: hidden product

    Quote Originally Posted by dgent View Post
    With a small line of code you can eliminate any product or category coming up in any searches.

    Go into phpmyadmin and into your database and make the id of your hidden product any number over 50,000

    Then in modules/pages/advanced_search_result/header.php

    Add the line in bold..

    $zco_notifier->notify('NOTIFY_SEARCH_FROM_STRING');

    $where_str = " WHERE (p.products_status = 1
    AND p.products_id < 50000
    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 ";

    This will make any product with an ID number higher than 50000 not show up in searches.

    Its a bit crude and any new product you add after this will be over 50,000 and not show up, so bare this in mind and change the details. Im sure there's a better way of doing it, or even hiding a specific product number on its own.
    one of our websites "hides" a large amount of items for a unique business need.. if you're going to get into the db editing, etc - I might suggest creating a custom field (or better yet, maybe utilizing an unused existing field in the products table) to "flag" these items. Then, instead of messing with product id's and such - you can just edit the sql to exclude any products where "noshow_flag = true" to something like:

    $where_str = " WHERE (p.products_status = 1
    AND p.noshow_flag = 0
    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 ";

    I feel like we had to make some other edits as well - to remove the items from results on the products_all, products_new, etc.. don't want the hidden items showing up there. keep in mind for our solution, it's not a horrible thing if a customer were to "accidentally" find one of these items - but we'd prefer them not to. So, depending on how "critical" your need is to keep these things out of sight, our solution might not be the best for you.

  6. #6
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,146
    Plugin Contributions
    0

    Default Re: hidden product

    My idea would be fine if you were making a new store from scratch. Start your first product from id say '10000' and add products when ever you like, then make any of the hidden products ID below 10000 and modify the code to suit. Then adding more products isnt a problem as the ID numbers will still keep going up, and any products you want to hide, just move to the below 10,000 level.

 

 

Similar Threads

  1. Hidden frontEnd product
    By weramirez in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 9 May 2011, 09:42 PM
  2. Creating A Hidden Product
    By pizzazz_retail in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 11 Aug 2010, 07:40 PM
  3. hidden product page
    By billt in forum General Questions
    Replies: 6
    Last Post: 4 Feb 2009, 07:38 AM
  4. product hidden in search results
    By hamelin85 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 29 Jun 2006, 06:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •