Change discount code to use cookies

Change discount code to use cookies