PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
← All changes | assets/admin/settings.min.js +1 -1 7.1.4 → 8.0.2 View file →
@@ -1 +1 @@
1 -jQuery(document).ready(function($){function isSectionActive(sectionId){var urlParams=new URLSearchParams(window.location.search);if("tiered_pricing_table_settings"===urlParams.get("tab"))return urlParams=urlParams.get("section"),"general"===sectionId?!urlParams||"general"===urlParams:urlParams===sectionId}class SettingsPage{constructor(){this.rows=[]}init(rowsConfig){this.rows=rowsConfig.map(config=>new("subsection"===config.type?SettingsSubsection:SettingsRow)(config.id,config.dependencies||{})),this.rows.forEach(row=>row.init(this)),this.renderSettings()}getRowById(id){return this.rows.find(row=>row.id===id)}renderSettings(){this.rows.forEach(row=>row.shouldBeShown()?row.show():row.hide())}}class SettingsElement{constructor(id,dependencies={}){this.prefix="tier_pricing_table_",this.id=id,this.settingsPage=null,this.dependencies=dependencies}init(settingsPage){this.settingsPage=settingsPage,this.getElementsToBind().on("change",()=>this.settingsPage.renderSettings())}getElementsToBind(){return this.$getRow(!1)}shouldBeShown(){if("function"==typeof this.customShouldBeShown)return this.customShouldBeShown();let pass=!0;for(var[rowID,value]of Object.entries(this.dependencies)){const row=this.settingsPage.getRowById(rowID);if(row&&(":checked"===value?pass=pass&&row.isChecked():":unchecked"===value?pass=pass&&!row.isChecked():"string"==typeof value?pass=pass&&row.isValueEqual(value):Array.isArray(value)&&(pass=pass&&value.some(_value=>row.isValueEqual(_value))),!pass))break}return pass}isChecked(){return this.$getRow().is(":checked")}isValueEqual(value){return this.$getRow().val()===value}show(){}hide(){}$getRow(any=0){}}class SettingsRow extends SettingsElement{show(){this.$getRow().closest("tr").show()}hide(){this.$getRow().closest("tr").hide()}$getRow(any=!0){let input=$('[name="'+this.prefix+this.id+'"]');return input=any&&input.is(":radio")?input.filter(":checked"):input}}class SettingsSubsection extends SettingsElement{constructor(id,dependencies={}){super(id,dependencies),this.id=this.prefix+id}getElementsToBind(){return $()}show(){this.$getRow().forEach(element=>element.show())}hide(){this.$getRow().forEach(element=>element.hide())}$getRow(any=0){var sectionDescription=$("#"+this.id+"-description"),title=sectionDescription.prev("h2"),section=sectionDescription.next("table");return[title,sectionDescription,section]}}var productPageSettingPage;isSectionActive("general")&&((productPageSettingPage=new SettingsPage).init([{id:"display"},{id:"display_type"},{id:"quantity_type"},{id:"tooltip_color",dependencies:{display_type:"tooltip"}},{id:"tooltip_size",dependencies:{display_type:"tooltip"}},{id:"tooltip_border",dependencies:{display_type:"tooltip"}},{id:"table_title",dependencies:{display_type:["blocks","table","options","dropdown","horizontal-table","plain-text"]}},{id:"position_hook",dependencies:{display:":checked",display_type:["blocks","table","options","dropdown","horizontal-table","plain-text"]}},{id:"selected_quantity_color"},{id:"table_quantity_measurement[singular]",dependencies:{display_type:["table","tooltip","horizontal-table"]}},{id:"blocks_quantity_measurement[singular]",dependencies:{display_type:"blocks"}},{id:"pricing_blocks_style",dependencies:{display_type:"blocks"}},{id:"pricing_table_style",dependencies:{display_type:"table"}},{id:"compact_layout",dependencies:{display_type:["table","options","blocks","dropdown","horizontal-table"]}},{id:"head_quantity_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"head_price_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"show_discount_column",dependencies:{display_type:["blocks"]}},{id:"head_discount_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"clickable_table_rows"},{id:"options_option_text",dependencies:{display_type:["options","dropdown"]}},{id:"options_show_default_option",dependencies:{display_type:"options"}},{id:"options_default_option_text",dependencies:{options_show_default_option:":checked",display_type:["options","dropdown"]}},{id:"options_show_original_product_price",dependencies:{display_type:["options","dropdown"]}},{id:"options_show_total",dependencies:{display_type:"options",pricing_options_style:["default","style-1","style-2","style-3"]}},{id:"pricing_options_style",dependencies:{display_type:"options"}},{id:"plain_text_template",dependencies:{display_type:"plain-text"}},{id:"plain_text_show_first_tier",dependencies:{display_type:"plain-text"}},{id:"plain_text_first_tier_template",dependencies:{plain_text_show_first_tier:":checked",display_type:"plain-text"}},{id:"product_page_price_format"},{id:"update_price_on_product_page",dependencies:{product_page_price_format:"custom"}},{id:"show_tiered_price_as_discount",dependencies:{update_price_on_product_page:":checked",product_page_price_format:"custom"}},{id:"show_total_price",dependencies:{product_page_price_format:"custom"}},{id:"show_total_price_non_tiered",dependencies:{show_total_price:":checked",product_page_price_format:"custom"}},{id:"you_save_enabled"},{id:"you_save_consider_sale_price",dependencies:{you_save_enabled:":checked"}},{id:"you_save_non_tiered",dependencies:{you_save_enabled:":checked",you_save_consider_sale_price:":checked"}},{id:"you_save_template",dependencies:{you_save_enabled:":checked"}},{id:"you_save_text_color",dependencies:{you_save_enabled:":checked"}},{id:"non_logged_in_users_prevent_purchase"},{id:"non_logged_in_users_add_to_cart_label",dependencies:{non_logged_in_users_prevent_purchase:":checked"}},{id:"non_logged_in_users_purchase_message",dependencies:{non_logged_in_users_prevent_purchase:":checked"}},{id:"non_logged_in_users_hide_prices"},{id:"non_logged_in_users_price_message",dependencies:{non_logged_in_users_hide_prices:":checked"}},{id:"tiered_price_at_catalog"},{id:"tiered_price_at_catalog_for_variable",dependencies:{tiered_price_at_catalog:":checked"}},{id:"tiered_price_at_catalog_type",dependencies:{tiered_price_at_catalog:":checked"}},{id:"tiered_price_at_catalog_custom_template",dependencies:{tiered_price_at_catalog:":checked",tiered_price_at_catalog_type:"custom"}},{id:"lowest_prefix",dependencies:{tiered_price_at_catalog:":checked",tiered_price_at_catalog_type:"lowest"}},{id:"show_discount_in_cart"},{id:"show_subtotal_as_discount_in_cart"},{id:"consider_sale_price_as_discount_in_cart"},{id:"cart_upsell_enabled"},{id:"cart_upsell_template",dependencies:{cart_upsell_enabled:":checked"}},{id:"cart_upsell_color",dependencies:{cart_upsell_enabled:":checked"}},{id:"display_summary"},{id:"display_summary_non_tiered",dependencies:{display_summary:":checked"}},{id:"summary_title",dependencies:{display_summary:":checked"}},{id:"summary_type",dependencies:{display_summary:":checked"}},{id:"summary_total_label",dependencies:{display_summary:":checked",summary_type:["inline","detailed"]}},{id:"summary_each_label",dependencies:{display_summary:":checked",summary_type:"inline"}},{id:"summary_position_hook",dependencies:{display_summary:":checked"}}]),productPageSettingPage=productPageSettingPage.getRowById("consider_sale_price_as_discount_in_cart"))&&(productPageSettingPage.customShouldBeShown=function(){var row1=this.settingsPage.getRowById("show_subtotal_as_discount_in_cart"),row2=this.settingsPage.getRowById("show_discount_in_cart");return row1&&row1.isChecked()||row2&&row2.isChecked()}),isSectionActive("shop-loop-display")&&(new SettingsPage).init([{id:"shop_loop_display_enabled"},{id:"shop_loop_display_position",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_show_quantity_field",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_use_reduced_styles",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_you_save_enabled",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_dynamic_price",dependencies:{shop_loop_display_enabled:":checked"}},{type:"subsection",id:"shop_loop_display_layout_settings",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_layout_settings"},{id:"shop_loop_display_layout",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_title",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_quantity_type",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_selected_quantity_color",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_table_quantity_measurement[singular]",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_blocks_quantity_measurement[singular]",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"blocks"}},{id:"shop_loop_display_blocks_show_discount",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"blocks"}},{id:"shop_loop_display_quantity_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_price_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_discount_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_clickable_table_rows",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_options_show_original_product_price",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_options_show_total",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"options"}},{id:"shop_loop_display_options_option_text",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_options_show_default_option",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"options"}},{id:"shop_loop_display_options_default_option_text",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_plain_text_template",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}},{id:"shop_loop_display_plain_text_show_first_tier",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}},{id:"shop_loop_display_plain_text_first_tier_template",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}}]),window.tptIntegrationBlockClickInitialized||(window.tptIntegrationBlockClickInitialized=!0,$(document).on("click",".tpt-integration-wrapper",function(e){$(e.target).is("a")||$(e.target).closest("a").length||$(e.target).is("input")||$(e.target).closest("label").length||(e=$(this).find('input[type="checkbox"]')).prop("checked",!e.prop("checked")).trigger("change")})),window.tptFeatureFlagBlockClickInitialized||(window.tptFeatureFlagBlockClickInitialized=!0,$(document).on("click",".tpt-feature-flag-wrapper",function(e){$(e.target).is("a")||$(e.target).closest("a").length||$(e.target).is("input")||$(e.target).closest("label").length||(e=$(this).find('input[type="checkbox"]')).prop("checked",!e.prop("checked")).trigger("change")}))});
1 +jQuery(document).ready(function($){function isSectionActive(sectionId){var urlParams=new URLSearchParams(window.location.search);if("tiered_pricing_table_settings"===urlParams.get("tab"))return urlParams=urlParams.get("section"),"general"===sectionId?!urlParams||"general"===urlParams:urlParams===sectionId}class SettingsPage{constructor(){this.rows=[]}init(rowsConfig){this.rows=rowsConfig.map(config=>new("subsection"===config.type?SettingsSubsection:SettingsRow)(config.id,config.dependencies||{})),this.rows.forEach(row=>row.init(this)),this.renderSettings()}getRowById(id){return this.rows.find(row=>row.id===id)}renderSettings(){this.rows.forEach(row=>row.shouldBeShown()?row.show():row.hide())}}class SettingsElement{constructor(id,dependencies={}){this.prefix="tier_pricing_table_",this.id=id,this.settingsPage=null,this.dependencies=dependencies}init(settingsPage){this.settingsPage=settingsPage,this.getElementsToBind().on("change",()=>this.settingsPage.renderSettings())}getElementsToBind(){return this.$getRow(!1)}shouldBeShown(){if("function"==typeof this.customShouldBeShown)return this.customShouldBeShown();let pass=!0;for(var[rowID,value]of Object.entries(this.dependencies)){const row=this.settingsPage.getRowById(rowID);if(row&&(":checked"===value?pass=pass&&row.isChecked():":unchecked"===value?pass=pass&&!row.isChecked():"string"==typeof value?pass=pass&&row.isValueEqual(value):Array.isArray(value)&&(pass=pass&&value.some(_value=>row.isValueEqual(_value))),!pass))break}return pass}isChecked(){return this.$getRow().is(":checked")}isValueEqual(value){return this.$getRow().val()===value}show(){}hide(){}$getRow(any=0){}}class SettingsRow extends SettingsElement{show(){this.$getRow().closest("tr").show()}hide(){this.$getRow().closest("tr").hide()}$getRow(any=!0){let input=$('[name="'+this.prefix+this.id+'"]');return input=any&&input.is(":radio")?input.filter(":checked"):input}}class SettingsSubsection extends SettingsElement{constructor(id,dependencies={}){super(id,dependencies),this.id=this.prefix+id}getElementsToBind(){return $()}show(){this.$getRow().forEach(element=>element.show())}hide(){this.$getRow().forEach(element=>element.hide())}$getRow(any=0){var sectionDescription=$("#"+this.id+"-description"),title=sectionDescription.prev("h2"),section=sectionDescription.next("table");return[title,sectionDescription,section]}}var productPageSettingPage,GUEST_USERS_CONFIG=[{id:"non_logged_in_users_prevent_purchase"},{id:"non_logged_in_users_add_to_cart_label",dependencies:{non_logged_in_users_prevent_purchase:":checked"}},{id:"non_logged_in_users_purchase_message",dependencies:{non_logged_in_users_prevent_purchase:":checked"}},{id:"non_logged_in_users_hide_prices"},{id:"non_logged_in_users_price_message",dependencies:{non_logged_in_users_hide_prices:":checked"}},{id:"visibility_closed_store"},{id:"visibility_closed_store_pages",dependencies:{visibility_closed_store:":checked"}},{id:"visibility_enabled"},{id:"visibility_hidden_redirect",dependencies:{visibility_enabled:":checked"}},{id:"cart_rules_enabled"},{id:"cart_rules_minimums[__none__][amount]",dependencies:{cart_rules_enabled:":checked"}},{id:"cart_rules_amount_message",dependencies:{cart_rules_enabled:":checked"}},{id:"cart_rules_quantity_message",dependencies:{cart_rules_enabled:":checked"}},{type:"subsection",id:"_subsection_payment-methods",dependencies:{cart_rules_enabled:":checked"}},{type:"subsection",id:"_subsection_shipping-methods",dependencies:{cart_rules_enabled:":checked"}}],WHOLESALE_ENABLED={wholesale_enabled:":checked"},WHOLESALE_ENABLED=[{id:"wholesale_enabled"},{id:"wholesale_role",dependencies:WHOLESALE_ENABLED},{id:"wholesale_approval",dependencies:WHOLESALE_ENABLED},{id:"wholesale_registration_page",dependencies:WHOLESALE_ENABLED},{id:"wholesale_login_redirect_page",dependencies:WHOLESALE_ENABLED},{id:"wholesale_login_form_link",dependencies:WHOLESALE_ENABLED},{id:"wholesale_login_form_link_text",dependencies:{wholesale_enabled:":checked",wholesale_login_form_link:":checked"}},{type:"subsection",id:"wholesale_section_form",dependencies:WHOLESALE_ENABLED},{type:"subsection",id:"wholesale_section_spam",dependencies:WHOLESALE_ENABLED},{id:"wholesale_recaptcha",dependencies:WHOLESALE_ENABLED},{id:"wholesale_recaptcha_site_key",dependencies:{wholesale_enabled:":checked",wholesale_recaptcha:":checked"}},{id:"wholesale_recaptcha_secret_key",dependencies:{wholesale_enabled:":checked",wholesale_recaptcha:":checked"}},{type:"subsection",id:"wholesale_section_messages",dependencies:WHOLESALE_ENABLED}];isSectionActive("general")&&((productPageSettingPage=new SettingsPage).init([{id:"display"},{id:"display_type"},{id:"quantity_type"},{id:"tooltip_color",dependencies:{display_type:"tooltip"}},{id:"tooltip_size",dependencies:{display_type:"tooltip"}},{id:"tooltip_border",dependencies:{display_type:"tooltip"}},{id:"table_title",dependencies:{display_type:["blocks","table","options","dropdown","horizontal-table","plain-text"]}},{id:"position_hook",dependencies:{display:":checked",display_type:["blocks","table","options","dropdown","horizontal-table","plain-text"]}},{id:"selected_quantity_color"},{id:"discount_badge_color",dependencies:{display_type:"table",pricing_table_style:["style-2","style-3","style-4","style-5","style-6"]}},{id:"table_active_border",dependencies:{display_type:"table",pricing_table_style:["style-1","style-5","style-6"]}},{id:"table_quantity_measurement[singular]",dependencies:{display_type:["table","tooltip","horizontal-table"]}},{id:"blocks_quantity_measurement[singular]",dependencies:{display_type:"blocks"}},{id:"pricing_blocks_style",dependencies:{display_type:"blocks"}},{id:"pricing_table_style",dependencies:{display_type:"table"}},{id:"pricing_dropdown_style",dependencies:{display_type:"dropdown"}},{id:"pricing_plain_text_style",dependencies:{display_type:"plain-text"}},{id:"compact_layout",dependencies:{display_type:["table","options","blocks","dropdown","horizontal-table"]}},{id:"tiers_order"},{id:"layout_spacing",dependencies:{display_type:["blocks","options","table"]}},{id:"cell_padding",dependencies:{display_type:["table","horizontal-table"]}},{id:"discount_format",dependencies:{display_type:["table","horizontal-table","tooltip","blocks","options"]}},{id:"head_quantity_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"head_price_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"show_discount_column",dependencies:{display_type:["blocks","options"]}},{id:"head_discount_text",dependencies:{display_type:["tooltip","table","horizontal-table"]}},{id:"clickable_table_rows"},{id:"options_option_text",dependencies:{display_type:["options","dropdown"]}},{id:"options_show_default_option",dependencies:{display_type:"options"}},{id:"options_default_option_text",dependencies:{display_type:["options","dropdown"]}},{id:"options_show_original_product_price",dependencies:{display_type:["options","dropdown"]}},{id:"options_show_total",dependencies:{display_type:"options",pricing_options_style:["default","style-1","style-2","style-3","style-4","style-5","style-6"]}},{id:"pricing_options_style",dependencies:{display_type:"options"}},{id:"plain_text_template",dependencies:{display_type:"plain-text"}},{id:"plain_text_show_first_tier",dependencies:{display_type:"plain-text"}},{id:"plain_text_first_tier_template",dependencies:{plain_text_show_first_tier:":checked",display_type:"plain-text"}},{id:"product_page_price_format"},{id:"update_price_on_product_page",dependencies:{product_page_price_format:"custom"}},{id:"show_tiered_price_as_discount",dependencies:{update_price_on_product_page:":checked",product_page_price_format:"custom"}},{id:"show_total_price",dependencies:{product_page_price_format:"custom"}},{id:"show_total_price_non_tiered",dependencies:{show_total_price:":checked",product_page_price_format:"custom"}},{id:"you_save_enabled"},{id:"you_save_consider_sale_price",dependencies:{you_save_enabled:":checked"}},{id:"you_save_non_tiered",dependencies:{you_save_enabled:":checked",you_save_consider_sale_price:":checked"}},{id:"you_save_template",dependencies:{you_save_enabled:":checked"}},{id:"you_save_text_color",dependencies:{you_save_enabled:":checked"}},{id:"tiered_price_at_catalog"},{id:"tiered_price_at_catalog_for_variable",dependencies:{tiered_price_at_catalog:":checked"}},{id:"tiered_price_at_catalog_type",dependencies:{tiered_price_at_catalog:":checked"}},{id:"tiered_price_at_catalog_custom_template",dependencies:{tiered_price_at_catalog:":checked",tiered_price_at_catalog_type:"custom"}},{id:"lowest_prefix",dependencies:{tiered_price_at_catalog:":checked",tiered_price_at_catalog_type:"lowest"}},{id:"show_discount_in_cart"},{id:"show_subtotal_as_discount_in_cart"},{id:"consider_sale_price_as_discount_in_cart"},{id:"cart_upsell_enabled"},{id:"cart_upsell_template",dependencies:{cart_upsell_enabled:":checked"}},{id:"cart_upsell_color",dependencies:{cart_upsell_enabled:":checked"}},{id:"cart_upsell_link",dependencies:{cart_upsell_enabled:":checked"}},{id:"cart_upsell_progress",dependencies:{cart_upsell_enabled:":checked"}},{id:"cart_total_savings"},{id:"cart_total_savings_label",dependencies:{cart_total_savings:":checked"}},{id:"display_summary"},{id:"display_summary_non_tiered",dependencies:{display_summary:":checked"}},{id:"summary_title",dependencies:{display_summary:":checked"}},{id:"summary_type",dependencies:{display_summary:":checked"}},{id:"summary_total_label",dependencies:{display_summary:":checked",summary_type:["inline","detailed"]}},{id:"summary_each_label",dependencies:{display_summary:":checked",summary_type:"inline"}},{id:"summary_position_hook",dependencies:{display_summary:":checked"}}].concat(GUEST_USERS_CONFIG)),productPageSettingPage=productPageSettingPage.getRowById("consider_sale_price_as_discount_in_cart"))&&(productPageSettingPage.customShouldBeShown=function(){var row1=this.settingsPage.getRowById("show_subtotal_as_discount_in_cart"),row2=this.settingsPage.getRowById("show_discount_in_cart");return row1&&row1.isChecked()||row2&&row2.isChecked()}),isSectionActive("shop-loop-display")&&(new SettingsPage).init([{id:"shop_loop_display_enabled"},{id:"shop_loop_display_position",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_show_quantity_field",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_use_reduced_styles",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_you_save_enabled",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_dynamic_price",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_scope",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_contexts",dependencies:{shop_loop_display_enabled:":checked",shop_loop_display_scope:"selected"}},{id:"shop_loop_display_categories",dependencies:{shop_loop_display_enabled:":checked",shop_loop_display_scope:"selected"}},{id:"shop_loop_display_tiers_limit",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_badge_enabled"},{id:"shop_loop_display_badge_template",dependencies:{shop_loop_display_badge_enabled:":checked"}},{id:"shop_loop_display_badge_position",dependencies:{shop_loop_display_badge_enabled:":checked"}},{id:"shop_loop_display_badge_color",dependencies:{shop_loop_display_badge_enabled:":checked"}},{type:"subsection",id:"shop_loop_display_layout_settings",dependencies:{shop_loop_display_enabled:":checked"}},{id:"shop_loop_display_layout_settings"},{id:"shop_loop_display_layout",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_pricing_table_style",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"table"}},{id:"shop_loop_display_pricing_blocks_style",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"blocks"}},{id:"shop_loop_display_pricing_options_style",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"options"}},{id:"shop_loop_display_pricing_dropdown_style",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"dropdown"}},{id:"shop_loop_display_pricing_plain_text_style",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}},{id:"shop_loop_display_title",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_quantity_type",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_selected_quantity_color",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_discount_badge_color",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"table",shop_loop_display_pricing_table_style:["style-2","style-3","style-4","style-5","style-6"]}},{id:"shop_loop_display_table_active_border",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"table",shop_loop_display_pricing_table_style:["style-1","style-5","style-6"]}},{id:"shop_loop_display_table_quantity_measurement[singular]",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_blocks_quantity_measurement[singular]",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"blocks"}},{id:"shop_loop_display_blocks_show_discount",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["blocks","options"]}},{id:"shop_loop_display_tiers_order",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_layout_spacing",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["blocks","options","table"]}},{id:"shop_loop_display_cell_padding",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_discount_format",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table","blocks","options"]}},{id:"shop_loop_display_quantity_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_price_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_discount_column_title",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["table","horizontal-table"]}},{id:"shop_loop_display_clickable_table_rows",dependencies:{shop_loop_display_layout_settings:"custom"}},{id:"shop_loop_display_options_show_original_product_price",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_options_show_total",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"options"}},{id:"shop_loop_display_options_option_text",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_options_show_default_option",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"options"}},{id:"shop_loop_display_options_default_option_text",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:["dropdown","options"]}},{id:"shop_loop_display_plain_text_template",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}},{id:"shop_loop_display_plain_text_show_first_tier",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}},{id:"shop_loop_display_plain_text_first_tier_template",dependencies:{shop_loop_display_layout_settings:"custom",shop_loop_display_layout:"plain-text"}}]),isSectionActive("wholesale")&&(new SettingsPage).init(GUEST_USERS_CONFIG.concat(WHOLESALE_ENABLED)),window.tptIntegrationBlockClickInitialized||(window.tptIntegrationBlockClickInitialized=!0,$(".tpt-example").each(function(){const $example=$(this),$input=$example.closest("td").find("input.tpt-toggle-switch").first();var update;$input.length&&(update=function(){$example.find(".tpt-example__case").removeClass("tpt-example__case--current"),$example.find($input.is(":checked")?".tpt-example__case--on":".tpt-example__case--off").addClass("tpt-example__case--current")},$input.on("change",update),update())}),$(document).on("click",".tpt-integration-wrapper",function(e){$(e.target).is("a")||$(e.target).closest("a").length||$(e.target).is("input")||$(e.target).closest("label").length||(e=$(this).find('input[type="checkbox"]')).prop("checked",!e.prop("checked")).trigger("change")})),window.tptFeatureFlagBlockClickInitialized||(window.tptFeatureFlagBlockClickInitialized=!0,$(document).on("click",".tpt-feature-flag-wrapper",function(e){$(e.target).is("a")||$(e.target).closest("a").length||$(e.target).is("input")||$(e.target).closest("label").length||(e=$(this).find('input[type="checkbox"]')).prop("checked",!e.prop("checked")).trigger("change")}))});