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

fix(e-commerce): fetch selling price with pricing rule #28951

Conversation

dj12djdjs
Copy link
Collaborator

closes #28950

Behavior Before PR
ecommerce pricing rule

Behavior After PR
fix ecommerce pricing rule

@dj12djdjs dj12djdjs changed the title fix: fetch correct selling price. fix(e-commerce): fetch selling price with pricing rule Dec 18, 2021
@marination marination added needs-tests This PR needs automated unit-tests. e-commerce-fix E-commerce PRs that need to be front ported to develop labels Dec 21, 2021
@marination
Copy link
Collaborator

marination commented Dec 21, 2021

@dj12djdjs can you please add a simple test case for this in test_website_item.py under test_website_item_price_for_logged_in_user.
Create a new pricing rule for a certain customer (with user linked), change session user to this customer user, and check the price fetched by get_product_info_for_website

@marination marination self-assigned this Dec 21, 2021
@marination
Copy link
Collaborator

marination commented Dec 27, 2021

Test for test_against_leave_application_validation_after_submit breaking, unrelated.
Tested the PR, works correctly and applies pricing rule for customer user only , on product listing , cart, wishlist and item page. Price for other user unaffected.

@marination marination merged commit 1c2a8c6 into frappe:version-13-hotfix Dec 27, 2021
@marination marination removed the needs-tests This PR needs automated unit-tests. label Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e-commerce-fix E-commerce PRs that need to be front ported to develop
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants