]> _ Git - pmi.git/commitdiff
wait #6379 @0:10
authorsoufiane <soufiane@cubedesigners.com>
Mon, 9 Oct 2023 13:41:58 +0000 (15:41 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 9 Oct 2023 13:41:58 +0000 (15:41 +0200)
app/Http/Controllers/AjaxController.php

index b78a0bcfc3ff14543e976c35d187461cbfb9dee6..c8833ffaddf6960fdd4db9969dfaf64b8224003f 100644 (file)
@@ -313,6 +313,7 @@ class AjaxController extends CubistFrontController
             $categoryProduct = $products[$id]['category'];
             $discount = intval(Client::getDiscount($categoryProduct, Client::getCategory()));
             $price = 0;
+            $priceDiscount = 0;
 
             if($basicSellingPrice) {
                 $price = $basicSellingPrice;
@@ -350,7 +351,7 @@ class AjaxController extends CubistFrontController
                 }
 
                 $productsMessage[$indexMessage] .= isset($price) && $cartByID[0]['basic_selling_price'] ? $labelPrice . ECommerceCommon::formatPrice($price) . "€ \n" : "";
-                if ($discount) {
+                if ($discount && $priceDiscount) {
                     $productsMessage[$indexMessage] .= $labelPriceDiscount . ECommerceCommon::formatPrice($priceDiscount) . "€ \n";
                 }
             }