Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Posts
    23
    Plugin Contributions
    1

    Default shopping cart with checkout button and product image

    This module will put an image of the product in your shopping cart sidebox and also provide a checkout button at the bottom of the shopping cart sidebox.

    This module is a combination of:

    1) Shopping cart with checkout button sidebox by Wilkesy

    and

    2) Shopping Cart with Image Sidebox by kuroi

    all i did was put the 2 together. It works perfectly on 1.3.7

    There is only 1 file to replace - please make a copy of the file you are replacing or backup your site before using.

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: shopping cart with checkout button and product image

    Sounds great..have you submitted to downloads section?
    If not, where can it be downloaded please?

  3. #3
    Join Date
    Sep 2007
    Posts
    23
    Plugin Contributions
    1

    Default Re: shopping cart with checkout button and product image

    sorry, its here. Yes i have submitted it in the downloads section

    http://www.zen-cart.com/forum/showthread.php?t=80293

  4. #4
    Join Date
    Feb 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: shopping cart with checkout button and product image

    Hi,

    I will modify this sidebox for show the price of the products that have add to cart, but I don't know how can show the price plus the quantity.

    this is my code:
    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">';
          }
    
            $products_price = zen_get_products_display_price($products[$i]);
    		$content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . $products[$i]['name'] . $products_price . '</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_WIDTH, IMAGE_SHOPPING_CART_HEIGHT) . '</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" />';
    	$content .= '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>';
      }
    
      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'] > 0 ) {
          $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>';
    ?>
    Sorry I not programer and my english is not good.

    Regards

  5. #5
    Join Date
    Oct 2006
    Posts
    75
    Plugin Contributions
    0

    Default Re: shopping cart with checkout button and product image

    Hello all,
    I have combined the side shopping cart with product images and checkout button with the free shipping side shopping cart.

    I have two issues that I need some help with:

    1.) The text that reads "Your order qualifies for free shipping!" Is aligned kinda crappy. It starts to the right and at the top of the "Checkout Button" image, then proceeds to finish the sentence under the button. I would like the text to be all above the "Checkout Button".

    2.) Id like to add the "Checkout with PayPal" button into the side cart as well. I need the word "or" in between the "Checkout Button" and the "Checkout with PayPal Button"

    Here is the code I have so far:
    Code:
    <title></title><?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_WIDTH, IMAGE_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" />';
        $content .= '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>';
      }
    
    //Begin free shipping qualifier
    $free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;
    
    if ($free_ship_on == 'true') {
      $free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
      if ($_SESSION['cart']->count_contents() > 0) { 
         $_SESSION['cart']->get_products(); 
         $basket_total = $_SESSION['cart']->show_total(); 
         if ($basket_total < $free_limit) { 
            $diff_to_free = ($free_limit - $basket_total); 
            $content .= '<span class="alert">' . 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping in the USA!' . '</span>'; 
         } else { 
            $content .= '<span class="alert">' . 'Your order qualifies for Free Shipping in the USA!' . '</span>'; 
         } 
      } else { 
            $content .= '<span class="alert">' . 'Free Shipping for orders of ' . $currencies->format($free_limit) . ' or more in the USA!' . '</span>'; 
      }
      } 
    //End of free shipping qualifier
    
      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'] > 0 ) {
          $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>';
    ?>
    
    

  6. #6
    Join Date
    Jun 2007
    Posts
    195
    Plugin Contributions
    0

    Default Re: shopping cart with checkout button and product image

    Do you have the URL for your site?

 

 

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. Replies: 12
    Last Post: 25 Jun 2010, 06:02 PM
  3. Shopping Cart with CheckOut Button--change image
    By carol2848 in forum Addon Sideboxes
    Replies: 7
    Last Post: 24 Jun 2010, 01:18 PM
  4. Shopping cart sidebox with checkout button BUT doesn't go to checkout
    By MeltDown in forum All Other Contributions/Addons
    Replies: 15
    Last Post: 27 Aug 2008, 04:56 PM
  5. Replies: 0
    Last Post: 14 Nov 2007, 04:40 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