Produktinformation
Ofodrad arbetshandske
i slitstarkt läder...
Drivers Work Glove från Hestra är en ofodrad arbetshandske för många typer av bygg-, trädgårds- och hemmaprojekt. Den är sydd i mjukt och smidigt nötläder som formar sig efter handen och ger bra grepp. Lädret är slitstarkt och vattenavvisande och skyddar mot skråmor och skav när du bär plank, monterar, hanterar verktyg med mera. Enkel att ta på och av, med en mjuk resår runt handleden.
Kollektion
MULTI-USE PROTECTION
Aktivitet
Trädgårdsarbete Hantverksarbete
Yttermaterial
Nötläder
Standarder
EN388:2132X
0) { digitalProduct.value = initialValue; digitalProduct.parentElement.style.display = 'none'; } } } /* * * Adapter for product form * */ if (isset(product_form) && product_form.length > 0) { product_form.addEventListener('submit', async function(e) { // Prevent default submit e.preventDefault(); // Check attribute dropdowns if (!verify_purchase(e)) { return; } var data = new FormData(e.target); var values = Object.fromEntries(data.entries()); product_form.removeAttribute('disabled'); try { // nocart == 'none' is used for form file uploads if (values.disable_ajax_addtocart == 'true' || values?.nocart == 'request' || values?.nocart == 'none') { product_form.submit(); return; } values = { ...values, redirect: false }; const result = await $s('cart').addToCart(values); // This fix is for products which have // particular stockgroup rule which is not // inspected during the ajax.php request for purchasing if (!result) { product_form.submit(); return; } } catch (e) { console.log(e); } }); } /* * * Main functions * */ function loop_dropdowns() { if (document.querySelectorAll('#product_is_bundle').length > 0) { return; } selected_list.length = 0; selected_stock_list.length = 0; selected_dropdown = ''; selected_stock = ''; empty_dropdown = ''; this_dropdown = ''; var price_element = document.querySelector('.products_price'); var bonuspoints_active = document.getElementById('bonuspoeng_strong'); var price_old = document.querySelector('.price-old s'); var stock_box = document.querySelector('.stock_box'); attributes.forEach(function(attribute, index) { thisid = attribute.id.match(/[\d\.]+/g); this_dropdown = thisid[0] + '-' + attribute.value; if (attribute.value > 0) { selected_list[index] = this_dropdown; } if (attribute.classList.contains('attribute_with_stock')) { selected_stock_list[index] = this_dropdown; } }); /* New fix for badly sortet attrs */ selected_list.sort(natcmp); for (var i in selected_list) { if (selected_dropdown.length > 0) { selected_dropdown = selected_dropdown + ','; } selected_dropdown = selected_dropdown + selected_list[i]; } selected_stock_list.sort(natcmp); for (var i in selected_stock_list) { if (selected_stock.length > 0) { selected_stock = selected_stock + ','; } selected_stock = selected_stock + selected_stock_list[i]; } // Update product's price if (typeof price_list[selected_dropdown] !== 'undefined') { price_element.innerHTML = price_list[selected_dropdown]; } if (typeof price_old !== 'undefined' && price_old !== null && typeof old_stock_list !== 'undefined' && old_stock_list[selected_dropdown]) { price_old.innerText = old_stock_list[selected_dropdown]; } else if (typeof price_old !== 'undefined' && price_old !== null && typeof old_price_list !== 'undefined' && old_price_list[selected_dropdown]) { price_old.innerText = old_price_list[selected_dropdown]; } // Here we reset the in stock notification form // to the initial state $s('in_stock_notification').showPurchaseButton(); if (stock_box && stock_list[selected_stock] > 0) // || allow_purchase[selected_dropdown] == 1 { in_stock = stock_list[selected_stock]; if (show_q_in_stock) { var template_text = template_got; if (typeof stockgroup_rules !== 'undefined') { stockgroup_rules.map(function(rule) { if (rule.rule == 'goe_then' || rule.rule == 'loe_then') { if (rule.rule == 'goe_then' && parseInt(in_stock) >= parseInt(rule.status_value)) { template_text = rule.content; } if (rule.rule == 'loe_then' && parseInt(in_stock) <= parseInt(rule.status_value)) { template_text = rule.content; } } }); } stock_box.innerHTML = str_replace('%qty', in_stock, template_text); } else { stock_box.innerHTML = str_replace('%qty', in_stock, template_got); } stock_box.classList.remove('attr_not_in_stock'); } else if (stock_box && stock_list[selected_stock] <= 0 && document.querySelector("input[name='products_notify_attributes']")) { document.querySelector("input[name='products_notify_attributes']").value = selected_dropdown; stock_box.classList.add('attr_not_in_stock'); in_stock = stock_list[selected_dropdown]; stock_box.innerHTML = template_empty; //$s('in_stock_notification').showInStockNotification = true; } else { if (stock_box) { if (stock_list[0] >= 1) { stock_box?.classList?.remove('attr_not_in_stock'); in_stock = stock_list[0]; stock_box.innerHTML = str_replace('%qty', in_stock, template_got); } else { in_stock = 0; stock_box?.classList?.add('attr_not_in_stock'); stock_box.innerHTML = template_empty; } stock_box?.classList?.remove('attr_not_in_stock'); } } // All logic is held inside the module, // Here we just trigger it $s('in_stock_notification').onAttributeSelected(); // If we have disabled attribute combos, make sure they are not possible to purchase if (disabled_attributes[selected_stock] == 1) { document.querySelector('.product_attributes_wrapper:eq(0)').insertAdjacentHTML("beforeend", '
'); document.querySelector('.attribute-disabled-info').slideDown(); document.querySelector('#addToShoppingCart')?.setAttribute('disabled', true); } else { document.querySelector('.attribute-disabled-info')?.remove(); document.querySelector('#addToShoppingCart')?.removeAttribute('disabled'); } if (typeof bonuspoints_active !== 'undefined' && bonuspoints_active !== null) { var bonuspoeng_modifier = bonuspoints_active?.getAttribute('BONUSPOINTS_MODIFIER_IN'); if (typeof club_price != 'undefined' && typeof member_bonus != 'undefined' && member_bonus && club_price != '') { var products_price = club_price; } else { var products_price = price_element.innerHTML; } // remove ,- products_price from and make it number products_price = products_price.replace(',-', ''); // remove . from products_price to make calculation below correct (i.e. 1.000.000 -> 1000000) products_price = products_price.replace('.', ''); bonuspoints_active.innerText = Math.round(parseFloat(bonuspoeng_modifier) * parseInt(products_price)); } prepare_package(); return selected_dropdown; } function verify_purchase(event) { // If error == 1 return false; var has_error = 0; var attrTitle = ''; var errormessage = ""; var attribute_selects = document.querySelectorAll('.attribute_element select'); var product_package = document.getElementById('product_is_package'); var product_package_qty = document.querySelectorAll('.package_button_qty'); var product_package_containers = document.querySelectorAll('.package li div.container'); var product_not_purchasable = document.querySelector('.product_not_purchasable'); // Validate that fields are filled attribute_selects?.forEach(function(attribute_select) { var combo = attribute_select.getAttribute('option_id') + '-' + attribute_select.value; if (typeof attribute_select.value === 'undefined' || attribute_select.value === 0) { has_error = 1; return false; } if (empty(attribute_select.value) && isset(attribute_select.getAttribute('title'))) { if (product_package) { //scrollToAttribute($(this).parent().attr('option_id')); attrTitle = attribute_select.getAttribute('title'); errormessage += js_error_must_choose_attribute.replace('%s', attrTitle) + "\n"; } else { error_must_choose = js_error_must_choose_attribute.replace('%s', attribute_select .getAttribute('title')); errormessage += error_must_choose + "\n"; } has_error = 1; } }); if (has_error) { $s('events').dispatch('must_choose_attributes', { error: errormessage }); event.stopPropagation(); product_form.setAttribute('valid', false); return false; } if (product_package) { var product_string = ''; var quantity_boxes_present = false; if (product_package_qty.length > 0) { var quantity_boxes_present = true; } product_package_containers.forEach(function(product_package_container) { package_product_id = product_package_container.getAttribute('data-id'); if (!empty(product_string)) product_string += ','; if (quantity_boxes_present) { // Add quantity information to the product string var qty_box = document.querySelector('.qty_box_' + package_product_id); quantity_box_value = qty_box.value; if (isNaN(quantity_box_value) || quantity_box_value == 0) { return true; } product_string += quantity_box_value + '*'; } product_string += package_product_id; product_package_container.querySelectorAll('.attribute_element select').forEach(function( attribute_select) { product_string += '{' + attribute_select.getAttribute('option_id') + '}' + attribute_select.value; }); }); if (typeof is_pos != 'undefined' && is_pos == true) { autofill_url = '/pos'; } else { autofill_url = ''; } product_form.setAttribute('action', autofill_url + '/cart?autofill_cart_content=' + product_string); if (document.querySelectorAll('#product_is_bundle').length > 0) { const bundleId = document.querySelector('#product_is_bundle').value; const parentProductId = document.querySelector('#parent_product_id').value; product_form.setAttribute('action', autofill_url + `/cart?autofill_bundle_content=${product_string}&bundle_id=${bundleId}&parent_product=${parentProductId}`); } //window.location('/cart?autofill_cart_content='+product_string+'&preload=1'); //return false; return true; } if (document.querySelectorAll('#product_is_bundle').length > 0) { var product_string = ''; var quantity_boxes_present = false; if (document.querySelectorAll('.package_button_qty').length > 0) { var quantity_boxes_present = true; } document.querySelectorAll('.bundle li div.bundle-product').forEach(function(item) { package_product_id = item.getAttribute('data-id'); if (!empty(product_string)) product_string += ','; if (quantity_boxes_present) { // Add quantity information to the product string quantity_box_value = document.querySelector('.qty_box_' + package_product_id)?.value; if (isNaN(quantity_box_value) || quantity_box_value == 0) { return true; } product_string += quantity_box_value + '*'; } product_string += package_product_id; item.querySelectorAll('.attribute_element select')?.forEach(function(innerItem) { product_string += '{'+ innerItem.getAttribute('option_id') +'}'+ innerItem.value; }); item.querySelectorAll('.attribute_element.attribute_type_input input')?.forEach(function( innerItem) { product_string += '{'+ innerItem.getAttribute('id')?.match(/(d+)/g)[0]+'}'+ innerItem.value; }); }); if (typeof is_pos != 'undefined' && is_pos == true) { autofill_url = '/pos'; } else { autofill_url = ''; } product_form.setAttribute('action', autofill_url + '/cart?autofill_cart_content=' + product_string); if (document.querySelectorAll('#product_is_bundle').length > 0) { const bundleId = document.querySelector('#product_is_bundle').value; const parentProductId = document.querySelector('#parent_product_id').value; product_form.setAttribute('action', autofill_url + `/cart?autofill_bundle_content=${product_string}&bundle_id=${bundleId}&parent_product=${parentProductId}`); const formData = new FormData(product_form); //$s('events').dispatch('add_to_cart', Object.fromEntries(formData.entries())); $s('notifications').showNotification('success', 'cart', $s('notifications').getMessage('successMessage')); } return true; } //allow to add products to wishlist if (product_form.querySelector("input[name=nocart]")?.value == "wishlist") { return true; } // Check if we have attributes // Can we buy current selection? if (isset(allow_purchase[selected_stock])) { if (empty(allow_purchase[selected_stock])) { has_error = 1; if (product_not_purchasable) { product_not_purchasable.innerHTML = 'Kombinasjonen du har valgt er ikke på lager'; } else { $s('notifications').showNotification('error', 'javascript', js_error_product_not_in_stock) } return false; } } else if (empty(selected_stock)) { if (empty(allow_purchase[0])) { has_error = 1; if (product_not_purchasable) { product_not_purchasable.innerHTML = js_error_product_not_in_stock; } else { $s('notifications').showNotification('error', 'javascript', js_error_product_not_in_stock) } return false; } } if (has_error) { return false; } return true; } function prepare_package() { var hasAttribute = false; var hasValues = false; var package_buttons = document.querySelectorAll('.package_button'); var products_price = document.querySelector('.products_price'); if (typeof package_special_price !== 'undefined') { var price = (package_special_price * 1); } else { var price = (baseprice * 1); } if (typeof package_special_price !== 'undefined' && package_special_price == '0') { price = baseprice; } // Cast to integer price = parseInt(price); package_buttons.forEach(function(package_button) { hasAttribute = false; hasValues = true; //$('.container[data-id=' + $(this).attr('data-id') + '] .attribute_element select').each(function() { // price += parseInt(($(this).find('option:selected').attr('data-price') * 1)); // hasAttribute = true; // if (empty($(this).val())) { // hasValues = false; // } //}); products_price.innerHTML = display_price(price); //if ((hasAttribute && hasValues) || !hasAttribute) { // $(this).removeClass('package_button_checked').addClass('package_button_checked');; //} else { // $(this).removeClass('package_button_checked'); // } }); } /* * * Helper functions * */ function natcmp_ignore_case(s1, s2) { return natcmp(s1.toLowerCase(), s2.toLowerCase()); } function buy_product() { if (verify_purchase() != false) { document.add2cart.submit(); } } function natcmp(s1, s2) { var n = /^(\d+)(.*)$/; while (true) { if (s1 == s2) { return 0; } if (s1 == '') { return -1; } if (s2 == '') { return 1; } var n1 = n.exec(s1); var n2 = n.exec(s2); if ((n1 != null) && (n2 != null)) { if (n1[1] != n2[1]) { return n1[1] - n2[1]; } s1 = n1[2]; s2 = n2[2]; } else { n1 = s1.charCodeAt(0); n2 = s2.charCodeAt(0); if (n1 != n2) { return n1 - n2; } s1 = s1.substr(1); s2 = s2.substr(1); } } } // Verifies that we have attributes function verify_attributes() { counter = 0; document.querySelectorAll(".attrbutedropdown").forEach(function(index, val) { counter++; }); if (counter > 0) { has_attributes = true; loop_dropdowns(); } else { has_attributes = false; in_stock = stock_list[0]; } } function str_replace(search, replace, subject) { var result = ""; var oldi = 0; for (i = subject.indexOf(search); i > -1; i = subject.indexOf(search, i)) { result += subject.substring(oldi, i); result += replace; i += search.length; oldi = i; } return result + subject.substring(oldi, subject.length); } // move this to global scope // once all globally scoped js variables // are available for all templates function display_price(number) { var decimals = decimal_places; var dec_point = decimal_point; var thousands_sep = thousands_point; var front_point = symbol_left; var end_point = symbol_right; if (dont_show_decimals == 1) { decimals = 0; } number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); var n = !isFinite(+number) ? 0 : +number, prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, dec = (typeof dec_point === 'undefined') ? '.' : dec_point, s = '', toFixedFix = function(n, prec) { var k = Math.pow(10, prec); return '' + Math.round(n * k) / k; }; // Fix for IE parseFloat(0.55).toFixed(0) = 0; s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d3)+(?!\d))/g, sep); } if ((s[1] || '').length < prec) { s[1] = s[1] || ''; s[1] += new Array(prec - s[1].length + 1).join('0'); } return front_point + s.join(dec) + end_point; } function isset(variable) { return typeof(variable) != "undefined" && variable !== null; } function empty(mixed_var) { var key; if (mixed_var === "" || mixed_var === 0 || mixed_var === "0" || mixed_var === null || mixed_var === false || typeof mixed_var === 'undefined') { return true; } if (typeof mixed_var == 'object') { for (key in mixed_var) { return false; } return true; } return false; } async function getmodelCheck() { var stockattributes = ""; var products_id = document.querySelector('input[name="products_id"]').value; var qty; var i = 0; var error = '0'; const attrbutedropdowns = document.querySelectorAll('.attrbutedropdown'); qty = 1; attrbutedropdowns.forEach(function(dd) { if (dd.value == "" || dd.value == 0) { // not all attributes selected error = '1'; } else { if (i > 0) stockattributes += ","; stockattributes += dd.id + "-" + dd.value; i = 1; } }); if (error == '0') { // Consider having some loading state const model = await $s('product').getProductModel(products_id, stockattributes); // Consider having multiple product modules if (model) { const model_container = document.querySelector(".product_model > span"); if (model_container) { model_container.innerHTML = model; } } } } function switchAttributeImage(select) { if (typeof attributes_images === 'object' && Object.keys(attributes_images).length > 0) { attr_dd_combo = select.getAttribute('option_id') + '-' + select.value; // If an attribute exists for this combo, we switch image imagePath = attributes_images[attr_dd_combo]; if (typeof imagePath === 'string') { var imageName = imagePath.split('/').pop(); switch_attributes_image(imageName); } if (typeof imagePath === 'undefined') { reset_attribute_image(); } } } function switch_attributes_image(image_url) { change_cart_image(image_url); $s('events').dispatch('switch_attributes_image', { image_url }); } function change_cart_image(image_url) { // Update or set the hidden input that is posted with the form when adding product to cart if (document.querySelector('#add2cart .cart_image')) { document.querySelector('#add2cart .cart_image').value = image_url; } else { var cart_image_input = document.createElement('input'); cart_image_input.type = 'hidden'; cart_image_input.name = 'cart_image'; cart_image_input.classList.add('cart_image'); cart_image_input.value = image_url; document.querySelector('#add2cart').prepend(cart_image_input); } } function get_attribute_image_by_key(key) { return attributes_images[key]; } function reset_attribute_image() { document.querySelector('#add2cart .cart_image')?.remove(); }
Din varukorg är tom!
Summa:
Prenumerera Nyhetsbrev:
Meld deg på nyhetsbrevet vårt og vær oppdatert med alle nyhetene våre først
Välj Valuta
Välj Språk
/
Om du är osäker, välj inklusive moms