If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Free Shipping Image showing twice on Cart page

Free Shipping Image showing twice on Cart page

Started by mickmo68 on 25 Jan 2013, 2:07 AM · Views: 707

Results 1 to 3 of 3
25 Jan 2013, 2:07 AM
#1
mickmo68 avatar

mickmo68

Zen Follower

Join Date:
Apr 2008
Location:
Boston
Posts:
129
Plugin Contributions:
0

Post #1 by mickmo68

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

<!-- ** 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-pressure-fit-baby-safety-gate

Any help would be greatly appreciated.

Mickey

25 Jan 2013, 3:06 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

You have the code to show it in there twice:

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!