- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
<script>
var SPO = 2;
$(document).ready(function(){
// hide inactive spo experience
if (typeof SPO !== "undefined") {
$("body").addClass("spo");
var selector = ".spo-prod:not(.exp"+SPO+"A-prod), .spo-banner:not(.exp"+SPO+"A-banner)";
$(selector).remove();
$(".control-exp").remove();
$(".spo-banner, .spo-prod, .spo-description, .spo-bottomsection").show();
}
$(".spo-description-wrap").show();
//click first radio
$($("input[name^='product-radio']").get().reverse()).click();
// change product name in cart lightbox
try {
window.setTimeout(function() {
jQuery.each(jQuery('.cart-product-name'), function(i, e) {
var langname = jQuery(e).text().match(/.+(?=lifetime)/i)
if (langname) {
console.log('langname: ',langname)
$(e).html(langname[0] + '<br> 24 months- Family Pack')
}
})
}, 3000)
} catch(e) {}
});
//FOR CURRENT CATALOGS
$(document).ready(function(){
//Fix 12 Months Cart
$('.product-select input[data-duration~="12"]').each(function(i,v){
var newhref = ($(v).attr('data-cart') || '').replace(/pc=[^&$]+/ig, 'pc=portland_12M');
$(v).attr('data-cart', newhref);
});
//Fix 12 Months Display Prices
$('.product-select input[data-duration~="12"] ~ .price').text('$144');
$('.product-select input[data-duration~="12"] ~ .strike-price').css('visibility','visible');
//Reset cart for checked
$('.spo-cart-btn.active').attr('href', $('input:checked').data('cart'));
//Fix Family Pack Cart
$('.spo-cart-btn[href*=90284]').each(function(i,v){
var newhref = ($(v).attr('href') || '').replace(/pc=[^&$]+/ig, 'pc=reykjavik_F24M');
$(v).attr('href', newhref);
$(v).parents('.product-select').find('input').attr('data-cart', newhref);
});
//Fix Family Pack Price
$('.banner-product label span.price').text('$314');
$('.banner-product label span.strike-price').css('visibility','visible');
});
</script>