diff --git a/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php b/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php
index 88f40bf..af12eb4 100644
--- a/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php
+++ b/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php
@@ -275,7 +275,7 @@ class SmartyHelperFunctions
}
- public static function displayPriceSplit($price){
+ public static function displayPriceSplit($price, $show_currency = false) {
/* Helper to split the price into euros and cents to make it more stylish
registered under public_html/modules/is_themecore/src/Hook/Smarty.php
@@ -283,15 +283,16 @@ class SmartyHelperFunctions
{price_split price=$product.price}
*/
-
//Convert to a string and only keep numbers, commas and dots
+ $currency_name = \Context::getContext()->currency->name;
+ $currency_symbol = \Context::getContext()->currency->symbol;
$price_string = implode(',', $price);
$price_string = preg_replace('/[^0-9,.]/', '', $price_string);
// Split by comma and wrap each part in a span
$price_parts = explode(',', $price_string);
if (count($price_parts) >= 2) {
- echo '' . $price_parts[0] . '';
+ echo '' . ($show_currency ? $currency_symbol : '') . $price_parts[0] . '';
echo '' . $price_parts[1] . '';
} else {
foreach ($price_parts as $part) {