Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Location
    Boston
    Posts
    148
    Plugin Contributions
    0

    Default Free Shipping Image showing twice on Cart page

    I'm a complete hack when it comes to code and I can't figure out what I've done wrong. I modified the /public_html/includes/templates/My_Template/templates/tpl_shopping_cart_default to hide the shipping estimator when FREE SHIPPING applies with this
    Code:
    <!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
    
    <br class="clearBoth" />
    
    <?php
    if ($shipping_weight == 0) {
      echo '<div id="freeShippingIcon"><img src="includes/templates/template_default/images/always-free-shipping.gif" alt="Always Free Shipping" title=" Always Free Shipping " width="94" height="54"></div>';
    }
          if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1' && $shipping_weight > 0) {
    ?>
    
    <div class="buttonRowShip"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
     zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
    <?php
        }
    ?>
    
    
    
    <?php
    if ($shipping_weight == 0) {
      echo '<div id="freeShippingIcon"><img src="includes/templates/template_default/images/always-free-shipping.gif" alt="Always Free Shipping" title=" Always Free Shipping " width="94" height="54"></div></div>';
    }
          if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '2' && $shipping_weight > 0) {
    /**
     * load the shipping estimator code if needed
     */
    ?>
          <?php require(DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php')); ?>
    
    <?php
          }
    It works great when the admin is set to '2' (displays shipping form) and it works for '1' (displays button) when the item is NOT free shipping.
    The problem is when it's set to '1' (display button) and it is FREE SHIPPING, I get two FREE SHIPPING images. I only want one.

    You can see it by putting this item in the cart:

    http://keepsafeco.com/swinging-press...by-safety-gate

    Any help would be greatly appreciated.

    Mickey

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

    Default Re: Free Shipping Image showing twice on Cart page

    You have the code to show it in there twice:
    Code:
    if ($shipping_weight == 0) {
      echo '<div id="freeShippingIcon"><img src="includes/templates/template_default/images/always-free-shipping.gif" alt="Always Free Shipping" title=" Always Free Shipping " width="94" height="54"></div>';
    }
    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!]
    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
    Apr 2008
    Location
    Boston
    Posts
    148
    Plugin Contributions
    0

    Default Re: Free Shipping Image showing twice on Cart page

    ...forest through the trees.

    Thank you

 

 

Similar Threads

  1. Replies: 3
    Last Post: 7 Dec 2014, 03:15 PM
  2. v139h Product FREE Shipping IMAGE not showing up on Main & Product Page:
    By rlexyd in forum Templates, Stylesheets, Page Layout
    Replies: 43
    Last Post: 29 Jan 2013, 05:42 AM
  3. v150 Free Shipping Image Not Showing
    By SmartBUyAudio in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 19 Dec 2012, 04:08 PM
  4. Replies: 18
    Last Post: 28 Aug 2012, 02:24 PM
  5. Image on page showing up twice
    By [email protected] in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 21 Mar 2007, 06:55 PM

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