Jump to content

Remove google maps from order page in 1.6 (slowing down/ crashing site/server)


jimmyc
 Share

Recommended Posts

Anyone know the best way to remove the google maps module lookup for the customers address in the order page in 1.6. Or a way to remove google maps all together from prestashop.

 

We have a user in china that cannot access the order page whenever the china government tries to block google and its services (they do that every time something sensitive comes up in western news).

 

Any assistance on how to safely do so would be helpful.

 

Thanks. 

Share this post


Link to post
Share on other sites

Hi JimmyC..

 

controllers/admin/AdminOrdersController.php

 

find and then comment out as follows:

	public function setMedia()
	{
		parent::setMedia();

		$this->addJqueryUI('ui.datepicker');
		$this->addJS(_PS_JS_DIR_.'vendor/d3.v3.min.js');
//		$this->addJS('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false');

		if ($this->tabAccess['edit'] == 1 && $this->display == 'view')
		{
			$this->addJS(_PS_JS_DIR_.'admin_order.js');
			$this->addJS(_PS_JS_DIR_.'tools.js');
			$this->addJqueryPlugin('autocomplete');
		}
	}

  • Like 2

Share this post


Link to post
Share on other sites

  • 10 months later...
  • 1 month later...

Hi,

 

commenting the line as El Patron suggested removes the ability to see your client's location on the edit order page (admin view).

To remove Google maps from the front-end, while keeping the fonctionnality in the back-end, you'd better move the line into the "if" just after :

{code}

$this->addJqueryUI('ui.datepicker');

$this->addJS(_PS_JS_DIR_.'vendor/d3.v3.min.js');

 

if ($this->tabAccess['edit'] == 1 && $this->display == 'view')

{

$this->addJS('https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false');

$this->addJS(_PS_JS_DIR_.'admin/orders.js');

$this->addJS(_PS_JS_DIR_.'tools.js');

$this->addJqueryPlugin('autocomplete');

}

{/code}

  • Like 1

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More