Magento 1.3.2.4 — Add a shipping map to your checkout page (one page checkout)
I wanted to add a UPS shipping map to my checkout page in magento 1.3.2.4.
The file that needs to be edited is: app/frontend/design/default (or other theme) /[Choose your template]/checkout/onepage/shipping_method/available.phtml
This statement below will add whatever html you want to add to the UPS ground line on the checkout page.
<?php if($_rate->getMethodTitle()==’UPS Ground’):?><span>INSERT YOUR HTML HERE</span><?php endif ;?>
I wanted this to go on the same line as the UPS Ground and price.
Here is what my code ending up looking like:
From line 35:
<?php foreach ($_rates as $_rate): ?>
<li>
<?php if ($_rate->getErrorMessage()): ?>
<ul><li><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
<?php else: ?>
<input name=”shipping_method” type=”radio” value=”<?php echo $_rate->getCode() ?>” id=”s_method_<?php echo $_rate->getCode() ?>”<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ‘ checked=”checked”‘ ?> />
<label for=”s_method_<?php echo $_rate->getCode() ?>”><?php echo $_rate->getMethodTitle() ?>
<strong>
<?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; ?>
</strong>
</label><?php if($_rate->getMethodTitle()==’UPS Ground’):?><span>DOES this work</span><?php endif ;?>
<?php endif ?>
</li>
<?php endforeach; ?>
I used UPS ground, for my example. But you can put in any method you want from your checkout page. For example, Priority Mail or USPS Next Day Air work too etc..
You will need one of these statements for each method you want to put text by. Add style or class to your span tag to add a custom design to it.
You may need to change out the ” quotes for ones that actually work in html, depending on how this copies.
Hope this helps.
–Bryan
Advertisement
Categories: Uncategorized
Hey, great blog…but I don’t understand how to add your site in my rss reader. Can you Help me, please
-Robert Shumake Paul Nicoletti