If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / Require login to add to cart, but show prices regardless

Require login to add to cart, but show prices regardless

Locked

Started by frankderosa on 13 May 2009, 2:50 PM · Views: 2,667

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
13 May 2009, 2:50 PM
#1
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #1 by frankderosa

My client wants to require the customer to log in to their account before they can add items to their cart. They also want to show prices to all visitors, logged in or not. The available settings for this cover this in pieces and parts, but not all at once. Is this possible without a mod? I'd like to avoid a core mod for obvious reasons, but custom code is an option.

Thanks!
Frank

13 May 2009, 3:08 PM
#2
ajeh avatar

ajeh

Oba-san

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

Post #2 by ajeh

Currently, the choices are:

Customer Shop Status - View Shop and Prices
Customer must be approved to shop
0= Not required
1= Must login to browse
2= May browse but no prices unless logged in
3= Showroom Only

Customer Approval Status - Authorization Pending
Customer must be Authorized to shop
0= Not required
1= Must be Authorized to Browse
2= May browse but no prices unless Authorized
3= Customer May Browse and May see Prices but Must be Authorized to Buy

Neither one of those quite fit the bill as you want prices while browsing and not logged in ...

The Customer Approval Status comes closest:

3= Customer May Browse and May see Prices but Must be Authorized to Buy

But, now you need to Approve your customers for them to buy ... a step that I am not sure you are want to add to the shopping experience on your store ...

However, you could customize the code to auto-approve the customer when the account is created and I believe things would then work the way you are wanting them to ...

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!

13 May 2009, 6:41 PM
#3
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #3 by frankderosa

Thanks for the help. It's good to see that I do understand the options correctly. I still wish I had been wrong so you could have pointed out the simple solution that I missed. :smile:

So, just to clarify, automatically authorizing new accounts along with the "3= Customer May Browse and May see Prices but Must be Authorized to Buy" option should deliver what I am looking for.

I'm going to try this by setting the default value for the customers_authorization field in the zen_customers table to 1. I'll let you know if this is all I need once I switch over to option 3...

Thanks,
Frank

13 May 2009, 6:47 PM
#4
ajeh avatar

ajeh

Oba-san

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

Post #4 by ajeh

That is the closest match to what you want ...

Then, just customize things so customers are automatically authorized if you do not want them to have to wait once they have created an account ...

NOTE: these kinds of settings are ones that often require a new sessions to see them work or to see changes as many of these settings are set/evaluated only once per session or until they change ...

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!

13 May 2009, 7:16 PM
#5
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #5 by frankderosa

Rats, I was hoping my default value would be enough, but it's not. I'll have to actually hack some code.

Here's what I changed:

includes/modules/create_account.php, line 72 was

$customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION;

I changed it to:

$customers_authorization = 0;

And that took care of it. Now I just need to make a huge note about merging this change when the site is upgraded someday.

Thanks for the help!

Frank

13 May 2009, 8:07 PM
#6
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #6 by frankderosa

Oops, that only fixed the first logged in session. I'm glad you mentioned how it might take a few trips around the site - I had to logout and in again to see that the approval was a bit short lived.

I changed line 295 from

'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION

to

'customers_authorization' => 0

That seems to be working great. I can log in and out with authorization all the way.

Frank

13 May 2009, 8:11 PM
#7
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,753
Plugin Contributions:
0

Post #7 by Kim

This is prolly a silly question, but why would you want to put a roadblock in front of your customers when they are ready to buy?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

13 May 2009, 8:20 PM
#8
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #8 by frankderosa

We do have a reason. This site is for an international company which has three similar looking sites for different international regions. We are forcing the customer to log in at this stage to make sure they are at the correct site before they go to the trouble of adding items to their cart. Ideally, this does not happen if all goes well, but I don't want them getting complaints that customers shopped around for several products and put them in the cart before discovering that they are shopping on the wrong site and need to re-load a cart on the correct site. This is kind of a pain, but it prevents people from wasting a bunch of time.

If you have any thoughts on how to handle this, I am open to them. I'm not going to claim this solution is ideal.

Frank

13 May 2009, 8:24 PM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,753
Plugin Contributions:
0

Post #9 by Kim

Perhaps a landing page that detects their geoIP and sends them to the correct site to start with?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

13 May 2009, 8:27 PM
#10
frankderosa avatar

frankderosa

New Zenner

Join Date:
Jan 2009
Location:
Charlottesville, VA
Posts:
51
Plugin Contributions:
0

Post #10 by frankderosa

Kim:

Perhaps a landing page that detects their geoIP and sends them to the correct site to start with?

We plan to ask them for this, but they can still potentially wander if they are clever/dumb enough. I'm not sure which one to be the most nervous about. :unsure:

Frank

8 May 2010, 8:22 PM
#11
sandragrills avatar

sandragrills

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Post #11 by sandragrills

Thanks for posting this - it helped me out a lot!