Add addOrder javascript function.