If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / How do I requre buyers to create an account?

How do I requre buyers to create an account?

Locked

Started by andrek79 on 31 Mar 2010, 9:45 PM · Views: 1,156

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
31 Mar 2010, 9:45 PM
#1
andrek79 avatar

andrek79

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Post #1 by andrek79

I apologize if this has been addressed already, but all I could find was:

https://www.zen-cart.com/tutorials/index.php?article=16

I would like to make sure that this does happen, ie I want to make sure that visitors need to make payments to www.articlesandlandingpages.com

I use Paypal as my merchant account & if you click the paypal icon you skip creating an account. Am I missing something as I charge a $20 membership fee that comes from http://www.zen-cart.com/forum/showthread.php?p=863768 according to one post I may need to disable the 'Guest Checkout' & can't find where it is located.

Any help offered would be great!

31 Mar 2010, 10:15 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #2 by gjh42

There is no guest checkout unless you have specifically added a mod to allow it. Paypal is supposed to return the customer's shipping information when the transaction is complete, but it may be possible for that to malfunction if there is an error in setup - the Paypal experts would have to address that question for more detail. As for billing info, the whole idea of Paypal is to keep merchants from getting the customer's info.

31 Mar 2010, 11:00 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #3 by drbyte

If you hook the NOTIFY_LOGIN_SUCCESS_VIA_CREATE_ACCOUNT notifier point, it will fire whenever the automatic account-creation is triggered by anyone who starts Express Checkout without first creating an account in your store.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Apr 2010, 7:30 AM
#4
andrek79 avatar

andrek79

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Post #4 by andrek79

DrByte:

If you hook the NOTIFY_LOGIN_SUCCESS_VIA_CREATE_ACCOUNT notifier point, it will fire whenever the automatic account-creation is triggered by anyone who starts Express Checkout without first creating an account in your store.

Thanks DrByte. I am a little familliar with coding, but CSS is still new to me & even with frames would not know where to look for the NOTIFY_LOGIN_SUCCESS_VIA_CREATE_ACCOUNT or where to hook it to. Do you happen to know generally where I would find it? I would love to try it, on a side note I found that a work around would be to remove the PayPal icon on the payment pages, but I am not certain how to do that. I assume I would just change some CSS or PHP file & remove it, or is there a way to remove that icon from the admin console?

1 Apr 2010, 7:34 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

Your agreement with PayPal prohibits you from removing their button.

Notifiers have nothing to do with CSS. Notifiers require custom coding. I'm not familiar with the addon you're attempting to use, and don't know if it was written to work with notifier support or not. If it was, then it should already be working, or only require simple tweaking. If not, then you may have to get your hands wet in PHP.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Apr 2010, 8:29 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

Okay, I've looked at the addon and taken an hour to look at the code and write and test the following alterations:

  1. First, a CAUTION!!!!!!!
    The addon is written for OLD versions of Zen Cart. Using it without upgrading all the files it touches will result in broken or lost functionality in your store.

  2. If you want to switch it to use the more appropriate method of hooking notifier points rather than editing core code in order to inject items into the customer's cart, you can make the following changes:

a) delete the "create_account.php" file included in the addon. Not only is it for an old version of Zen Cart, but the next two files make it unnecessary to alter/touch the create_account.php file to accomplish the same thing:

b) create a new file: /includes/auto_loaders/config.membershipFee.php
containing just the following:```

<?php /** * autoloader for MembershipFee addon * * @copyright Copyright 2003-2010 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: config.membershipFee.php 2010-03-31 drbyte $ */ $autoLoadConfig[90][] = array('autoType'=>'class', 'loadFile'=>'observers/class.membershipFee.php'); $autoLoadConfig[90][] = array('autoType'=>'classInstantiate', 'className'=>'membershipFee', 'objectName'=>'membershipFee'); ``` c) create a new file: /includes/classes/observers/class.membershipFee.php containing just the following:``` <?php /** * observer class for MembershipFee addon. Adds product ID specified in the MY_MEMBERSHIP_FEE constant (defined elsewhere) to the cart automatically upon create_account * * @copyright Copyright 2003-2010 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: class.membershipFee.php 2010-03-31 drbyte $ */ class membershipFee extends base { function membershipFee() { global $zco_notifier; $zco_notifier->attach($this, array('NOTIFY_LOGIN_SUCCESS_VIA_CREATE_ACCOUNT')); } function update(&$class, $eventID) { if (!defined('MY_MEMBERSHIP_FEE') || (int)MY_MEMBERSHIP_FEE < 1) return FALSE; $_SESSION['cart']->add_cart((int)MY_MEMBERSHIP_FEE); } } ``` The above components are all that is needed to get the product added to the cart upon create_account. (except for the define() for MY_MEMBERSHIP_FEE in the /extra_configures/membership_fee.php file) 3. All the other files included in the addon are used to prevent the ability to click on the "hidden" product anywhere in the store. However, as I mentioned, they are based on older versions of Zen Cart, and extreme caution should be used if you are going to use them on a newer version than what they were written for. WinMerge may be of help if you wish to upgrade them for some degree of compatibility. Of course, donations are welcome at <https://www.zen-cart.com/donate>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.