[Resolved] Various problems: Generate Press Premium + ElementorPro + WooCommerce

Home Forums Support [Resolved] Various problems: Generate Press Premium + ElementorPro + WooCommerce

Home Forums Support Various problems: Generate Press Premium + ElementorPro + WooCommerce

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #870976
    Tom
    Lead Developer
    Lead Developer

    First, you’ll want to remove any customization you’ve made to the badge in Elementor.

    Then you can add this CSS:

    .woocommerce #content span.onsale, 
    .woocommerce #content ul.products li.product .onsale {
        height: 75px;
        width: 75px;
        line-height: 75px;
        border-radius: 100%;
        background: orange;
        position: absolute;
        top: -20px;
        left: -20px;
        font-size: 10px;
        padding: 0;
    }

    To change the text, try this function:

    add_filter( 'woocommerce_sale_flash', function() {
        return '<span class="onsale">YOUR TEXT HERE</span>';
    } );
    #872651
    Antonio

    Thank you very much Tom, for all your help. Now with that bit of code I have a base to experiment a bit with the style.

    Thanks!

    πŸ––πŸ˜‰

    m.

    #872755
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #940216
    Sam

    I’m jumping in this thread because it seems like an appropriate place to post my issue, but I can start a new one if you’d prefer.

    I have set up a Single Product template using Elementor Pro Theme Builder.

    All works pretty much as you’d expect, but…when you add an “Add to Cart” module, the nice “+” and “-” buttons aren’t displayed. I have double checked that I’ve correctly set the option to show those buttons (in the Customizer) and they are displaying correctly when using a standard Woocommerce template.

    I had a look through the code and it seems like you’re actively removing the “do-quantity-buttons” class via JS specifically for Elementor “Add to Cart” modules, I am wondering why.

    Is it possible to get those nice buttons to display?

    Thanks so much.

    ~Sam

    #940347
    David
    Staff
    Customer Support

    Hi there,

    Unfortunately not, Elementor does not provide any filters to remove their button and the way they output the button conflicts with the GP +/- buttons.

    #941284
    Sam

    Thanks for your reply David,

    I had a look into the way that Elementor adds the “Add To Cart” (when using the “Product Add to Cart” module) and it looked like it was using standard Woocommerce methods, nothing that should interfere with the functionality of GPP, so I simply removed that chunk of conditional logic from the JS and it works like a charm πŸ™‚

    Just thought I would mention it, in case Tom wants to test/revisit it in a future release. I like those buttons. hehehe.

    Thanks,
    ~Sam

    #941513
    David
    Staff
    Customer Support

    Thanks for feeding back – it is something we may look closer at. The issue with Elementor is not the function but they way the add markup around the element.

    Currently the only the method we could see was to add an elementor specific condition to the theme. Which we are reluctant to do as it leads to potential breakages or code redundancy that is stuck in the theme if/when Elementor makes changes.

    Also be aware that any changes made to the parent theme or plugin functions will be overwritten when updates are made.

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.