1

I'm not asking anyone for a whole solution (although I'd gladly accept), but rather for someone to point me in the right direction as to how to accomplish this. I am a web designer with intermediate PHP knowledge.

Goal:

  • Add custom select input to WooCommerce product page
  • Admin defines select options on per product basis
  • Select option chosen by user should be stored just like other custom fields

Here's my real world use case:

My client is selling youth sporting events tickets. The select list should display the grade levels (3rd, 4th, 5th, etc) that are available for that event.

I realize that this could be accomplished with WC variations, but I really don't want the added complexity that comes with variations. Especially when it comes to importing by CSV. A spreadsheet of 10 events can go from 10 rows to 60+ when going the variation route.

  • This may be incredibly inefficient, or maybe there is a way better way to accomplish this, but here's an idea: Use two custom fields. One admin field for the admin to select which options are available for the front-end. The second field (on the product page) gets populated via jQuery with the options selected from the first field. – Joey Farruggio May 3 '17 at 22:21
  • I gave what I commented above a shot. It seems to be working. I just made sure that the values of the select's options match each other. – Joey Farruggio May 4 '17 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.