tions.preCheckFunction = function() {
// Intercept add to cart requests, prevent them from continuing
if(this.ajax && this.ajax.data && ['shop:on_addMultiToCart', 'shop:on_addToCart'].includes(this.ajax?.data.cms_handler_name)) {
return false;
}
return true;
}
let basketUrl = 'https://' + CHECKOUT_DOMAIN + '/basket';
$('body').on('click', BOOK_BTN_SELECTORS.join(', '), function(e) {
if(window.debug) {
debugger;
}
let $form = $(e.target).getForm();
let data = {'prod_codes':{}, 'extras': {}};
if($form.is('.om-table-form')) {
$('input[name^="product_cart_quantity\["]').each(function(i, elem) {
let qty = elem.value;
let prodCode = $(elem).closest('tr').find('input[name="x_remote_prod_code"]').val();
if(prodCode && qty > 0) {
data['prod_codes'][prodCode] = qty;
}
});
}
else {
let qty = $form.find('input[name="product_cart_quantity"]').val();
let prodCode = $form.find('input[name="x_remote_prod_code"]').val();
data['prod_codes'][prodCode] = qty;
data['extras'][prodCode] = {};
for(let extra of document.querySelectorAll('input:checked[name^="product_extra_options["')) {
let key = extra.name.substring(22, 54);
data['extras'][prodCode][key] = 1
}
}
let product_name = $form.find('input[name="product_name"]').val();
let sku = $form.find('input[name="product_sku"]').val();
let product_price = $form.find('input[name="product_price"]').val();
Phpr.showLoadingIndicator({form: $form, loadIndicator: Phpr.options.loadIndicator});
$.ajax({
url: basketUrl + '/add/',
type: 'POST',
crossDomain: true,
xhrFields: {
withCredentials: true
},
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
data: data,
success: function (response) {
dataLayer.push({
'event' : 'add_to_cart',
'ecommerce' : {
'items': [{
'item_id': sku,
'item_name': product_name,
'price': product_price,
'quantity': $('#product_cart_quantity').val()
}]
}
});
Phpr.hideLoadingIndicator({form: $form, loadIndicator: Phpr.options.loadIndicator});
if(response.redirect) {
window.location.href = response.redirect;
}
},
error: function (xhr, status) {
Phpr.hideLoadingIndicator({form: $form, loadIndicator: Phpr.options.loadIndicator});
}
});
});
}
})
Call FREE for expert advice ProSolve Underground Warning Tape is designed to enable services such as electric cables, pipes etc. to be located without damage. See More Like This: Tapes Length (mm): 365000 Width (mm): 150 Height (mm): 0.1 Weight (kg): 1.3 There are currently no reviews for this item, why not be the first? Whether you need a long-term, short-term, or temporary climate solution, sometimes it can help if you can break the costs down, especially if the situation is unexpected or an emergency. To help our customers and make climate control and air quality equipment more accessible, we've worked with PayPal to provide a way to spread the cost with PayPal Pay in 3. You can use Pay in 3 for eligible shopping cart amounts between £30.00 to £2,000.00. Terms apply.
ProSolve Underground Warning Tape - Data Cable (Box Qty: 4)
Description
Specification
Customer Reviews
PAYPAL PAY IN 3
SPREAD THE COST OF ESSENTIAL HEATING, VENTILATION, AND AIR CONDITIONING EQUIPMENT
LIGHTNING DEAL