Salamander 270g 700x1000 R schwarz | Inapa Deutschland GmbH (2024)

'; if(opt.required == 0) { html += '

'; } var data = option[i].product_option_value; $.each(data, function(i, opt2){ if(i == 0 && opt.required != 0){ html+='

'; }else{ html+='

'; } }); }); $('.'+parent_class+'_info .productValueOptions').html(html); } $('.'+parent_class+'_info .productValueOptions').html(html); } }); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }});function addToCart(){ var json = []; //serialize of the form var jsonArr = []; $(".bulk-table tbody tr").each(function(){ if($(this).find("[name=model]").val() != "" && typeof $(this).find("[name=model]").val() !== "undefined"){ optionfield = $(this).attr('class'); jsonArr.push({ 'product_id':$(this).find("[name=product_id]").val(), 'qty' : convertCommaToDot($(this).find("[name=quick_order_qty]").val(), 'cd'), 'option' : $('.'+optionfield+'_info .productValueOptions [type=radio]:checked').val(), 'option_id' : $('.'+optionfield+'_info .productValueOptions [type=radio]:checked').attr('option_id') }); } }); //no items on cart if(jsonArr.length > 0){ //verificar quantidades primeiro $.ajax({ url: 'index.php?route=checkout/cart/addBuckle', type: 'post', data: {'data':jsonArr}, dataType: 'json', beforeSend: function(){ $('button.add_bundle').attr('disabled',true); $('.modal-footer').append(''); }, complete: function(){ $('button.add_bundle').attr('disabled',false); $('.modal-footer .fa-spinner ').remove(); }, success: function (json) { if(json.status="1"){ $("#bundleOrder .modal-footer").html(""); $("#bundleOrder .modal-body").html("

Artikel wurden dem Warenkorb erfolgreich hinzugefügt.
Bitte gehen Sie zur Kasse um die Bestellung abzuschließen.

"); setTimeout(function(){ window.location = "https://shop.inapa.de/index.php?route=checkout/cart"; }, 2000); }else{ $("#bundleOrder .modal-footer .returning_errors").html("Your order contain errors."); $('#bundleOrder input[name=model]').each(function(){ if($(this).val() != "" && $(this).val().length>0) { //error handling check availability && model setTimeout(function(){ fethProductByModel($(this)); },500); } }); } } }); }}jQuery(document).ready(function(){ $('.quick_order_btn').on('click', function(){ $('.tooltip ').remove(); }); $('#quick-order div input[name=\'model\']').donetyping(function () { $('.product_results').remove(); $('.tooltip ').remove(); $.ajax({ url: 'index.php?route=product/product/getProductByModel&model=' + $('#quick-order div input[name=\'model\']').val(), data: {}, type: 'get', dataType: 'json', success: function (json) { if (json && json.hasOwnProperty('product_id')) { $('#quick-order div input[name=\'product_id\']').val(json['product_id']); $('#quick-order div input[name=\'minimum\']').val(parseFloat(json['minimum'])); $('#quick-order div input[name=\'step_quantity\']').val(parseFloat(json['step_quantity'])); $('#quick-order div input[name=\'quick_order_qty\']').val(convertCommaToDot(parseFloat(json['minimum']), 'dc')); $('#quick-order div input[name=\'format\']').val(json['format']); $('#quick-order div input[name=\'grammage\']').val(json['grammage']); $('#quick-order div input[name=\'name\']').val(json['name']); $('#quick-order div #unit').html(json['unit']); $('#option_quantity').val($('input[name=minimum]').val()); $('#add_quick_cart').attr('data-product_model', '' + $('#quick-order div input[name=\'model\']').val() + ''); $('#add_quick_cart').attr('data-product_name', '' + json['name'] + ''); if(!json['price']) { $('#quick-order .quick_order_btn').after(''); } else { $('#quick-order .quick_order_btn').after(''); } setTimeout(function () { $('.product_results').trigger('mouseover'); }, 500); if(json['is_available'] === 0 || json['price'] === 0) { $('#add_quick_cart').attr('disabled', true); } else { $('#add_quick_cart').attr('disabled', false); } } else { $('#quick-order div #unit').html(''); $('#div-quick-order-warning').html(''); $('#quick-order div input[name=\'product_id\']').val(''); $('#quick-order div input[name=\'minimum\']').val(''); $('#quick-order div input[name=\'step_quantity\']').val(''); $('#quick-order div input[name=\'quick_order_qty\']').val(''); $('#quick-order div input[name=\'format\']').val(''); $('#quick-order div input[name=\'grammage\']').val(''); $('#quick-order div input[name=\'name\']').val(''); $('#option_quantity').val(''); if ($('#quick-order div input[name=\'model\']').val().length > 0) { $('#option_quantity').val(''); $('#quick-order .quick_order_btn').after(''); $('.tooltip ').remove(); } else { $('#option_quantity').val(''); $('.product_results').remove(); } } // product options $.ajax({ url: 'index.php?route=product/product/getProductOptions&product_id=' + $('input[name=product_id]').val(), data: {}, type: 'get', dataType: 'json', success: function (option) { $('#quicksearch_product_options #product_options2 #modal_values').html(''); if (option.length == 1) { var product_name = $('#quick-order div input[name=\'name\']').val(); var product_model = $('#quick-order div input[name=\'model\']').val(); $('#quicksearch_product_options').append('

Optionen

' + product_model + ' - ' + product_name + '

'); $.each(option, function (i, opt) { $('#quicksearch_product_options #product_options2 #modal_values').append('

'); if (opt.required == 0) { $('#quicksearch_product_options #product_options2 .options_values_modal').append('

'); } var data = option[i].product_option_value; $.each(data, function (i, opt2) { var prices = ''; if (opt2.final_price.length > 0) { var prices = '

' + opt2.final_price + '(' + opt2.optionTonPrice + '/' + opt2.text_tonne + ')

'; } $('#quicksearch_product_options #product_options2 .options_values_modal').append('

'); }); $('#quicksearch_product_options #product_options2 #modal_values').append('

'); }); $('#quicksearch_product_options #modal_values').after('

'); $('#quicksearch_product_options #option_product_id').val($('input[name=product_id]').val()); $('#quicksearch_product_options #option_quantity').val($('input[name=quick_order_qty]').val()); } } }); // product options }, error: function (xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); // Clean the previous modal before populate again $('#quicksearch_product_options').html(''); });});$('#quick-order div button[name=\'add-to-cart\']').on('click', function() { $('.tooltip').remove(); var product_id = $('#quick-order div input[name="product_id"]').val(); var minimum = parseFloat($('#quick-order div input[name=\'minimum\']').val()); var step = parseFloat($('#quick-order div input[name=\'step_quantity\']').val()); var quantity = convertCommaToDot($('#quick-order div input[name=\'quick_order_qty\']').val(), 'cd'); var product_model = $(this).attr('data-product_model'); var product_name = $(this).attr('data-product_name'); var fmod = (quantity*1000) % (step*1000); $('#productAlternativeQuickSearch .modal-title').html(product_name+' - '+product_model); $('#productAlternativeQuickSearch input[name="product_id_ws"]').val(product_id); var width = $(window).width(); var selector = $(this).parents('body').find('#quicksearch_product_options #product_options2'); if (selector.length) { $('#quicksearch_product_options #product_options2').modal('show'); } else { // validate if product_id and quantity are both filled in if(!product_id || !quantity) { $('#content').parent().before('

' + "Artikelnummer und Menge sind Pflicht." + '

'); setTimeout(function () { $('.close').trigger("click") }, 3500); setTimeout(function () { $('.alert').remove() }, 4500); } else // validate minimum quantity and multiple increment quantity if(quantity < minimum || fmod != 0 ) { $('#content').parent().before('

' + "Minimum" + minimum + ' ' + "Schrittmenge" + step + '

'); setTimeout(function () { $('.close').trigger("click") }, 3500); setTimeout(function () { $('.alert').remove() }, 4500); } else { // add product to cart $.ajax({ url : 'index.php?route=checkout/cart/add', type : 'post', data : 'product_id='+product_id+'&quantity='+quantity+'&recommendation_id='+getUrlVariable('recommendation_id'), dataType : 'json', beforeSend : function(){ $('#add_quick_cart').html(''); $('.alert').remove(); }, complete: function(){ $('#add_quick_cart').html(''); }, success: function (json) { if(json['external_url']) { window.open(json['external_url'], '_blank'); } else { clearTimeout(timer); $('.alert, .text-danger').remove(); $('.form-group').removeClass('has-error'); $('#quick-order #div-quick-order-details').slideUp(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { var element = $('#input-option' + i.replace('_', '-')); if (element.parent().hasClass('input-group')) { $('#product_options2').modal('show'); } else { $('#product_options2').modal('show'); } } } window.location = json['redirect']; if (json['error']['recurring']) { $('#content').parent().before('

' + json['error']['recurring'] + '

'); } $('.text-danger').parent().addClass('has-error'); } if (json['success']) { $('#content').parent().before('

' + json['success'] + '
'+json['text_subtotal']+'

'+json['btn_cart']+' '+json['btn_checkout']+'

'); $('p.alert_subtotal').html(json['text_subtotal']); $('#quick-order div input[name=\'model\']').val(''); $('#quick-order .product_results').remove(); $('#quick-order div #unit').html(''); $('#quick-order div input[name=\'product_id\']').val(''); $('#quick-order div input[name=\'minimum\']').val(''); $('#quick-order div input[name=\'step_quantity\']').val(''); $('#quick-order div input[name=\'quick_order_qty\']').val(''); $('#quick-order div input[name=\'format\']').val(''); $('#quick-order div input[name=\'grammage\']').val(''); $('#quick-order div input[name=\'name\']').val(''); $('.box-cart button.cart_button').addClass('with-products'); $('div.shopping_cart_quantity').html(json['total_quantity']).show(); $('#cart-total').html(json['total']); $('#cart-total2').html(json['total2']); } timer = setTimeout(function () { $('.alert').addClass('fadeOut'); if (json['redirect'] && json['error'] == undefined ) { location = json['redirect']; } }, 6000); } } }); // calculate totals setTimeout(function() { getTotals() }, 200 ); // calculate totals } }});$('#qty_add_qo').on('click', function() { var minimum = parseFloat($('#quick-order div input[name=\'minimum\']').val()); var step = parseFloat($('#quick-order div input[name=\'step_quantity\']').val()); var qty = convertCommaToDot($('#quick-order div input[name=\'quick_order_qty\']').val(), 'cd'); var roundUp = parseFloat(round_up((qty - minimum), step)); if(isNaN(minimum)) { return false; } if(isNaN(qty) || qty <= 0) { $('#quick-order div input[name=\'quick_order_qty\']').val(minimum); } else if ((parseFloat((qty - minimum).toFixed(2)) % step) > 0 || (qty < minimum)) { $('#quick-order div input[name=\'quick_order_qty\']').val(convertCommaToDot(parseFloat((roundUp + step + minimum).toFixed(5)), 'dc')); } else { $('#quick-order div input[name=\'quick_order_qty\']').val(convertCommaToDot(parseFloat((roundUp + minimum + step).toFixed(5)), 'dc')); } setTimeout(function () { $('#option_quantity').val($('#quick-order div input[name=\'quick_order_qty\']').val())}, 200);}); $('#qty_subtract_qo').on('click', function() { var minimum = parseFloat($('#quick-order div input[name=\'minimum\']').val()); var step = parseFloat($('#quick-order div input[name=\'step_quantity\']').val()); var qty = convertCommaToDot($('#quick-order div input[name=\'quick_order_qty\']').val(), 'cd'); var roundUp = parseFloat(round_up((qty - minimum), step)); if(isNaN(minimum)) { return false; } if (isNaN(qty) || qty <= 0 || qty <= minimum) { $('#quick-order div input[name=\'quick_order_qty\']').val(convertCommaToDot(minimum, 'dc')); } else { $('#quick-order div input[name=\'quick_order_qty\']').val(convertCommaToDot(parseFloat((qty - step).toFixed(5)), 'dc')); } setTimeout(function () { $('#option_quantity').val($('#quick-order div input[name=\'quick_order_qty\']').val())}, 200);}); round_up = function(x,factor){ return x - (x%factor) + (x%factor>0 && factor);}// Function to open modal when the add to cart button is pressedfunction openAvailabilityModalQuickSearch(product_id, quantity){ setTimeout(function(){ $('#productAlternativeQuickSearch').modal('show')}, 100); $('#productAlternativeQuickSearchQuickSearch .product_ws tbody').html(''); $('#productAlternativeQuickSearch .next_arrivals tbody').html(''); $('#productAlternativeQuickSearch .next_arrivals_cart tbody').html(); $.ajax({ url: 'index.php?route=common/modal/getDelivery&quantity='+quantity+'&product_id='+product_id+'', type: 'POST', dataType: 'json', success: function (json) { $('#productAlternativeQuickSearch .modal-title'); $('#productAlternativeQuickSearch .loading_arrivals').remove(); var data = json.oCheckAvailability.Product.Warehouse; if(data[0] == null){ $('#productAlternativeQuickSearch .next_arrivals_cart tbody').append("

Es gibt keine voraussichtlichen Wareneingänge für dieses Produkt.

"); } else { $.each(data, function(i, elem){ $('#productAlternativeQuickSearch .product_ws tbody').append('

'+elem.Name+''+round(elem.Stock,2)+''+round(elem.QtToSend,2)+''+elem.Expedition+'h

'); if(elem.Arrival){ $('#productAlternativeQuickSearch .next_arrivals_table').fadeIn(); var data2 = data[i].Arrival; if(!$.isArray(data2)) data2 = [data2]; $.each(data2, function(idx, date){ $('#productAlternativeQuickSearch .next_arrivals tbody').append('

'+toMmDdYy(date.ArrivalDate)+''+round(date.Qt,2)+'

'); }); } }); } }, error: function(){ alert('Error occurred during the process'); } }); // Get related products by ajax $.ajax({ url: 'index.php?route=product/category/getRelatedProducts&product_id='+product_id+'', type: 'POST', dataType: 'json', success: function (json) { if(json.length == 0){ $('#productAlternativeQuickSearch .related_products_list .no_related').fadeIn(); } else { $('#productAlternativeQuickSearch .related_products_list .no_related').fadeOut(); $.each(json, function(i, elem){ var alternativeList = getAlternativeListHtml('

  • '+json[i].model+'-'+json[i].name+'

    ', elem, '

  • ' ); $('#productAlternativeQuickSearch .related_products_list').append(alternativeList); }); } } });}// send an email to the inapa seller$('#send_email_outofstock_quick_search').on('click', function() { var stock_available = Array(); $("#productAlternativeQuickSearch #product_ws tbody tr .warehouse,#product_ws tbody tr .stock_available ").each(function(i, v){ stock_available[i] = $(this).text(); }) var input_value = $('#productAlternativeQuickSearch .requested_quantity strong').text(); var warehouse = $('#productAlternativeQuickSearch .warehouse').text(); var stock = stock_available; var arrival_date = $('#productAlternativeQuickSearch #next_arrivals tbody').find("td:first").text(); var product_id = $('#productAlternativeQuickSearch input[name="product_id_ws"]').val(); var sell_unit = $('span#unit').text(); $('#productAlternativeQuickSearch .loading_email').fadeIn(); dataString = 'product_id='+product_id+'&desired_quantity='+input_value+'&stock='+stock+'&arrival_date='+arrival_date+'&sell_unit='+sell_unit+''; var url_go = 'index.php?route=common/modal/sendEmail'; // Do the ajax request to prepare data to be sent by email $.ajax({ url: url_go, type: 'POST', data: dataString, crossDomain: true, success: function () { $('#productAlternativeQuickSearch .loading_email').fadeOut(); $('#productAlternativeQuickSearch .alert-success-modal').fadeIn().delay(2000).fadeOut(); setTimeout(function(){ $('#productAlternativeQuickSearch').modal('hide') }, 3000); }, error: function(){ alert('error'); } }); }); // Update quantity field$('#quick-order div input[name=\'quick_order_qty\']').focusout(function() { $( "#option_quantity" ).val( $(this).val());});

    Salamander 270g 700x1000 R schwarz | Inapa Deutschland GmbH (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Allyn Kozey

    Last Updated:

    Views: 6373

    Rating: 4.2 / 5 (43 voted)

    Reviews: 90% of readers found this page helpful

    Author information

    Name: Allyn Kozey

    Birthday: 1993-12-21

    Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

    Phone: +2456904400762

    Job: Investor Administrator

    Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

    Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.