Jump to content

Contact page map location is incorrect


Steve_J

Recommended Posts

I've added the same Latitude and Longitude for our shop in 'Preferences > Store Contacts > Parameters' and in 'Preferences > Store Contacts > Edit' (for the physical store).

 

When visiting the 'Contact Us' page of the site ( http://horsewerks.com.au.php53-9.dfw1-2.websitetestlink.com/contact-us ) a get the wrong location showing in the map but if I visit the 'Our Store(s)!' link ( http://horsewerks.com.au.php53-9.dfw1-2.websitetestlink.com/stores ) in the site footer I get the correct location showing in the map.

 

Any suggestions as to why the 'Contact Page' map is showing an incorrect location?

Link to comment
Share on other sites

Thanks for your suggestion.

I've transposed the latitude and longitude and found that the contact page map has not changed at all.

So it seems that the system is not using the figures I'm entering?

The map is displaying a location with co-ordinates -32.830735,147.451465 when the co-ordinates I'm putting into the admin are -34.480617,150.417493 a difference in location of several hundred kilometres.

Any other thoughts on what the fix might be?

Link to comment
Share on other sites

I managed to get the correct map showing by modifying the contact-form.tpl file which is in the 'Leisure' theme folder.

 

Found this code: "center: new google.maps.LatLng({$srpta.lingerie_shop_gmap_latitude}, {$srpta.lingerie_shop_gmap_longitude}),"

 

and replaced {$srpta.lingerie_shop_gmap_latitude} and {$srpta.lingerie_shop_gmap_longitude} with actual co-ordinates for latitude and longitude.

Link to comment
Share on other sites

  • 1 year later...

Hi kamaaina,

It's 18months since I worked on this issue and can't remember how I solved the problem.

I think I might have updated the theme to a newer version which fixed the issue for me.

I've just checked the theme folder contact-form.tpl and the original code now appears to be in place.

Sorry, I can't help you with any additional info on this.

Steve J

Link to comment
Share on other sites

  • 6 months later...

Sillymonkey

 

Preferences->Store Contacts

 

Is your default lat and long set correctly?

yes.  I have changed them several time to different quardinate, not just the location I desire and NOTHING changes.  The map remains the same no matter WHAT I DO! At this point I'm ready to yank it off entriely, but even resetting the form file with the default to eliminate the map altogether has not effected the page.  And yes, I have refresed my cache numerous time, even opened in numerous browsers. 

I have attempted to edit the contact-form.tpl file as that is where I see the source for the coordinates, but pulling the file from the original shows an error.  But as I said before, even replacing the file with the default contact-form.tpl which does NOT have a map in it, has not changed the site.  You can see it here. oozevape.com/contact.

Link to comment
Share on other sites

Hi

 

If you view source of the contact page you will see the following:

function initialize2() {
  var myLatlng2 = new google.maps.LatLng(51.3,0);
  var mapOptions2 = {
    zoom: 9,
    center: myLatlng2,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map2 = new google.maps.Map(document.getElementById('map-canvas'), mapOptions2);

  var marker = new google.maps.Marker({
      position: myLatlng2,
      map: map2
  });
}

The line starting with:

 

var myLatlng2 = new google.maps.LatLng(51.3,0);

 

is where the map is centering to (51.3, 0).

 

Look for this code in your theme and change, although it should be taking the default and should not be hardcoded into the javascript.

 

See how you get on.

Edited by prestatent (see edit history)
Link to comment
Share on other sites

Hi

 

If you view source of the contact page you will see the following:

function initialize2() {
  var myLatlng2 = new google.maps.LatLng(51.3,0);
  var mapOptions2 = {
    zoom: 9,
    center: myLatlng2,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map2 = new google.maps.Map(document.getElementById('map-canvas'), mapOptions2);

  var marker = new google.maps.Marker({
      position: myLatlng2,
      map: map2
  });
}

The line starting with:

 

var myLatlng2 = new google.maps.LatLng(51.3,0);

 

is where the map is centering to (51.3, 0).

 

Look for this code in your theme and change, although it should be taking the default and should not be hardcoded into the javascript.

 

See how you get on.

I'll take a look, but even what you're looking at is not what the file is set to, since I replaced that file with one that doesn't include the map at all.  so somehow its pulling information from another source. Let me see if I can locate that file.

Link to comment
Share on other sites

I updated the file and uploaded it via ftp to my site theme folder.  Still no change.  So now my code reads: function initialize2() {
  var myLatlng2 = new google.maps.LatLng(42.6083068,-83.05106810000001);
  var mapOptions2 = {
    zoom: 9,
    center: myLatlng2,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map2 = new google.maps.Map(document.getElementById('map-canvas'), mapOptions2);

  var marker = new google.maps.Marker({
      position: myLatlng2,
      map: map2
  });

 

HELP!

Link to comment
Share on other sites

Looking at view source it still shows the old code. Have you cleared the cache and deleted the /cache/class_index.php file? This file will be recreated when you view the site.

 

If it still doesn't work after this then I've no idea. You may want to contact the theme developer for help on this.

Link to comment
Share on other sites

Looking at view source it still shows the old code. Have you cleared the cache and deleted the /cache/class_index.php file? This file will be recreated when you view the site.

 

If it still doesn't work after this then I've no idea. You may want to contact the theme developer for help on this.

yes.  I just deleted the class_index.php file and cleared my internet cache.  Still showing in the source the old code.  Not sure where else to change the details.  The developer says that the contact page is defaul prestashop and doesn't support it

Link to comment
Share on other sites

Still no answers?  I've deleted the file and replaced it with on that has the coordinates listed as I want, but it still pulls the same files.  There is NO change, if I delete the file the contact page does not pull, but otherwise, any and all contact files I place into the folder pull the wrong image.

Link to comment
Share on other sites

Hi

 

 

The best I can do is look at the site via backoffice and also look at the code maybe with access to ftp. If you want to do this, you may send your details on a PM. I'll spend no more than an hour on this to see if I can locate the problem.

 

Cheers

At this point, I don't know what other options I might have.  Please let me know how you would like the information to be able to login and look.

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...