revamped product.php

more neater code. check it out and let me know if there are bugs