Skip Navigation

[Resolved] Conditional HTML – Woocommerce quantity

This support ticket is created 5 years, 2 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by kaiD 5 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1289585
Firefox_Screenshot_2019-07-11T12-10-37.384Z.png

Tell us what you are trying to do?
I like to show content on the single product page depending on how many items the user has selected.
For example: Standard is 1; On the site should stand the text "A"
If the user select that he want a product not only 1 but 2 x text "B" should be visible.

Is there any documentation that you are following?
I try conditional logic in the template but i don´t know which shortcode for the woocommerce quantity of a product i should use

Is there a similar example that we can see?
See screenshot

What is the link to your site?
hidden link

#1289675

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no such feature available. You need to add custom javascript/jQuery code and target the change event of the quantity dropdown and show/hide your required text accordingly.

Please check the following examples that will help you:
=> hidden link
=> https://stackoverflow.com/questions/21584752/want-to-show-hide-div-based-on-dropdown-box-selection

#1290499

Hi,

thanks for your response. I am no coder so i understand just a bit. But i will discuss your solution with one. I guess it will help me.

Have a nice day.

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