Streaming live at 10am (PST)

Open cart by clicking non-cart button

Hi! I’d like to add an edit cart button in my Checkout page, and it doesnt allow me to put cart element inside a checkout.

I thought I could add a custom code like this to add a button where I need it, but it doesnt seem to work for some reason.

<script>

$('.editcart').click(function() {
  $('.cart-btn').click();
});

</script>

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Ok someone helped me with vanilla js script, for some reason jquery doesn’t work and this works:

document.querySelector('.editcart').addEventListener('click', e => { 
e.preventDefault(); document.querySelector('.cart-btn').click(); })

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.