Plugin Directory

Changeset 3389952


Ignore:
Timestamp:
11/04/2025 08:19:51 PM (2 months ago)
Author:
bbioon
Message:

Merchant v2.1.9

Location:
merchant
Files:
981 added
8 edited

Legend:

Unmodified
Added
Removed
  • merchant/trunk/assets/js/modules/quick-view/quick-view.js

    r3151017 r3389952  
    1313      $modals.each(function () {
    1414        var $modal = $(this);
    15         var $openButton = $('.merchant-quick-view-button');
    1615        var $closeButton = $modal.find('.merchant-quick-view-close-button');
    1716        var $inner = $modal.find('.merchant-quick-view-inner');
     
    1918        var $overlay = $modal.find('.merchant-quick-view-overlay');
    2019        var isOpen = false;
    21         $openButton.on('click', function (e) {
     20        $(document).on('click', '.merchant-quick-view-button', function (e) {
    2221          e.preventDefault();
    2322          $content.empty();
  • merchant/trunk/assets/js/modules/quick-view/quick-view.min.js

    r3198417 r3389952  
    1 var merchant=merchant||{};merchant.modules=merchant.modules||{},(r=>{merchant.modules.quickView={init:function(){var t=r(".merchant-quick-view-modal");t.length&&t.each(function(){var e=r(this),t=r(".merchant-quick-view-button"),n=e.find(".merchant-quick-view-close-button"),a=e.find(".merchant-quick-view-inner"),i=e.find(".merchant-quick-view-content"),c=e.find(".merchant-quick-view-overlay"),o=!1;t.on("click",function(t){t.preventDefault(),i.empty(),e.addClass("merchant-show"),e.addClass("merchant-loading"),o=!0,r.post(window.merchant.setting.ajax_url,{action:"merchant_quick_view_content",nonce:window.merchant.setting.nonce,product_id:r(this).data("product-id")},function(t){var n;t.success&&o?(i.html(t.data),a.addClass("merchant-show"),e.removeClass("merchant-loading"),n=i.find(".woocommerce-product-gallery"),wc_single_product_params.zoom_enabled=window.merchant.setting.quick_view_zoom,"function"==typeof r.fn.wc_product_gallery&&n.length&&(n.trigger("wc-product-gallery-before-init",[n.get(0),wc_single_product_params]),wc_single_product_params.flexslider_enabled="1",n.wc_product_gallery(wc_single_product_params),n.trigger("wc-product-gallery-after-init",[n.get(0),wc_single_product_params])),n=i.find(".variations_form"),"function"==typeof r.fn.wc_variation_form&&n.length&&n.each(function(){r(this).wc_variation_form()}),window.botiga&&window.botiga.productSwatch&&window.botiga.productSwatch.init(),window.botiga&&window.botiga.qtyButton&&window.botiga.qtyButton.init("quick-view")):(i.html(t.data),a.addClass("merchant-show"),e.removeClass("merchant-loading")),window.dispatchEvent(new Event("merchant.quickview.ajax.loaded"))}).fail(function(t,n){i.html(n),a.addClass("merchant-show"),e.removeClass("merchant-loading")})}),c.on("click",function(t){t.preventDefault(),n.trigger("click")}),n.on("click",function(t){t.preventDefault(),o=!1,e.removeClass("merchant-show"),a.removeClass("merchant-show")})})}},r(document).ready(function(){merchant.modules.quickView.init()})})(jQuery);
     1var merchant=merchant||{};merchant.modules=merchant.modules||{},(o=>{merchant.modules.quickView={init:function(){var t=o(".merchant-quick-view-modal");t.length&&t.each(function(){var e=o(this),n=e.find(".merchant-quick-view-close-button"),a=e.find(".merchant-quick-view-inner"),i=e.find(".merchant-quick-view-content"),t=e.find(".merchant-quick-view-overlay"),c=!1;o(document).on("click",".merchant-quick-view-button",function(t){t.preventDefault(),i.empty(),e.addClass("merchant-show"),e.addClass("merchant-loading"),c=!0,o.post(window.merchant.setting.ajax_url,{action:"merchant_quick_view_content",nonce:window.merchant.setting.nonce,product_id:o(this).data("product-id")},function(t){var n;t.success&&c?(i.html(t.data),a.addClass("merchant-show"),e.removeClass("merchant-loading"),n=i.find(".woocommerce-product-gallery"),wc_single_product_params.zoom_enabled=window.merchant.setting.quick_view_zoom,"function"==typeof o.fn.wc_product_gallery&&n.length&&(n.trigger("wc-product-gallery-before-init",[n.get(0),wc_single_product_params]),wc_single_product_params.flexslider_enabled="1",n.wc_product_gallery(wc_single_product_params),n.trigger("wc-product-gallery-after-init",[n.get(0),wc_single_product_params])),n=i.find(".variations_form"),"function"==typeof o.fn.wc_variation_form&&n.length&&n.each(function(){o(this).wc_variation_form()}),window.botiga&&window.botiga.productSwatch&&window.botiga.productSwatch.init(),window.botiga&&window.botiga.qtyButton&&window.botiga.qtyButton.init("quick-view")):(i.html(t.data),a.addClass("merchant-show"),e.removeClass("merchant-loading")),window.dispatchEvent(new Event("merchant.quickview.ajax.loaded"))}).fail(function(t,n){i.html(n),a.addClass("merchant-show"),e.removeClass("merchant-loading")})}),t.on("click",function(t){t.preventDefault(),n.trigger("click")}),n.on("click",function(t){t.preventDefault(),c=!1,e.removeClass("merchant-show"),a.removeClass("merchant-show")})})}},o(document).ready(function(){merchant.modules.quickView.init()})})(jQuery);
  • merchant/trunk/inc/modules/buy-now/class-buy-now.php

    r3248005 r3389952  
    334334        global $post, $product;
    335335
     336        /**
     337         * Hook 'merchant_is_pre_order_product' Checks if the product is a pre-order.
     338         *
     339         * @param int $product_id The product ID.
     340         *
     341         * @since 2.1.9
     342         */
     343        $is_pre_order = apply_filters( 'merchant_is_pre_order_product', $product->get_id() );
     344        if ( true === $is_pre_order ) {
     345            return;
     346        }
     347
    336348        $settings = $this->get_module_settings();
    337349
     
    396408    public function shop_archive_product_buy_now_button() {
    397409        global $post, $product;
     410
     411        /**
     412         * Hook 'merchant_is_pre_order_product' Checks if the product is a pre-order.
     413         *
     414         * @param int $product_id The product ID.
     415         *
     416         * @since 2.1.9
     417         */
     418        $is_pre_order = apply_filters( 'merchant_is_pre_order_product', $product->get_id() );
     419        if ( true === $is_pre_order ) {
     420            return;
     421        }
    398422
    399423        if ( ! $product->is_in_stock() ) {
  • merchant/trunk/inc/modules/pre-orders/class-pre-orders-main-functionality.php

    r3379075 r3389952  
    6868        // Cart
    6969        add_filter( 'woocommerce_get_item_data', array( $this, 'cart_message_handler' ), 10, 2 );
     70
     71        /**
     72         * Hook 'merchant_is_pre_order_product' Checks if the product is a pre-order.
     73         *
     74         * @param int $product_id The product ID.
     75         *
     76         * @since 2.1.9
     77         */
     78        add_filter('merchant_is_pre_order_product', array( $this, 'is_pre_order' ), 10, 1 );
    7079
    7180        add_action( 'woocommerce_order_item_meta_end', array( $this, 'order_item_meta_end' ), 10, 4 );
  • merchant/trunk/inc/modules/quick-view/class-quick-view.php

    r3269935 r3389952  
    284284     */
    285285    public function enqueue_scripts() {
    286         wp_enqueue_script( 'zoom' );
    287         wp_enqueue_script( 'flexslider' );
     286        if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '10.3', '>=' ) ) {
     287            wp_enqueue_script( 'wc-zoom' );
     288            wp_enqueue_script( 'wc-flexslider' );
     289        } else {
     290            wp_enqueue_script( 'zoom' );
     291            wp_enqueue_script( 'flexslider' );
     292        }
    288293        wp_enqueue_script( 'wc-single-product' );
    289294        wp_enqueue_script( 'wc-add-to-cart-variation' );
  • merchant/trunk/languages/merchant.pot

    r3379075 r3389952  
    99"Language-Team: aThemes <[email protected]>\n"
    1010"Last-Translator: aThemes <[email protected]>\n"
    11 "POT-Creation-Date: 2025-10-15 17:29+0000\n"
     11"POT-Creation-Date: 2025-11-04 19:59+0000\n"
    1212"Report-Msgid-Bugs-To: https://athemes.com/contact/\n"
    1313"X-Poedit-Basepath: ..\n"
     
    518518msgstr ""
    519519
    520 #: admin/classes/class-merchant-admin-modules.php:517, inc/modules/buy-now/class-buy-now.php:50, inc/modules/buy-now/class-buy-now.php:348, inc/modules/buy-now/class-buy-now.php:429, inc/modules/quick-view/class-quick-view.php:674, inc/modules/buy-now/admin/options.php:22
     520#: admin/classes/class-merchant-admin-modules.php:517, inc/modules/buy-now/class-buy-now.php:50, inc/modules/buy-now/class-buy-now.php:360, inc/modules/buy-now/class-buy-now.php:453, inc/modules/quick-view/class-quick-view.php:679, inc/modules/buy-now/admin/options.php:22
    521521msgid "Buy Now"
    522522msgstr ""
     
    18041804msgstr ""
    18051805
    1806 #: inc/modules/animated-add-to-cart/class-animated-add-to-cart.php:185, inc/modules/buy-x-get-y/class-buy-x-get-y.php:253, inc/modules/frequently-bought-together/class-frequently-bought-together.php:219, inc/modules/quick-view/class-quick-view.php:381, inc/modules/volume-discounts/class-volume-discounts.php:373, templates/modules/buy-x-get-y/single-product.php:238, inc/modules/buy-x-get-y/admin/options.php:549, inc/modules/buy-x-get-y/admin/options.php:678, inc/modules/buy-x-get-y/admin/options.php:740, inc/modules/buy-x-get-y/admin/options.php:803, inc/modules/complementary-products/admin/options.php:599, inc/modules/frequently-bought-together/admin/options.php:759, inc/modules/volume-discounts/admin/options.php:717, inc/modules/volume-discounts/admin/options.php:781, inc/modules/volume-discounts/admin/options.php:853, templates/modules/complementary-products/admin-preview/cart.php:36
     1806#: inc/modules/animated-add-to-cart/class-animated-add-to-cart.php:185, inc/modules/buy-x-get-y/class-buy-x-get-y.php:253, inc/modules/frequently-bought-together/class-frequently-bought-together.php:219, inc/modules/quick-view/class-quick-view.php:386, inc/modules/volume-discounts/class-volume-discounts.php:373, templates/modules/buy-x-get-y/single-product.php:238, inc/modules/buy-x-get-y/admin/options.php:549, inc/modules/buy-x-get-y/admin/options.php:678, inc/modules/buy-x-get-y/admin/options.php:740, inc/modules/buy-x-get-y/admin/options.php:803, inc/modules/complementary-products/admin/options.php:599, inc/modules/frequently-bought-together/admin/options.php:759, inc/modules/volume-discounts/admin/options.php:717, inc/modules/volume-discounts/admin/options.php:781, inc/modules/volume-discounts/admin/options.php:853, templates/modules/complementary-products/admin-preview/cart.php:36
    18071807msgid "Add To Cart"
    18081808msgstr ""
     
    21782178msgstr ""
    21792179
    2180 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:103
     2180#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:112
    21812181msgid "Shipping Date"
    21822182msgstr ""
    21832183
    2184 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:867
     2184#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:876
    21852185msgid "We detected that your cart has pre-order products. Please remove them before being able to add this product."
    21862186msgstr ""
    21872187
    2188 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:864
     2188#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:873
    21892189msgid "We detected that you are trying to add a pre-order product in your cart. Please remove the rest of the products before proceeding."
    21902190msgstr ""
    21912191
    2192 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:931, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1755, inc/modules/pre-orders/class-pre-orders.php:65, inc/modules/pre-orders/class-pre-orders.php:247
     2192#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:940, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1764, inc/modules/pre-orders/class-pre-orders.php:65, inc/modules/pre-orders/class-pre-orders.php:247
    21932193msgid "Pre Order Now!"
    21942194msgstr ""
    21952195
    2196 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:956, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1075, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1756, inc/modules/pre-orders/class-pre-orders.php:66
     2196#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:965, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1084, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1765, inc/modules/pre-orders/class-pre-orders.php:66
    21972197msgid "Ships on {date}."
    21982198msgstr ""
    21992199
    2200 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1090
     2200#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1099
    22012201msgid "Pre Ordered"
    22022202msgstr ""
    22032203
    22042204#. translators: %s: pre ordered product count
    2205 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1096
     2205#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1105
    22062206msgid "Pre Ordered <span class=\"count\">(%s)</span>"
    22072207msgid_plural "Pre Ordered <span class=\"count\">(%s)</span>"
     
    22092209msgstr[1] ""
    22102210
    2211 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1108
     2211#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1117
    22122212msgid "Pre-Ordered"
    22132213msgstr ""
    22142214
    2215 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1151, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1341, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1758, inc/modules/pre-orders/admin/options.php:491
     2215#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1160, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1350, inc/modules/pre-orders/class-pre-orders-main-functionality.php:1767, inc/modules/pre-orders/admin/options.php:491
    22162216msgid "Ships on"
    22172217msgstr ""
    22182218
    2219 #: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1749, inc/modules/pre-orders/admin/options.php:52
     2219#: inc/modules/pre-orders/class-pre-orders-main-functionality.php:1758, inc/modules/pre-orders/admin/options.php:52
    22202220msgid "Custom Pre-order"
    22212221msgstr ""
     
    22652265msgstr ""
    22662266
    2267 #: inc/modules/product-labels/class-product-labels.php:336, inc/modules/quick-view/class-quick-view.php:375, inc/modules/recently-viewed-products/class-recently-viewed-products.php:199, inc/modules/recently-viewed-products/class-recently-viewed-products.php:206, inc/modules/recently-viewed-products/class-recently-viewed-products.php:213, inc/modules/sticky-add-to-cart/class-sticky-add-to-cart.php:218, inc/modules/wishlist/class-wishlist.php:173
     2267#: inc/modules/product-labels/class-product-labels.php:336, inc/modules/quick-view/class-quick-view.php:380, inc/modules/recently-viewed-products/class-recently-viewed-products.php:199, inc/modules/recently-viewed-products/class-recently-viewed-products.php:206, inc/modules/recently-viewed-products/class-recently-viewed-products.php:213, inc/modules/sticky-add-to-cart/class-sticky-add-to-cart.php:218, inc/modules/wishlist/class-wishlist.php:173
    22682268msgid "Product Title"
    22692269msgstr ""
     
    24332433msgstr ""
    24342434
    2435 #: inc/modules/quick-view/class-quick-view.php:376
     2435#: inc/modules/quick-view/class-quick-view.php:381
    24362436msgid "The product description normally is displayed here."
    24372437msgstr ""
    24382438
    2439 #: inc/modules/quick-view/class-quick-view.php:605
     2439#: inc/modules/quick-view/class-quick-view.php:610
    24402440msgid "Close quick view modal"
    24412441msgstr ""
  • merchant/trunk/merchant.php

    r3379075 r3389952  
    44 * Plugin URI:  https://athemes.com/merchant
    55 * Description: All-in-one WooCommerce plugin for pre-orders, product labels, buy now, quick view, discount rules and more.
    6  * Version:     2.1.8
     6 * Version:     2.1.9
    77 * Author:      aThemes
    88 * Author URI:  https://athemes.com
     
    1313 *
    1414 * WC requires at least: 6.0
    15  * WC tested up to: 10.0.0
     15 * WC tested up to: 10.3.0
    1616 *
    1717 * @package Merchant
     
    2525
    2626// Merchant constants.
    27 define( 'MERCHANT_VERSION', '2.1.8' );
     27define( 'MERCHANT_VERSION', '2.1.9' );
    2828define( 'MERCHANT_DB_VERSION', '1.1.0' ); // Update only when the database structure changes. In inc/classes/class-merchant-db-tables.php
    2929define( 'MERCHANT_FILE', __FILE__ );
  • merchant/trunk/readme.txt

    r3379075 r3389952  
    44Tested up to: 6.8
    55Requires PHP: 7.3
    6 Stable tag: 2.1.8
     6Stable tag: 2.1.9
    77Contributors: aThemes
    88License: GPLv3 or later
     
    219219
    220220== Changelog ==
     221= 2.1.9 =
     222* Added - Pre-Orders and Buy Now: Added logic to hide the “Buy Now” button for products marked as pre-order
     223* Fixed - Quick View: Fixed an issue where the button only opened the modal on the first shop page; it now works correctly across all pages
     224
    221225= 2.1.8 =
    222226* Added - Woo Brands Support: You can now use Brands as a trigger option across all Merchant modules
Note: See TracChangeset for help on using the changeset viewer.