Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    12
    Plugin Contributions
    0

    Default Restricting access at a product level

    I'm managing a Zen Cart store for a customer who is selling t-shirts. Amung other requests, he has shirts that are available to the general public, but also wants to sell shirts for organizations through his site that aren't for the general public, such as company shirts, etc.

    He wants to password protect the products that are to be restricted.

    I was thinking it would be better to assign a token when the product is created which can be called from a URL or if it doesn't exist require it to be submitted before the product can be viewed.

    I've searched the forums several times and searched through all the contributions and can't find anything to offer this solution, or a similar one.

    Does anyone have any recommendations of how to do this?

    I'm not afraid to try to code it myself, but I'm not so familar with altering the backend of Zen Cart. What files would I need to alter to make it happen?

    The cart is the latest 1.3.9h with image handler, zen lightbox and google analytics addons installed.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Restricting access at a product level


  3. #3
    Join Date
    May 2010
    Posts
    32
    Plugin Contributions
    0

    Default Re: Restricting access at a product level

    These links might help too:

    plugin:


    thread:


    The idea is to place all products that are to be hidden in the same category and then hide that category

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Restricting access at a product level

    I didn't recommend the hideCategories mod since its page says it doesn't work with PHP5, which most servers have been upgraded to. If the mod has been updated, that's probably the way to go.

  5. #5
    Join Date
    Feb 2007
    Posts
    12
    Plugin Contributions
    0

    Default Re: Restricting access at a product level

    Quote Originally Posted by stevesh View Post
    I didn't recommend the hideCategories mod since its page says it doesn't work with PHP5, which most servers have been upgraded to. If the mod has been updated, that's probably the way to go.
    I had seen this too and steered clear of it. My servers run PHP 5, so no support to that is a no go for me.

  6. #6
    Join Date
    Feb 2007
    Posts
    12
    Plugin Contributions
    0

    Default Re: Restricting access at a product level

    What I've started working on is basically this:


    I plan to write a script that will be called by cron at midnight every night that will take any product that has expired and change their status. In my case, my customer wants to keep all product in his store, even if it has expired, kind of as a portfolio of past products (most of his stuff is one time runs, consigned by customers, etc.) So for him, I've changed the language for "Call for price" to "Archived" which allows the product to stay visible in the cart, but prevent it from being purchased. The cron job will then run a MySQL query to change the value of "Call for Price" from off to on.

    I'm still working on the idea of the token. The idea is to allow my customer to be able to send an email link to his customers so that all they need to do is click the link and gain access. If someone were to navigate to the product without the URL, it will prompt them for the token number, very similar to prompting for a password, before allowing the product to be viewed.

    Upon submitting the new product (or editing an existing one) I'm thinking a simple Unix Timestamp should be adequate to use as a token. I can't foresee any issues with randomization picking an existing token that way. Something as simple as
    Code:
    SELECT UNIX_TIMESTAMP(NOW());
    It would result in a token that when appended to the URL, should look like such:
    Code:
    http://testserv.local/zc/index.php?main_page=product_info&cPath=1_9&products_id=26&token=1290490762
    Sadly, because of my day job and family life, I've not gotten much farther than figuring what files I needed to edit to add the fields in the screenshot above. Sometimes, it just helps me to write things out even if no one else may read it.

 

 

Similar Threads

  1. Restricting access to only to catagories
    By ipanemasand in forum General Questions
    Replies: 1
    Last Post: 5 Jun 2011, 03:08 AM
  2. restricting access
    By timdwyer42 in forum General Questions
    Replies: 2
    Last Post: 6 Apr 2009, 05:08 AM
  3. Restricting access to the CC module
    By vega7 in forum Customization from the Admin
    Replies: 0
    Last Post: 7 Feb 2008, 07:37 AM
  4. Restricting Customer Access
    By mauryg in forum Managing Customers and Orders
    Replies: 10
    Last Post: 22 Mar 2007, 11:55 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR