Jump to content

Edit History

mathdex

mathdex

Hi everyone, 

I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons.

This all happens in the hook DisplayHeader.

 1.7: 

$controller->registerJavascript(
'module-our-script',
'http://cdnForOurJavascript.js',
array('server' => 'remote')
);

 1.6:

$controller->addJS('http://cdnForOurJavascript.js', false);

The problem is if I run this function again, it "overrides" the previous added js-file.

Is there a way to add multiple javascript files to the controller ? 

Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong !

 

Have a nice day.

mathdex

mathdex

Hi everyone, 

I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons.

This all happens in the hook DisplayHeader.

 1.7: 

$controller->registerJavascript(
'module-our-script',
'http://cdnForOurJavascript.js',
array('server' => 'remote')
);

 1.6:

$controller->addJS('http://cdnForOurJavascript.js', false);

The problem is if I run this function again, it "overrides" the previous added js-file.

Is there a way to add multiple javascript files to the controller ? 

Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong !

 

Have a nice day.

mathdex

mathdex

Hi everyone, 

I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons.

This all happens in the hook DisplayHeader.

 1.7: 

$controller->registerJavascript(
'module-our-script',
'http://cdnForOurJavascript.js',
array('server' => 'remote')
);

 1.6:

$controller->addJS('http://cdnForOurJavascript.js', false);

The problem is if I run this function again, it "overrides" the previous added js-file.

Is there a way to add multiple javascript files to the controller ? 

Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong !

 

Have a nice day.

mathdex

mathdex

Hi everyone, 

I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons.

This all happens in the hook DisplayHeader.

 1.7: 

$controller->registerJavascript(
'module-our-script',
'http://cdnForOurJavascript.js',
array('server' => 'remote')
);

 1.6:

$controller->addJS('http://cdnForOurJavascript.js', false);

The problem is if I run this function again, it "overrides" the previous added js-file.

Is there a way to add multiple javascript files to the controller ? 

Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong !

 

Have a nice day.

mathdex

mathdex

Hi everyone, 

I'm working on an existing module and I'm really new to PrestaShop. We want to display buttons bellow the carrier's we add with the our module. The way we do it for now is by loading a javascript file containing code to display those buttons.

This all happens in the hook DisplayHeader.

 1.7: 

$controller->registerJavascript(
'module-our-script',
'http://cdnForOurJavascript.js',
array('server' => 'remote')
);

 1.6:

$controller->addJS('http://cdnForOurJavascript.js', false);

The problem is if I run this function again, it "overrides" the previous added js-file.

Is there a way to add multiple javascript files to the controller ? 

Thanks in advance for your responses, if some things don't seem clear it's because my understanding of the software is still limited, feel free to correct me if I say something wrong !

 

Have a nice day.

 
×
×
  • Create New...