Skip Navigation

[Resolved] WooCommerce Content Template

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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by terryE 1 year, 10 months ago.

Assisted by: Shane.

Author
Posts
#2365315

Hi Guys,

I'm trying to display some products on a 'page' including 'Add to Cart' etc.

I would normally use [product_page id="xxx"], but this does not pull through the Content Template.

So I'm using the following shortcode to render the content template on the page, and display the product...

[wpv-post-body view_template="Template for Subs" id="xxx"]

In the template, I am using the woocommerce shortcode to display the 'Add to Cart' button...

[wpv-woo-buy-options add_to_cart_text="Sign Up"]

But the Button is not being displayed on the page.

However, if I view the product single page, the 'Add to Cart' button is being displayed ok.

Hope this makes sense! 🙂

Terry.

#2365369

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Terry,

Thank you for getting in touch.

I'm assuming that the [wpv-woo-buy-options add_to_cart_text="Sign Up"] shortcode is in the [wpv-post-body view_template="Template for Subs" id="xxx"] content template.

Perhaps you can try this shortcode below as the above one use context is for the product page template.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154336

Thanks,
Shane

#2365717

That works, just means one extra step for the user, but it's workable

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