/*! elementor-pro - v3.27.0 - 20-01-2025 */ .elementor-price-table{text-align:center}.elementor-price-table .elementor-price-table__header{background:var(--e-price-table-header-background-color,#555);padding:20px 0}.elementor-price-table .elementor-price-table__heading{color:#fff;font-size:24px;font-weight:600;line-height:1.2;margin:0;padding:0}.elementor-price-table .elementor-price-table__subheading{color:#fff;font-size:13px;font-weight:400}.elementor-price-table .elementor-price-table__original-price{align-self:center;font-size:.5em;font-weight:400;line-height:1;margin-inline-end:15px;text-decoration:line-through}.elementor-price-table .elementor-price-table__original-price .elementor-price-table__currency{font-size:1em;margin:0}.elementor-price-table .elementor-price-table__price{align-items:center;color:#555;display:flex;flex-direction:row-reverse;flex-wrap:wrap;font-size:65px;font-weight:800;justify-content:center;padding:40px 0}.elementor-price-table .elementor-price-table__price .elementor-typo-excluded{font-size:medium;font-style:normal;font-weight:400;letter-spacing:normal;line-height:normal;text-transform:none}.elementor-price-table .elementor-price-table__after-price{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;flex-wrap:wrap;text-align:start}.elementor-price-table .elementor-price-table__integer-part{line-height:.8}.elementor-price-table .elementor-price-table__currency,.elementor-price-table .elementor-price-table__fractional-part{font-size:.3em;line-height:1}.elementor-price-table .elementor-price-table__currency{margin-inline-end:3px}.elementor-price-table .elementor-price-table__period{font-size:13px;font-weight:400;width:100%}.elementor-price-table .elementor-price-table__features-list{color:var(--e-price-table-features-list-color);line-height:1;list-style-type:none;margin:0;padding:0}.elementor-price-table .elementor-price-table__features-list li{font-size:14px;line-height:1;margin:0;padding:0}.elementor-price-table .elementor-price-table__features-list li .elementor-price-table__feature-inner{margin-left:15px;margin-right:15px}.elementor-price-table .elementor-price-table__features-list li:not(:first-child):before{border:0 solid hsla(0,0%,48%,.3);content:"";display:block;margin:10px 12.5%}.elementor-price-table .elementor-price-table__features-list i{font-size:1.3em;margin-inline-end:10px}.elementor-price-table .elementor-price-table__features-list svg{margin-inline-end:10px;fill:var(--e-price-table-features-list-color);height:1.3em;width:1.3em}.elementor-price-table .elementor-price-table__features-list svg~*{vertical-align:text-top}.elementor-price-table .elementor-price-table__footer{padding:30px 0}.elementor-price-table .elementor-price-table__additional_info{font-size:13px;line-height:1.4;margin:0}.elementor-price-table__ribbon{height:150px;left:0;overflow:hidden;position:absolute;right:auto;top:0;transform:rotate(0);width:150px}.elementor-price-table__ribbon-inner{background:#000;font-size:13px;font-weight:800;left:0;line-height:2;margin-top:35px;text-align:center;text-transform:uppercase;transform:translateY(-50%) translateX(0) translateX(35px) rotate(-45deg);width:200%}.elementor-price-table__ribbon.elementor-ribbon-left{left:0;right:auto;transform:rotate(0)}.elementor-price-table__ribbon.elementor-ribbon-right{left:auto;right:0;transform:rotate(90deg)}.elementor-widget-price-table .elementor-widget-container,.elementor-widget-price-table:not(:has(.elementor-widget-container)){background-color:#f9fafa;overflow:hidden}/* Video widget ---------------------------------------------------------- */=== Variation Swatches for WooCommerce by CartFlows === Contributors: brainstormforce Tags: woocommerce variation swatches, woocommerce attributes, woocommerce product variation, variation product swatches, color variation swatch Requires at least: 5.4 Tested up to: 6.8 Stable tag: 1.0.13 Requires PHP: 5.6 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Variation Swatches for WooCommerce is the easiest to use plugin to convert dropdown boxes into highly engaging variation swatches. == Description == Variation Swatches for WooCommerce is the easiest to use plugin to convert dropdown boxes into highly engaging variation swatches. Make it faster and easier for your buyers to choose product variations visually. There are no complicated settings or configuration needed to start using Variation Swatches for WooCommerce. [youtube https://www.youtube.com/watch?v=j2UbKnuF7-Y] Instantly convert traditional dropdown attributes to visually appealing swatches. This plugin provides options to convert woocommerce variation attributes to swatches. We provide multiple options like image, color, label type swatches for both product page and shop page. Variation Swatches for WooCommerce works with most well coded WordPress themes & plugins. Learn more from our [knowledge base.](https://cartflows.com/docs/variation-swatches-for-woocommerce-plugin/) [Try the live demo of Variation Swatches for WooCommerce](https://bsf.io/variation-swatches-woo-demo) ## Variation Swatches Is Compatible With ## ### Page Builders ### Variation Swatches works with all WordPress page builders, including: * Elementor * Beaver Builder * Brizy Builder * Divi Builder * Thrive Architect * Gutenberg * Spectra Website Builder * Oxygen Builder * Bricks Builder * And others ### WooCommerce Themes ### Variation Swatches works with any theme, including: * Astra * Avada * Blocksy * Divi * Flatsome * GeneratePress * Hello Elementor * Hestia * Kadence * Neve * OceanWP Here are some of our products: * **Astra Theme** Currently used by nearly 2 million websites, Astra Theme is the most popular WordPress theme and is also the most popular WooCommerce theme. Variation Swatches for WooCommerce was made to work perfectly with Astra Theme. [Visit Astra Theme](https://wpastra.com) * **CartFlows** Currently used by nearly 300,000 store owners to get more orders and increase the order value through our conversion optimized checkout replacement for WooCommerce, checkout order bumps, one-click post purchase upsells, and A/B split testing engine. [Visit CartFlows](https://cartflows.com) * **Cart Abandonment Recovery** Currently used by nearly 400,000 store owners to capture lost revenue caused by buyers that don’t complete their checkout. Cart Abandonment Recovery captures these lost orders and automatically contacts the lost buyers to get them to complete their order. [Visit Cart Abandonment Recovery](https://wordpress.org/plugins/woo-cart-abandonment-recovery/) * **Stripe for WooCommerce** Stripe for WooCommerce delivers a simple, secure way to accept credit card payments, Apple Pay, and Google Pay on your WooCommerce store. Reduce payment friction and boost conversions using this free plugin! [Visit Stripe for WooCommerce](https://wordpress.org/plugins/checkout-plugins-stripe-woo/) * **Starter Templates** Currently used by nearly 2 million websites, Starter Templates offers hundreds of complete website templates, including over 50 website designs for WooCommerce stores. [Visit Starter Templates](https://wordpress.org/plugins/astra-sites/) As you can see, we know WooCommerce inside and out and help thousands of store owners build highly profitable stores everyday. == Global Features: == 1. Enable Swatches for Shop / Product details pages 1. 3 different Swatch types (label, color, image) 1. Completely customizable swatches design with height, width and border radius 1. Auto convert variation dropdowns to label/button type Swatch 1. Disabled Attribute Type (Blur with Cross, Blur Only, Hide) 1. Enable/Disable tooltip 1. Tooltip with image preview == Shop Page Features: == 1. Override global features and make different settings for shop page 1. Swatches Alignment for shop page (Left, Center, Right) 1. Swatches position (Before title, After title, Before price, After price) == USERS LOVE VARIATION SWATCHES == [youtube https://www.youtube.com/watch?v=94OJz6lu_HE] [youtube https://www.youtube.com/watch?v=mjXCkw7rt2Y] == Installation == 1. Install the `Variation Swatches for WooCommerce` either via the WordPress plugin directory or by uploading `variation-swatches-woo.zip` to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Make sure to disable caching on your checkout and thank you steps == Frequently Asked Questions == = Does this shows variations on shop / archieve page? = Yes, this plugin enables variation swatches on shop / archieve page. User can select variant directly from shop page and add to cart. == Screenshots == 1. Converts default dropdowns to Swatches 2. Multiple options for swatches available == Changelog == = 1.0.13 – THURSDAY, 24th APRIL 2025 = * New - Introduced a CartFlows info page to help users discover checkout optimization features. * Improvement - Added filters cfvsw_is_required_screen_for_swatch_types and cfvsw_available_attributes for better customization. * Fix - Swatches were not displaying for variation products when included in a bundled product. = 1.0.12 – THURSDAY, 21st NOVEMBER 2024 = * Fix - Fixed the conflict with 'WooCommerce Load More Products' plugin & disabled attributes of variations products. * Fix - Fixed the conflict with Astra theme 'Swap image on hover" feature not working when swatches are disabled from shop/archive pages = 1.0.11 – MONDAY, 7th OCTOBER 2024 = * Fix - Resolved the issue where the variation swatch selection did not function properly when jQuery Migrate was disabled in Bricks Builder. * Fix - Resolved the issue where the "Out-of-Stock Disable" feature did not work correctly with pagination. = 1.0.10 – THURSDAY, 15th AUGUST 2024 = * Improvement: Updated the WooCommerce HPOS Compatibility. = 1.0.9 – WEDNESDAY, 14th AUGUST 2024 = * Fix - Resolved the issue of "Swipe images on hover" feature was not working when using the Astra theme. * Fix - Removed error messages related to undefined variables that were appearing on the frontend. * Fix - Updated the codebase to better handle both array and non-array values. = 1.0.8 – THURSDAY, 28th MARCH 2024 = * New: Introduced the border width option for the swatch. You can now set a custom border width to your swatches. = 1.0.7 – WEDNESDAY, 22nd FEBRUARY 2023 = * Improvement - Refactored some code to harden the security of the plugin. = 1.0.6 – WEDNESDAY, 14th DECEMBER 2022 = * Improvement - Added support for the taxonomy page. * Improvement - Added support to populate swatches on ajax calls. * Fixed - Wrong images were appearing on the swatches selection. * Fixed - Plugin conflict with WP-Persian plugin. * Fixed - Unable to save custom attribute data with the Cyrillic alphabet. = 1.0.5 – TUESDAY, 18th OCTOBER 2022 = * Fixed - Compatibility issues with WP Sheet Editor – Taxonomy Terms Pro. * Fixed - Fatal error with Astra theme. * Fixed - Variation price disappears on shop page. = 1.0.4 – WEDNESDAY, 7th SEPTEMBER 2022 = * Improvement - Supports WooCommerce shortcodes. * Improvement - Astra's swap mode working on disabling swatches on shop page. * Improvement - Increased variation threshold to 200. * Fixed - Admin UI breaking on edit product page. * Fixed - Settings page UI issue on attribute edit. = 1.0.3 – WEDNESDAY, 24th AUGUST 2022 = * Feature - Disable out of stock terms. * Feature - Catalog mode for shop page. * Improvement - Admin UI improvements. * Improvement - Supports Astra's infinite scroll mode. * Fixed - Issue selecting multiple options on shop page. * Fixed - Thumbnail dimension on shop page. = 1.0.2 – TUESDAY, 9th AUGUST 2022 = * Feature - Customize variation swatches from the edit product page. * Improvement - Updated swatches' spacing. * Improvement - Maintain swatches order on frontend as per settings. * Improvement - Added RTL support for the settings page. = 1.0.1 – THURSDAY, 21st JULY 2022 = * Improvement - Support for Astra upsells on cart page. = 1.0.0 – FRIDAY, 15th JULY 2022 = * Initial release. /** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. * * @package FacebookCommerce */ jQuery( document ).ready( ( $ ) => { 'use strict'; /** * Google product category field handler. * * @since 2.1.0 * * @type {WC_Facebook_Google_Product_Category_Fields} object */ window.WC_Facebook_Google_Product_Category_Fields = class WC_Facebook_Google_Product_Category_Fields { /** * Handler constructor. * * @since 2.1.0 * * @param {Object[]} categories The full categories list, indexed by the category ID * @param {string} categories[].label The category label * @param {string[]} categories[].options The category's child categories' IDs * @param {string} categories[].parent The category's parent category ID * @param {string} input_id The element that should receive the latest concrete category ID */ constructor(categories, input_id) { this.categories = categories; this.input_id = input_id; var $input = $( '#' + this.input_id ); $( '
' ) .insertBefore( $input ) .on( 'change', 'select.wc-facebook-google-product-category-select', ( event ) => { this.onChange( $( event.target ) ); } ); this.addInitialSelects( $input.val() ); var optionalSelectorID = this.globalsHolder().enhanced_attribute_optional_selector; if(typeof(optionalSelectorID) !== 'undefined') { // Initial trigger for the optional attributes selector $( '#' + optionalSelectorID ).on('change', function(){ $('.wc-facebook-enhanced-catalog-attribute-optional-row') .toggleClass('hidden', !$(this).prop("checked")); }); } } globalsHolder() { if(typeof(facebook_for_woocommerce_product_categories) !== 'undefined'){ return facebook_for_woocommerce_product_categories; } else if(typeof(facebook_for_woocommerce_settings_sync) !== 'undefined'){ return facebook_for_woocommerce_settings_sync; } else { return facebook_for_woocommerce_products_admin; } } getPageType(){ if(typeof(facebook_for_woocommerce_product_categories) !== 'undefined'){ if( $( 'input[name=tag_ID]' ).length === 0){ return this.globalsHolder().enhanced_attribute_page_type_add_category; } else { return this.globalsHolder().enhanced_attribute_page_type_edit_category; } } else { return this.globalsHolder().enhanced_attribute_page_type_edit_product; } } /** * Adds the initial select fields for the previously selected values. * * If there is no previously selected value, it adds two selected fields with no selected option. * * @param {string} categoryId the selected google product category */ addInitialSelects( categoryId ) { if ( categoryId ) { this.getSelectedCategoryIds( categoryId ).forEach( ( pair ) => { this.addSelect( this.getOptions( pair[1] ), pair[0] ); } ); var options = this.getOptions( categoryId ); if ( Object.keys( options ).length ) { this.addSelect( options ); } } else { this.addSelect( this.getOptions() ); this.addSelect( {} ); } } /** * Sets the enhanced attributes to show * */ requestAttributesIfValid() { // if an input with this id isn't available then we can't show // enhanced attributes on this page, (for example it may be the // product sync page) var canShowEnhancedAttributesID = 'wc_facebook_can_show_enhanced_catalog_attributes_id'; if($( '#'+canShowEnhancedAttributesID ).val() !== 'true'){ return; } $('.wc-facebook-enhanced-catalog-attribute-row').remove(); if(this.isValid()) { var inputSelector = '#' + this.input_id; var $inputParent = $( inputSelector ).parents('div.form-field'); var optionalSelectorID = this.globalsHolder().enhanced_attribute_optional_selector; if( this.getPageType() === this.globalsHolder().enhanced_attribute_page_type_edit_category ){ $inputParent = $( inputSelector ).parents('tr.form-field'); } else if( this.getPageType() === this.globalsHolder().enhanced_attribute_page_type_edit_product ) { $inputParent = $( inputSelector ).parents('p.form-field'); } $.get( this.globalsHolder().ajax_url, { action: 'wc_facebook_enhanced_catalog_attributes', security: '', selected_category: $( inputSelector ).val(), tag_id: parseInt($( 'input[name=tag_ID]' ).val(), 10), taxonomy: $( 'input[name=taxonomy]' ).val(), item_id: parseInt( $( 'input[name=post_ID]' ).val(), 10 ), page_type: this.getPageType(), }, function( response ) { var $response = $(response); $( '#' + optionalSelectorID, $response ).on('change', function(){ $('.wc-facebook-enhanced-catalog-attribute-optional-row') .toggleClass('hidden', !$(this).prop("checked")); }); $response.insertAfter($inputParent); // Ensure tooltips work: $(document.body).trigger('init_tooltips'); }); } } /** * Updates the subsequent selects whenever one of the selects changes. * * @since 2.1.0 */ onChange(element) { // remove following select fields if their options depended on the value of the current select field if ( element.hasClass( 'locked' ) ) { element.closest( '.wc-facebook-google-product-category-field' ).nextAll().remove(); } var categoryId = element.val(); if ( categoryId ) { var options = this.getOptions( categoryId ); if ( Object.keys( options ).length ) { this.addSelect( options ); } } else { // use category ID from the last select field that has a selected value categoryId = element.closest( '#wc-facebook-google-product-category-fields' ) .find( '.wc-facebook-google-product-category-select' ) .not( element ) .last() .val(); if ( ! categoryId ) { this.addSelect( {} ); } } $( '#' + this.input_id ).val( categoryId ); this.requestAttributesIfValid(); } /** * Returns true if there have been at least two levels of category selected * * @return {boolean} */ isValid() { var selectsWithValueCount = $('.wc-facebook-google-product-category-select') .filter(function(_i, el) { return $(el).val() !== ""; }) .length; return selectsWithValueCount >= 2; } /** * Adds a new select with the given options. * * @since 2.1.0 * * @param {Object.} options an object with option IDs as keys and option labels as values * @param {string} selected the selected option ID */ addSelect( options, selected ) { var $container = $( '#wc-facebook-google-product-category-fields' ); var $otherSelects = $container.find( '.wc-facebook-google-product-category-select' ); var $select = $( '' ); $otherSelects.addClass( 'locked' ); $container.append( $( '
' ).append( $select ) ); $select.attr( 'data-placeholder', this.getSelectPlaceholder( $otherSelects, options ) ).append( $( '' ) ); Object.keys( options ).forEach( ( key ) => { $select.append( $( '' ) ); } ); $select.val( selected ).select2( { allowClear: true } ); } /** * Gets the placeholder string for a select field based on the number of existing select fields. * * @since 2.1.0 * * @param {jQuery} $otherSelects a jQuery object matching existing select fields * @param {Object.} options an object with option IDs as keys and option labels as values * @return {string} */ getSelectPlaceholder( $otherSelects, options ) { if ( 0 === $otherSelects.length ) { return facebook_for_woocommerce_google_product_category.i18n.top_level_dropdown_placeholder; } if ( 1 === $otherSelects.length && 0 === Object.keys( options ).length ) { return facebook_for_woocommerce_google_product_category.i18n.second_level_empty_dropdown_placeholder; } return facebook_for_woocommerce_google_product_category.i18n.general_dropdown_placeholder; } /** * Gets an array of options for the given category ID. * * @since 2.1.0 * * @param {string} category_id The given category ID * @return {Object.} an object with option IDs as keys and option labels as values */ getOptions(category_id) { if ( 'undefined' === typeof category_id || '' === category_id ) { return this.getTopLevelOptions(); } if ( 'undefined' === typeof this.categories[ category_id ] ) { return []; } if ( 'undefined' === typeof this.categories[ category_id ]['options'] ) { return []; } return this.categories[ category_id ]['options']; } /** * Gets an array of top level category options. * * @since 2.1.0 * * @return {Object.} an object with option IDs as keys and option labels as values */ getTopLevelOptions() { let options = {}; Object.keys( this.categories ).forEach( ( key ) => { if ( this.categories[ key ].parent ) { return; } options[ key ] = this.categories[ key ].label; } ); return options; } /** * Gets the ID of the selected category and all its ancestors. * * The method returns an array of arrays, where each entry is a pair of category IDs. * The first entry in the pair is the category ID and the second entry is the ID of the corresponding parent category. * * We use an array of arrays to be able to present the select fields in the correct order. * Object keys are automatically ordered causing options for categories with larger IDs to be displayed last. * * @param {string} categoryId * @param {Array.} categoryId */ getSelectedCategoryIds( categoryId ) { var options = []; do { if ( 'undefined' !== typeof this.categories[ categoryId ] ) { options.push( [ categoryId, this.categories[ categoryId ].parent ] ); categoryId = this.categories[ categoryId ].parent; } } while ( '' !== categoryId ); return options.reverse(); } } } ); {"translation-revision-date":"2025-01-10T11:57:03+00:00","generator":"WP-CLI\/2.11.0","source":"src\/Components\/Dashboard\/TemplateSection.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"en","plural-forms":"nplurals=2; plural=(n != 1);"},"Build Websites 10x Faster with Templates":["Erstellen Sie Websites 10x schneller mit Vorlagen"],"Choose from our professionally designed websites to build your site faster, with easy customization options.":["W\u00e4hlen Sie aus unseren professionell gestalteten Websites, um Ihre Seite schneller zu erstellen, mit einfachen Anpassungsoptionen."],"View Templates":["Vorlagen anzeigen"]}}}