Plugin Directory

Changeset 2922451


Ignore:
Timestamp:
06/06/2023 03:38:43 PM (3 years ago)
Author:
actpro
Message:

3.0.1

  • Compatible with WooCommerce 7.7.x
  • Compatible with WordPress 6.2.x
  • Fixed - Multiple addons on single product page then subtotal count multiple times
Location:
extra-product-options-for-woocommerce
Files:
83 added
6 edited

Legend:

Unmodified
Added
Removed
  • extra-product-options-for-woocommerce/trunk/README.txt

    r2894799 r2922451  
    33Tags: Product options, WooCommerce Extra Product Options, WooCommerce Extra product fields, Woocommerce Product Addons
    44Requires at least: 3.8
    5 Tested up to: 6.1.1
     5Tested up to: 6.2.2
    66Requires PHP: 5.6
    7 WC tested up to: 7.5.1
    8 Stable tag: 3.0
     7WC tested up to: 7.7.2
     8Stable tag: 3.0.1
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    208208
    209209== Changelog ==
     210= 3.0.1 =
     211* Compatible with WooCommerce 7.7.x
     212* Compatible with WordPress 6.2.x
     213* Fixed - Multiple addons on single product page then subtotal count multiple times
     214
    210215= 3.0 =
    211216* Compatible with WooCommerce 7.5.x
  • extra-product-options-for-woocommerce/trunk/assets/js/epofw-front.js

    r2894799 r2922451  
    545545                    $( '#addon_total' ).show();
    546546                    var addonSubtotal = 0;
    547                     $( '#addon_total tr td.addon_price' ).each( function () {
     547                    $( '.epofw_addon_totals #addon_total:visible:not(.addon_total_hd) .addon_price' ).each( function () {
    548548                        addonSubtotal = parseFloat( addonSubtotal ) + parseFloat( $( this ).attr( 'data-addon-price' ) );
    549549                    } );
     550                   
    550551                    if ( undefined !== addonSubtotal ) {
    551552                        addonSubtotal = AWSF.number_format( addonSubtotal, decimals, decimalSeparator, thousandSeparator );
  • extra-product-options-for-woocommerce/trunk/assets/js/epofw-front.min.js

    r2894799 r2922451  
    1 !function(F){"use strict";var r=epofw_front_var.currency,p=epofw_front_var.decimal_separator,f=epofw_front_var.thousand_separator,u=epofw_front_var.decimals,t=epofw_front_var.position,a={init:function(){F("form.cart").submit(function(){var e=AWSF.checkValidationForEachFields();if(-1!==jQuery.inArray(!1,e))return!1}),F(document).click(function(e){F(e.target).is(".epofw_dft_colorpicker")||F(".epofw_dft_colorpicker").iris("hide")}),F(".epofw_dft_colorpicker").click(function(){return F(".epofw_dft_colorpicker").iris("hide"),F(this).iris("show"),!1}),F(".epofw_dft_multiselect").length&&F(".epofw_dft_multiselect").select2(),F(".epofw_dft_datepicker").length&&F(".epofw_dft_datepicker").each(function(){var e=F(this).attr("id");F("#"+e).datepicker({dateFormat:"dd-mm-yy"})}),F(".epofw_dft_timepicker").length&&F(".epofw_dft_timepicker").each(function(){var e=F(this).attr("id");F("#"+e).timepicker({timeFormat:"hh:mm:ss TT"})}),F(".epofw_dft_colorpicker").length&&F(".epofw_dft_colorpicker").each(function(){var e=F(this),i=e.closest(".epofw_addon_html").data("uqd-attr"),n=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),o=AWSF.epofwFieldsMatchParameter(e,"data_inp_type",""),e=F(this).attr("id"),d=F(this).attr("name").replace("[value]","").replace("[]",""),l=F(this).attr("data-label-name");F("#"+e).iris({defaultColor:!0,change:function(e,t){var a,t=t.color.toString(),r=l+" - "+t;0===F("tr#tr_"+d).length?(a=AWSF.createTr(t,d,r,n,"",o,i),F("#addon_total #addon_subtotal").before(a)):AWSF.addTrInAddonDetails(t,d,r,n,"",o,i),AWSF.calculateAddonPrice()},clear:function(e){jQuery(e.target).siblings(".wp-color-picker")[0]&&(F("tr#tr_"+d).remove(),AWSF.calculateAddonPrice())},hide:!0,palettes:!0})});var e=AWSF.epofwGetProductId(),t=F('.cart .quantity input[name="quantity"]').val();AWSF.epofwCheckTable(e,"",t),F(document).on("input",'.epofw_fields_table:visible input[type="text"], .epofw_fields_table:visible input[type="password"], .epofw_fields_table:visible textarea',a.onKeyUpChangeAddon),F(document).on("change",".epofw_fields_table:visible input, .epofw_fields_table:visible textarea",a.onKeyUpChangeAddon),F(document).on("change",".epofw_fields_table:visible select",a.onKeyUpChangeSelectAddon),F(document).on("change",".variations_form .variations select",a.getSelectedVariation),F(document).on("change",".cart.variations_form .quantity .qty",a.getProductQty),F(document).on("change",'.cart input[name="quantity"]',a.updateProductPriceInAddonDetailsOnQtyChange)},updateProductPriceInAddonDetailsOnQtyChange:function(){var e=F('input[name="product_id"]').val(),t=F('input[name="variation_id"]').val(),a=(void 0===(e=void 0===e?F(".single_add_to_cart_button").val()||F('button[name="add-to-cart"]').val():e)&&(t=""),F('.variations_form .quantity input[name="quantity"]').val());AWSF.epofwCheckTable(e,t,a)},updateProductPriceInAddonDetails:function(){var e=F('.quantity input[name="quantity"]').val(),t=F("#addon_total #addon_prd_details .addon_price").attr("data-epofw-prd-price"),a=t=F("form.cart").hasClass("bundle_form")&&1<e?(t=F(".bundle_price .price span.woocommerce-Price-amount.amount:last").text()).replace(r,""):t,t=(0<e&&(a=t*e),F("#addon_total #addon_prd_details .addon_price").attr("data-addon-price",a),void 0!==a&&(a=AWSF.number_format(a,u,p,f)),AWSF.setCurrencyPosition(a));F("#addon_prd_details .addon_price strong span").html(t)},checkValidationForEachFields:function(){var r=[];return F(".epofw_fields_table:visible .epofw_td_value").each(function(){var e,t=AWSF.epofwFieldsMatchParameter(F(this),"required","logical_operation"),a=AWSF.epofwFieldsMatchParameter(F(this),"data_inp_type","logical_operation");"radiogroup"===a&&(e="radio"),"checkbox"!==a&&"checkboxgroup"!==a||(e="checkbox"),"text"!==a&&"datepicker"!==a&&"colorpicker"!==a&&"timepicker"!==a||(e="text"),"textarea"!==a&&"number"!==a&&"password"!==a&&"select"!==a&&"multiselect"!==a||(e=a),t&&"rd_status"in t&&"on"===t.rd_status&&(a="#ff0000",t="This is required field","radio"!==e&&"checkbox"!==e||(F(this).find('input[type="'+e+'"]').filter(":checked").length<1?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"text"!==e&&"textarea"!==e&&"number"!==e&&"password"!==e||(""===F(this).find('input[type="'+e+'"]').val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"textarea"===e&&(""===F(this).find("textarea").val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"select"===e&&(""===F(this).find("select").val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"multiselect"===e)&&(0==F(this).find("select > option:selected").length?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove())}),r},cartQtyChange:function(){var e,t;return"undefined"!=typeof wc_cart_params&&(e=F(this).val(),e=parseFloat(e),t=F(this).attr("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1"),F.post(epofw_front_var.ajaxurl,{action:"rf_update_total_price",quantity:e,hash:t},function(e){F("div.cart_totals").replaceWith(e),F("body").trigger("rf_update_total_price")})),!1},getProductQty:function(){var e,t,a,r=AWSF.epofwGetProductId(),i=F(this).val();F("form.cart").hasClass("variations_form")?(a=F(".variations_form").data("product_variations"),e=AWSF.getChosenAttributes(),(a=AWSF.findMatchingVariations(a,e.data))&&(e.count==e.chosenCount?a.hasOwnProperty(0)&&F(".epofw_fields_table").length&&F(".epofw_fields_table").is(":visible")&&(e=a[0].variation_id,t=(a=a[0].display_price).toFixed(u).replace(".",p),F("#addon_prd_details .addon_price").attr("data-addon-price",a),F("#addon_prd_details .addon_price").attr("data-epofw-prd-price",a),a=AWSF.setCurrencyPosition(t),F("#addon_prd_details .addon_price strong span").html(a),AWSF.calculateAddonPrice(),AWSF.epofwCheckTable(r,e,i)):AWSF.epofwCheckTable(r,"",i))):AWSF.epofwCheckTable(r,"",i)},getSelectedVariation:function(){var e,t=F('.variations_form .quantity input[name="quantity"]').val(),a=F('input[name="product_id"]').val(),r=F(".variations_form").data("product_variations"),i=AWSF.getChosenAttributes(),r=AWSF.findMatchingVariations(r,i.data);r&&(i.count==i.chosenCount?r.hasOwnProperty(0)&&F(".epofw_fields_table").length&&(i=r[0].variation_id,r=r[0].display_price,F("#addon_prd_details .addon_price").attr("data-epofw-prd-price",r),e=r.toFixed(u).replace(".",p),F("#addon_prd_details .addon_price").attr("data-addon-price",r),r=AWSF.setCurrencyPosition(e),F("#addon_prd_details .addon_price strong span").html(r),AWSF.calculateAddonPrice(),AWSF.epofwCheckTable(a,i,t)):AWSF.epofwCheckTable(a,"",t))},onKeyUpChangeAddon:function(){var e=F(this).closest(".epofw_addon_html").data("uqd-attr"),t=F('.quantity input[name="quantity"]').val();AWSF.epofwDisplayFiledsDataAndDisplay(F(this),t,e)},onKeyUpChangeSelectAddon:function(){var e=F(this).closest(".epofw_addon_html").data("uqd-attr"),t=F('.quantity input[name="quantity"]').val();AWSF.epofwDisplayAnotherFiledsDataAndDisplay(F(this),t,e)},addonPriceChangeToDecimalForCalc:function(e){var t=e;return t=-1!=(e=e.toString()).indexOf(p)?e.replace(p,"."):t},changeAddonDetailsIfTrExists:function(e,t,a,r,i){F("tr#tr_"+e).find("td:first div#dv_"+e).html(t);t=F("#"+e+"_afq").val(),t&&(r*=t),void 0!==r&&(r=AWSF.number_format(r,u,p,f)),F("tr#tr_"+e).attr("data-udi",i),F("tr#tr_"+e).find("td:last").html(AWSF.setCurrencyPosition(r)),t=AWSF.addonPriceChangeToDecimalForCalc(r);F("tr#tr_"+e).find("td:last").attr("data-addon-price",t),F("tr#tr_"+e).find("td:last").attr("data-addon-og-price",a)},createTr:function(e,t,a,r,i,n,o){var d=document.createElement("tr"),o=(d.setAttribute("id","tr_"+t),d.setAttribute("class","addon_item"),d.setAttribute("data-udi",o),document.createElement("td")),l=document.createElement("div"),c=(l.setAttribute("id","dv_"+t),document.createElement("span")),a=(c.setAttribute("class","span_field_lable"),"colorpicker"===n&&(a=a.replace(e,"")),document.createTextNode(a)),e=(c.appendChild(a),"colorpicker"===n&&((a=document.createElement("span")).setAttribute("style","color: "+e+"; font-size:20px; padding: 0;line-height: 0"),n=document.createTextNode("■"),a.appendChild(n),n=document.createTextNode(" "),a.appendChild(n),(n=document.createElement("label")).setAttribute("class","label_field_lable"),e=document.createTextNode(e),n.appendChild(e),c.appendChild(a),c.appendChild(n)),l.appendChild(c),o.appendChild(l),document.createElement("td")),a=(e.setAttribute("class","addon_price"),AWSF.addonPriceChangeToDecimalForCalc(r)),n=F("#"+t+"_afq").val(),c=(n&&(r*=n),AWSF.addonPriceChangeToDecimalForCalc(r));return e.setAttribute("data-addon-price",c),e.setAttribute("data-addon-og-price",a),void 0!==r&&(r=AWSF.number_format(r,u,p,f)),r=AWSF.setCurrencyPosition(r),l=document.createTextNode(r),e.appendChild(l),d.appendChild(o),d.appendChild(e),d},setCurrencyPosition:function(e){return"left_space"==t?e=-1!=e.indexOf("-")?(e=e.replace("-",""),"-"+r+" "+e):r+" "+e:"left"==t?e=-1!=e.indexOf("-")?(e=e.replace("-",""),"-"+r+e):r+e:"right_space"==t?e=-1!=e.indexOf("-")?"-"+(e=e.replace("-",""))+" "+r:e+" "+r:"right"==t&&(-1!=e.indexOf("-")?e="-"+(e=e.replace("-",""))+r:e+=r),e},addTrInAddonDetails:function(e,t,a,r,i,n,o){var d,l,c,s=F("#addon_total");""!==e?(0===s.find("tr#tr_"+t).length?d=AWSF.createTr(e,t,a,r,i,n,o):(s.find("#dv_"+t).length&&s.find("#dv_"+t).remove(),o=(i=document.getElementById("tr_"+t)).getElementsByTagName("td")[0],(c=document.createElement("div")).setAttribute("id","dv_"+t),(l=document.createElement("span")).setAttribute("class","span_field_lable"),"colorpicker"===n&&(a=a.replace(e,"")),a=document.createTextNode(a),l.appendChild(a),"colorpicker"===n&&((a=document.createElement("span")).setAttribute("style","color: "+e+"; font-size:20px; padding: 0;line-height: 0"),n=document.createTextNode("■"),a.appendChild(n),n=document.createTextNode(" "),a.appendChild(n),(n=document.createElement("label")).setAttribute("class","label_field_lable"),e=document.createTextNode(e),n.appendChild(e),l.appendChild(a),l.appendChild(n)),c.appendChild(l),o.appendChild(c),e=i.getElementsByTagName("td")[1],a=AWSF.addonPriceChangeToDecimalForCalc(r),(n=F("#"+t+"_afq").val())&&(r*=n),r&&(void 0!==(l=r)&&(l=AWSF.number_format(r,u,p,f)),o=AWSF.setCurrencyPosition(l),e.innerHTML=o),c=i.getElementsByTagName("td")[1],n=AWSF.addonPriceChangeToDecimalForCalc(r),c.setAttribute("data-addon-price",n),c.setAttribute("data-addon-og-price",a)),F("#addon_total #addon_subtotal").before(d)):s.find("tr#tr_"+t).remove()},number_format:function(e,t,a,r){if(null==e)throw new TypeError("number is not valid");e=((e=e.toString())+"").replace(/[^0-9+\-Ee.]/g,"");var e=isFinite(+e)?+e:0,t=isFinite(+t)?Math.abs(t):0,r=void 0===r?",":r,a=void 0===a?".":a,i="";return 3<(i=(t?function(e,t){t=Math.pow(10,t);return""+Math.round(e*t)/t}(e,t):""+Math.round(e)).split("."))[0].length&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(i[1]||"").length<t&&(i[1]=i[1]||"",i[1]+=new Array(t-i[1].length+1).join("0")),i.join(a)},calculateAddonPrice:function(){AWSF.updateProductPriceInAddonDetails();var e,t=[];F(".epofw_fields_table:visible").each(function(){var e=F(this);"display: none;"!==F.trim(F(e).attr("style"))&&t.push(!0)}),!0===t.includes(!0)&&(0===F("#addon_total tr.addon_item").length?F("#addon_total").hide():(F("#addon_total").removeClass("addon_total_hd"),F("#addon_total").show(),e=0,F("#addon_total tr td.addon_price").each(function(){e=parseFloat(e)+parseFloat(F(this).attr("data-addon-price"))}),void 0!==e&&(e=AWSF.number_format(e,u,p,f)),F("#addon_subtotal td:last strong").html(AWSF.setCurrencyPosition(e))))},getFieldInputBasedOnType:function(e){var t="";return"select"===e||"multiselect"===e?t="select":"radiogroup"===e?t='input[type="radio"]:checked':"checkboxgroup"===e||"checkbox"===e?t='input[type="checkbox"]:checked':"text"===e||"password"===e||"hidden"===e||"number"===e||"datepicker"===e||"colorpicker"===e||"timepicker"===e?t='input[type="text"]':"textarea"===e&&(t="textarea"),t},findMatchingVariations:function(e,t){for(var a=[],r=0;r<e.length;r++){var i=e[r];AWSF.isMatch(i.attributes,t)&&a.push(i)}return a},isMatch:function(e,t){var a,r,i,n=!0;for(a in e)e.hasOwnProperty(a)&&(r=e[a],i=t[a],void 0!==r)&&void 0!==i&&0!==r.length&&0!==i.length&&r!==i&&(n=!1);return n},getChosenAttributes:function(){var a={},r=0,i=0;return F(".variations_form").find(".variations select").each(function(){var e=F(this).data("attribute_name")||F(this).attr("name"),t=F(this).val()||"";0<t.length&&i++,r++,a[e]=t}),{count:r,chosenCount:i,data:a}},epofwMatchParameter:function(e,t,a,r,i){var n=[];n.push(!0);for(var o=0;o<e.length;o++){var d,l,c,s,p=e[o],f=p.opt,u=p.cnd,h=p.val;if("prdvar"===u||"qty"===u||"dp"===u)if(s=(s="prdvar"===u?a:"qty"===u?r:"dp"===u?(c=(l=new Date).getMonth().length+1===1?l.getMonth()+1:"0"+(l.getMonth()+1),("0"+l.getDate()).slice(-2)+"-"+c+"-"+l.getFullYear()):t).toString()){if("dp"===u){for(var _=h.toString(),m=[_[0]+_[1]],A=2;A<_.length;A++)A<=4&&_[A]%2==0?m.push("-",_[A]):m.push(_[A]);h=[m.join("")]}else h=p.val.toString();if(("iet"===f||"net"===f)&&(d=!0===h.includes(s)),n.push(d),"qty"===u||"dp"===u){for(var v=0;v<h.length;v++)"lt"===f?d=h[v]>s:"let"===f?d=h[v]>=s:"gt"===f?d=h[v]<s:"get"===f&&(d=h[v]<=s);n.push(d)}}else n.push(d=!1)}return 0<=F.inArray(!1,n)?(F(i).each(function(e,t){F("#tr_"+t).remove(),AWSF.calculateAddonPrice()}),!1):(F(i).each(function(){AWSF.calculateAddonPrice()}),!0)},epofwFieldsMatchParameter:function(e,t,a){a=("logical_operation"===a?e:e.parent().closest(".epofw_td_value")).attr("data-epofw_sa");if(a)return JSON.parse(a)[0][t]},epofwCheckTable:function(i,n,o){F(".epofw_fields_table").each(function(){var e=F(this),t=F(this).data("epofw_attr"),a=F(this).closest(".epofw_addon_html").data("uqd-attr"),r=[];F(this).find(".epofw_tr_se:visible").each(function(){r.push(F(this).find("input, select, textarea").attr("id"))}),!0===AWSF.epofwMatchParameter(t,i,n,o,r)?(e.hasClass("epofw_field_qty_hd")&&e.removeClass("epofw_field_qty_hd"),e.hasClass("epofw_field_dnl")&&e.removeClass("epofw_field_dnl"),AWSF.epofwGetFieldData(e,o,a),AWSF.calculateAddonPrice(),e.show()):(AWSF.epofwGetFieldData(e,o,a),F('#addon_total tr[data-udi="'+a+'"]').each(function(){F("#"+F(this).attr("id")).remove()}),AWSF.calculateAddonPrice(),e.hide())})},getFieldPriceBasedOnPriceOptions:function(e,t,a){return AWSF.addonPriceChangeToDecimalForCalc(a)},epofwGetFieldData:function(e,t,a){F(e).find(".epofw_tr_se:visible input, .epofw_tr_se:visible textarea").each(function(){AWSF.epofwDisplayFiledsDataAndDisplay(F(this),t,a)}),F(e).find(".epofw_tr_se:visible select").each(function(){AWSF.epofwDisplayAnotherFiledsDataAndDisplay(F(this),t,a)})},epofwMatchOptionsBasedOnCheckedValue:function(e,t){if(e.hasOwnProperty(t))return e[t]},epofwDisplayFiledsDataAndDisplay:function(e,t,a){if(!e.closest(".epofw_tr_se").is(":hidden")){var r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type","");if("select"!==r&&"multiselect"!==r){var i,n,o,d,l,c,s,p,f,r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type","");if(F('.quantity input[name="quantity"]').val(),"checkbox"===r){var u,h=e.attr("id"),_={},m=(F(F('input[name="'+e.attr("name")+'"]:checked')).each(function(){n=F(this).val(),f=AWSF.epofwFieldsMatchParameter(F(this),"options",""),(s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2])),_[n]=o}),0),A=[];for(u in _)A.push(u),m=parseFloat(m)+parseFloat(_[u]);A&&(n=A.join()),o=m,l=(i=e.attr("data-label-name"))+" - "+n,p=e.attr("name").replace("[value]","").replace("[]",""),""!==n?(0===F("tr#tr_"+p).length?c=AWSF.createTr(n,p,l,o,"",r,a):AWSF.changeAddonDetailsIfTrExists(p,l,m,o,a),F("#addon_total #addon_subtotal").before(c)):F("tr#tr_"+p).remove()}else if("checkboxgroup"===r)n="",p=e.attr("name").replace("[value]","").replace("[]",""),e.is(":checked")?(n=e.val(),f=AWSF.epofwFieldsMatchParameter(e,"options",""),(s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2]),i=e.attr("data-label-name"),c=e.parent().parent().parent().attr("id"),F("#"+c+" .epofw_field_checkboxgroup").prop("checked",!1),e.prop("checked",!0),h=e.attr("id"),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a))):F("tr#tr_"+p).remove();else if("radiogroup"===r)n="",p=e.attr("name").replace("[value]","").replace("[]",""),e.is(":checked")&&(n=e.val(),f=AWSF.epofwFieldsMatchParameter(e,"options",""),s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2]),i=e.attr("data-label-name"),h=e.attr("id"),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a));else if("html"===r)h=e.attr("id"),i=AWSF.epofwFieldsMatchParameter(e,"data-label-name",""),n=e.val(),o=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),d=AWSF.epofwFieldsMatchParameter(e,"addon_price_type",""),o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,o),l=i+" - "+n,n&&AWSF.addTrInAddonDetails(n,h,l,o,"",r,a);else{if(void 0===r)return;h=e.attr("id"),i=e.attr("data-label-name"),n=e.val(),p=e.attr("name").replace("[value]","").replace("[]",""),o=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),d=AWSF.epofwFieldsMatchParameter(e,"addon_price_type",""),o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,o),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a)}AWSF.calculateAddonPrice()}}},epofwMultiSelectData:function(e,t,i,a,r,n,o,d,l,c,s){if(!e.closest(".epofw_tr_se").is(":hidden")){var p=F("#"+e.attr("id")).select2("data");if(p){var f,u={},h=(F(p).each(function(e,t){var a,r=AWSF.epofwMatchOptionsBasedOnCheckedValue(l,t.id);r&&(a=r[1],a=AWSF.getFieldPriceBasedOnPriceOptions(i,a,r[2]),u[t.id]=a)}),0),_=[];for(f in u)_.push(f),h=parseFloat(h)+parseFloat(u[f]);r=h,n=t+" - "+(i=_?_.join():i),"All"===F.trim(i)&&(F("#"+d+" > option").prop("selected","selected"),F("#"+d).trigger("change"));p=e.attr("name").replace("[value]","").replace("[]","");""!==i?(0===F("tr#tr_"+p).length?o=AWSF.createTr(i,p,n,r,"",a,s):AWSF.changeAddonDetailsIfTrExists(p,n,h,r,s),F("#addon_total #addon_subtotal").before(o)):F("tr#tr_"+p).remove(),AWSF.calculateAddonPrice()}}},epofwDisplayAnotherFiledsDataAndDisplay:function(e,t,a){var r,i,n,o,d,l,c,s,p,f,u,h,_;e.closest(".epofw_tr_se").is(":hidden")||(r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type",""),void 0===(i=e.parent().children().attr("data-label-name"))&&(i=e.parent().parent().children().children().attr("data-label-name")),n=e.attr("id"),o=e.attr("name").replace("[value]","").replace("[]",""),d=F("tr#tr_"+o).length,"multiselect"===r?(h=AWSF.epofwFieldsMatchParameter(e,"options",""),u="",F("#"+e.attr("id")).on("select2:select",function(){AWSF.epofwMultiSelectData(e,i,u,r,s,l,c,n,h,t,a)}),F("#"+e.attr("id")).on("select2:unselect",function(){AWSF.epofwMultiSelectData(e,i,u,r,s,l,c,n,h,t,a)})):"select"===r&&(u=e.val(),h=AWSF.epofwFieldsMatchParameter(e,"options",""),(_=AWSF.epofwMatchOptionsBasedOnCheckedValue(h,u))&&(p=_[1],f=_[2],s=AWSF.getFieldPriceBasedOnPriceOptions(u,p,_[2]),""!==u)&&void 0!==u&&(l=i+" - "+u),""!==u?(0===d?c=AWSF.createTr(u,o,l,s,"",r,a):AWSF.changeAddonDetailsIfTrExists(o,l,f,s,a),F("#addon_total #addon_subtotal").before(c)):F("tr#tr_"+o).remove(),AWSF.calculateAddonPrice()))},epofwGetProductId:function(){return F("form.cart").hasClass("variations_form")&&F('input[name="product_id"]').val(),(F("form.cart").hasClass("bundle_form")?F('input[name="add-to-cart"]'):F('button[name="add-to-cart"]')).val()},epofwGetFieldsExtraAttr:function(e){return e.parent().closest(".epofw_td_value").attr("data-epofw_sa")}};F(function(){a.init()}),window.AWSF=a}(jQuery);
     1!function(F){"use strict";var r=epofw_front_var.currency,p=epofw_front_var.decimal_separator,f=epofw_front_var.thousand_separator,u=epofw_front_var.decimals,t=epofw_front_var.position,a={init:function(){F("form.cart").submit(function(){var e=AWSF.checkValidationForEachFields();if(-1!==jQuery.inArray(!1,e))return!1}),F(document).click(function(e){F(e.target).is(".epofw_dft_colorpicker")||F(".epofw_dft_colorpicker").iris("hide")}),F(".epofw_dft_colorpicker").click(function(){return F(".epofw_dft_colorpicker").iris("hide"),F(this).iris("show"),!1}),F(".epofw_dft_multiselect").length&&F(".epofw_dft_multiselect").select2(),F(".epofw_dft_datepicker").length&&F(".epofw_dft_datepicker").each(function(){var e=F(this).attr("id");F("#"+e).datepicker({dateFormat:"dd-mm-yy"})}),F(".epofw_dft_timepicker").length&&F(".epofw_dft_timepicker").each(function(){var e=F(this).attr("id");F("#"+e).timepicker({timeFormat:"hh:mm:ss TT"})}),F(".epofw_dft_colorpicker").length&&F(".epofw_dft_colorpicker").each(function(){var e=F(this),i=e.closest(".epofw_addon_html").data("uqd-attr"),n=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),o=AWSF.epofwFieldsMatchParameter(e,"data_inp_type",""),e=F(this).attr("id"),d=F(this).attr("name").replace("[value]","").replace("[]",""),l=F(this).attr("data-label-name");F("#"+e).iris({defaultColor:!0,change:function(e,t){var a,t=t.color.toString(),r=l+" - "+t;0===F("tr#tr_"+d).length?(a=AWSF.createTr(t,d,r,n,"",o,i),F("#addon_total #addon_subtotal").before(a)):AWSF.addTrInAddonDetails(t,d,r,n,"",o,i),AWSF.calculateAddonPrice()},clear:function(e){jQuery(e.target).siblings(".wp-color-picker")[0]&&(F("tr#tr_"+d).remove(),AWSF.calculateAddonPrice())},hide:!0,palettes:!0})});var e=AWSF.epofwGetProductId(),t=F('.cart .quantity input[name="quantity"]').val();AWSF.epofwCheckTable(e,"",t),F(document).on("input",'.epofw_fields_table:visible input[type="text"], .epofw_fields_table:visible input[type="password"], .epofw_fields_table:visible textarea',a.onKeyUpChangeAddon),F(document).on("change",".epofw_fields_table:visible input, .epofw_fields_table:visible textarea",a.onKeyUpChangeAddon),F(document).on("change",".epofw_fields_table:visible select",a.onKeyUpChangeSelectAddon),F(document).on("change",".variations_form .variations select",a.getSelectedVariation),F(document).on("change",".cart.variations_form .quantity .qty",a.getProductQty),F(document).on("change",'.cart input[name="quantity"]',a.updateProductPriceInAddonDetailsOnQtyChange)},updateProductPriceInAddonDetailsOnQtyChange:function(){var e=F('input[name="product_id"]').val(),t=F('input[name="variation_id"]').val(),a=(void 0===(e=void 0===e?F(".single_add_to_cart_button").val()||F('button[name="add-to-cart"]').val():e)&&(t=""),F('.variations_form .quantity input[name="quantity"]').val());AWSF.epofwCheckTable(e,t,a)},updateProductPriceInAddonDetails:function(){var e=F('.quantity input[name="quantity"]').val(),t=F("#addon_total #addon_prd_details .addon_price").attr("data-epofw-prd-price"),a=t=F("form.cart").hasClass("bundle_form")&&1<e?(t=F(".bundle_price .price span.woocommerce-Price-amount.amount:last").text()).replace(r,""):t,t=(0<e&&(a=t*e),F("#addon_total #addon_prd_details .addon_price").attr("data-addon-price",a),void 0!==a&&(a=AWSF.number_format(a,u,p,f)),AWSF.setCurrencyPosition(a));F("#addon_prd_details .addon_price strong span").html(t)},checkValidationForEachFields:function(){var r=[];return F(".epofw_fields_table:visible .epofw_td_value").each(function(){var e,t=AWSF.epofwFieldsMatchParameter(F(this),"required","logical_operation"),a=AWSF.epofwFieldsMatchParameter(F(this),"data_inp_type","logical_operation");"radiogroup"===a&&(e="radio"),"checkbox"!==a&&"checkboxgroup"!==a||(e="checkbox"),"text"!==a&&"datepicker"!==a&&"colorpicker"!==a&&"timepicker"!==a||(e="text"),"textarea"!==a&&"number"!==a&&"password"!==a&&"select"!==a&&"multiselect"!==a||(e=a),t&&"rd_status"in t&&"on"===t.rd_status&&(a="#ff0000",t="This is required field","radio"!==e&&"checkbox"!==e||(F(this).find('input[type="'+e+'"]').filter(":checked").length<1?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"text"!==e&&"textarea"!==e&&"number"!==e&&"password"!==e||(""===F(this).find('input[type="'+e+'"]').val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"textarea"===e&&(""===F(this).find("textarea").val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"select"===e&&(""===F(this).find("select").val()?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove()),"multiselect"===e)&&(0==F(this).find("select > option:selected").length?(F(this).find(".epofw_error").length<1&&F(this).last().append('<p class="epofw_error" style="color: '+a+';">'+t+"</p>"),r.push(!1)):F(this).find(".epofw_error").remove())}),r},cartQtyChange:function(){var e,t;return"undefined"!=typeof wc_cart_params&&(e=F(this).val(),e=parseFloat(e),t=F(this).attr("name").replace(/cart\[([\w]+)\]\[qty\]/g,"$1"),F.post(epofw_front_var.ajaxurl,{action:"rf_update_total_price",quantity:e,hash:t},function(e){F("div.cart_totals").replaceWith(e),F("body").trigger("rf_update_total_price")})),!1},getProductQty:function(){var e,t,a,r=AWSF.epofwGetProductId(),i=F(this).val();F("form.cart").hasClass("variations_form")?(a=F(".variations_form").data("product_variations"),e=AWSF.getChosenAttributes(),(a=AWSF.findMatchingVariations(a,e.data))&&(e.count==e.chosenCount?a.hasOwnProperty(0)&&F(".epofw_fields_table").length&&F(".epofw_fields_table").is(":visible")&&(e=a[0].variation_id,t=(a=a[0].display_price).toFixed(u).replace(".",p),F("#addon_prd_details .addon_price").attr("data-addon-price",a),F("#addon_prd_details .addon_price").attr("data-epofw-prd-price",a),a=AWSF.setCurrencyPosition(t),F("#addon_prd_details .addon_price strong span").html(a),AWSF.calculateAddonPrice(),AWSF.epofwCheckTable(r,e,i)):AWSF.epofwCheckTable(r,"",i))):AWSF.epofwCheckTable(r,"",i)},getSelectedVariation:function(){var e,t=F('.variations_form .quantity input[name="quantity"]').val(),a=F('input[name="product_id"]').val(),r=F(".variations_form").data("product_variations"),i=AWSF.getChosenAttributes(),r=AWSF.findMatchingVariations(r,i.data);r&&(i.count==i.chosenCount?r.hasOwnProperty(0)&&F(".epofw_fields_table").length&&(i=r[0].variation_id,r=r[0].display_price,F("#addon_prd_details .addon_price").attr("data-epofw-prd-price",r),e=r.toFixed(u).replace(".",p),F("#addon_prd_details .addon_price").attr("data-addon-price",r),r=AWSF.setCurrencyPosition(e),F("#addon_prd_details .addon_price strong span").html(r),AWSF.calculateAddonPrice(),AWSF.epofwCheckTable(a,i,t)):AWSF.epofwCheckTable(a,"",t))},onKeyUpChangeAddon:function(){var e=F(this).closest(".epofw_addon_html").data("uqd-attr"),t=F('.quantity input[name="quantity"]').val();AWSF.epofwDisplayFiledsDataAndDisplay(F(this),t,e)},onKeyUpChangeSelectAddon:function(){var e=F(this).closest(".epofw_addon_html").data("uqd-attr"),t=F('.quantity input[name="quantity"]').val();AWSF.epofwDisplayAnotherFiledsDataAndDisplay(F(this),t,e)},addonPriceChangeToDecimalForCalc:function(e){var t=e;return t=-1!=(e=e.toString()).indexOf(p)?e.replace(p,"."):t},changeAddonDetailsIfTrExists:function(e,t,a,r,i){F("tr#tr_"+e).find("td:first div#dv_"+e).html(t);t=F("#"+e+"_afq").val(),t&&(r*=t),void 0!==r&&(r=AWSF.number_format(r,u,p,f)),F("tr#tr_"+e).attr("data-udi",i),F("tr#tr_"+e).find("td:last").html(AWSF.setCurrencyPosition(r)),t=AWSF.addonPriceChangeToDecimalForCalc(r);F("tr#tr_"+e).find("td:last").attr("data-addon-price",t),F("tr#tr_"+e).find("td:last").attr("data-addon-og-price",a)},createTr:function(e,t,a,r,i,n,o){var d=document.createElement("tr"),o=(d.setAttribute("id","tr_"+t),d.setAttribute("class","addon_item"),d.setAttribute("data-udi",o),document.createElement("td")),l=document.createElement("div"),c=(l.setAttribute("id","dv_"+t),document.createElement("span")),a=(c.setAttribute("class","span_field_lable"),"colorpicker"===n&&(a=a.replace(e,"")),document.createTextNode(a)),e=(c.appendChild(a),"colorpicker"===n&&((a=document.createElement("span")).setAttribute("style","color: "+e+"; font-size:20px; padding: 0;line-height: 0"),n=document.createTextNode("■"),a.appendChild(n),n=document.createTextNode(" "),a.appendChild(n),(n=document.createElement("label")).setAttribute("class","label_field_lable"),e=document.createTextNode(e),n.appendChild(e),c.appendChild(a),c.appendChild(n)),l.appendChild(c),o.appendChild(l),document.createElement("td")),a=(e.setAttribute("class","addon_price"),AWSF.addonPriceChangeToDecimalForCalc(r)),n=F("#"+t+"_afq").val(),c=(n&&(r*=n),AWSF.addonPriceChangeToDecimalForCalc(r));return e.setAttribute("data-addon-price",c),e.setAttribute("data-addon-og-price",a),void 0!==r&&(r=AWSF.number_format(r,u,p,f)),r=AWSF.setCurrencyPosition(r),l=document.createTextNode(r),e.appendChild(l),d.appendChild(o),d.appendChild(e),d},setCurrencyPosition:function(e){return"left_space"==t?e=-1!=e.indexOf("-")?(e=e.replace("-",""),"-"+r+" "+e):r+" "+e:"left"==t?e=-1!=e.indexOf("-")?(e=e.replace("-",""),"-"+r+e):r+e:"right_space"==t?e=-1!=e.indexOf("-")?"-"+(e=e.replace("-",""))+" "+r:e+" "+r:"right"==t&&(-1!=e.indexOf("-")?e="-"+(e=e.replace("-",""))+r:e+=r),e},addTrInAddonDetails:function(e,t,a,r,i,n,o){var d,l,c,s=F("#addon_total");""!==e?(0===s.find("tr#tr_"+t).length?d=AWSF.createTr(e,t,a,r,i,n,o):(s.find("#dv_"+t).length&&s.find("#dv_"+t).remove(),o=(i=document.getElementById("tr_"+t)).getElementsByTagName("td")[0],(c=document.createElement("div")).setAttribute("id","dv_"+t),(l=document.createElement("span")).setAttribute("class","span_field_lable"),"colorpicker"===n&&(a=a.replace(e,"")),a=document.createTextNode(a),l.appendChild(a),"colorpicker"===n&&((a=document.createElement("span")).setAttribute("style","color: "+e+"; font-size:20px; padding: 0;line-height: 0"),n=document.createTextNode("■"),a.appendChild(n),n=document.createTextNode(" "),a.appendChild(n),(n=document.createElement("label")).setAttribute("class","label_field_lable"),e=document.createTextNode(e),n.appendChild(e),l.appendChild(a),l.appendChild(n)),c.appendChild(l),o.appendChild(c),e=i.getElementsByTagName("td")[1],a=AWSF.addonPriceChangeToDecimalForCalc(r),(n=F("#"+t+"_afq").val())&&(r*=n),r&&(void 0!==(l=r)&&(l=AWSF.number_format(r,u,p,f)),o=AWSF.setCurrencyPosition(l),e.innerHTML=o),c=i.getElementsByTagName("td")[1],n=AWSF.addonPriceChangeToDecimalForCalc(r),c.setAttribute("data-addon-price",n),c.setAttribute("data-addon-og-price",a)),F("#addon_total #addon_subtotal").before(d)):s.find("tr#tr_"+t).remove()},number_format:function(e,t,a,r){if(null==e)throw new TypeError("number is not valid");e=((e=e.toString())+"").replace(/[^0-9+\-Ee.]/g,"");var e=isFinite(+e)?+e:0,t=isFinite(+t)?Math.abs(t):0,r=void 0===r?",":r,a=void 0===a?".":a,i="";return 3<(i=(t?function(e,t){t=Math.pow(10,t);return""+Math.round(e*t)/t}(e,t):""+Math.round(e)).split("."))[0].length&&(i[0]=i[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(i[1]||"").length<t&&(i[1]=i[1]||"",i[1]+=new Array(t-i[1].length+1).join("0")),i.join(a)},calculateAddonPrice:function(){AWSF.updateProductPriceInAddonDetails();var e,t=[];F(".epofw_fields_table:visible").each(function(){var e=F(this);"display: none;"!==F.trim(F(e).attr("style"))&&t.push(!0)}),!0===t.includes(!0)&&(0===F("#addon_total tr.addon_item").length?F("#addon_total").hide():(F("#addon_total").removeClass("addon_total_hd"),F("#addon_total").show(),e=0,F(".epofw_addon_totals #addon_total:visible:not(.addon_total_hd) .addon_price").each(function(){e=parseFloat(e)+parseFloat(F(this).attr("data-addon-price"))}),void 0!==e&&(e=AWSF.number_format(e,u,p,f)),F("#addon_subtotal td:last strong").html(AWSF.setCurrencyPosition(e))))},getFieldInputBasedOnType:function(e){var t="";return"select"===e||"multiselect"===e?t="select":"radiogroup"===e?t='input[type="radio"]:checked':"checkboxgroup"===e||"checkbox"===e?t='input[type="checkbox"]:checked':"text"===e||"password"===e||"hidden"===e||"number"===e||"datepicker"===e||"colorpicker"===e||"timepicker"===e?t='input[type="text"]':"textarea"===e&&(t="textarea"),t},findMatchingVariations:function(e,t){for(var a=[],r=0;r<e.length;r++){var i=e[r];AWSF.isMatch(i.attributes,t)&&a.push(i)}return a},isMatch:function(e,t){var a,r,i,n=!0;for(a in e)e.hasOwnProperty(a)&&(r=e[a],i=t[a],void 0!==r)&&void 0!==i&&0!==r.length&&0!==i.length&&r!==i&&(n=!1);return n},getChosenAttributes:function(){var a={},r=0,i=0;return F(".variations_form").find(".variations select").each(function(){var e=F(this).data("attribute_name")||F(this).attr("name"),t=F(this).val()||"";0<t.length&&i++,r++,a[e]=t}),{count:r,chosenCount:i,data:a}},epofwMatchParameter:function(e,t,a,r,i){var n=[];n.push(!0);for(var o=0;o<e.length;o++){var d,l,c,s,p=e[o],f=p.opt,u=p.cnd,h=p.val;if("prdvar"===u||"qty"===u||"dp"===u)if(s=(s="prdvar"===u?a:"qty"===u?r:"dp"===u?(c=(l=new Date).getMonth().length+1===1?l.getMonth()+1:"0"+(l.getMonth()+1),("0"+l.getDate()).slice(-2)+"-"+c+"-"+l.getFullYear()):t).toString()){if("dp"===u){for(var _=h.toString(),m=[_[0]+_[1]],v=2;v<_.length;v++)v<=4&&_[v]%2==0?m.push("-",_[v]):m.push(_[v]);h=[m.join("")]}else h=p.val.toString();if(("iet"===f||"net"===f)&&(d=!0===h.includes(s)),n.push(d),"qty"===u||"dp"===u){for(var A=0;A<h.length;A++)"lt"===f?d=h[A]>s:"let"===f?d=h[A]>=s:"gt"===f?d=h[A]<s:"get"===f&&(d=h[A]<=s);n.push(d)}}else n.push(d=!1)}return 0<=F.inArray(!1,n)?(F(i).each(function(e,t){F("#tr_"+t).remove(),AWSF.calculateAddonPrice()}),!1):(F(i).each(function(){AWSF.calculateAddonPrice()}),!0)},epofwFieldsMatchParameter:function(e,t,a){a=("logical_operation"===a?e:e.parent().closest(".epofw_td_value")).attr("data-epofw_sa");if(a)return JSON.parse(a)[0][t]},epofwCheckTable:function(i,n,o){F(".epofw_fields_table").each(function(){var e=F(this),t=F(this).data("epofw_attr"),a=F(this).closest(".epofw_addon_html").data("uqd-attr"),r=[];F(this).find(".epofw_tr_se:visible").each(function(){r.push(F(this).find("input, select, textarea").attr("id"))}),!0===AWSF.epofwMatchParameter(t,i,n,o,r)?(e.hasClass("epofw_field_qty_hd")&&e.removeClass("epofw_field_qty_hd"),e.hasClass("epofw_field_dnl")&&e.removeClass("epofw_field_dnl"),AWSF.epofwGetFieldData(e,o,a),AWSF.calculateAddonPrice(),e.show()):(AWSF.epofwGetFieldData(e,o,a),F('#addon_total tr[data-udi="'+a+'"]').each(function(){F("#"+F(this).attr("id")).remove()}),AWSF.calculateAddonPrice(),e.hide())})},getFieldPriceBasedOnPriceOptions:function(e,t,a){return AWSF.addonPriceChangeToDecimalForCalc(a)},epofwGetFieldData:function(e,t,a){F(e).find(".epofw_tr_se:visible input, .epofw_tr_se:visible textarea").each(function(){AWSF.epofwDisplayFiledsDataAndDisplay(F(this),t,a)}),F(e).find(".epofw_tr_se:visible select").each(function(){AWSF.epofwDisplayAnotherFiledsDataAndDisplay(F(this),t,a)})},epofwMatchOptionsBasedOnCheckedValue:function(e,t){if(e.hasOwnProperty(t))return e[t]},epofwDisplayFiledsDataAndDisplay:function(e,t,a){if(!e.closest(".epofw_tr_se").is(":hidden")){var r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type","");if("select"!==r&&"multiselect"!==r){var i,n,o,d,l,c,s,p,f,r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type","");if(F('.quantity input[name="quantity"]').val(),"checkbox"===r){var u,h=e.attr("id"),_={},m=(F(F('input[name="'+e.attr("name")+'"]:checked')).each(function(){n=F(this).val(),f=AWSF.epofwFieldsMatchParameter(F(this),"options",""),(s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2])),_[n]=o}),0),v=[];for(u in _)v.push(u),m=parseFloat(m)+parseFloat(_[u]);v&&(n=v.join()),o=m,l=(i=e.attr("data-label-name"))+" - "+n,p=e.attr("name").replace("[value]","").replace("[]",""),""!==n?(0===F("tr#tr_"+p).length?c=AWSF.createTr(n,p,l,o,"",r,a):AWSF.changeAddonDetailsIfTrExists(p,l,m,o,a),F("#addon_total #addon_subtotal").before(c)):F("tr#tr_"+p).remove()}else if("checkboxgroup"===r)n="",p=e.attr("name").replace("[value]","").replace("[]",""),e.is(":checked")?(n=e.val(),f=AWSF.epofwFieldsMatchParameter(e,"options",""),(s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2]),i=e.attr("data-label-name"),c=e.parent().parent().parent().attr("id"),F("#"+c+" .epofw_field_checkboxgroup").prop("checked",!1),e.prop("checked",!0),h=e.attr("id"),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a))):F("tr#tr_"+p).remove();else if("radiogroup"===r)n="",p=e.attr("name").replace("[value]","").replace("[]",""),e.is(":checked")&&(n=e.val(),f=AWSF.epofwFieldsMatchParameter(e,"options",""),s=AWSF.epofwMatchOptionsBasedOnCheckedValue(f,n))&&(d=s[1],o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,s[2]),i=e.attr("data-label-name"),h=e.attr("id"),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a));else if("html"===r)h=e.attr("id"),i=AWSF.epofwFieldsMatchParameter(e,"data-label-name",""),n=e.val(),o=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),d=AWSF.epofwFieldsMatchParameter(e,"addon_price_type",""),o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,o),l=i+" - "+n,n&&AWSF.addTrInAddonDetails(n,h,l,o,"",r,a);else{if(void 0===r)return;h=e.attr("id"),i=e.attr("data-label-name"),n=e.val(),p=e.attr("name").replace("[value]","").replace("[]",""),o=AWSF.epofwFieldsMatchParameter(e,"addon_price",""),d=AWSF.epofwFieldsMatchParameter(e,"addon_price_type",""),o=AWSF.getFieldPriceBasedOnPriceOptions(n,d,o),l=i+" - "+n,AWSF.addTrInAddonDetails(n,p,l,o,"",r,a)}AWSF.calculateAddonPrice()}}},epofwMultiSelectData:function(e,t,i,a,r,n,o,d,l,c,s){if(!e.closest(".epofw_tr_se").is(":hidden")){var p=F("#"+e.attr("id")).select2("data");if(p){var f,u={},h=(F(p).each(function(e,t){var a,r=AWSF.epofwMatchOptionsBasedOnCheckedValue(l,t.id);r&&(a=r[1],a=AWSF.getFieldPriceBasedOnPriceOptions(i,a,r[2]),u[t.id]=a)}),0),_=[];for(f in u)_.push(f),h=parseFloat(h)+parseFloat(u[f]);r=h,n=t+" - "+(i=_?_.join():i),"All"===F.trim(i)&&(F("#"+d+" > option").prop("selected","selected"),F("#"+d).trigger("change"));p=e.attr("name").replace("[value]","").replace("[]","");""!==i?(0===F("tr#tr_"+p).length?o=AWSF.createTr(i,p,n,r,"",a,s):AWSF.changeAddonDetailsIfTrExists(p,n,h,r,s),F("#addon_total #addon_subtotal").before(o)):F("tr#tr_"+p).remove(),AWSF.calculateAddonPrice()}}},epofwDisplayAnotherFiledsDataAndDisplay:function(e,t,a){var r,i,n,o,d,l,c,s,p,f,u,h,_;e.closest(".epofw_tr_se").is(":hidden")||(r=AWSF.epofwFieldsMatchParameter(e,"data_inp_type",""),void 0===(i=e.parent().children().attr("data-label-name"))&&(i=e.parent().parent().children().children().attr("data-label-name")),n=e.attr("id"),o=e.attr("name").replace("[value]","").replace("[]",""),d=F("tr#tr_"+o).length,"multiselect"===r?(h=AWSF.epofwFieldsMatchParameter(e,"options",""),u="",F("#"+e.attr("id")).on("select2:select",function(){AWSF.epofwMultiSelectData(e,i,u,r,s,l,c,n,h,t,a)}),F("#"+e.attr("id")).on("select2:unselect",function(){AWSF.epofwMultiSelectData(e,i,u,r,s,l,c,n,h,t,a)})):"select"===r&&(u=e.val(),h=AWSF.epofwFieldsMatchParameter(e,"options",""),(_=AWSF.epofwMatchOptionsBasedOnCheckedValue(h,u))&&(p=_[1],f=_[2],s=AWSF.getFieldPriceBasedOnPriceOptions(u,p,_[2]),""!==u)&&void 0!==u&&(l=i+" - "+u),""!==u?(0===d?c=AWSF.createTr(u,o,l,s,"",r,a):AWSF.changeAddonDetailsIfTrExists(o,l,f,s,a),F("#addon_total #addon_subtotal").before(c)):F("tr#tr_"+o).remove(),AWSF.calculateAddonPrice()))},epofwGetProductId:function(){return F("form.cart").hasClass("variations_form")&&F('input[name="product_id"]').val(),(F("form.cart").hasClass("bundle_form")?F('input[name="add-to-cart"]'):F('button[name="add-to-cart"]')).val()},epofwGetFieldsExtraAttr:function(e){return e.parent().closest(".epofw_td_value").attr("data-epofw_sa")}};F(function(){a.init()}),window.AWSF=a}(jQuery);
  • extra-product-options-for-woocommerce/trunk/extra-product-options-for-woocommerce.php

    r2894799 r2922451  
    33 * Plugin Name:         Extra Product Options for WooCommerce
    44 * Description:         Extra product options for WooCommerce Plugin allows you to add custom form fields (12+ field types) and sections to your WooCommerce product page. Easy way to add custom fields as per your requirement
    5  * Version:             3.0
     5 * Version:             3.0.1
    66 * Author:              actpro
    77 * Author URI:          https://profiles.wordpress.org/actpro/
     
    1111 * Domain Path:         /languages
    1212 * WC requires at least: 3.6
    13  * WC tested up to: 7.5.1
     13 * WC tested up to: 7.7.2
    1414 *
    1515 * @package Extra_Product_Options_For_WooCommerce
  • extra-product-options-for-woocommerce/trunk/languages/extra-product-options-for-woocommerce.pot

    r2894799 r2922451  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Extra Product Options for WooCommerce 3.0\n"
     5"Project-Id-Version: Extra Product Options for WooCommerce 3.0.1\n"
    66"Report-Msgid-Bugs-To: https://www.wpactpro.com/contact/\n"
    7 "POT-Creation-Date: 2023-04-03 12:14:17+00:00\n"
     7"POT-Creation-Date: 2023-06-06 15:05:08+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
  • extra-product-options-for-woocommerce/trunk/settings/epofw-constant.php

    r2894799 r2922451  
    1212}
    1313if ( ! defined( 'EPOFW_PLUGIN_VERSION' ) ) {
    14     define( 'EPOFW_PLUGIN_VERSION', '3.0' );
     14    define( 'EPOFW_PLUGIN_VERSION', '3.0.1' );
    1515}
    1616if ( ! defined( 'EPOFW_SLUG' ) ) {
Note: See TracChangeset for help on using the changeset viewer.