Button WooCommerce use [add_to_cart_url id="263"] without reloading Page
Hello guys,
I just want to use the onclic funktion [add_to_cart_url id="263"] in a button. It works fine, but unfortunately the page getting reloadet after clicking the button.
Is there a way to disable the "reload page" behavior?
Thanks for any help.
Best regards,
Johannes
Comments
Hello,
Please, go to WooCommerce -> Settings -> Products, check Enable AJAX option, and see if it works then.
Thanks
Hi guys,
thanks for reply. this setting is enabled (i did it before) but it dont work for my case :(
do you have other suggestions?
thanks in advance.
best regards,
Johannes
Please, try the following shortcode instead:
Thanks
Hey,
thanks for reply. Unfortunately also with this setting the same issue appear :(
best regards,
Johannes
Please attach a link to your website so we can check it out. If the page is offline(localhost), then our help will be limited. You will have to contact us when the page is online. Also, please make sure that the page is not under maintenance before you provide us with the link.
Thanks
Hey guys,
the link to the site ist https://barnfield-distillery.com
but you need login credentials. Should I send you these by private message?
Best regards,
Johannes
Please send this information privately thru the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact and we will check it out.
Notice!
Please attach a link to this forum discussion.
Thanks
thanks for reply.
the message with the login data is sended
Can you change the privileges of this account to have admin rights, please?
I need to check your WP panel.
Thanks
of course. its done
I have created a new page named "Muffin Test", added the shortcode there, and it is working as it should, without the page reload.
Can you check it, please?
Thanks
yes this work. But I dont want do it with a column. I want to realize it with a betheme button. I updatet you testsite with testdata(button) and now you can see it doesnt work.
Can you maybe check the issue?
best regards,
johannes
Onclick field is not for shortcodes but functions. You can read more about the onclick event at the following link:
https://www.w3schools.com/jsref/event_onclick.asp
If you want this shortcode to work, you need to put it in the column item.
Best regards
hello thanks for reply.
is there then a way to do it with your button?
if yes can you tell me how?
There are no settings to achieve that with a regular button.
Maybe with some customization, it would be possible but we do not provide help with files modifications, and you would have to contact your web developer.
Best regards