Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed payment bug of revisiting old product #4

Merged
merged 2 commits into from
Jan 29, 2021

Conversation

mumerfarooq000
Copy link

Old product was often revisit when buying new product which was logical error as basket line is not newly created but updated by vanilla edx. so bit change of logic and introducing product column was only way to solve it with least coding changes.

@mumerfarooq000 mumerfarooq000 self-assigned this Jan 27, 2021
configuration_helpers = request.site.siteconfiguration.edly_client_theme_branding_settings
url = configuration_helpers.get('LUMSXPAY_VOUCHER_API_URL')

if request.user.is_anonymous or not (url and request.basket):
if request.user.is_anonymous or not (url and basket):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not wrap inside login_required decorator?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be tried

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For classes, we can use LoginRequiredMixin

course_ids = []
def get_existing_basket_challan(self, request):
basket = request.basket
product = basket.lines.first().product

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@@ -130,6 +130,8 @@ class Meta(object):

class BasketChallanVoucher(TimeStampedModel):

This comment was marked as resolved.

This comment was marked as resolved.

course_ids = []
def get_existing_basket_challan(self, request):
basket = request.basket
product = basket.lines.first().product

This comment was marked as resolved.

configuration_helpers = request.site.siteconfiguration.edly_client_theme_branding_settings
url = configuration_helpers.get('LUMSXPAY_VOUCHER_API_URL')

if request.user.is_anonymous or not (url and request.basket):
if request.user.is_anonymous or not (url and basket):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For classes, we can use LoginRequiredMixin

@mumerfarooq000 mumerfarooq000 merged commit 3e83941 into develop Jan 29, 2021
@mumerfarooq000 mumerfarooq000 deleted the umerF/lums-135/fix-payment-bug branch January 29, 2021 07:59
@mumerfarooq000 mumerfarooq000 mentioned this pull request Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants