Post by cumquat » Mon Dec 21, 2009 7:23 pm

Hi there,

New to opencart but so far so good. Normally i use SilverStripe which is great for everything i do except eCommerce which opencart seems to do sweet.
I'm more a designer than developer so here's my question has anyone integrated Google maps with open cart? I've searched the forum and haven't seen anything, i was gonna follow the guide to writing a module on the wiki but it wasn't finished, so i was hoping that someone could point me in the right direction.

Regards

Mick

Newbie

Posts

Joined
Mon Dec 21, 2009 7:17 pm
Location - London, UK

Post by moggiex » Tue Dec 22, 2009 5:24 am

Hi Mick,

I don't see how you would want to use them for hum-drum products, only for an about us page or something, where you can copy/paste the code almost straight from the Google Site

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by Xsecrets » Tue Dec 22, 2009 6:31 am

yes I'm curious as to what you would want a google maps module to do exactly.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by imaginetech » Tue Dec 22, 2009 8:28 am

Maybe the store is so big that a Google Maps is required to navigate the aisles...?

Or maybe it's not.

Image
www.opencartstore.com
Get OpenCart Templates and OpenCart Modules.


User avatar
Active Member

Posts

Joined
Fri Sep 04, 2009 12:25 pm
Location - Darwin, Australia

Post by cumquat » Tue Dec 22, 2009 2:38 pm

The store is for an art gallery, so as well as selling online they want people to come visit. So i need to show where they are. Granted i could just put an image up, but it would be much nicer to link it in with Google maps.

I've looked at the code and got it to work but not as part of the site so i can navigate to http://www.mywebsite.com/map but the page is just the map and not enclosed in the site framework. When I've tried pasting the JavaScript on a page copied from one of the others like contact page it just displays the script as text.

There is probably a very easy way of doing this which is why most people don't understand my problem but as i said i'm not really a coder more a designer.

Mick

If only the store was so big it needed GM i might be able to get a decent fee :o)

Newbie

Posts

Joined
Mon Dec 21, 2009 7:17 pm
Location - London, UK

Post by cumquat » Tue Dec 22, 2009 4:36 pm

Maybe the issue is with my lack of understanding of the opencart framework, how do you go about creating/registering a page of your own design into the system.

Mick

Newbie

Posts

Joined
Mon Dec 21, 2009 7:17 pm
Location - London, UK

Post by moggiex » Tue Dec 22, 2009 5:30 pm

cumquat wrote:Maybe the issue is with my lack of understanding of the opencart framework, how do you go about creating/registering a page of your own design into the system.

Mick
Hi Mick,

Yes this is a royal pain in the rear as the pages get posted to the database and any php or coding is not parsed, as its converted to its html equvilent, but where there is a will there is a way and the way is to eval() it and include an external page like this:

Open:

Code: Select all

./catalog/view/theme/default/template/information/information.tpl
Line 6:

Code: Select all

<div class="middle"><?php echo $description; ?>
Change it to read like this:

Code: Select all

<div class="middle">
<?php
		eval('?>' . $description . '<?php ');
?>
Now in the chosen information page, put this in it, where the filename.php contains anything you want:

Code: Select all

<?php

  include_once("/path/to/site/dir/filename.php");

?>
The php include_once() is parsed and the filename.php is included into the page, it works fine for one chunk of php code. Its not a nice way, but it certainly works as I had this problem before.

OpenCart really needs a wrapper function, so that extra pages can be wrapped more easily into the site.

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by cumquat » Tue Dec 22, 2009 6:21 pm

You sir are a star, that all worked cheers for that.

Mick

Newbie

Posts

Joined
Mon Dec 21, 2009 7:17 pm
Location - London, UK

Post by moggiex » Tue Dec 22, 2009 8:37 pm

cumquat wrote:You sir are a star, that all worked cheers for that.

Mick
No probs, it was a royal pain in the rear for me a few weeks back, was well cuffed when I realised it was a quick one to sort.

Took me no closer to integrating phpBB forum though :(

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by nicudica » Wed Dec 30, 2009 12:20 am

Hi,

This mod will have this option, show the visitors location on the google map.

http://forum.opencart.com/viewtopic.php?f=23&t=9036

Regards,

User avatar
Active Member

Posts

Joined
Wed Nov 11, 2009 9:20 pm
Location - Bucharest / Romania

Post by i2Paq » Wed Dec 30, 2009 6:09 am

nicudica wrote:Hi,

This mod will have this option, show the visitors location on the google map.

http://forum.opencart.com/viewtopic.php?f=23&t=9036

Regards,

What the TS means is that he wants to show a Google Map on the front end of his site so customers know where to go to visit his shop ;)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Xsecrets » Wed Dec 30, 2009 10:47 am

I would think it should be very simple to create an information page and paste in the google embed code from their site.

also while eval() does work it can be dangerous. I wouldn't go around using it all the time if you don't have to.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by nicudica » Wed Dec 30, 2009 1:50 pm

Hi i2Paq,

Yeah its a nice idea, in the contact front page, could be shown this information too;)
But my mod shows the information in the back end.

Best Regards,

User avatar
Active Member

Posts

Joined
Wed Nov 11, 2009 9:20 pm
Location - Bucharest / Romania

Post by bajaber » Sat Feb 12, 2011 8:14 pm

Xsecrets wrote:yes I'm curious as to what you would want a google maps module to do exactly.
Allowing your customers to pick the actual delivery address - especially with places that have a poor postal system.

New member

Posts

Joined
Mon Dec 27, 2010 9:08 pm

Post by bryan200 » Sun Mar 13, 2011 5:53 am

I have a category of products that I changed to stores and service providers and want to display locations (multiple) for the search or category products ( now stores or services ) for those providers.

I see there is a plugin "Google Map for product v2", which places a map on the detail page, with a single location.

I am looking for a way to use the full functionality of the google maps api to connect to the lat long of the products (store or service provider location) in the category selected. Perhaps add an input in the product details in the admin?

I am more of a designer than coder, maybe a reference to someone who could do this for me.

Thank you.
Bryan.

Newbie

Posts

Joined
Sun Mar 13, 2011 5:33 am

Post by bradcamry » Mon May 23, 2011 2:30 pm

Google maps is the powerful tool to get the direction of the place. moreover we can can embed a map onto a web page for Contact Page. it has great network connection where we can easily find out the perfect location where we want to go.

article submission service


Newbie

Posts

Joined
Mon May 23, 2011 1:55 pm

Post by affect » Tue Aug 16, 2011 5:43 am

Just in case someone wants to different Google Maps locations in dialog boxes without needing a separate page for the map, I've created a module for that: http://www.opencart.com/index.php?route ... on_id=2975

MultiMerch Marketplace for OpenCart

Image


User avatar
Active Member

Posts

Joined
Sat Aug 13, 2011 5:04 pm


Post by dimko » Fri Oct 21, 2011 8:23 pm

Xsecrets wrote:I would think it should be very simple to create an information page and paste in the google embed code from their site.

also while eval() does work it can be dangerous. I wouldn't go around using it all the time if you don't have to.
When I do that, there's nothing shown on the information page, just big white space where the map should be.

Any help?

Using OpenCart v1.5.1.3


Active Member

Posts

Joined
Sun Sep 25, 2011 2:10 am
Who is online

Users browsing this forum: No registered users and 35 guests