Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    42
    Plugin Contributions
    0

    Default Changing Login in Functionality

    I was wondering if it was possible to change the default functionality when a returning customer logins in. To illustrate:

    1. A customer comes to the shop, logs in and puts a number of items in his cart. They then log out.

    2. Sometime later he comes back and, without logging in, puts an item in his cart and selects the 'checkout' button.

    3. This takes him to the register/login page and he fills in his username and password.

    4. This takes him to the shipping page, then the payment page ... etc

    The key thing is that the customer may not remember that he still has a number of items from his first shopping trip in his cart. Potentially they could go all the way to the end of the process without realising that this is the case.

    My suggestion is that after logging in, the customer should be taken to their shopping cart rather than the shipping page. I've had a look to see if I can find how to do this but no luck so would be grateful for any advice ......

  2. #2
    Join Date
    Sep 2007
    Posts
    21
    Plugin Contributions
    1

    Idea or Suggestion Re: Changing Login in Functionality

    I thought this was a strange behaviour too. Sending the user to their cart is a much better idea than the home page after log in.

    I fixed this in zen 1.3.7.1. to do this you need to edit includes/modules/pages/login/header_php.php

    line 91, where it has
    PHP Code:
          // restore cart contents
          
    $_SESSION['cart']->restore_contents();
          
    /*
          if ($_SESSION['cart']->count_contents() > 0) {
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING));
          }
          */ 
    I changed it to
    PHP Code:
          // restore cart contents
          
    $_SESSION['cart']->restore_contents();

          if (
    $_SESSION['cart']->count_contents() > 0) {
           
    zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
          }
          
    /*
          if ($_SESSION['cart']->count_contents() > 0) {
          zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING));
          }
          */ 

  3. #3
    Join Date
    Nov 2006
    Posts
    42
    Plugin Contributions
    0

    Default Re: Changing Login in Functionality

    Thanks a lot for that which works like a dream. To be honest, I'm surprised that this isn't standard functionality for ZC ......

 

 

Similar Threads

  1. How will changing these dates affect functionality?
    By JollyJim in forum General Questions
    Replies: 2
    Last Post: 24 Nov 2009, 12:17 AM
  2. changing login redirect
    By jaredbbauer in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 29 Jul 2008, 12:58 AM

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