Modified js functions to update cart quantity