Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2006
    Location
    Washington State
    Posts
    13
    Plugin Contributions
    0

    Default $XX.XX remaining until free shipping

    I have created my CSS style sheets and am now trying to understand how the sideboxes function. I think I have a slight grasp on the override options but am not sure what actual file(s) control the sidebox. I am trying to get the following code into a sidebox but am not sure how to get it to register in my admin console so I can turn it on. The code was poached from another forum and will tell the user how much remains for them to qualify for free shipping.

    Can someone give me some guidance with this isssue?

    Code:
    <?php
    $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);
         echo 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping!';
       } else {
         echo 'Your order qualifies for Free Shipping!';
       }
      } else {
      echo 'Free Shipping for all orders of ' . $currencies->format($free_limit) . ' or more.';
      }
    }
    ?>

  2. #2
    Join Date
    Sep 2006
    Posts
    9
    Plugin Contributions
    1

    Idea or Suggestion Re: $XX.XX remaining until free shipping

    HTML Code:
    Hi, 
    
    You will need to add the following code:
    $free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

    if ($free_ship_on == 'false') {
    $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!' . '</span>';
    } else {
    $content .= '<span class="alert">' . 'Your order qualifies for Free Shipping!' . '</span>';
    }
    } else {
    $content .= '<span class="alert">' . 'Free Shipping for orders of ' . $currencies->format($free_limit) . ' or more.' . '</span>';
    }
    }
    HTML Code:
    into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
    Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled. 
    
    Check out it here: <a href="http://www.unique-gifts-jewelry.com">Uniquely Yours, Unique Gifts and Jewelry</a>.

  3. #3
    Join Date
    Sep 2006
    Posts
    9
    Plugin Contributions
    1

    Default Re: $XX.XX remaining until free shipping

    Hi,

    You will need to add the following code:

    $free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

    if ($free_ship_on == 'false') {
    $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!' . '</span>';
    } else {
    $content .= '<span class="alert">' . 'Your order qualifies for Free Shipping!' . '</span>';
    }
    } else {
    $content .= '<span class="alert">' . 'Free Shipping for orders of ' . $currencies->format($free_limit) . ' or more.' . '</span>';
    }
    }

    into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
    Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled.

    Check out it here: http://www.unique-gifts-jewelry.com

    Sorry for messing up previous message.
    Last edited by VaicekaL; 30 Nov 2006 at 10:54 AM. Reason: learning to post

  4. #4
    Join Date
    Sep 2006
    Posts
    9
    Plugin Contributions
    1

    Idea or Suggestion Re: $XX.XX remaining until free shipping

    Hi,

    You will need to add the following code:

    PHP Code:
    $free_ship_on MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

    if (
    $free_ship_on == 'false') {
    $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!' '</span>';
    } else {
    $content .= '<span class="alert">' 'Your order qualifies for Free Shipping!' '</span>';
    }
    } else {
    $content .= '<span class="alert">' 'Free Shipping for orders of ' $currencies->format($free_limit) . ' or more.' '</span>';
    }

    into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
    Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled.

    Check out it here: http://www.unique-gifts-jewelry.com

    Sorry for messing up previous 2 messages. I hope administrator will forgive me. Still learning to post correctly. This 7 minute limit is some_thing!
    Last edited by VaicekaL; 30 Nov 2006 at 11:04 AM.

  5. #5
    Join Date
    Nov 2005
    Location
    Narnia
    Posts
    822
    Plugin Contributions
    0

    Default Re: $XX.XX remaining until free shipping

    That's pretty cool! You should package it up and put it in the downloads section....people would like it!

  6. #6
    Join Date
    Jul 2006
    Location
    London, UK
    Posts
    11
    Plugin Contributions
    0

    Default Re: $XX.XX remaining until free shipping

    Quote Originally Posted by VaicekaL View Post
    Hi,

    You will need to add the following code:

    PHP Code:
    $free_ship_on MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

    if (
    $free_ship_on == 'false') {
    $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!' '</span>';
    } else {
    $content .= '<span class="alert">' 'Your order qualifies for Free Shipping!' '</span>';
    }
    } else {
    $content .= '<span class="alert">' 'Free Shipping for orders of ' $currencies->format($free_limit) . ' or more.' '</span>';
    }

    into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
    Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled.

    Check out it here: http://www.unique-gifts-jewelry.com

    Sorry for messing up previous 2 messages. I hope administrator will forgive me. Still learning to post correctly. This 7 minute limit is some_thing!
    I'm wondering if this code could be adapted to a ' add $XX.XX to your order to qualify for a free gift'? I already have the store automatically adding a free gift once the customer spends $40 but it'd be nice to have a prompt like this to encourage them.

  7. #7
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: $XX.XX remaining until free shipping

    Does the sidebox download in the downloads section relate to this thread ?

    If so what extras do you have to do to get ti to work / configure it ?

    There were not any instructions in the download.

    Thanks
    Various Zen cart sites !

  8. #8
    Join Date
    Nov 2006
    Posts
    91
    Plugin Contributions
    0

    Default Re: $XX.XX remaining until free shipping

    I love the script but I can't seem to get it to work right. When I put it in, it shows the free shipping at $50 but once items are in the cart, it doesn't show any alerts. Do I need to make the sidebox larger or something?

 

 

Similar Threads

  1. Replies: 4
    Last Post: 12 Jan 2015, 10:45 PM
  2. Items remaining til free shipping
    By 00Goat in forum Basic Configuration
    Replies: 0
    Last Post: 10 Mar 2009, 04:06 PM
  3. PayPal Free CC Transaction Processing Until 1/31/2008
    By jnetmcp in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 16 Feb 2008, 07:23 PM
  4. $XX.XX remaining until free shipping, continued
    By arcanesanctuary in forum Basic Configuration
    Replies: 21
    Last Post: 26 May 2007, 04:21 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