hasSpecialPrice() ? $productOrProductVariant->getSpecialPrice() : $productOrProductVariant->price;
$previousPrice = $sellingPrice->convertToCurrentCurrency()->format();
$flashSalePrice = FlashSale::pivot($productOrProductVariant)->price->convertToCurrentCurrency()->format();
if (is_callable($callback)) {
return $callback($flashSalePrice, $previousPrice);
}
return "{$flashSalePrice} {$previousPrice}";
}
$price = $productOrProductVariant->price->convertToCurrentCurrency()->format();
$specialPrice = $productOrProductVariant->getSpecialPrice()->convertToCurrentCurrency()->format();
if (is_callable($callback)) {
return $callback($price, $specialPrice);
}
if (!$productOrProductVariant->hasSpecialPrice()) {
return $price;
}
return "{$specialPrice} {$price}";
}
}