1/** 2 * 2020-2022 3 * 4 * NOTICE OF LICENSE 5 * 6 * This file is not open source! Each license that you purchased is only available for 1 wesite only. 7 * If you want to use this file on more websites (or projects), you need to purchase additional licenses. 8 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party. 9 * 10 * DISCLAIMER 11 * 12 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 13 * versions in the future. If you wish to customize PrestaShop for your 14 * needs please contact us for extra customization service at an affordable price 15 * 16 * @author Digincube <[email protected]> 17 * @copyright 2021-2022 Digincube 18 * @license Valid for 1 website (or project) for each purchase of license 19 */ 20 21 22var md_bl_parent_li = typeof md_blockcart_line_sel !== 'undefined' && md_blockcart_line_sel.length ? md_blockcart_line_sel : '#modal-cart-preview #cart-product-list .cart-product-line'; 23 24(function ($) { 25 26 addBlockCartIcon(); 27 $( document ).ajaxComplete(function( event, xhr, settings ) { 28 addBlockCartIcon(); 29 setTimeout(function() { 30 addBlockCartIcon(); 31 }, 100); 32 setTimeout(function() { 33 addBlockCartIcon(); 34 }, 1000); 35 setTimeout(function() { 36 addBlockCartIcon(); 37 }, 4000); 38 }); 39 40})(jQuery); 41 42function addBlockCartIcon(){ 43 if($(md_bl_parent_li).length){ 44 $(md_bl_parent_li).each(function(index,elem){ 45 if($(elem).find('.mdgiftproduct_hash').length || $(elem).find('[name="productgift_hash"]').length){ 46 let pl_info = $(elem).find("*:contains(mdgiftproduct_hash)").filter(function() { return $(this).children().length === 0;}).parent(); 47 let md_remove_from_cart = $(elem).find('a[href*="delete=1"]'), 48 md_qty_selector = $(elem).find('[data-update-url]'); 49 50 if(md_remove_from_cart.length && md_remove_from_cart.attr('href').indexOf('productgift_hash') < 0){ 51 var currentHashArr = $(elem).find('[name="productgift_hash"]').val(), 52 url = new URL(md_remove_from_cart.attr('href')); 53 url.searchParams.append('productgift_hash', currentHashArr.trim()); 54 md_remove_from_cart.attr('href', url.href); 55 } 56 if(pl_info.length){ 57 pl_info.hide(); 58 } 59 if(md_qty_selector.length){ 60 if(!$(elem).find('.mdblockcart-gift').length){ 61 md_qty_selector.parent().addClass('mdblockcart-gift'); 62 } 63 md_qty_selector.remove(); 64 md_qty_selector.siblings().remove(); 65 $(elem).find('.input-group-btn-vertical').remove(); 66 } 67 } 68 }); 69 } 70}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.