js code for cart page