Is there a better way to hide the price of the configurable product on the product page but reveal the price once a selection is made?
jQuery( ".product-options .price" ).hide();
jQuery( ".super-attribute-select" ).change(function () {
if (jQuery( ".super-attribute-select" ).val() !== "Choose an Option..." ) {
jQuery( ".product-options .price" ).show();
}
else if (jQuery( ".super-attribute-select" ).val() == "Choose an Option..." ) {
jQuery( ".product-options .price" ).show();
}
});
Second, is there a way to hide the price again in case the "Choose an Option" selection is made once again? My else if statement doesnt seem to work correctly, as the $0.00 price remains visible if you reselect "Choose an Option".
Try with the Element Id or you need to make changes into the js file to fulfil your requirements.
Has anyone made this work?
You can try it by
jQuery( ".wapper-view" ).show();
jQuery( ".super-attribute-select" ).change(function () {
if (jQuery( ".super-attribute-select" ).val() == "" ) {
jQuery( ".wapper-view" ).hide();
}else {
jQuery( ".wapper-view" ).show();
}
});
Some one make that work ?