Displaying Extra Shipping Info in Checkout
Posted: Tue Apr 19, 2011 4:43 pm
I have a range of shipping methods and would like to display further info about each method when it is selected in the checkout. Useful to show terms for specific methods...
I have got this to work in so far that when different radio buttons are selected a different <div> is displayed. However i can't get it to work when the zone changes. e.g. if the country is changed i can't see any way of showing different info.

I have modified the file Snippets/ExpressCheckoutChooseShipper.html
The code is a bit messy but you should get the idea, the complete code i now have for this template is:
The code works with a unique input value on each <li> for the shipping methods. However these values are not unique across zones.
Any ideas how i could create or access unique identifiers for the shipping methods. I can see methodid in the database table shipping_methods but not sure how to access these.
If anyone could help or point me in the right direction that would be great.
Thanks
Bart
I have got this to work in so far that when different radio buttons are selected a different <div> is displayed. However i can't get it to work when the zone changes. e.g. if the country is changed i can't see any way of showing different info.
I have modified the file Snippets/ExpressCheckoutChooseShipper.html
The code is a bit messy but you should get the idea, the complete code i now have for this template is:
Code: Select all
<div id="shipterm" style="width:360px;margin-right:20px;border:2px solid #000;padding:5px;float:right;">
<style type="text/css"> .descso { display: none; } </style>
<div id="1" class="descso"><ul><li>Usually arrives in two working days</li><li>Compensation is not available</li><li>Recommended maximum order value is £35</li></ul>
</div>
<div id="2" class="descso"><ul><li>Sent by Royal Mail Special Delivery</li><li>A signature is required upon delivery</li><li>Saturday delivery not guaranteed</li><li>Compensation available for lost/damaged packages</li></ul><span style="font-size:0.8em">Service only available to England, Wales and parts of Scotland excl. Highlands & Islands. More info</span>
</div>
<div id="3" class="descso"><ul><li>Sent by Royal Mail Special Delivery</li><li>A signature is required upon delivery</li><li>Compensation for lost packages can be made up to a value of £500</li></ul>
</div>
<div id="0" class="descso"><ul><li>Sent by Royal Mail Tracked or Parcel Force depending on the weight of the order</li><li>A signature maybe required upon delivery</li><li>Saturday delivery not guaranteed</li><li>Compensation available for lost/damaged packages</li></ul>
</div>
</div>
<div style="width:500px;float:left">
<form method="post" action="#" onsubmit="ExpressCheckout.ChooseShippingProvider(); return false;">
<p>%%LNG_ExpressCheckoutSelectShippingProvider%%</p>
%%GLOBAL_ShippingQuotes%%
<p><a href='pages/Delivery-Options.html' style='color:red;font-size:0.8em;text-decoration:none !important'>*Delivery Terms - Please Read*</a></p>
<div class="ML20">
<input type="submit" value="%%LNG_Continue%%" />
</div>
%%GLOBAL_DeliveryDisclaimer%%
</form></div>
<script type="text/javascript">
$(document).ready(function(){
$("input[name$='selectedShippingMethod[%%GLOBAL_AddressId%%]']").click(function() {
var test = $(this).val();
$("div.descso").hide();
$("#"+test).show();
});
});
</script>
Any ideas how i could create or access unique identifiers for the shipping methods. I can see methodid in the database table shipping_methods but not sure how to access these.
If anyone could help or point me in the right direction that would be great.
Thanks
Bart