Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    help question Shopping cart sidebox with checkout button BUT doesn't go to checkout

    I've just installed the add-on Shopping cart sidebox with checkout button and product image. According to the readme, this module is a combination of: 1) Shopping cart with checkout button sidebox by Wilkesy and 2) Shopping Cart with Image Sidebox by kuroi. It consists of one page that over-writes tpl_shopping_cart.php.

    I love the idea of this simple add-on but when I click on the Go to Checkout button it takes me to the shopping_cart page instead. It seems as though it should go to the login page, correct? This happens both when I'm logged in and when I'm not.

    I looked into the contents of the php file but can't see where I might make changes to affect this. I've included the entire contents below:
    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cartt Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_shopping_cart.php 2007-03-15 kuroi $
     */
      
    $content ="";

      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';
      if (
    $_SESSION['cart']->count_contents() > 0) {
      
    $content .= '<div id="cartBoxListWrapper">' "\n" '<ul>' "\n";
        
    $products $_SESSION['cart']->get_products();
        for (
    $i=0$n=sizeof($products); $i<$n$i++) {
          
    $content .= '<li>';

          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $content .= '<span class="cartNewItem">';
          } else {
            
    $content .= '<span class="cartOldItem">';
          }

          
    $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER '</span><a href="' zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' $products[$i]['id']) . '">';

          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $content .= '<span class="cartNewItem">';
          } else {
            
    $content .= '<span class="cartOldItem">';
          }

          
    $content .= zen_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTHIMAGE_SHOPPING_CART_HEIGHT) . '<br>' $products[$i]['name'] . '</span></a></li>' "\n";

          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $_SESSION['new_products_id_in_cart'] = '';
          }
        }
        
    $content .= '</ul>' "\n" '</div>';
      } else {
        
    $content .= '<div id="cartBoxEmpty">' BOX_SHOPPING_CART_EMPTY '</div>';
      }

      if (
    $_SESSION['cart']->count_contents() > 0) {
        
    $content .= '<hr />';
        
    $content .= '<div class="cartBoxTotal">' $currencies->format($_SESSION['cart']->show_total()) . '</div>';
        
    $content .= '<br class="clearBoth" />';
      }

      if (isset(
    $_SESSION['customer_id'])) {
        
    $gv_query "select amount
                     from " 
    TABLE_COUPON_GV_CUSTOMER "
                     where customer_id = '" 
    $_SESSION['customer_id'] . "'";
       
    $gv_result $db->Execute($gv_query);

        if (
    $gv_result->RecordCount() && $gv_result->fields['amount'] > ) {
          
    $content .= '<div id="cartBoxGVButton"><a href="' zen_href_link(FILENAME_GV_SEND'''SSL') . '">' zen_image_button(BUTTON_IMAGE_SEND_A_GIFT_CERT BUTTON_SEND_A_GIFT_CERT_ALT) . '</a></div>';
          
    $content .= '<div id="cartBoxVoucherBalance">' VOUCHER_BALANCE $currencies->format($gv_result->fields['amount']) . '</div>';
        }
      }
      
    $content .= '</div>';
    ?>
    Any idea how to re-direct the checkout button to the login page? I am running 1.3.6 and this may be the culprit.

    Thanks

  2. #2
    Join Date
    Apr 2007
    Posts
    649
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    It does to the checkout for me on your Beadlily site.

  3. #3
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Quote Originally Posted by helpme View Post
    It does to the checkout for me on your Beadlily site.
    Really?! That's odd - For me it goes to the shopping cart in both IE & FF.

    Would anyone else be willing to throw something in the shopping cart at BeadedLily and hit the checkout button located within the shopping cart sidebox? Thanks!!

  4. #4
    Join Date
    Apr 2007
    Posts
    649
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Oh, I'm sorry I miss read your post.....yes it goes to the shopping cart, and actually I just installed this on my site and it also goes to the shopping cart, I'm using 1.3.7
    At first I thought it should go to the login page also, but then nowone could revise their cart. Right?

  5. #5
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Quote Originally Posted by helpme View Post
    Oh, I'm sorry I miss read your post.....yes it goes to the shopping cart, and actually I just installed this on my site and it also goes to the shopping cart, I'm using 1.3.7
    At first I thought it should go to the login page also, but then nowone could revise their cart. Right?
    It seems to me that it should go to the same place that the checkout button on the shopping cart page goes to: Either to checkout_shipping if you are logged in or to the login page.

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    The code that you have posted is from the shopping cart sidebox with image that I corrected (but had completely forgotten about!) not from the version with image and button. That's why you can't find the the button code.

    When you go into the correct version, the code that you are looking for is this
    PHP Code:
    $content .= '<a href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '">' zen_image_button(BUTTON_IMAGE_CHECKOUTBUTTON_CHECKOUT_ALT) . '</a>'
    and the change will hopefully be obvious.

    Don't worry about whether a visitor is already logged in or not. Zen Cart will take care of that automatically if they're not.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Quote Originally Posted by kuroi View Post
    The code that you have posted is from the shopping cart sidebox with image that I corrected (but had completely forgotten about!) not from the version with image and button. That's why you can't find the the button code.

    When you go into the correct version, the code that you are looking for is this
    PHP Code:
    $content .= '<a href="' zen_href_link(FILENAME_SHOPPING_CART'''SSL') . '">' zen_image_button(BUTTON_IMAGE_CHECKOUTBUTTON_CHECKOUT_ALT) . '</a>'
    and the change will hopefully be obvious.

    Don't worry about whether a visitor is already logged in or not. Zen Cart will take care of that automatically if they're not.
    I, too saw that I had posted the wrong code, although I did use the proper code on my site.

    I hate to be thick (I just can't help it!) but the necessary change is not obvious. I did look at the code and made a few changes but certainly not the correct ones! Would you be so kind as to clarify a bit? Thanks for your help!

    Tim

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Provided all the conditions are met to allow the checkout to proceed to shipping page, you would need to replace FILENAME_SHOPPING_CART with FILENAME_CHECKOUT_SHIPPING and set Admin > Configuration > My Store > Show Cart after adding product to false.

    However, there is still a risk that Zen Cart will return you to page from which you came, rather than onward to checkout shipping. You'd have to try it and see.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    Quote Originally Posted by kuroi View Post
    Provided all the conditions are met to allow the checkout to proceed to shipping page, you would need to replace FILENAME_SHOPPING_CART with FILENAME_CHECKOUT_SHIPPING and set Admin > Configuration > My Store > Show Cart after adding product to false.

    However, there is still a risk that Zen Cart will return you to page from which you came, rather than onward to checkout shipping. You'd have to try it and see.

    Beautiful - That did the trick. Thanks for taking the time to help. I certainly do muck around with php all the time but sometimes the logic eludes me.

    Thanks again!

  10. #10
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox with checkout button BUT doesn't go to checkout

    I've installed this module into a new zencart and have included the modifications discussed in this thread. Everything works as it should.

    My question concerns the checkout image that is called to be displayed in the sidebox. What changes would I need to make to tpl_shopping_cart.php so that a different checkout image is called? The problem is that the sidebox is a dark background while the main page is light and therefore the same image won't work visually on both.

    Thanks for whatever help or hints you can offer.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Shopping Cart Sidebox with Checkout Button (and image?)
    By MeltDown in forum Addon Sideboxes
    Replies: 2
    Last Post: 5 Apr 2013, 04:23 PM
  2. Checkout Button in Shopping cart sidebox?
    By zoreli in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 30 Jul 2010, 06:03 PM
  3. Replies: 12
    Last Post: 25 Jun 2010, 06:02 PM
  4. shopping cart sidebox with checkout button only when cart is full
    By sunnydaydreame in forum Basic Configuration
    Replies: 0
    Last Post: 5 Feb 2008, 12:52 AM
  5. Shopping Cart with checkout button sidebox
    By metalarea in forum Basic Configuration
    Replies: 2
    Last Post: 11 Nov 2007, 10:39 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