• Resolved jeriko90

    (@jeriko90)


    Buttons do not work

    Good afternoon.
    I have this version of the plugin but it doesn’t work.

    The only functional version is 1.16, could you please revert it.

    I attach a screenshot:

    https://prnt.sc/z0v7ai

    Greetings .

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Found a temporary solution until the developers fix the issue.
    Add this code in your theme’s functions.php file:

    function dmc_wc_smntcswcb_quantity_fix_before() {
    	echo '<div class="product-quantity">';
    }
    function dmc_wc_smntcswcb_quantity_fix_after() {
    	echo '</div>';
    }
    add_action( 'woocommerce_before_add_to_cart_quantity', 'dmc_wc_smntcswcb_quantity_fix_before' );
    add_action( 'woocommerce_after_add_to_cart_quantity', 'dmc_wc_smntcswcb_quantity_fix_after' );

    Keep in mind that if you will update your theme version, then this code will be automatically removed. You can safely add it again.
    Let me know if this fixes the issue for you guys and feel free to contact me in case you need some help.
    Dan
    Web Developer

    Thread Starter jeriko90

    (@jeriko90)

    Actually we added this configuration but it does not work either.
    Is this correct?

    <?php
    /**
    * Theme functions and definitions
    *
    * @package HelloElementor
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly.
    }

    define( ‘HELLO_ELEMENTOR_VERSION’, ‘2.3.1’ );

    if ( ! isset( $content_width ) ) {
    $content_width = 800; // Pixels.
    }

    if ( ! function_exists( ‘hello_elementor_setup’ ) ) {
    /**
    * Set up theme support.
    *
    * @return void
    */

    function dmc_wc_smntcswcb_quantity_fix_before() {
    echo ‘<div class=”product-quantity”>’;
    }
    function dmc_wc_smntcswcb_quantity_fix_after() {
    echo ‘</div>’;
    }
    add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘dmc_wc_smntcswcb_quantity_fix_before’ );
    add_action( ‘woocommerce_after_add_to_cart_quantity’, ‘dmc_wc_smntcswcb_quantity_fix_after’ );

    function hello_elementor_setup() {

    This file use your recomendation :
    wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variation-add-to-cart-button.php: do_action( ‘woocommerce_before_add_to_cart_quantity’ );
    wp-content/plugins/woocommerce/templates/single-product/add-to-cart/grouped.php: do_action( ‘woocommerce_before_add_to_cart_quantity’ );
    wp-content/plugins/woocommerce/templates/single-product/add-to-cart/simple.php: do_action( ‘woocommerce_before_add_to_cart_quantity’ );

    • This reply was modified 3 years, 9 months ago by jeriko90.

    Try adding it at the top of the functions.php file. Right after the <?php

    Thread Starter jeriko90

    (@jeriko90)

    Not Work ??

    <?php

    /**
    Parche Actualizacion Quantity
    */

    function dmc_wc_smntcswcb_quantity_fix_before() {
    echo ‘<div class=”product-quantity”>’;
    }
    function dmc_wc_smntcswcb_quantity_fix_after() {
    echo ‘</div>’;
    }
    add_action( ‘woocommerce_before_add_to_cart_quantity’, ‘dmc_wc_smntcswcb_quantity_fix_before’ );
    add_action( ‘woocommerce_after_add_to_cart_quantity’, ‘dmc_wc_smntcswcb_quantity_fix_after’ );

    /**
    * Theme functions and definitions
    *
    * @package HelloElementor
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly.
    }

    define( ‘HELLO_ELEMENTOR_VERSION’, ‘2.3.1’ );

    site : amande.com.ar

    It might be because the functions.php file is not being read properly.
    I made this functions into a plugin.
    You can download the plugin here: https://danmillercoding.com/plugins/smntcs-woocommerce-quantity-buttons-fix.zip
    Install, activate and it should work.
    Let me know if it works!
    Dan

    Thread Starter jeriko90

    (@jeriko90)

    Hi, I installed the update patch that you gave me but it still does not work.
    https://prnt.sc/10c4da3 .

    Then most likely you have an issue with server cache. Or the theme or a plugin is overriding the function.

    Plugin Author Niels Lange

    (@nielslange)

    Hello @jeriko90 & @danmillercoding ??

    I just release version 1.24 and the buttons should now work as expected on all pages.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Last Update buttons don’t work’ is closed to new replies.