[Support request] Single Product Quantity Button not working with Elementor

Home Forums Support [Support request] Single Product Quantity Button not working with Elementor

Home Forums Support Single Product Quantity Button not working with Elementor

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2322811
    GeneratePressUser

    Hello Generatepress team,

    So, we tried using both Generatepress and Astra on the same website, generatepress option of show quantity buttons on single product does not work on elementor single product pages, while same in Astra works.

    Pls see the images in private box

    Pls can your team check the issue and let us know how we can make it use generatepress quantity button? Elementor does not have button and they told it relies on theme and woocommerce as its woocommerce and theme functionality and right now they dont have any feature to add there button but maybe in future, but since we are using generatepress it should show those buttons there right?

    #2323009
    Fernando
    Customer Support

    Hello there,

    May you provide the link to the site in question?

    You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2323020
    GeneratePressUser

    Hey fernando,

    Pls see the private box

    #2323024
    Fernando
    Customer Support

    From my end, this is how the GP site quantity section looks like: https://share.getcloudapp.com/v1uQ6l0Y

    If you try using a different browser/device do the + and – buttons appear?

    #2323025
    GeneratePressUser

    Hey Fernando,

    Pls refresh the button wont be there, those are my custom php code buttons not of generate press.

    Right now u will see generatepress only putting those buttons on cart page and not on single product elementor page, while astra if we use they hv it showing on both single product as well as cart.

    #2323398
    David
    Staff
    Customer Support

    Hi there,

    GP hooks its quantity buttons into the standard woocommerce add-to-cart form. Thats it.
    Elementor ( or at least on your site ) is outputting the qty buttons inside this container: e-atc-qty-button-holder – and thats not standard woocommerce. Thats Elementor or another plugin.

    GP has no handle on that, and would require us to integrate with Elementor, which is not something we would do, as it will ultimately result in some redundant code when Elementor decides that their Theme Builder should handle this kind of thing.

    #2323407
    GeneratePressUser

    Hey David,

    How come astra buttons are showing on elementor page? Can u pls once check the astra site how are they implementing it can u pls shed some light why they are able to do it and why generate press ones don’t show?

    #2323433
    David
    Staff
    Customer Support

    Actually referring back to other topics on this matter, GP removes them if it sees the form is from Elementor:

    // Check if we see elementor style classes
    if ( cart.closest( '.elementor-add-to-cart' ).length ) {
        // Found classes, remove them and finish here
        $( '.elementor.product' ).removeClass( 'do-quantity-buttons' );
        return;
    }

    Historically what Elementor does, conflicted with what GP did, so we disable them.

    That code is part of this script in the GP Plugin:

    gp-premium/woocommerce/functions/js/woocommerce.js

    You can try deleting those lines if you want to keep them.
    But as i mentioned above they always conflicted with Elementor in the past.

    #2323703
    GeneratePressUser

    Hey David,

    Oh got it, so looking at astra are they not using that same implementation? coz their button I see is so far working perfect without any conflict there.

    Btw 1 advice if your team can manually make 1 code to add those buttons when using elementor that will be great, like here is 1 guide:

    https://www.businessbloomer.com/woocommerce-add-plus-minus-buttons-to-add-to-cart-quantity-input/

    #2325381
    David
    Staff
    Customer Support

    We will do some tests, it may be a case that we don’t need to disable our qty buttons now when elementor is loading the add to cart form, as it seems elementor is no longer adding the number input which conflicted.

    Thanks for the feedback

    #2326416
    GeneratePressUser

    Hey David,

    Yes, as far as what I can see elementor is not adding anything there now, so maybe generatepress quantity buttons will be amazing to use along with Elementor, pls let me know when you are planning to add that back in generatepress, any ETA?

    #2328221
    David
    Staff
    Customer Support

    We will need to do some testing before we can say for certain and set a timeline.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.