Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Aug 2010
    Location
    Cebu, Philippines
    Posts
    21
    Plugin Contributions
    0

    Default Force registration/login prior to adding to cart

    Hello. What I want to do is rather different from the easy checkout/COWA mods that allow users to place orders without registering first. Zen Cart's default behavior is to allow guests to add items to a shopping cart then, when they click the checkout button, it prompts them to register or log in. I want to make Zen Cart do that when guests first try to add a product to the cart. Basically so only registered and logged in users are allowed to shop. I still want guests to be able to browse my store's products though. Is there a setting or existing mod to do this?

    I'm using ZC version 1.39h with Super Orders mod among a few others.

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

    Default Re: Force registration/login prior to adding to cart

    You could use in the Configuration ... Customers ...
    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

    It is recommended that Option 2 be used for the purposes of Spiders if you wish customers to login to see prices.
    where 2 would let the customer browse without prices and must login to see prices or add to cart ...
    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: v1.5.5]
    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
    Aug 2010
    Location
    Cebu, Philippines
    Posts
    21
    Plugin Contributions
    0

    Default Re: Force registration/login prior to adding to cart

    Yes, I thought of that, but I think that would annoy potential customers and drive them away. Forcing people to jump through hoops just to get basic information such as prices: not good. By the time they click on the add item to cart button they've already decided to buy: they've changed from being lookie-loos to actual customers. That's the time to make them have to register or log in, not before.

    I've tested all permutations of the Customer Shop Status and none of them give me what I want, which is that the default behavior of requesting login/registration when they click check-out be changed to happen when they click add to cart instead. I was hoping someone has already made that modification and could tell me how so I wouldn't have to reinvent the wheel. :)

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

    Default Re: Force registration/login prior to adding to cart

    You could use the Customer Authorization and set to 3 ... :
    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

    It is recommended that Option 2 or 3 be used for the purposes of Spiders
    then change the code in the file:
    /includes/modules/create_account.php

    using your templates and overrides:
    /includes/modules/your_template_dir/create_account.php

    and change the code to read:
    Code:
        $sql_data_array = array('customers_firstname' => $firstname,
                                'customers_lastname' => $lastname,
                                'customers_email_address' => $email_address,
                                'customers_nick' => $nick,
                                'customers_telephone' => $telephone,
                                'customers_fax' => $fax,
                                'customers_newsletter' => (int)$newsletter,
                                'customers_email_format' => $email_format,
                                'customers_default_address_id' => 0,
                                'customers_password' => zen_encrypt_password($password),
    //                            'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION
                                'customers_authorization' => 0
        );
    now you have the Add to Cart buttons and Buy Now buttons make the customer Login/Create an Account to add to cart ... but when they do create an account, instead of making the customer have to wait for approval, customers are automatically set to approved ...

    Crafty eh?
    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: v1.5.5]
    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!

  5. #5
    Join Date
    Aug 2010
    Location
    Cebu, Philippines
    Posts
    21
    Plugin Contributions
    0

    Default Re: Force registration/login prior to adding to cart

    THANK YOU! That does exactly what I want! Now to figure out how to replace the "Login to Shop" text with a button.

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

    Default Re: Force registration/login prior to adding to cart

    Using your templates and overrides, you can find the current definition for the:
    Login to Shop

    with the Tools ... Developers Tool Kit ... and in the bottom input box enter the text you are looking for:
    login to shop

    and select Catalog and click SEARCH ...

    Then change the existing text define to be an image:
    Code:
    //  define('TEXT_LOGIN_TO_SHOP_BUTTON_REPLACE','Login to Shop');
      define('TEXT_LOGIN_TO_SHOP_BUTTON_REPLACE',zen_image($template->get_template_dir($image, DIR_WS_TEMPLATE, $current_page_base, 'buttons/' . $_SESSION['language'] . '/') . 'button_next.gif'));
    this example would pull the existing image for the Next button, just so that you can see the change ...

    What is the real path for that? Well of course we all know just click right on an image to find out its properties which would include its path ...
    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: v1.5.5]
    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. #7
    Join Date
    Aug 2010
    Location
    Cebu, Philippines
    Posts
    21
    Plugin Contributions
    0

    Default Re: Force registration/login prior to adding to cart

    Ja sure, you betcha! That works like a champ! Thanks a million.

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

    Default Re: Force registration/login prior to adding to cart

    You are most welcome ... glad that these customizations worked for you ...
    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: v1.5.5]
    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!

  9. #9
    Join Date
    Oct 2010
    Location
    ireland
    Posts
    23
    Plugin Contributions
    0

    Default Re: Force registration/login prior to adding to cart

    i'm seriously impressed...knowledge is wonderful, dude you have the knowledge...

  10. #10
    Join Date
    Nov 2010
    Posts
    21
    Plugin Contributions
    0

    Default Re: Force registration/login prior to adding to cart

    Sorry, I made the change of the code but nothing happens to me, do not see the button "Add to Car. "
    In what is wrong?

    I use v1.3.9f

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Force Login to Add To Cart
    By jogrady in forum General Questions
    Replies: 0
    Last Post: 9 Dec 2011, 05:19 AM
  2. Free digital downloads force registration?
    By cleasterwood in forum Managing Customers and Orders
    Replies: 3
    Last Post: 27 Aug 2009, 06:55 PM
  3. Force Login and Membership
    By junior6773 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 23 Jul 2008, 08:36 PM
  4. Force default for html emails on customer registration
    By accension in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Jun 2008, 05:47 PM
  5. Mystery Sidebox Invisible Prior to Login
    By samadhi in forum Addon Sideboxes
    Replies: 29
    Last Post: 29 Apr 2007, 07:39 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR