def get_context_data(self, **kwargs): # pylint: disable=arguments-differ context = super(ReceiptResponseView, self).get_context_data(**kwargs) order = context[self.context_object_name] context['order_product_ids'] = ','.join( map(str, order.lines.values_list('product_id', flat=True))) has_enrollment_code_product = False if order.basket: has_enrollment_code_product = any( line.product.is_enrollment_code_product for line in order.basket.all_lines()) context.update({ 'payment_method': self.get_payment_method(order), 'display_credit_messaging': self.order_contains_credit_seat(order), }) context.update(self.get_order_dashboard_context(order)) context.update(self.get_order_verification_context(order)) context.update(self.get_show_verification_banner_context(context)) context.update({ 'explore_courses_url': get_lms_explore_courses_url(), 'has_enrollment_code_product': has_enrollment_code_product, 'disable_back_button': self.request.GET.get('disable_back_button', 0), }) if settings.AWIN_ADVERTISER_ID: context.update({ 'product_tracking': self.add_product_tracking(order), }) return context
def get_context_data(self, **kwargs): # pylint: disable=arguments-differ context = super(ReceiptResponseView, self).get_context_data(**kwargs) order = context[self.context_object_name] has_enrollment_code_product = False if order.basket: has_enrollment_code_product = any( line.product.is_enrollment_code_product for line in order.basket.all_lines()) context.update({ 'payment_method': self.get_payment_method(order), 'display_credit_messaging': self.order_contains_credit_seat(order), }) context.update(self.get_order_dashboard_context(order)) context.update(self.get_order_verification_context(order)) context.update(self.get_show_verification_banner_context(context)) context.update({ 'explore_courses_url': get_lms_explore_courses_url(), 'has_enrollment_code_product': has_enrollment_code_product, 'disable_back_button': self.request.GET.get('disable_back_button', 0), }) return context
def get_context_data(self, **kwargs): context = super(ReceiptResponseView, self).get_context_data(**kwargs) order = context[self.context_object_name] context.update({ 'payment_method': self.get_payment_method(order), 'display_credit_messaging': self.order_contains_credit_seat(order), }) context.update(self.get_order_dashboard_context(order)) context.update(self.get_order_verification_context(order)) context.update({ 'explore_courses_url': get_lms_explore_courses_url(), 'has_enrollment_code_product': any(line.product.is_enrollment_code_product for line in order.basket.all_lines()) }) return context