From c6a44b54149696282b9d1d666f50126750545922 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 7 Jun 2019 11:18:46 +0530 Subject: [PATCH] Updated cart for custom_price --- packages/Webkul/Checkout/src/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 5850f8d52..a68aa485e 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -866,7 +866,7 @@ class Cart { } else if ($this->price->getMinimalPrice($item->child->product_flat) != $item->price) { // $price = (float) $item->custom_price ? $item->custom_price : $item->child->product->price; - if ((float)$item->custom_price) { + if (! is_null($item->custom_price)) { $price = $item->custom_price; } else { $price = $this->price->getMinimalPrice($item->child->product_flat); @@ -890,7 +890,7 @@ class Cart { } else if ($this->price->getMinimalPrice($productFlat) != $item->price) { // $price = (float) $item->custom_price ? $item->custom_price : $item->product->price; - if ((float)$item->custom_price) { + if (! is_null($item->custom_price)) { $price = $item->custom_price; } else { $price = $this->price->getMinimalPrice($productFlat);