I'm using the validation box that is under the product options of the admin. However, is there way to put this in a tpl without having to put this for each product that needs it.
Code:
if (product_option('Hose Media').value == '')
{ alert('Please complete Hose Media (Ex. Water, Steam, etc.)');
return false;
}
if (product_option('Hose Working Pressure (PSI)').value == '')
{ alert('Please complete Hose Working Pressure (PSI)');
return false;
}
if (product_option('Hose Operating Temperature (F)').value == '')
{ alert('Please complete Hose Operating Temperature (F)');
return false;
}
if (document.getElementById('po454').selectedIndex == 0)
{ alert('Please select your 1st Fititng.'); return false;
}
if (document.getElementById('po455').selectedIndex == 0)
{ alert('Please select your 2nd Fititng.'); return false;
}
else return true;
By the way this is for a 4.2 cart