Add price rounding for specific price reductions in Product class

This commit is contained in:
2025-04-13 23:31:05 +02:00
parent 075fe64cc8
commit a6a57d6c53
2 changed files with 9 additions and 4 deletions

View File

@@ -11725,8 +11725,8 @@
},
"appagebuilder.php": {
"type": "-",
"size": 157926,
"lmtime": 1742913415376,
"size": 156813,
"lmtime": 1744230683719,
"modified": false
},
"classes": {
@@ -13066,8 +13066,8 @@
"front": {
"CmsController.php": {
"type": "-",
"size": 2647,
"lmtime": 1742913531287,
"size": 2639,
"lmtime": 1744231251306,
"modified": false
},
"index.php": {

View File

@@ -3954,6 +3954,11 @@ class ProductCore extends ObjectModel
$price -= $specific_price_reduction;
}
// Zaokrąglanie w górę tylko gdy mamy redukcję
if ($specific_price && $specific_price['reduction'] > 0) {
$price = Tools::ceilf($price);
}
// Group reduction
if ($use_group_reduction) {
$reduction_from_category = GroupReduction::getValueForProduct($id_product, $id_group);