added percent in product price 3

This commit is contained in:
2026-07-04 22:14:18 +03:30
parent ed5bd74986
commit 3373bc82ca
4 changed files with 111 additions and 8 deletions
@@ -693,7 +693,12 @@ class ProductController extends SuperController
}
if (is_string($value)) {
$value = str_replace([',', ' ', '٬'], '', $value);
$value = trim(str_replace([' ', '٬'], '', $value));
if (str_contains($value, ',') && ! str_contains($value, '.')) {
$value = str_replace(',', '.', $value);
} else {
$value = str_replace(',', '', $value);
}
}
return (float) $value;