Hello team,
I would like to realize a one-product store with Woocommerce and a toolset product template. The one product should appear directly on the start page. For this I have
[product_page id="xxx"]
which does not work properly. Both the toolset template and the Woocommerce template are displayed together. (The product in the "normal view" is displayed correctly and everything works).
Next idea was
[wpv-post-body view_template="The name of the template" id="xxx"]
It also works, but not correctly. The template is displayed incompletely. E.g. no "Add to Cart Button"
What can I do to display exactly one product with shopping cart etc. directly on the start page?
Best regards
Michael
Hi Michael,
Thank you for contacting us and I'd be happy to assist.
For what you're planning, the use of Toolset's 'wpv-post-body' shortcode for the content template should work just fine.
The only change I'll recommend is to use the 'item' attribute in place of the 'id' attribute, for specifying the target product post's ID:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body )
[wpv-post-body view_template="The name of the template" item="xxx"]
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Hello Waqar,
I have replaced the attribute, unfortunately the problem still exists. The original product page is:
hidden link
Embedded with shortcode it looks like this
hidden link
If you have another idea....
Regards
Michael
Thank you for sharing this update.
To troubleshoot this, I'll need to see how these templates and WooCommerce are set up in the admin area.
Can you please share temporary admin login details, in reply to this message?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank you for sharing the access details.
During troubleshooting, I was able to show the 'Add to cart' button for a single product on the target page, using these methods:
1. Using the 'Single Product' block from the WooCommerce.
( screenshot: hidden link )
2. By including a Toolset view that shows only a single product filtered by the product ID. Inside this view's loop, I included the 'Add to Cart Button' from Toolset, which shows the button successfully on the page's front-end.
( screenshot: hidden link )
You can use any of these approaches, based on the design requirements.
Hello Waqar,
thank you very much, this helps me!
Best regards
Michael