Hello,
Just wanted to share the following code with Shopsite stores from our shopping cart. We do allot of international business where the customer needs to know about duty and VAT taxes. We wanted to display the calculator when the country selected was not the US.
The following code was provided by Steven from Lexiconn our ISP. Lexiconn has bailed me out of coding jams more than I can count. They are GREAT.
<!-- Duty and Tariff -->
<div class="cart-content">
<div class="cart-info"><a href="http://www.dutycalculator.com/new-import-duty-and-tax-calculation/" target="_blank"><img id="duty_calculator" src="http://www.dutycalculator.com/banners/468_60.jpg" title="Duty Calculator" style="display: none;"></a></div>
</div>
Then set the script to show the image if the country is not US:
<script type="text/javascript">
$(function(){
if($("select[name='country']").val()=='US'){
$("#duty_calculator").hide();
} else{
$("#duty_calculator").show();
}
$("select[name='country']").change(function(){
if($(this).val()=='US'){
$("#duty_calculator").hide();
} else{
$("#duty_calculator").show();
}
});
});
</script>
this way the image is not displayed on the page until the page has loaded and then is hidden is the US is selected.
Regards,
Steven
John
www.KayakProShop.com