Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2007
    Posts
    93
    Plugin Contributions
    0

    Default Making a category only visible after login

    HI, I have found loads of threads on password protecting a category and also about hiding a category, only visible through URL link. BUT what about only having certain categories available for viewin after a customer has logged in. Is that able to be done.

    Nat

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Making a category only visible after login

    Do you mean links and images and listings etc. where anything to do with the product(s) in those categories do not show unless someone is logged in?

    Currently you can limit the ability to see prices or shop etc. until the customer is logged in ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2007
    Posts
    93
    Plugin Contributions
    0

    Default Re: Making a category only visible after login

    Ideally what I would want would be for the category header to be able to be seen, but if they try and view it they would need to login or register first. This is for the sale of sporting photographs, juniors photos would need to be members only. But seniors photos wouldnt not need login first.

    My thought at the moment is to have a site up front with links to 2 seperate carts one for juniors and one for seniors, and just have a password protection set up there. This is the way I might end up heading as login within the site can still be done by anyone.

    Does this make sense.

    Nat

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Making a category only visible after login

    To control the Product Listing ... you can edit the file:
    /includes/index_filters/default_filter.php

    And create this variable $block_these:
    PHP Code:
    if (isset($_SESSION['customer_id']) && $_SESSION['customer_id'] > 0) {
      
    $block_these '';
    } else {
      
    $block_these " and p.master_categories_id != 10 ";

    and add to each set of WHERE settings ...

    Now how you set the condition is up to you ... this example blocks categories_id 10 on the assumption master_categories_id is 10 ...

    Then to do the searches, you can customize the file:
    /includes/modules/pages/advanced_search_results/header_php.php

    and use the same code and add to the last set of WHERE settings ...

    You can do this anywhere you want this to happen ...

    Or, you can take the approach of an intercept page where they see some info but when they try to get to detail it is blocked ...

    Or, you can change those products to be Login Only products by altering the function(s) for the buy and add to cart ...

    There are a number of approaches that could be used to close off products ...

    So it's time to get your coder hat on ...

    Or, time to find someone who is a glutton for punishment ... er ... a coder who can write this for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

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

    Default Re: Making a category only visible after login

    Hi Linda,

    I had the same question. So to summarize, you are saying that right now without custom coding, there is no way to have a category only be visible AFTER the customer logs in?

    I'd like to be able to show a few general categories to everyone who browses my site, but require login for them to see all product details/photos, etc.

    Thanks!
    Patrick

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Making a category only visible after login

    The hideCategory mod in Downloads is intended for allowing only certain logged-in customers to see certain categories. It could probably be set up to allow all logged-in customers to see those categories.

  7. #7
    Join Date
    Nov 2008
    Posts
    93
    Plugin Contributions
    0

    Default Re: Making a category only visible after login

    Pulling up an old thread here, but it's the one I could find that was most like my question.

    -When a user visits my shop they can see all but one category. We'll call this category "for PHOTOGRAPHERS" and has a category ID of 75.

    When this user registers on my site, I add them to the group pricing called "Wholesale Account" if they are a wholesale member. Once the user visits my site again and logs in as a wholesale member, they can then see the "for PHOTOGRAPHERS" category.

    How can I set this up?
    TIA!

  8. #8
    Join Date
    Mar 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Making a category only visible after login

    I would also like this same setup.

    any ideas?

  9. #9
    Join Date
    Oct 2010
    Posts
    1
    Plugin Contributions
    0

    Default Re: Making a category only visible after login

    Quote Originally Posted by Ajeh View Post
    To control the Product Listing ... you can edit the file:
    /includes/index_filters/default_filter.php

    And create this variable $block_these:
    PHP Code:
    if (isset($_SESSION['customer_id']) && $_SESSION['customer_id'] > 0) {
      
    $block_these '';
    } else {
      
    $block_these " and p.master_categories_id != 10 ";

    and add to each set of WHERE settings ...

    Now how you set the condition is up to you ... this example blocks categories_id 10 on the assumption master_categories_id is 10 ...

    Then to do the searches, you can customize the file:
    /includes/modules/pages/advanced_search_results/header_php.php

    and use the same code and add to the last set of WHERE settings ...

    You can do this anywhere you want this to happen ...

    Or, you can take the approach of an intercept page where they see some info but when they try to get to detail it is blocked ...

    Or, you can change those products to be Login Only products by altering the function(s) for the buy and add to cart ...

    There are a number of approaches that could be used to close off products ...

    So it's time to get your coder hat on ...

    Or, time to find someone who is a glutton for punishment ... er ... a coder who can write this for you ...
    Im fnding this alitttle difficult. are you saying theat the only way to get thiis (members only category ) is to pay some one to do it?

    I give up is any one out there willing to write this script for me please email me.

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Making a category only visible after login

    I am saying that if you cannot figure out how to apply these changes yourself, that you may need additional help and usually that requires parting with a few $$$ to get someone to help you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Making Customer ID visible in Invoice and Packing Slip
    By kohul1 in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Nov 2011, 12:59 PM
  2. Need help PLEASE on making all products visible on the one page ??
    By 1uppromotions in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Oct 2011, 12:41 PM
  3. Making a Download/Product or Category Available Only by Coupon?
    By ScriptJunkie in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 22 Sep 2009, 07:31 AM
  4. making a hidden wholesale only category?
    By daniellebaklava in forum General Questions
    Replies: 1
    Last Post: 10 Jun 2007, 10:44 PM
  5. Category visible only by specific groups of customers
    By sanji in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 20 Sep 2006, 02:58 AM

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