• Resolved wichtc91

    (@wichtc91)


    Dear WordPress users,

    I have created a product page using Woocommerce elementor widgets and I would like to better control the behaviour of the “add to cart” button.

    Since I only have 1 product to sell, I place the products and the cart widgets on the same page.

    What I would like is that when I press on “add to cart” (ajouter au panier, in french), the user gets redirected to the bottom of the page (where the cart is). I have placed a menu anchor there (with CSS ID #shop) but I don’t see how I can change the behavior of the button.

    Best,

    C.

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

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @wichtc91,

    I’m not sure how Elementor widgets work but if the add to cart button was a custom button, you can make it add the product to the cart and jump to the cart section by redirecting to ?add-to-cart={porductID}#{cartclass}.

    Example: ?add-to-cart=55#cart2

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend contacting Elementor support, perhaps there’s an easy way to achieve this with their plugin.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Control behaviour of “Add to Cart” button’ is closed to new replies.