0

i have a problem during the checkout step "shipping method". I have configured a shipping method string in backend (config->sales->flat rate->method name) which is shown, but there is also the price added after that string. Of course this is correct but i don´t want to see zero prices (which occurs when delivery address is e.g. Egypt):

This is the frontend with the price field - don´t mind the language mix it´s just misconfigured^^

Well i already figured out that "app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml" is responsible for that (line 58-65) and that "code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php" probably could be overwritten for like doing some price filtering, but i really only want to hide that zero price if it occurs (so the configured backend string should be shown) not whole groups or anything like that.

Can anyone tell me how exactly I have to check for zero prices in available.phtml to achieve my goal (because by now i failed miserably doing so xD) or give me a proper solution by overwriting a class method if there is any i missed so far ?

Thank you !

1 Answer 1

0

ok i feel a bit stupid now, but i was able to achieve what I wanted by editing available.phtml. It really was just a simple check around the whole price thing in line 58-65. So for anyone having the same issue this is the solution:

<?php if((float)$_rate->getPrice() != 0.00): ?>
                            <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
                            <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
                            <?php echo $_excl; ?>
                            <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
                                (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
                            <?php endif; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.