updated js for checkout page