From d6a43605acaff1cf335dc044e2b297132d6eb2ce Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Thu, 4 Dec 2025 12:56:56 +0300 Subject: [PATCH] fix(spa): remove html in price for some opencart custom themes --- .../controller/extension/tgshop/handle.php | 3 ++- .../framework/OpenCart/Currency.php | 25 +++++++++++++++++++ .../framework/OpenCart/PriceFormatter.php | 17 +++++++++++++ .../oc_telegram_shop/stubs/currency.php | 4 +++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 module/oc_telegram_shop/upload/oc_telegram_shop/framework/OpenCart/Currency.php create mode 100644 module/oc_telegram_shop/upload/oc_telegram_shop/framework/OpenCart/PriceFormatter.php diff --git a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php index fc7165f..67cba74 100755 --- a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php +++ b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php @@ -9,6 +9,7 @@ use Monolog\Handler\RotatingFileHandler; use Monolog\Logger; use Openguru\OpenCartFramework\ImageTool\ImageTool; use Openguru\OpenCartFramework\ImageTool\ImageToolInterface; +use Openguru\OpenCartFramework\OpenCart\Currency as TelecartCurrency; use Openguru\OpenCartFramework\OpenCart\Decorators\OcRegistryDecorator; use Openguru\OpenCartFramework\Support\Arr; use Psr\Log\LoggerInterface; @@ -83,7 +84,7 @@ class ControllerExtensionTgshopHandle extends Controller }); $app->bind(Url::class, fn() => $this->url); - $app->bind(Currency::class, fn() => $this->currency); + $app->bind(Currency::class, fn() => new TelecartCurrency($this->registry)); $app->bind(Tax::class, fn() => $this->tax); $app->bind(ImageToolInterface::class, fn() => new ImageTool(DIR_IMAGE, HTTPS_SERVER)); $app->bind(Cart::class, fn() => $this->cart); diff --git a/module/oc_telegram_shop/upload/oc_telegram_shop/framework/OpenCart/Currency.php b/module/oc_telegram_shop/upload/oc_telegram_shop/framework/OpenCart/Currency.php new file mode 100644 index 0000000..56db7c3 --- /dev/null +++ b/module/oc_telegram_shop/upload/oc_telegram_shop/framework/OpenCart/Currency.php @@ -0,0 +1,25 @@ +