Hi @denisdraghici,
It looks like you need to make the product into a variable product. This will give you a dropdown list with your options of 1, 6 and 20. You can learn more about variable products here – https://docs.woocommerce.com/document/variable-product/
As far as positioning the dropdown in the spot that you want, you will need to unhook it from the location where it appears by default and hook it into the woocommerce_after_quantity_input_field area.
You’ll find a handy visual guide for the hooks available on your WooCommerce product pages here – https://hooks.wpdesk.org/product/hoodie-with-pocket/
If you’re not too sure what a hook is, you’ll get a primer here:
https://developer.wordpress.org/plugins/hooks/ and a good tutorial here – https://premium.wpmudev.org/blog/wordpress-hooks/
Cheers.
Hi @luminus,
thank you very much for the reply.
I’ve managed to create the variations and display them as a drop down. Got stuck at the second step as I’m not very familiar with the woocommerce hooks and templates.
Any chance I could get some more specific help? Which template file should I edit?
Thanks in advance!
Plugin Support
Hannah S.L.
(@fernashes)
Automattic Happiness Engineer
Hey there,
I’m glad to hear you’re making progress!
While we’re happy to help you in the right direction, most of us aren’t developers. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the following places for more development-oriented questions:
- WooCommerce Slack Community: https://woocommerce.com/community-slack/
- Advanced WooCommerce group on Facebook: https://www.facebook.com/groups/advanced.woocommerce/