Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2010
    Posts
    11
    Plugin Contributions
    0

    Default How do I requre buyers to create an account?

    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!
    Last edited by Andrek79; 31 Mar 2010 at 10:48 PM. Reason: Needed to add a blurb about 'Guest Checkout'

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

    Default Re: How do I requre buyers to create an account?

    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.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How do I requre buyers to create an account?

    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.

  4. #4
    Join Date
    Mar 2010
    Posts
    11
    Plugin Contributions
    0

    Default Re: How do I requre buyers to create an account?

    Quote Originally Posted by DrByte View Post
    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?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How do I requre buyers to create an account?

    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.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How do I requre buyers to create an account?

    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:
    Code:
    <?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:
    Code:
    <?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 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.

 

 

Similar Threads

  1. How to set/create another manager account than admin account?
    By andy_lau in forum Basic Configuration
    Replies: 1
    Last Post: 15 Apr 2009, 09:19 AM
  2. Replies: 0
    Last Post: 19 Nov 2007, 08:15 AM
  3. Replies: 13
    Last Post: 3 Sep 2007, 11:43 PM
  4. How do i create a Paypal sandbox account?
    By henryvuong in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 8 Apr 2007, 03:12 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