plugin google maps

cachousam

Avatar: cachousam

2013-05-30 06:27

Hello.
I installed the google maps plugin, but it does not show me the right address.
Already living in France, I changed the https://maps.google.pl/maps?q = by replacing pl to fr.
Now the card is not Polish but French, but the address is not correct.
Do you have an explanation?

The problem is in this code i suppose:


if( !empty( $config['google_map_page'] ) && $config['google_map_page'] == $aData['iPage'] ){
    echo 
'<div class="googlemap"><iframe src="https://maps.google.fr/maps?q='.( !empty( $config['google_map_country'] ) ? ','.$config['google_map_country'] : null ).( !empty( $config['google_map_city'] ) ? ','.$config['google_map_city'] : null ).( !empty( $config['google_map_street'] ) ? ','.$config['google_map_street'] : null ).'a&hnear='.( !empty( $config['google_map_city'] ) ? $config['google_map_city'] : null ).'&z=13&output=embed"></iframe></div>';
}





thank you

» Quick.Cart v3.x

wewior (OpenSolution)

Avatar: wewior

2013-05-30 07:19

Can you send your page url so we may look at it. Show also how it should look like in google maps, so we may have comparation.

cachousam

Avatar: cachousam

2013-05-31 14:22

Hello

Here is the link

http://cameralive.free.fr/?tents,6

If i read the source code in the page (see below), i can see that the found adress is good but the display in the map is false.

<div class="googlemap"><iframe src="https://maps.google.fr/maps?q=,france,lyon,place bellecourhnear=lyon&z=13&output=embed"></iframe></div>


If i change the adress in the admin page/setting, the map is the same but the adress in the source code of the page is the found adress that i have write in the setting.
You can test , the admin page with the code admin.

See you soon

Thanks for your help

boboo

Avatar: boboo

2013-05-31 22:19

Look at this fragment in the source code:
?q=,france,lyon,place &raquo; bellecourhnear=lyon&z=13&output=embed
I miss a "&" between 'bellecour' and 'hnear'
'hnear' is a $GET variable and needs this ampersand.

I checked this address with this sign and it works correctly.
Check once more your code. Somewhere you are losing this "&".

boboo

boboo

Avatar: boboo

2013-05-31 22:24

and exchange the: "&" in php code to: "&amp;"

boboo

cachousam

Avatar: cachousam

2013-06-01 10:15

Thank you BOBOO.
I'm already looking if it was not a problem of encoding ansi or utf8 in the file page-default.tpl.
After changing the code as shown below, it works.

<div class="googlemap"><iframe src="https://maps.google.fr/maps?q='.( !empty( $config['google_map_country'] ) ? ','.$config['google_map_country'] : null ).( !empty( $config['google_map_city'] ) ? ','.$config['google_map_city'] : null ).( !empty( $config['google_map_street'] ) ? ','.$config['google_map_street'] : null ).'&amphnear='.( !empty( $config['google_map_city'] ) ? $config['google_map_city'] : null ).'&z=13&output=embed"></iframe></div>';


Can you tell me what this sign at the end of coding: &z=13&

I am very pleased to have successfully modified this plugin to QC6 in QC3.7.
Not being a programmer, with great patience and copy paste,test, I'm really enjoying embellishing the script.

But a plugin resists me, and I wonder if someone had the kindness to help me make it work.
It is the product slider plugin.
I really do a lot of testing but I just hangs at the end.
I had already opened a post here:

http://opensolution.org/forum/slider-product,8233,2.html

Thank you in advance.

boboo

Avatar: boboo

2013-06-02 20:04

z=13
it is a map zoom factor by loading the page.

boboo

Toulousaing

Avatar: Toulousaing

2013-06-22 19:32

Cachousam, How did you "install plugin Google Maps"?

I just installed QC6.1 Ext and the "Plugins" button in the admin/tools panel gives: "The data could not be found"
The doc sez "Hover over the "Tools" tab and select the "Plugins" link. Here you can browse through and install plugins available in your version of the script."
Browse through what? There is no list.
I wish to install plugin "Users".
Help via private mail from OpenSolution did not help.
Answer was RTFM but I found NOTHING on plugins installation... except the "How to install" text file which tells me to perform 93 html modifications in the scripts. Is that "One click installation"?
Merci mon Pote.

Didier
Toulouse

QC 6.1 free

cachousam

Avatar: cachousam

2013-06-29 16:29

Hello Didier.
I confirm that the forum is almost dead and that's unfortunate.
Here's what I do to adapt the google maps plugin in my qc3.7.

In file lang/fr.php
add:
$ lang ['Google_map_page'] = "Page with google map";
$ lang ['Country'] = "Country";

In file config / general.php
set this option to "true"
$ config ['embed_php'] = true;

In file config / lang.fr.php
add:
$ config ['google_map_page'] = "";
$ config ['google_map_country'] = "";
$ config ['google_map_city'] = "";
$ config ['google_map_street'] = "";

In file template / pages-default.tpl

add after
! - BEGIN CONTAINER ->
<div id="page">

<?php
if( !empty( $config['google_map_page'] ) && $config['google_map_page'] == $aData['iPage'] ){
echo '<div class="googlemap"><iframe src="https://maps.google.fr/maps?q='.( !empty( $config['google_map_country'] ) ? ','.$config['google_map_country'] : null ).( !empty( $config['google_map_city'] ) ? ','.$config['google_map_city'] : null ).( !empty( $config['google_map_street'] ) ? ','.$config['google_map_street'] : null ).'&amphnear='.( !empty( $config['google_map_city'] ) ? $config['google_map_city'] : null ).'&z=13&output=embed"></iframe></div>';
}
?>

In the file templates / default.css
add:
#page .googlemap iframe{width:100%;height:200px;margin:0;padding:0;border:1px solid #014973;}

in file templates/admin/setting.tpl
add after
<!-- orders_email end -->

<!-- google maps info start -->
<tr class="l1" id="google_map_country">
<th>
$lang['Country']
</th>
<td>
<input type="text" name="google_map_country" value="$config['google_map_country']" size="30" maxlength="40" class="input" />
</td>
</tr>

<tr class="l1" id="google_map_city">
<th>
$lang['City']
</th>
<td>
<input type="text" name="google_map_city" value="$config['google_map_city']" size="30" maxlength="40" class="input" />
</td>
</tr>
<tr class="l1" id="google_map_street">
<th>
$lang['Street']
</th>
<td>
<input type="text" name="google_map_street" value="$config['google_map_street']" size="30" maxlength="40" class="input" />
</td>
</tr>

and before
<!-- tab pages -->
add:
<tr>
<td>$lang['Google_map_page']</td>
<td>
<select name="google_map_page">
<option value="">$lang['none']</option>
$sGooglemapPageSelect
</select>
</td>
</tr>

in the file action-admin/setting.php
add:
$sGooglemapPageSelect = $oPage->throwPagesSelectAdmin( $config['google_map_page'] );


And here it is done.

You can see the result here:
http://cameralive.free.fr/

It seems to me that we already know. You did not have a military store?
Dominique from Lyon

cachousam

Avatar: cachousam

2013-06-29 18:31

Hello,
Besides, someone might it help me for correctly write the function in the action-client/p.php file so that I could remove the php code in the file-default.tpl pages.
I tried this but the div of google maps does not appear:

in the pages-default.tpl I call the variable like this:

$ sPageGoogleMap

in the file action-client/p.php , I created the following function:

if($iContent == $config['google_map_page'])
$sPageGoogleMap = !empty( $config['google_map_page'] ) && $config['google_map_page'] == $aData['iPage'] {
'<div class="googlemap"><iframe src="https://maps.google.fr/maps?q='.( !empty( $config['google_map_country'] ) ? ','.$config['google_map_country'] : null ).( !empty( $config['google_map_city'] ) ? ','.$config['google_map_city'] : null ).( !empty( $config['google_map_street'] ) ? ','.$config['google_map_street'] : null ).'&amphnear='.( !empty( $config['google_map_city'] ) ? $config['google_map_city'] : null ).'&z=13&output=embed"></iframe></div>'
};

Thank you in advance

Back to top
about us | contact