Thanks also xcartmods.so.uk !
Final code added to opc_main.tpl to target the UK and Ireland to work around their new VAT rule of it not applying to orders over 135 pounds.
Quote:
<script>
$(document).ready(function() {
var $selectedCountry = $('select#b_country').val();
if ($selectedCountry == 'GB' || $selectedCountry == 'IE') {
$('#GB_Message').removeAttr('style');// Show message
} else {
$('#GB_Message').css('display', 'none');// Hide message
}
$('select#b_country').on('change', function() {
var $modifiedCountry = $(this).val();
if ($modifiedCountry == 'GB' || $modifiedCountry == 'IE') {
$('#GB_Message').removeAttr('style');// Show message
} else {
$('#GB_Message').css('display', 'none');// Hide message
}
});
});
</script>
<div id="GB_Message" style="display:none">
<h3 style="color:red;">UK RESIDENTS: Meessage here</h3>
</div>
|
Appreciate the assistance