Skip to content

Commit

Permalink
NTR: Fixed customproduct values prices
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Jan 17, 2025
1 parent dcd5360 commit 8bd0454
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).


### Features
- Return over Shopware Commercial plugins is now transfered to Mollie when the Return status is set to "Done" and can be cancelled with the "Cancelled" status. Please note that the refund cannot be cancelled after two hours.
- Returns over Shopware Commercial plugins is now transferred to Mollie when the Return status is set to "Done" and can be cancelled with the "Cancelled" status. Please note that the refund cannot be cancelled after two hours.
### Changes
- Minimum Supported Shopware version is now 6.4.5.0
- Add new monolog channel "mollie". You can now add custom handler and assign them to the mollie channel
### Fixes
- fixed order details in refund manager in shopware 6.4.x
- Fixed order details in refund manager in shopware 6.4.x
- Fixed the issue for SwagCustomizedProducts, the prices for option values are now added to the order
16 changes: 12 additions & 4 deletions src/Service/MollieApi/Builder/MollieLineItemBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,18 @@ public function buildLineItems(string $taxStatus, ?OrderLineItemCollection $line
if ($productChildren === null) {
continue;
}
$productChildren = $productChildren->filterByType(self::LINE_ITEM_TYPE_CUSTOM_PRODUCTS_OPTIONS);
foreach ($productChildren as $productChild) {
if ($productChild->getPrice() !== null && $productChild->getPrice()->getTotalPrice() > 0) {
$lineItems->add($productChild);
$options = $productChildren->filterByType(self::LINE_ITEM_TYPE_CUSTOM_PRODUCTS_OPTIONS);
foreach ($options as $option) {
$optionValues = $option->getChildren();
if ($optionValues !== null) {
foreach ($optionValues as $optionValue) {
if ($optionValue->getPrice() !== null && $optionValue->getPrice()->getTotalPrice() > 0) {
$lineItems->add($optionValue);
}
}
}
if ($option->getPrice() !== null && $option->getPrice()->getTotalPrice() > 0) {
$lineItems->add($option);
}
}
}
Expand Down

0 comments on commit 8bd0454

Please # to comment.