Add price rounding for specific price reductions in Product class
This commit is contained in:
8
.vscode/ftp-kr.sync.cache.json
vendored
8
.vscode/ftp-kr.sync.cache.json
vendored
@@ -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": {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user