check the code on productDelete page.