Skip to content

Commit

Permalink
google maps now mandates an api key so add to general store settings/…
Browse files Browse the repository at this point in the history
…location and smarty function google_maps
  • Loading branch information
dleffler committed Apr 7, 2017
1 parent 289f474 commit 373fd7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Expand Up @@ -115,6 +115,7 @@
<div id="tab7" role="tabpanel" class="tab-pane fade">
<h2>{'General Location Settings'|gettext}</h2>
{control type="checkbox" name="address_allow_admins_all" label="Allow admins access to the full geographical data regardless of other settings?"|gettext value=1 checked=$config.address_allow_admins_all}
{control type="text" name="map_apikey" label="Google Maps API Key"|gettext value=$config.map_apikey}
</div>
<div id="tab8" role="tabpanel" class="tab-pane fade">
<h2>{"Product Feeds Settings"|gettext}</h2>
Expand Down
1 change: 1 addition & 0 deletions framework/modules/ecommerce/views/ecomconfig/configure.tpl
Expand Up @@ -115,6 +115,7 @@
<div id="tab7">
<h2>{'General Location Settings'|gettext}</h2>
{control type="checkbox" name="address_allow_admins_all" label="Allow admins access to the full geographical data regardless of other settings?"|gettext value=1 checked=$config.address_allow_admins_all}
{control type="text" name="map_apikey" label="Google Maps API Key"|gettext value=$config.map_apikey}
</div>
<div id="tab8">
<h2>{"Product Feeds Settings"|gettext}</h2>
Expand Down
2 changes: 1 addition & 1 deletion framework/plugins/function.google_map.php
Expand Up @@ -94,7 +94,7 @@ function smarty_function_google_map($params,&$smarty) {
expJavascript::pushToFoot(array(
"unique"=>'0-gmaps',
"jquery"=>1,
"src"=>'http://maps.google.com/maps/api/js'
"src"=>'http://maps.google.com/maps/api/js?key=' . ecomconfig::getConfig('map_apikey')
));
expJavascript::pushToFoot(array(
"unique"=>'gmap-' . $params['unique'],
Expand Down

0 comments on commit 373fd7f

Please sign in to comment.