We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b314399 commit 93e72bbCopy full SHA for 93e72bb
src/Message/AbstractRequest.php
@@ -178,11 +178,11 @@ protected function getItemData()
178
}
179
if ($cartHasDiscounts) {
180
$discounts = $xml->addChild('discounts');
181
- foreach ($items as $discountItems) {
182
- if ($discountItems->getPrice() < 0) {
+ foreach ($items as $discountItem) {
+ if ($discountItem->getPrice() < 0) {
183
$discount = $discounts->addChild('discount');
184
- $discount->addChild('fixed', $discountItems->getPrice() * -1);
185
- $discount->description = $discountItems->getName();
+ $discount->addChild('fixed', ($discountItem->getPrice() * $discountItem->getQuantity()) * -1);
+ $discount->description = $discountItem->getName();
186
187
188
0 commit comments