Hi,
Is it possible to move the add to cart button above the short description.
Thanks
Hi,
Is it possible to move the add to cart button above the short description.
Thanks
Hello @s_mocko,
Thanks for writing in!
You can add following JS code under X > Launch > Options > JS:
jQuery( function($) {$('.single-product form.cart').insertBefore ('.woocommerce div.product .summary');});
You car refer following documentations for more details on the jQuery methods used in above code.
http://api.jquery.com/insertbefore/
Please note that the code I shared is to help you get started. For us it’s difficult to provide support for custom development. Helping you beyond this would fall outside the scope of our support.
Thanks.
Hello @Prasant,
Thanks for de JS code, I add this:
jQuery( function($) {$(’.single-product form.cart’).insertAfter (’.woocommerce .price’);});
Now, I would like the Add to Cart button to be next to the other. Like in the image. Is this possible?
Thanks
Hi again,
Can you please share the URL of your site so we can take a look?
Thanks!
Hi @Nabbel,
The URL is: http://midentistry.es/producto/great-lakes-avengers-tp-vol-01-same-old-same-old/
Thanks!
Hi again,
Add the following code as well in your Customizer:
jQuery( function($) {$('.woocommerce .summary form.cart .single_add_to_cart_button').insertAfter ('.woocommerce .cart .quantity .input-text.qty');});
Hope this helps!
Didn’t quite work. Put it under the image. Looking for it to be here.
Hi again,
Can you please share the URL of your site so we can take a look?
Thanks!
Hi again,
Please use this code instead:
jQuery( function($) {$('.woocommerce .summary form.cart .single_add_to_cart_button').insertBefore ('.woocommerce-product-details__short-description');});
Let us know how this goes!
This worked great! Thanks so much.
Glad we could help.
Cheers!
Hi, sorry to bother. The placement looks great but when clicking add to cart nothing happens?
Hi there,
The add cart button is part of a FORM, moving it outside the form will also remove its capability. It’s now a normal button. For it to work, you need to move the entire form including the quantity. And the code will be like this,
jQuery( function($) {$('.woocommerce .summary form.cart').insertBefore ('.woocommerce-product-details__short-description');});
Thanks.