May 6, 2021 9:58 AM
Hi all, on my company website, you can see we have 3 different pricing licences, in euro, pound and SEK. The euro and pound are changing fine and are the price i need them at but the SEK pricing won't change for me. Bascially I want it to say:
1. Starter: SEK 44,800
2. Advanced: SEK 141,550
3. Standard: SEK 76,370
This is the page that we have: https://www.privacyengine.io/privacy-engine-pricing
Can someone help me with this please? I know we have custom HTML but i can't figure out what I need to change to have the right pricing showing.
Thanks,
May 6, 2021 12:50 PM
May 7, 2021 3:46 AM
Hi Kevin,
thank you for your reply.
This is the code:
<script type="text/javascript">
$(document).ready(function(){
$('.testimonials_wrap_v4').parents('.section_wrap').parents('.row-number-1').remove();
var countryCode='';
$.get("https://ipinfo.io", function(response) {
countryCode = response.country;
$("#ddlCurrency").val(countryCode);
if(countryCode == 'GB'){
$('.pricing_table_currency').text('£');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}else if(countryCode == 'US'){
$('.pricing_table_currency').text('$');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}else if(countryCode == 'SE'){
$('.pricing_table_currency').text('SEK');
$('.pricing_table_cost').each(function(){
$(this).text(parseFloat($(this).text()) * parseFloat(10));
$(this).text($(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
});
}else{
$('.pricing_table_currency').text('€');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}
}, "jsonp");
$("#ddlCurrency").on("change",function(){
if($("#ddlCurrency option:selected").val() == "GB"){
$('.pricing_table_currency').text('£');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}else if($("#ddlCurrency option:selected").val() == 'US'){
$('.pricing_table_currency').text('$');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}else if($("#ddlCurrency option:selected").val() == 'SE'){
$('.pricing_table_currency').text('SEK');
$('.pricing_table_cost').each(function(){
$(this).text(parseFloat($(this).text()) * parseFloat(10));
$(this).text($(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
});
}else{
$('.pricing_table_currency').text('€');
$('.pricing_table_cost:eq(0)').text('4,399');
$('.pricing_table_cost:eq(1)').text('13,899');
$('.pricing_table_cost:eq(2)').text('7,499');
}
});
});
</script>