bugfix in cart
							parent
							
								
									284397ca1f
								
							
						
					
					
						commit
						3d42690169
					
				| 
						 | 
					@ -1,29 +1,32 @@
 | 
				
			||||||
$(window).on('load', function(){
 | 
					$(window).on('load', function () {
 | 
				
			||||||
    if(localStorage.getItem("dismiss-message") == 1) $('.alert-dismissible').remove();
 | 
					    $.ajaxSetup({
 | 
				
			||||||
 | 
					        headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    if (localStorage.getItem("dismiss-message") == 1) $('.alert-dismissible').remove();
 | 
				
			||||||
    else $('.alert-dismissible').show();
 | 
					    else $('.alert-dismissible').show();
 | 
				
			||||||
    $('#btn-close-message').click(function(){ localStorage.setItem("dismiss-message", 1); });
 | 
					    $('#btn-close-message').click(function () { localStorage.setItem("dismiss-message", 1); });
 | 
				
			||||||
    if(localStorage.getItem("products") != null) objProducts = JSON.parse(localStorage.getItem("products"));
 | 
					    if (localStorage.getItem("products") != null) objProducts = JSON.parse(localStorage.getItem("products"));
 | 
				
			||||||
    updateProductsInLocalStorage();
 | 
					    updateProductsInLocalStorage();
 | 
				
			||||||
    if(hasCartCode()){
 | 
					    if (hasCartCode()) {
 | 
				
			||||||
        let productLink = getCartCode();
 | 
					        let productLink = getCartCode();
 | 
				
			||||||
        if(objProducts.length > 0) $('#modal-confirm-product-replacement').modal('show');
 | 
					        if (objProducts.length > 0) $('#modal-confirm-product-replacement').modal('show');
 | 
				
			||||||
        else $('#modal-confirm-addition-of-products').modal('show');
 | 
					        else $('#modal-confirm-addition-of-products').modal('show');
 | 
				
			||||||
        $('.btn-confirm-product-link').click(function(){
 | 
					        $('.btn-confirm-product-link').click(function () {
 | 
				
			||||||
            objProducts = JSON.parse(productLink);
 | 
					            objProducts = JSON.parse(productLink);
 | 
				
			||||||
            updateProductsInLocalStorage();
 | 
					            updateProductsInLocalStorage();
 | 
				
			||||||
            window.location.replace($('meta[name="checkout"]').attr('content'));
 | 
					            window.location.replace($('meta[name="checkout"]').attr('content'));
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    $(document).on('click', '.btn-remove-product', function(){
 | 
					    $(document).on('click', '.btn-remove-product', function () {
 | 
				
			||||||
        let productId = $(this).attr('data-id');
 | 
					        let productId = $(this).attr('data-id');
 | 
				
			||||||
        let objProductInfo = objProducts.find(obj => obj.id == productId);
 | 
					        let objProductInfo = objProducts.find(obj => obj.id == productId);
 | 
				
			||||||
        let index = objProducts.indexOf(objProductInfo);
 | 
					        let index = objProducts.indexOf(objProductInfo);
 | 
				
			||||||
        if(index != -1) objProducts.splice(index, 1);
 | 
					        if (index != -1) objProducts.splice(index, 1);
 | 
				
			||||||
        localStorage.setItem("products", JSON.stringify(objProducts));
 | 
					        localStorage.setItem("products", JSON.stringify(objProducts));
 | 
				
			||||||
        $(this).parent().parent().remove();
 | 
					        $(this).parent().parent().remove();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $('#count-products-in-bag').text(getQuantityOfProducts());
 | 
					        $('#count-products-in-bag').text(getQuantityOfProducts());
 | 
				
			||||||
        if(objProducts.length > 0){
 | 
					        if (objProducts.length > 0) {
 | 
				
			||||||
            $('.cart-link').show();
 | 
					            $('.cart-link').show();
 | 
				
			||||||
            $(".btn-share").show();
 | 
					            $(".btn-share").show();
 | 
				
			||||||
            $('#count-products-in-bag').show();
 | 
					            $('#count-products-in-bag').show();
 | 
				
			||||||
| 
						 | 
					@ -31,7 +34,7 @@ $(window).on('load', function(){
 | 
				
			||||||
            $('#total-price').parent().parent().parent().show();
 | 
					            $('#total-price').parent().parent().parent().show();
 | 
				
			||||||
            $('#no-products').hide();
 | 
					            $('#no-products').hide();
 | 
				
			||||||
            $('#modal-buttons').show();
 | 
					            $('#modal-buttons').show();
 | 
				
			||||||
        }else{
 | 
					        } else {
 | 
				
			||||||
            $('.cart-link').hide();
 | 
					            $('.cart-link').hide();
 | 
				
			||||||
            $(".btn-share").hide();
 | 
					            $(".btn-share").hide();
 | 
				
			||||||
            $('#count-products-in-bag').hide();
 | 
					            $('#count-products-in-bag').hide();
 | 
				
			||||||
| 
						 | 
					@ -41,35 +44,35 @@ $(window).on('load', function(){
 | 
				
			||||||
            $('#modal-buttons').hide();
 | 
					            $('#modal-buttons').hide();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        getInfoFromSelectedProduct().done(function(response, status){
 | 
					        getInfoFromSelectedProduct().done(function (response, status) {
 | 
				
			||||||
            totalPrice = 0;
 | 
					            totalPrice = 0;
 | 
				
			||||||
            if(response.contents != undefined) response.contents.forEach(function(product){
 | 
					            if (response.contents != undefined) response.contents.forEach(function (product) {
 | 
				
			||||||
                let objProduct = getProductInfo(product);
 | 
					                let objProduct = getProductInfo(product);
 | 
				
			||||||
                totalPrice += objProduct.preis*objProduct.quantity;
 | 
					                totalPrice += objProduct.preis * objProduct.quantity;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            $('#total-price').text(numberToEuroFormat(totalPrice));
 | 
					            $('#total-price').text(numberToEuroFormat(totalPrice));
 | 
				
			||||||
            if(typeof updateProducts === "function") $('#total-checkout-price').text(numberToEuroFormat(totalPrice));
 | 
					            if (typeof updateProducts === "function") $('#total-checkout-price').text(numberToEuroFormat(totalPrice));
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        productId = $('meta[name="product-id"]').attr('content');
 | 
					        productId = $('meta[name="product-id"]').attr('content');
 | 
				
			||||||
        if(productId != undefined){
 | 
					        if (productId != undefined) {
 | 
				
			||||||
            let objProduct = objProducts.find(obj => obj.id == productId);
 | 
					            let objProduct = objProducts.find(obj => obj.id == productId);
 | 
				
			||||||
            if(objProduct == undefined) {
 | 
					            if (objProduct == undefined) {
 | 
				
			||||||
                $('#btn-add-to-bag').show();
 | 
					                $('#btn-add-to-bag').show();
 | 
				
			||||||
                $('#btn-show-bag').hide();
 | 
					                $('#btn-show-bag').hide();
 | 
				
			||||||
                if(objProducts.length > 0) $('#btn-check-out').parent().hide();
 | 
					                if (objProducts.length > 0) $('#btn-check-out').parent().hide();
 | 
				
			||||||
                else $('#btn-check-out').parent().show();
 | 
					                else $('#btn-check-out').parent().show();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                $('#btn-add-to-bag').hide();
 | 
					                $('#btn-add-to-bag').hide();
 | 
				
			||||||
                $('#btn-show-bag').show();
 | 
					                $('#btn-show-bag').show();
 | 
				
			||||||
                $('#btn-check-out').parent().hide();
 | 
					                $('#btn-check-out').parent().hide();
 | 
				
			||||||
                $('#count-items-in-bag').html(objProduct.quantity+`<svg style="fill: white; width: 12px; margin-left: 3px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 128C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128H0v304c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V128h-96zM224 48c44.112 0 80 35.888 80 80H144c0-44.112 35.888-80 80-80zm176 384c0 17.645-14.355 32-32 32H80c-17.645 0-32-14.355-32-32V176h48v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h160v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h48v256z"/></svg>`);
 | 
					                $('#count-items-in-bag').html(objProduct.quantity + `<svg style="fill: white; width: 12px; margin-left: 3px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 128C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128H0v304c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V128h-96zM224 48c44.112 0 80 35.888 80 80H144c0-44.112 35.888-80 80-80zm176 384c0 17.645-14.355 32-32 32H80c-17.645 0-32-14.355-32-32V176h48v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h160v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h48v256z"/></svg>`);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    $(document).on('input', '.select-quantity', function(){
 | 
					    $(document).on('input', '.select-quantity', function () {
 | 
				
			||||||
        let quantity = $(this).val();
 | 
					        let quantity = $(this).val();
 | 
				
			||||||
        let productId = $(this).attr('data-id');
 | 
					        let productId = $(this).attr('data-id');
 | 
				
			||||||
        let objProductInfo = objProducts.find(obj => obj.id == productId);
 | 
					        let objProductInfo = objProducts.find(obj => obj.id == productId);
 | 
				
			||||||
| 
						 | 
					@ -77,56 +80,56 @@ $(window).on('load', function(){
 | 
				
			||||||
        objProducts[index].quantity = quantity;
 | 
					        objProducts[index].quantity = quantity;
 | 
				
			||||||
        localStorage.setItem("products", JSON.stringify(objProducts));
 | 
					        localStorage.setItem("products", JSON.stringify(objProducts));
 | 
				
			||||||
        let productPrice = $(this).parent().parent().find('.product-price');
 | 
					        let productPrice = $(this).parent().parent().find('.product-price');
 | 
				
			||||||
        $.get($('meta[name="get-contents"]').attr('content')+"/"+objProductInfo.id).done(function(response, status){
 | 
					        $.get($('meta[name="get-contents"]').attr('content') + "/" + objProductInfo.id).done(function (response, status) {
 | 
				
			||||||
            let product = response.contents[0];
 | 
					            let product = response.contents[0];
 | 
				
			||||||
            let objProduct = getProductInfo(product);
 | 
					            let objProduct = getProductInfo(product);
 | 
				
			||||||
            objProduct = calculatePrice(objProduct);
 | 
					            objProduct = calculatePrice(objProduct);
 | 
				
			||||||
            let elementPrice = `
 | 
					            let elementPrice = `
 | 
				
			||||||
            <span>${numberToEuroFormat(objProduct.calc_preis)}</span>`;
 | 
					            <span>${numberToEuroFormat(objProduct.calc_preis)}</span>`;
 | 
				
			||||||
            if(objProduct.calc_preis != objProduct.preis) elementPrice += `
 | 
					            if (objProduct.calc_preis != objProduct.preis) elementPrice += `
 | 
				
			||||||
            <br>
 | 
					            <br>
 | 
				
			||||||
            <button style="font-size: 14px; padding: 0;" class="btn btn-link text-muted text-decoration-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseWidthExample" aria-expanded="false" aria-controls="collapseWidthExample">
 | 
					            <button style="font-size: 14px; padding: 0;" class="btn btn-link text-muted text-decoration-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseWidthExample" aria-expanded="false" aria-controls="collapseWidthExample">
 | 
				
			||||||
                <svg style="fill: currentColor; width: 15px; margin-right: 2px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M349.66 173.65l-11.31-11.31c-3.12-3.12-8.19-3.12-11.31 0l-164.7 164.69c-3.12 3.12-3.12 8.19 0 11.31l11.31 11.31c3.12 3.12 8.19 3.12 11.31 0l164.69-164.69c3.13-3.12 3.13-8.18.01-11.31zM240 192c0-26.47-21.53-48-48-48s-48 21.53-48 48 21.53 48 48 48 48-21.53 48-48zm-64 0c0-8.83 7.19-16 16-16s16 7.17 16 16-7.19 16-16 16-16-7.17-16-16zm144 80c-26.47 0-48 21.53-48 48s21.53 48 48 48 48-21.53 48-48-21.53-48-48-48zm0 64c-8.81 0-16-7.17-16-16s7.19-16 16-16 16 7.17 16 16-7.19 16-16 16zm192-80c0-35.5-19.4-68.2-49.6-85.5 9.1-33.6-.3-70.4-25.4-95.5s-61.9-34.5-95.5-25.4C324.2 19.4 291.5 0 256 0s-68.2 19.4-85.5 49.6c-33.6-9.1-70.4.3-95.5 25.4s-34.5 61.9-25.4 95.5C19.4 187.8 0 220.5 0 256s19.4 68.2 49.6 85.5c-9.1 33.6.3 70.4 25.4 95.5 26.5 26.5 63.4 34.1 95.5 25.4 17.4 30.2 50 49.6 85.5 49.6s68.1-19.4 85.5-49.6c32.7 8.9 69.4.7 95.5-25.4 25.1-25.1 34.5-61.9 25.4-95.5 30.2-17.3 49.6-50 49.6-85.5zm-91.1 68.3c5.3 11.8 29.5 54.1-6.5 90.1-28.9 28.9-57.5 21.3-90.1 6.5C319.7 433 307 480 256 480c-52.1 0-64.7-49.5-68.3-59.1-32.6 14.8-61.3 22.2-90.1-6.5-36.8-36.7-10.9-80.5-6.5-90.1C79 319.7 32 307 32 256c0-52.1 49.5-64.7 59.1-68.3-5.3-11.8-29.5-54.1 6.5-90.1 36.8-36.9 80.8-10.7 90.1-6.5C192.3 79 205 32 256 32c52.1 0 64.7 49.5 68.3 59.1 11.8-5.3 54.1-29.5 90.1 6.5 36.8 36.7 10.9 80.5 6.5 90.1C433 192.3 480 205 480 256c0 52.1-49.5 64.7-59.1 68.3z"/></svg>
 | 
					                <svg style="fill: currentColor; width: 15px; margin-right: 2px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M349.66 173.65l-11.31-11.31c-3.12-3.12-8.19-3.12-11.31 0l-164.7 164.69c-3.12 3.12-3.12 8.19 0 11.31l11.31 11.31c3.12 3.12 8.19 3.12 11.31 0l164.69-164.69c3.13-3.12 3.13-8.18.01-11.31zM240 192c0-26.47-21.53-48-48-48s-48 21.53-48 48 21.53 48 48 48 48-21.53 48-48zm-64 0c0-8.83 7.19-16 16-16s16 7.17 16 16-7.19 16-16 16-16-7.17-16-16zm144 80c-26.47 0-48 21.53-48 48s21.53 48 48 48 48-21.53 48-48-21.53-48-48-48zm0 64c-8.81 0-16-7.17-16-16s7.19-16 16-16 16 7.17 16 16-7.19 16-16 16zm192-80c0-35.5-19.4-68.2-49.6-85.5 9.1-33.6-.3-70.4-25.4-95.5s-61.9-34.5-95.5-25.4C324.2 19.4 291.5 0 256 0s-68.2 19.4-85.5 49.6c-33.6-9.1-70.4.3-95.5 25.4s-34.5 61.9-25.4 95.5C19.4 187.8 0 220.5 0 256s19.4 68.2 49.6 85.5c-9.1 33.6.3 70.4 25.4 95.5 26.5 26.5 63.4 34.1 95.5 25.4 17.4 30.2 50 49.6 85.5 49.6s68.1-19.4 85.5-49.6c32.7 8.9 69.4.7 95.5-25.4 25.1-25.1 34.5-61.9 25.4-95.5 30.2-17.3 49.6-50 49.6-85.5zm-91.1 68.3c5.3 11.8 29.5 54.1-6.5 90.1-28.9 28.9-57.5 21.3-90.1 6.5C319.7 433 307 480 256 480c-52.1 0-64.7-49.5-68.3-59.1-32.6 14.8-61.3 22.2-90.1-6.5-36.8-36.7-10.9-80.5-6.5-90.1C79 319.7 32 307 32 256c0-52.1 49.5-64.7 59.1-68.3-5.3-11.8-29.5-54.1 6.5-90.1 36.8-36.9 80.8-10.7 90.1-6.5C192.3 79 205 32 256 32c52.1 0 64.7 49.5 68.3 59.1 11.8-5.3 54.1-29.5 90.1 6.5 36.8 36.7 10.9 80.5 6.5 90.1C433 192.3 480 205 480 256c0 52.1-49.5 64.7-59.1 68.3z"/></svg>
 | 
				
			||||||
                Mengenrabat
 | 
					                Mengenrabat
 | 
				
			||||||
            </button>
 | 
					            </button>
 | 
				
			||||||
            <span class="badge text-bg-dark">${(((objProduct.calc_preis-objProduct.preis)*100)/objProduct.preis).toFixed(2)} %</span>
 | 
					            <span class="badge text-bg-dark">${(((objProduct.calc_preis - objProduct.preis) * 100) / objProduct.preis).toFixed(2)} %</span>
 | 
				
			||||||
            `;
 | 
					            `;
 | 
				
			||||||
            productPrice.html(elementPrice);
 | 
					            productPrice.html(elementPrice);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        $('#count-products-in-bag').text(getQuantityOfProducts());
 | 
					        $('#count-products-in-bag').text(getQuantityOfProducts());
 | 
				
			||||||
        getInfoFromSelectedProduct().done(function(response, status){
 | 
					        getInfoFromSelectedProduct().done(function (response, status) {
 | 
				
			||||||
            totalPrice = 0;
 | 
					            totalPrice = 0;
 | 
				
			||||||
            response.contents.forEach(function(product){
 | 
					            response.contents.forEach(function (product) {
 | 
				
			||||||
                let objProduct = getProductInfo(product);
 | 
					                let objProduct = getProductInfo(product);
 | 
				
			||||||
                calculatePrice(objProduct);
 | 
					                calculatePrice(objProduct);
 | 
				
			||||||
                totalPrice += objProduct.calc_preis*objProduct.quantity;
 | 
					                totalPrice += objProduct.calc_preis * objProduct.quantity;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            $('#total-price').text(numberToEuroFormat(totalPrice));
 | 
					            $('#total-price').text(numberToEuroFormat(totalPrice));
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        productId = $('meta[name="product-id"]').attr('content');
 | 
					        productId = $('meta[name="product-id"]').attr('content');
 | 
				
			||||||
        if(productId != undefined){
 | 
					        if (productId != undefined) {
 | 
				
			||||||
            let objProduct = objProducts.find(obj => obj.id == productId);
 | 
					            let objProduct = objProducts.find(obj => obj.id == productId);
 | 
				
			||||||
            if(objProduct == undefined) {
 | 
					            if (objProduct == undefined) {
 | 
				
			||||||
                $('#btn-add-to-bag').show();
 | 
					                $('#btn-add-to-bag').show();
 | 
				
			||||||
                $('#btn-show-bag').hide();
 | 
					                $('#btn-show-bag').hide();
 | 
				
			||||||
                if(objProducts.length > 0) $('#btn-check-out').parent().hide();
 | 
					                if (objProducts.length > 0) $('#btn-check-out').parent().hide();
 | 
				
			||||||
                else $('#btn-check-out').parent().show();
 | 
					                else $('#btn-check-out').parent().show();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                $('#btn-add-to-bag').hide();
 | 
					                $('#btn-add-to-bag').hide();
 | 
				
			||||||
                $('#btn-show-bag').show();
 | 
					                $('#btn-show-bag').show();
 | 
				
			||||||
                $('#btn-check-out').parent().hide();
 | 
					                $('#btn-check-out').parent().hide();
 | 
				
			||||||
                $('#count-items-in-bag').html(objProduct.quantity+`<svg style="fill: white; width: 12px; margin-left: 3px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 128C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128H0v304c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V128h-96zM224 48c44.112 0 80 35.888 80 80H144c0-44.112 35.888-80 80-80zm176 384c0 17.645-14.355 32-32 32H80c-17.645 0-32-14.355-32-32V176h48v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h160v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h48v256z"/></svg>`);
 | 
					                $('#count-items-in-bag').html(objProduct.quantity + `<svg style="fill: white; width: 12px; margin-left: 3px; margin-bottom: 2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 128C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128H0v304c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V128h-96zM224 48c44.112 0 80 35.888 80 80H144c0-44.112 35.888-80 80-80zm176 384c0 17.645-14.355 32-32 32H80c-17.645 0-32-14.355-32-32V176h48v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h160v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h48v256z"/></svg>`);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    $('#btn-copy-cart-link').click(function(){
 | 
					    $('#btn-copy-cart-link').click(function () {
 | 
				
			||||||
        $('.cart-link').select();
 | 
					        $('.cart-link').select();
 | 
				
			||||||
        document.execCommand("copy");
 | 
					        document.execCommand("copy");
 | 
				
			||||||
        $(this).html(`<svg style="fill: green; width: 18px;"xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 32c8.823 0 16 7.178 16 16v352c0 8.822-7.177 16-16 16H48c-8.822 0-16-7.178-16-16V80c0-8.822 7.178-16 16-16h352m-34.301 98.293l-8.451-8.52c-4.667-4.705-12.265-4.736-16.97-.068l-163.441 162.13-68.976-69.533c-4.667-4.705-12.265-4.736-16.97-.068l-8.52 8.451c-4.705 4.667-4.736 12.265-.068 16.97l85.878 86.572c4.667 4.705 12.265 4.736 16.97.068l180.48-179.032c4.704-4.667 4.735-12.265.068-16.97z"/></svg>`);
 | 
					        $(this).html(`<svg style="fill: green; width: 18px;"xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 32c8.823 0 16 7.178 16 16v352c0 8.822-7.177 16-16 16H48c-8.822 0-16-7.178-16-16V80c0-8.822 7.178-16 16-16h352m-34.301 98.293l-8.451-8.52c-4.667-4.705-12.265-4.736-16.97-.068l-163.441 162.13-68.976-69.533c-4.667-4.705-12.265-4.736-16.97-.068l-8.52 8.451c-4.705 4.667-4.736 12.265-.068 16.97l85.878 86.572c4.667 4.705 12.265 4.736 16.97.068l180.48-179.032c4.704-4.667 4.735-12.265.068-16.97z"/></svg>`);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
    $(".btn-share").click(async function() {
 | 
					    $(".btn-share").click(async function () {
 | 
				
			||||||
        if(navigator.share) { try { await navigator.share(shareData); } catch(err) { console.warn(err); } }
 | 
					        if (navigator.share) { try { await navigator.share(shareData); } catch (err) { console.warn(err); } }
 | 
				
			||||||
        else { console.warn('Native Web Sharing not supported'); }
 | 
					        else { console.warn('Native Web Sharing not supported'); }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
<!doctype html>
 | 
					<!doctype html>
 | 
				
			||||||
<html lang="{{str_replace('_', '-', app()->getLocale())}}">
 | 
					<html lang="{{str_replace('_', '-', app()->getLocale())}}">
 | 
				
			||||||
<head>
 | 
					<head>
 | 
				
			||||||
 | 
					    <meta name="csrf-token" content="{{csrf_token()}}"/>
 | 
				
			||||||
    <meta name="checkout" content="{{url('/checkout')}}">
 | 
					    <meta name="checkout" content="{{url('/checkout')}}">
 | 
				
			||||||
    <meta name="get-contents" content="{{url('/api/contents')}}">
 | 
					    <meta name="get-contents" content="{{url('/api/contents')}}">
 | 
				
			||||||
    <link rel="icon" type="image/x-icon" href="{{storage('assets/images/favicon.ico')}}">
 | 
					    <link rel="icon" type="image/x-icon" href="{{storage('assets/images/favicon.ico')}}">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue