I have a WooCommerce site that I am working on, it is a clothing site and apparently each brand / manufacturer of clothing has a “sizing chart” for their clothing. I am told that some brands fit loose, some fit tight etc. and that a sizing guide and chart has to be displayed on each product so that buyers will know which size to buy.
Solution so far:
Since I had already built the site using OceanWP and Elementor Pro, I had this brilliant (for me anyway!) idea that I could create the various size charts in Elementor Pro as templates, then use ACF to create a select field that displays the shortcodes. Then add a field into the Elementor Pro products page template to display a button that would open a modal containing the size cart. This actually works quite nicely and is responsive etc. I love it!
For items that don’t need the size chart, like purses and scarves etc., I do have the null set in ACF so that a size guide template will not load on these product pages but of course the button is still visible telling buyers to click here to see the size guide, which opens up blank.
I am trying to figure out a way to hide that button if a selection is not made in the back end, ie: if the user just leaves the null value “select”.
Is there any way anyone ca think of to use ACF or even standard WordPress functionality to hide the elementor generated button that activates the modal popup if the user does not make a selection in the select box in the back end?
I am thinking of creating a duplicate product template that does not have the ACF field, and then using a condition in Elementor Pro to use this template only o products with a category of, say … accessories.
Anyone have any thoughts on different ways this could be accomplished?
I want to keep it really simple for the client, so it would be nice if the sizing guide meta box with select field only showed up on products that needed it. So maybe again here, have it appear only on products in specific categories, or not appear on specific category like accessories.
Thanks in advance!