Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2009
    Posts
    15
    Plugin Contributions
    0

    Default Hiding products unless the user is logged in

    What I would like to do is mark certain products to NOT be displayed unless the user is logged into the site, or we give them a special global login. I am new to PHP and ZEN so I might need a little more explanation. Thanks in advance.

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

    Default Re: Hiding products unless the user is logged in

    While it is built into Zen Cart to have this feature for ALL Products to not display until the customer is logged in ... it is not a feature for just SOME products to be hidden from customers until they are logged in ...

    This could be customized, but what is the criteria that sets these Products apart from other Products?
    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
    Apr 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Hiding products unless the user is logged in

    Its actually Busness rules and needs, just to hide certain items and only show them if they enter a username and password. Secondly tracking purposes on our end.

  4. #4
    Join Date
    Apr 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Hiding products unless the user is logged in

    I was thinking of just haviong an additional field in the products like "public (0) " and "private (1)" then modify the SQL queries to check if the user is logged in the query ALL, if not filter results only to show "public (0)"

    Curious if someone has already done this, or the easiest way to accomplish. Im new to this (ZEN/PHP), but not to programming itself.


    (Ill buy the coffee LOL)

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

    Default Re: Hiding products unless the user is logged in

    Adding the new fields for this would be the "better" way to do this so that this field can be used to manage the products rather than a lot of fooling around with what and when products can be seen ...
    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!

  6. #6
    Join Date
    Apr 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Hiding products unless the user is logged in

    could you possibly point me to where the SQL statements are for the different listings, and quantities or possible modifications to to make this happen? I just wanted to make sure its complete and not just change one place and its not reflected in another. Im used to dealing with global stored procedures so it would effect the entire site, I dont see that happening with this. Additionally how do I determine if the user has logged in? Must be a variable somewhere.

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Hiding products unless the user is logged in

    In the Free Addon section, link at top of page, you can search for: Dual Pricing

    It is a module to only show Wholesale pricing if; A) a person is logged in, B) a person has been approved to view Wholesale pricing.

    You could use it as a base / example of coding needed for your purposes.

 

 

Similar Threads

  1. v154 Hiding "Add to Cart" button unless customer is logged in
    By jilbert in forum General Questions
    Replies: 3
    Last Post: 6 Nov 2015, 04:14 AM
  2. PPE user cannot get past step 2 of 3 in checkout unless logged into website
    By tezzerini in forum PayPal Express Checkout support
    Replies: 0
    Last Post: 19 Jan 2010, 09:54 PM
  3. my tax not shown unless a user is logged in
    By ellbourn in forum General Questions
    Replies: 4
    Last Post: 18 Jan 2010, 06:42 AM
  4. Replies: 2
    Last Post: 2 Oct 2009, 04:24 PM
  5. Hiding products/categories until logged on.
    By FishD in forum Customization from the Admin
    Replies: 4
    Last Post: 13 Jun 2008, 06:17 PM

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