Skip Navigation

[Resolved] Show text based off different Woocommerce variations

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

Problem:

I want to show text based off different Woocommerce variations

Solution:

It needs custom JS codes, for example, when user select a Woocommerce variation, you can trigger a JS function, in this JS function, display specific text.

Relevant Documentation:

https://api.jquery.com/change/

This support ticket is created 5 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 6 replies, has 2 voices.

Last updated by StanleyT8485 5 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1250535

Tell us what you are trying to do? I want to show text based off different Woocommerce variations.

For example if user select quantities between:
Qty 1-5, show "5 days manufacturing time."
Qty 6-10, show "7 days manufacturing time."
Qty 11+, show "10 days manufacturing time."

Another example if user select a product variation called "Super" then show the text "S"

Would this be possible with any of the Toolset plugins?

#1250593

Hello,

There isn't such kind of built-in feature within Toolset, I have searched it in google, and found some related topics, for example:
https://stackoverflow.com/questions/52587378/woo-commerce-add-variable-text-to-product-variations

For your reference.

#1250595

Hi Luo,
What did you search for in Google?

Is it possible to show a certain div ID based on a selected Woocommerce variation?
For example, if option A is selected, show table #ABC. If option B is selected, show table #DEF

Would this be possible?

Stan

#1250621

I searched with keyword "woocommerce variations quantity show different text".

For the question:
Is it possible to show a certain div ID based on a selected Woocommerce variation?

It needs custom JS codes, for example, when user select a Woocommerce variation, you can trigger a JS function, in this JS function, display specific text.
See document:
hidden link

#1250627

Thanks for the reply, Luo.

Would we be able to show specific text based on the quantity selected? Sorry, I understand this isn't part of Toolset.

#1250635

Yes, I think it is possible with custom JS codes, same as I mentioned above, when user change the value of quantity field, you can setup JS codes to display different text message.

#1252565

My issue is resolved now. Thank you!