Jump to content

Syntaxe pour modifier un paramètre à une fonction


Recommended Posts

Bonjour,

Je cherche la syntaxe pour ajouter à cet élément

$this->context->controller->registerJavascript(
'module-dpdfrance-gmaps',
'https://maps.googleapis.com/maps/api/js?key=' . Configuration::get('DPDFRANCE_GOOGLE_API_KEY'),
['priority' => 100, 'server' => 'remote']

ceci &callback=Function.prototype à la fin de l'url pour que celle ci devienne :

https://maps.googleapis.com/maps/api/js?key=MA-CLE&callback=Function.prototype

Auriez-vous la bonne syntaxe du code à remplacer ?

Merci

Prestashop 1.7.5

Link to comment
Share on other sites

Bonjour,

Ca devrait donner ceci :

$this->context->controller->registerJavascript(
'module-dpdfrance-gmaps',
'https://maps.googleapis.com/maps/api/js?key=' . Configuration::get('DPDFRANCE_GOOGLE_API_KEY') . '&callback=Function.prototype',
['priority' => 100, 'server' => 'remote']

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...