Jump to content

Edit History

Anonymous No.2

Anonymous No.2


removed typo errors

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

Quote

window.cldr is undefined getCurrencyFormatter@http://...../js/tools.js:177:3

What I am doing wrong?

Anonymous No.2

Anonymous No.2

I need to format price in my module's javascript. As I figured out, I need to use formatCurrencyCldr().

I included tools.js in the 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

Quote

window.cldr is undefined getCurrencyFormatter@http://...../js/tools.js:177:3

What I am doing wrong?

×
×
  • Create New...