Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Hiding products unless the user is logged in

Hiding products unless the user is logged in

Locked

Started by derek_icd on 28 Apr 2009, 3:52 PM · Views: 1,571

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
28 Apr 2009, 3:52 PM
#1
derek_icd avatar

derek_icd

New Zenner

Join Date:
Apr 2009
Posts:
15
Plugin Contributions:
0

Post #1 by derek_icd

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.

29 Apr 2009, 4:47 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

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!

7 May 2009, 2:44 PM
#3
derek_icd avatar

derek_icd

New Zenner

Join Date:
Apr 2009
Posts:
15
Plugin Contributions:
0

Post #3 by derek_icd

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.

7 May 2009, 2:48 PM
#4
derek_icd avatar

derek_icd

New Zenner

Join Date:
Apr 2009
Posts:
15
Plugin Contributions:
0

Post #4 by derek_icd

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)

7 May 2009, 6:31 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

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!

7 May 2009, 7:11 PM
#6
derek_icd avatar

derek_icd

New Zenner

Join Date:
Apr 2009
Posts:
15
Plugin Contributions:
0

Post #6 by derek_icd

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 May 2009, 8:00 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Post #7 by website_rob

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.

The learning is in the doing.

Potent Products