Commit dc3a4233 by Douglas Hall Committed by GitHub

Merge pull request #15293 from edx/saleem-latif/ENT-367

ENT-367: Show Enterprise Logistration for coupon users
parents d1f4e9b0 7914a009
...@@ -3176,6 +3176,7 @@ ENTERPRISE_EXCLUDED_REGISTRATION_FIELDS = { ...@@ -3176,6 +3176,7 @@ ENTERPRISE_EXCLUDED_REGISTRATION_FIELDS = {
'year_of_birth', 'year_of_birth',
'mailing_address', 'mailing_address',
} }
ENTERPRISE_CUSTOMER_COOKIE_NAME = 'enterprise_customer_uuid'
############## Settings for Course Enrollment Modes ###################### ############## Settings for Course Enrollment Modes ######################
COURSE_ENROLLMENT_MODES = { COURSE_ENROLLMENT_MODES = {
......
...@@ -248,7 +248,7 @@ def enterprise_customer_for_request(request, tpa_hint=None): ...@@ -248,7 +248,7 @@ def enterprise_customer_for_request(request, tpa_hint=None):
except EnterpriseCustomer.DoesNotExist: except EnterpriseCustomer.DoesNotExist:
pass pass
ec_uuid = request.GET.get('enterprise_customer') ec_uuid = request.GET.get('enterprise_customer') or request.COOKIES.get(settings.ENTERPRISE_CUSTOMER_COOKIE_NAME)
if not ec and ec_uuid: if not ec and ec_uuid:
try: try:
ec = EnterpriseCustomer.objects.get(uuid=ec_uuid) ec = EnterpriseCustomer.objects.get(uuid=ec_uuid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment