Post by Karsp_ » Sat Apr 13, 2019 6:57 pm

Hello!
I'm not really good using opencart but I really love it! I'm looking for a Google places search box for opencart. To show what I'm looking for is the link bellow.
https://developers.google.com/maps/docu ... -searchbox
I need it to use it in a form, where the city can be selected by the user and let me obtein de location values of the place (name, distance between one and anocther, etc).
Someone knows if a version of that hmlt plugin exist for opencart?
It is too hard to create an opencart plugin from that js?

Thanks you soo much in advance for reading my question and thanks for the help.
Regards! :D ;)

Newbie

Posts

Joined
Sat Nov 24, 2018 8:45 pm

Post by letxobnav » Sun Apr 14, 2019 12:49 am

well, go to jsfiddle, copy the html, javascript and css, drop that in the OC html module and include that module in one of the layout positions.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by cedcommerceteam » Tue Apr 16, 2019 11:42 am

hey @Karsp
you can add below script to that form page and use field is to get proper data

<script type="text/javascript" src='https://maps.google.com/maps/api/js?sen ... '></script>
<script src="view/javascript/mazaya/locationpicker.jquery.min.js"></script>
<script>
$('#id of div where map have to be shown').locationpicker({
location: {
latitude: default_latitude,
longitude: default_longitude
},
radius: 300,
inputBinding: {
latitudeInput: $('#id of field where to latitude'),
longitudeInput: $('#id of field where to latitude'),
locationNameInput: $('#id of field where to get entered data')
},
enableAutocomplete: true,
onchanged: function (currentLocation, radius, isMarkerDropped) {

}
});
</script>

you can add a script from controller too if you want

$this->document->addScript('path of js where you save the copy of js');


Or you can create an HTML Content with complete form in Modules and then add that HTML Content to desired page layout from Design > Layout section

Call us at : (+91) -8765210318 , Skype: live:carlmorgan.cedcommerce , Email: support@cedcommerce.com
CedCommerece : Officail Opencart Partners
CedCommerce Official : www.cedcommerce.com
Opencart Services : www.cedcommerce/opencart-services.com
Sell On various Marketplace Integration : Opencart-Extensions
Magenative Mobile App/IOS Development : magenative.com


User avatar
Active Member

Posts

Joined
Wed Aug 09, 2017 9:02 pm
Who is online

Users browsing this forum: No registered users and 10 guests