JEMBOT MAWOT Bypass Shell
/**
* 2007-2019 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2022 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
$(document).ready(function(){var t,i,a,e,n=(t=$("#form_step1_type_product"),{init:function(){t.prop("disabled",!1)}});displayFieldsManager=(i=$("#form_step1_type_product"),a=$("#show_variations_selector"),e=$("#combinations"),{init:function(){},initVisibilityRule:function(){var e=".js-show-price",n=".js-available-for-order",t=function(){var t=$(n+" input"),i=$(e+" input"),a=$(e);t.prop("checked")?(i.prop("checked",!0),a.addClass("hide")):a.removeClass("hide")};$(n+" .checkbox").on("click",t),t()},refresh:function(){this.checkAccessVariations(),$("#virtual_product").hide(),$('#form-nav a[href="#step3"]').text(translate_javascripts.Quantities),"1"===i.val()?($("#pack_stock_type, #js_form_step1_inputPackItems").show(),$('#form-nav a[href="#step4"]').show(),a.hide(),a.find('input[value="0"]').attr("checked",!0)):($("#virtual_product, #pack_stock_type, #js_form_step1_inputPackItems").hide(),$('#form-nav a[href="#step4"]').show(),"2"===i.val()?($("#form_step1_type_product").removeAttr("disabled"),a.show(),$("#virtual_product").show(),$('#form-nav a[href="#step4"]').hide(),"0"===a.find("input:checked").val()?$('#form-nav a[href="#step3"]').text(translate_javascripts["Virtual product"]):($('#form-nav a[href="#step3"]').text(translate_javascripts.Combinations),$("#virtual_product").hide())):(a.show(),$('#form-nav a[href="#step3"]').text(translate_javascripts.Quantities))),"1"===a.find("input:checked").val()||0<$("#accordion_combinations tr:not(#loading-attribute)").length?(e.show(),$("#specific-price-combination-selector").removeClass("hide").show(),"0"===i.val()?$('#form-nav a[href="#step3"]').text(translate_javascripts.Combinations):"0"===a.find("input:checked").val()?$('#form-nav a[href="#step3"]').text(translate_javascripts["Virtual product"]):$('#form-nav a[href="#step3"]').text(translate_javascripts.Combinations),$("#product_qty_0_shortcut_div, #quantities").hide()):(e.hide(),$("#specific-price-combination-selector").hide(),$("#product_qty_0_shortcut_div, #quantities").show()),1<=$('input[name="show_variations"][value="1"]:checked').length?$("#product_type_combinations_shortcut").show():$("#product_type_combinations_shortcut").hide()},getProductType:function(){switch(i.val()){case"0":return"standard";case"1":return"pack";case"2":return"virtual";default:return"standard"}},checkAccessVariations:function(){if(("1"===a.find("input:checked").val()||0<$("#accordion_combinations tr:not(#loading-attribute)").length)&&"1"===i.val()){var t="You can't create "+this.getProductType()+" product with variations. Are you sure to disable variations ? they will all be deleted.";modalConfirmation.create(translate_javascripts[t],null,{onCancel:function(){i.val(0).change(),$('#show_variations_selector input[value="1"]').click(),i.prop("disabled",!1)},onContinue:function(){$.ajax({type:"GET",url:$("#accordion_combinations").attr("data-action-delete-all").replace(/delete-all\/\d+/,"delete-all/"+$("#form_id_product").val()),success:function(){$("#accordion_combinations .combination").remove(),this.refresh(),i.prop("disabled",!1)},error:function(t){showErrorMessage(jQuery.parseJSON(t.responseText).message)}})}}).show()}}}),combinations=function(){$("#form_id_product").val();function o(t){if(!t.is("tr"))throw new Error("Structure of table has changed, this function need to be updated.");var i=t.find(".attribute_priceTE"),a=i.val()-i.attr("value"),e=t.find(".attribute-finalprice span"),n=e.data("price"),o=new Number(n)+new Number(a);e.html(ps_round(o,6))}return{init:function(){var t=$("#show_variations_selector input"),i=$("#form_step1_type_product"),a="#accordion_combinations .combination",e=$(a),n="";$(document).on("click","#accordion_combinations .attribute-actions div a",function(t){t.preventDefault(),$("#form-nav, #form_content #combinations").hide(),$("#form_content #combinations").next("div.form-group").hide();var i=$(this).attr("href");$("#accordion_combinations .attribute-actions "+i).prependTo($("#form_content #step3 .row .container-fluid > .row > div")),$(i).show(),$(i+" .nav").hide(),n=i}),$(document).on("click","#form_content .combination-form button.btn-back",function(t){if(t.preventDefault(),""!=n){var i=n.split("_");$(n).appendTo($("#accordion_combinations #attribute_"+i[2]+" .attribute-actions")),$("#accordion_combinations .attribute-actions .combination-form").hide(),$("#form-nav, #form_content #combinations").show(),$("#form_content #combinations").next("div.form-group").show()}}),0<e.length&&i.prop("disabled",!1),$(document).on("click","#accordion_combinations .delete",function(t){var i,a;t.preventDefault(),i=$(this),a=$("#attribute_"+i.attr("data")),modalConfirmation.create(translate_javascripts["Are you sure to delete this?"],null,{onContinue:function(){var t=i.attr("data");$.ajax({type:"DELETE",data:{"attribute-ids":[t]},url:i.attr("href"),beforeSend:function(){i.attr("disabled","disabled")},success:function(t){a.remove(),showSuccessMessage(t.message),displayFieldsManager.refresh()},error:function(t){showErrorMessage(jQuery.parseJSON(t.responseText).message)},complete:function(){i.removeAttr("disabled"),supplierCombinations.refresh(),warehouseCombinations.refresh(),$(".js-combinations-list .combination").length<=0&&$("#combinations_thead").fadeOut()}})}}).show()}),$(document).on("keyup",'input[id^="combination"][id$="_attribute_quantity"]',function(){var t=$(this).closest(".combination-form").attr("data");$("#accordion_combinations #attribute_"+t).find(".attribute-quantity input").val($(this).val())}),$(document).on("keyup",".attribute-quantity input",function(){var t=$(this).closest(".combination").attr("data");$("#combination_form_"+t).find('input[id^="combination"][id$="_attribute_quantity"]').val($(this).val())}),$(document).on("keyup",'input[id^="combination"][id$="_attribute_price"]',function(){var t=$(this).closest(".combination-form").attr("data"),i=$("#accordion_combinations #attribute_"+t).find(".attribute-price input");i.val($(this).val()),o($(i.parents("tr")[0]))}),$(document).on("click","input.attribute-default",function(){var a=$(this),t=$("input.attribute-default"),i=$(this).closest(".combination").attr("data");t.each(function(t){var i=$(this);i.data("id")!==a.data("id")&&i.prop("checked",!1)}),$(".attribute_default_checkbox").removeAttr("checked"),$("#combination_form_"+i).find('input[id^="combination"][id$="_attribute_default"]').prop("checked",!0)}),$(document).on("change",".attribute-price input",function(){var t=$(this).closest(".combination").attr("data");$("#combination_form_"+t).find('input[id^="combination"][id$="_attribute_price"]').val($(this).val()),o($(this).parent().parent().parent())}),$(document).on("keyup",'input[id^="combination"][id$="_attribute_price"]',function(){var t=$(this).closest(".combination-form").attr("data"),i=$("#accordion_combinations #attribute_"+t).find(".attribute-price-display");formatCurrencyCldr(parseFloat($(this).val()),function(t){i.html(t)})}),t.change(function(){displayFieldsManager.refresh(),e=$(a),"0"===$(this).val()&&0<e.length?modalConfirmation.create(translate_javascripts["Are you sure to disable variations ? they will all be deleted"],null,{onCancel:function(){$('#show_variations_selector input[value="1"]').prop("checked",!0),displayFieldsManager.refresh()},onContinue:function(){$.ajax({type:"GET",url:$("#accordion_combinations").attr("data-action-delete-all").replace(/\/\d+(?=\?.*)/,"/"+$("#form_id_product").val()),success:function(t){e.remove(),displayFieldsManager.refresh()},error:function(t){showErrorMessage(jQuery.parseJSON(t.responseText).message)}}),i.prop("disabled",!1)}}).show():i.prop("disabled",!1)}),$(document).on("click","#form .combination-form .btn-back",function(t){t.preventDefault(),$(this).closest(".combination-form").hide(),$("#form-nav, #form_content").show()}),$(document).on("click","#form .combination-form .nav a",function(t){t.preventDefault(),$(".combination-form").hide(),$('#accordion_combinations .combination[data="'+$(this).attr("data")+'"] .btn-open').click()})}}}(),BOEvent.on("Product Combinations Management started",function(){n.init()},"productCombinationVirtual")});
xxxxx1.0, XXX xxxx