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

OnCostCalculation getting fired twice in a row #2

Open
Bilalkh opened this issue Oct 5, 2017 · 1 comment
Open

OnCostCalculation getting fired twice in a row #2

Bilalkh opened this issue Oct 5, 2017 · 1 comment

Comments

@Bilalkh
Copy link

Bilalkh commented Oct 5, 2017

I've modified the code a little bit to enable me to trigger a custom DiscountBehavior that calculates the new cost of the price on different conditions and scenarios:
1- If an Item is created
2- If an Item has been deleted
3- If a coupon code is inserted

I checked my code, and I'm only calling Yii::$app->cart->getCost(true) once. Please note I'm also trying to do it with Pjax.

capture

@asyou99
Copy link

asyou99 commented Dec 1, 2017

I have save problem. When I call with "true" I get only the first time a discount all subsequent applications are given without a discount

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

No branches or pull requests

2 participants