custom add to cart link
Hello I am building a landing page with custom buttons and I need to put the "add to cart" woocommerce shortcode to this button.
for example I know that this is the shortcode:
[add_to_cart_url id=76]
I tried to put it inside you button but it's not working ... maybe I am putting it in the wrong position?
Please let me know.
Also, is there a way, only for this particular url / product ID to go direclty to chart/checkout page, as soon as I click on the button?
Thank you in advance for your assistance
Comments
Hello,
1) All shortcodes should be placed in Column item, so please, put it there, and check if it works then.
2) Please, check the following link https://wpbeaches.com/skip-cart-go-straight-to-checkout-page-in-woocommerce/
If it is not that, please, explain to me greater what you want to achieve.
Thanks
Hi there
regarding the first part, it's not actually that.
I am using your buttons so I put the code inside the button options where you can see LINK (in my previous screenhsot), but in this way it's not working
Regarding the other option I know those general settings for woocommerce, but I just wanted to create an exception for a single product ID to go directly to checkout...
Thanks for you help
1) But shortcodes do not work in Button item. All shortcodes should be placed in Column item.
https://themes.muffingroup.com/be/theme/shortcodes/typography/#columns
Links inside Button item should be URL links.
2) The secound question is not really Betheme related. In that case you should contact WooCoommerce support, and they should be able to help you.
Thanks
Sorry but If can not put a shortcode inside the button how can I create a button with shortcode inside?
also I would need to put an inner anchor inside the button like this
<a href="#ANCHOR">
also this is not possibile?
thank you
The button should generate automaticly after using this shortcode.
If you want to put anchor link iside the button just put there the id where you want to lead.
Best regards
Ok that's great!
Thank you!
The anchor is working but the add to cart not ...
I put this
But I see this online.
Am I doing anything wrong?
Thank you
I have tested this shortcode with Betheme and Twenty Twenty, and it is not working on both of them (in the previous message, I used a shortcode without "_url" and the end).
In that case, you should contact the WooCommerce support too, and ask them about this shortcode.
Best regards
ok thank you