Skip to content

Commit

Permalink
Added sub total lookup in extension/total/coupon model
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Aug 19, 2024
1 parent ae971be commit b00581c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/catalog/model/extension/total/coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getTotal(array $total): void {
}

if ($status) {
if ($coupon_info['type'] == 'F') {
if ($coupon_info['type'] == 'F' && $sub_total) {
$discount = $coupon_info['discount'] * ($product['total'] / $sub_total);
} elseif ($coupon_info['type'] == 'P') {
$discount = $product['total'] / 100 * $coupon_info['discount'];
Expand Down

0 comments on commit b00581c

Please sign in to comment.