Problem:
The user has an issue with an archive template for one specific product. A condition based on the product stock was not evaluating correctly.
Solution:
Changing the conditions from using variables to using shortcode fixed the issue.
Changing:
[wpv-conditional if="( $(views_woo_in_stock) eq '1' )"]In stock[/wpv-conditional][wpv-conditional if="( $(views_woo_in_stock) eq '0' )"]Out of stock[/wpv-conditional]
To:
[wpv-conditional if="( '[types field='views_woo_in_stock'][/types]' eq '1' )"]In stock[/wpv-conditional] [wpv-conditional if="( '[types field='views_woo_in_stock'][/types]' eq '0' )"]Out of stock[/wpv-conditional]
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: Africa/Casablanca (GMT+01:00)
This topic contains 2 replies, has 2 voices.
Last updated by 3 years, 2 months ago.
Assisted by: Jamal.