I need to format price in my module's javascript. As I figured out, I need to use formatCurrencyCldr().
I included tools.js where formatCurrencyCldr is defined:
public function hookHeader() { $this->context->controller->addJqueryUI('ui.autocomplete'); $this->context->controller->registerJavascript('modules-mymodule0', 'js/tools.js', ['position' => 'bottom', 'priority' => 1]); $this->context->controller->registerJavascript('modules-mymodule', 'modules/'.$this->name.'/mymodule.js', ['position' => 'bottom', 'priority' => 150]); $this->context->controller->addCSS($this->_path.'front.css', 'all'); }
However I get
Quotewindow.cldr is undefined getCurrencyFormatter@http://...../js/tools.js:177:3
What I am doing wrong?