Target specific addons only?
-
I have situations where I want to hide only specific addons. I tried modifying the js file to include an “else if” that would target a specific product and only the specific addons I wanted hidden. That didn’t work for some reason…the conditionals were correct as far as I could tell. Any ideas on how to make it work?
function style_add_ons(bool) { if ( bool == 'no' ) { $('.product-addon').css('display', 'block') } else if ( is_single('1786') && ( bool == 'yes' ) ) { $('.product-addon-unlimited-revisions').css('display', 'none'); } else { $('.product-addon').css('display', 'none'); } }That said…this would be a feature request given the fact that the addons all have their own, specific assigned CSS tags and the fields could be easily pulled from the database. So..in theory…if you check the box you already have in the variable, it would display a subset of checkboxes below in a row where you can check specific ones to hide only while leaving the remainders visible.
The topic ‘Target specific addons only?’ is closed to new replies.
