Giter VIP home page Giter VIP logo

numero2 / contao-storelocator Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 8.0 977 KB

Contao Plugin for managing stores (or in common address data) and providing a frontend-search based on geo data.

Home Page: https://www.numero2.de/contao/erweiterungen/storelocator.html

License: GNU Lesser General Public License v3.0

PHP 96.82% CSS 1.74% SCSS 1.44%
contao4 maps google-maps bing heremaps openstreetmap nominatim

contao-storelocator's Introduction

Contao StoreLocator

License: LGPL v3

About

This extension offers the possibility to create multiple lists containing address data, contact information as well as opening times. From the Frontend the user can enter any possible address to see which stores are nearby (like on Google Maps). Read more

Screenshot

Editing a single store

System requirements

Installation

  • Install via Contao Manager or Composer (composer require numero2/contao-storelocator)
  • Run a database update via the Contao-Installtool or using the contao:migrate command.

Using other providers

StoreLocator comes pre-bundled with a provider for Google Maps. If you want to use another provider you'll need to install additional packages:

Package Provider
numero2/contao-storelocator-bing-maps-provider Bing Maps
numero2/contao-storelocator-here-provider HERE Maps
numero2/contao-storelocator-nominatim-provider OpenStreetMap Nominatim
numero2/contao-storelocator-open-cage-provider OpenCage

Events

By default the importer will populate the model with the fields for the current row and the key provided in the first row of the file. For custom handling feel free to use the contao.storelocator_store_import event:

// src/EventListener/StoreImportListener.php
namespace App\EventListener;

use numero2\StoreLocatorBundle\Event\StoreImportEvent;
use numero2\StoreLocatorBundle\Event\StoreLocatorEvents;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(StoreLocatorEvents::STORE_IMPORT)]
class StoreImportListener {

    public function __invoke( StoreImportEvent $event ): void {
        // …
    }
}

contao-storelocator's People

Contributors

andreasisaak avatar asaage avatar bennyborn avatar davidmaack avatar michb avatar s6t avatar stefansl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

contao-storelocator's Issues

Map invisible on page load

The Google Map is invisible on page load, only the controls and grey background are visible. When you click on a store tile, the map moves to the location as it should. I cannot find what causes the issue. I replaced all modified templates by original ones.

Contao 4.13.40
PHP 8.1
Storelocator 4.2.9

CSV import: extend functionality by update & remove actions

Would be nice if the user can add another column to stores CSV like "published".
Contao standard field "published" already exists:
https://github.com/numero2/contao-storelocator/blob/master/src/Resources/contao/dca/tl_storelocator_stores.php#L229

But importer doesn't consider this field when importing:
https://github.com/numero2/contao-storelocator/blob/master/src/Resources/contao/modules/ModuleStoreLocatorImporter.php#L128

New CSV-column could be 1 or 0 for example.

Then following scenarios should be considered:

  • If 1
    • and store doesn't exist in DB --> add
    • and store exists --> update (or maybe check if data has changed and than update)
  • if 0
    • and store exists --> remove from DB

Why?
Our customer has thousands of stores world wide... it's a time consuming taks to manually click through storeLocator in Contao backend and update/remove stores. Furthermore it would lower the number of Googple-Maps-API requests (if store already exists and geo-data is the same --> no API call necessary).

CSV Import - Koordinaten

Hallo Benny. Danke für das neueste Update!

Es gibt leider noch ein kleines Problem mit dem CSV-Import.

Bei ungefähr 25-35% der Händler, die Importiert wurden, funktioniert die automatische Koordinaten-Erstellung nicht :-(
Ich habe es schon mehrfach versucht und die Adressen sind 100% in Ordnung.

Mann könnte zb. auf (Mehrere bearbeiten) klicken und alle auf einmal speichern aber in diesen Fall funktioniert es leider nicht. Mann muss jeden einzelnen Händler öffnen und speichern damit die Koordinaten generiert werden.

In meinen Fall bei 7.000 Händlern wären es fast 2.000 Händler die ich einzeln speichern muss, was wirklich zu viel ist...

Kann man irgendwie zb. über die Datenbank oder mit einer kleinen Script nach dem Import alle nochmal abspeichern, damit alle Koordinaten generiert werden?

Danke

Map-Generierung auf der Detailseite funktioniert nicht.

Liste, Suche usw. funktioniert problemlos.
Nur die Generierung des iFrames auf der Detailseite scheint nicht zu klappen.

<?= $this->mapsURI; ?>

wird auch generiert und ergibt einen Wert, dieser ist aber anscheinend nicht korrekt.
Evtl. kann man sich das ja mal ansehen :-) Danke sehr!

Custom markers are cut off, zip code search not working

Hello,

We are using this extension to show all pools that are using our certificates. We have currently 264 locations. But the custom markers seem to be cut off for whatever reason. See the attachment (1st one). When I make 2 locations invisible the markers are shown the correct way (2nd attachment). So it seems there is a limit of 262 stores. Is this something I can fix myself? (e.g. informing the cliënt there is a limit of locations), or can you fix this issue.

In addition to this, the zip code search does no longer work when 264 locations are active. It does work with 262 locations active. This is a bigger problem than the markers not showing correctly.

Thanks in advance :)

image
image

Use "noreferrer noopener" for links that open in a new window

Search not working with "Umlaut" aliases

The search module is not working if the alias of the page contains a Umlaut.

Warning: sprintf(): Too few arguments in
/www/htdocs/vendor/numero2/contao-storelocator/modules/ModuleStoreLocatorSearch.php
on line 149

Error in Modules

When I try to setup a new module (no matter what kind of "Händler" - it produces an Error:

Contao 4.9 - PHP 7.4

Argument 2 passed to Contao\Controller::getTemplateGroup() must be of the type array, string given, called in /var/clients/client3/web730/fressnapf/var/cache/prod/contao/dca/tl_module.php on line 2502

Nach dem Import doppelte Einträge

Wir haben derzeit den Fall das wir durch die Entwicklung einer neuen Extension (die am Storelocator andockt) immer wieder alle Händler neu importieren. Es ist etwas mühsam vorher immer alle zu löschen.

Ist das so gewollt das beim Import stumpf die CSV importiert wird ohne zu schauen ob nicht eventuell genau dadurch Duplikate entstehen?

Händler auf einer weiteren Seite einbinden

Vielen Dank für die super Erweiterung!

Meine Frage ist nun folgende: Ich würde gerne auf die gleichen Daten zurückgreifen, um eine Liste zu erstellen mit den Händlern, aber ganz individuell, nicht nach Standort sortiert. Ich stelle mir vor, dass man ein Inserttags mit der ID des Händlers benutzt und man so die Daten z.B. auf einer anderen Seite einbinden kann, ohne die Händlerinformationen doppelt anzulegen.

Daher meine Frage: Ist es möglich, auf die einzelnen Händler fest auf einer weiteren Seite einzubinden?

Doesn't work without Google API key

I've changed the frontend to output a openstreetmap based map with leaflet but in the backend the static map doesn't work without the Google API key.
This key you only get nowadays if you give them payment information but I'm not willing to do that so the static map doesn't work.
Maybe it's good to disable the map view if no API keys provided.

Template-Override

Hallo Benny,

der Template-Override ist leider nicht möglich wenn sich das Template in einem Unterordner befindet.

User location on loading

Hi,
it's not a bug, but i'd like to get User Position (with the browser prompt for geolocation), center Map on it, and get the distance calc for stores around him.
i didn't find if your module can handle that.
i' tried myself, i managed to get user position, centering the map, but i don't have the distance in the store list.

any advice/idea/update? :)

thanks

? in der Suche

Wenn man ein Fragezeichen mit in der Suchephrase eingibt und abschickt, wird das nicht escaped und man bekommt einen 404.

Daniel

Probleme mit Klammern bei Vorschläge anzeigen

Vielen Dank für das Modul.

Bei der Händlersuche gibt es bei Sonderzeichen einen Fehler und es wird nichts gefunden.

Halle - wird gefunden
Halle (Saale) ergibt Fehler und es werden keine Ergebnisse angezeigt.

Contao 4.13.20
PHP 8.1.22

Exception beim CSV-Import

Hallo Benny,

wenn die Extension beim Einlesen einer CSV-Datei die Koordinaten nicht ermitteln kann bricht sie mit einer Exception ab:

[26-Jun-2012 16:32:40] PHP Fatal error: Uncaught exception 'Exception' with message 'Query error: Column 'longitude' cannot be null (INSERT INTO tl_storelocator_stores (pid,name,email,url,phone,fax,street,postal,city,country,longitude,latitude) VALUES ('1','HörPartner GmbH','','http://','030 / 40043685','','Greifswalder Str. 90','10409','Berlin','DE',NULL,NULL))' thrown in /mnt/webe/e0/84/52254784/htdocs/hoerpartner/htdocs/system/libraries/Database.php on line 686

Man könnte die Datenbank auf NULL setzen oder Dummy-Werte bei NULL übernehmen.

Beste Grüße,
Daniel

Unnötige Übersetzungsstrings

Ihr verwendet für die Übersetzung der Länder eine eigene Liste in der default.php. Wieso verwendet ihr nicht einfach die von Contao?

Template für Insert-Tag

Ist es möglich ein Template für das Insert-Tag zu implementieren? Mir fehlen leider noch die Fähigkeiten für diese Aufgabe.

Etnfernung von Store zu Standort sollte doppelt so groß sein

Hallo,

die Entfernungen vom Standort zum Store sollten ungefähr doppelt so groß sein damit man eine realistischen Wert hat. Ich habe mir die Berechnung noch nicht ausführlich angeschaut aber wenn man die Entfernungen Luftlinie vergleicht dann ist der Faktor 2 realistischer.

Viele Grüße,
Wusch

Keine Generierung der Geodaten

Ich habe eine CSV mit 10 Händlern importiert, die Geodaten wurden ordnungsgemäß ermittelt. Bei einer CSV mit 80 Händlern passiert das nicht mehr. Wenn ich die einzelnen Händler bearbeite, dann sind beide Felder leer und erst mit den korrekten Daten gefüllt wenn ich den Datensatz nochmal abspeichere.

CSV Import for further Data

Good Day and thanks for the pretty nice extension. i am asking myself if it is possible to import more than the given csv-string name, email, url, telefon, fax, strasse, plz, ort, ländercode (ISO 3166-2).

For example: it would be perfect if the csv import would also handle description and opening times.

Thank you

multiSRC in tl_storelocator

I'm working on an extension for your storelocator which enables multiSRC instead of singleSRC in tl_storelocator_stores.php. If it's useful for you, I could start a PR for the storelocator core. What do you think?

Händlerliste-Frage

Hi! Tolle Erweiterung, habe eine Testinstallation aufgestetzt, aber die Händlerliste wird mir leider nicht angezeigt.. :-(
Ich bin mir sicher das alles im Backend ordentlich angepasst wurde.

Die Suche funktioniert ganz gut, nur schade das man nicht auf jeweiligen Händler in der Ergebnissliste klicken kann um in die Detailansicht zu kommen.

Hier der Link: http://bikecloud.de.dedi3244.your-server.de/index.php/

Danke und Grüße

Komma als Trennzeichen ungeeignet

Grade für solche Daten ist ein Komma als Trennzeichen in der CSV ungeeignet. Es kommt öfter vor das man bei Händlerdaten noch einen Zusatz hinzufügt und ihn mit einem Komma trennt.

Ich würde daher ein Semikolon bevorzugen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.