Apply discounts automatically if they are present in the URL and valid. #2237