Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Free Shipping Image showing twice on Cart page

Free Shipping Image showing twice on Cart page

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

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

<!-- ** 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

Re: Free Shipping Image showing twice on Cart page

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>';
}
25 Jan 2013, 3:30 AM
#3
mickmo68 avatar

mickmo68

Zen Follower

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

Re: Free Shipping Image showing twice on Cart page

...forest through the trees.

Thank you :blush: