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

[Promotion] Use proportional distribution in order percentage discount #5976

Merged
merged 2 commits into from
Sep 5, 2016

Conversation

pamil
Copy link
Contributor

@pamil pamil commented Sep 5, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Related tickets -
License MIT

@michalmarcinkowski
Copy link
Contributor

We should add more scenarios here. The order percentage discount should also take into account shipping fee.

$itemsTotal = [];
foreach ($subject->getItems() as $orderItem) {
$itemsTotal[] = $orderItem->getTotal();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is getItemsTotal() method on Order

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It returns the sum of items totals, not the array with items totals.

@pamil
Copy link
Contributor Author

pamil commented Sep 5, 2016

@michalmarcinkowski there's "Receiving percentage discount does not affect the shipping fee" scenario, so we should rather discuss on it.

@michalmarcinkowski michalmarcinkowski merged commit 1894b15 into Sylius:master Sep 5, 2016
@michalmarcinkowski
Copy link
Contributor

@pamil that's great! I recall we simplified that, so you should configure shipping percentage discount separately. Good job then! 👍

@pamil pamil deleted the order-percentage-discount branch September 6, 2016 07:32
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[Promotion] Use proportional distribution in order percentage 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

Successfully merging this pull request may close these issues.

None yet

3 participants