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
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.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 }
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


Reply With Quote

