Skip Navigation

[Resolved] Inserting a short code for a “Add to Cart” button from a custom field in a post

This thread is resolved. Here is a description of the problem and solution.

Problem:

I'm trying to add the short code for a ADD TO CART button for each post. I can't get the short code to show up in the Elementor template. I've tried using WYSIWYG and a single line field

Solution:

If you are using Toolset WooCommerce Blocks plugin in your website, you can try the shortcode: [wpv-woo-buy-options], for example:

[wpv-woo-buy-options add_to_cart_text="Purchase me"]

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-woo-buy-options

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by perryA 3 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1725923

Tell us what you are trying to do? I'm using "Simple Cart" from Paypal - I'm trying to add the short code for a ADD TO CART button for each post. I can't get the short code to show up in the Elementor template. I've tried using WYSIWYG and a single line field -- but that field shows up as a blank.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#1726393

Hello,

Please elaborate the questions with more details:
What is the shortcode for a "Add to Cart" button?
If you are using Toolset WooCommerce Blocks plugin in your website, you can try the shortcode: [wpv-woo-buy-options], for example:
[wpv-woo-buy-options add_to_cart_text="Purchase me"]

See our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-woo-buy-options
This shortcode outputs the Add to cart button on the Product detail pages for simple products...

#1726853

Simple Cart has a short code for the "Add to cart" button. When I add that shortcode to a custom field nothing show up. How do I add short codes to custom fields? Here is what it looks like: [wp_cart_button name="RIP GOP" price="17.50"]. I've tried single line and WYSIWYG fields -- but the short code does not show up in the post.

#1726987

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.