smile-sa / magento2-module-store-locator Goto Github PK
View Code? Open in Web Editor NEWMagento 2 store locator module
Magento 2 store locator module
Magento Version: 2.3.1 (Commerce)
Store Locator Module Version: 1.3.8
Environment: Production mode
Should be reproducible for the recent version of the extension according to the release notes.
The store details page is opened.
The 404 page is opened.
It looks like the "url_key" attribute is not selected for retailer collection during store list page rendering. In the case "url_key" attribute value is missed, the retailer name is used to generate the link to store details page on Frontend. That leads to 404 page display when the URL key differs from retailer name.
On Store Locator search page,
i have a javascript error when i make a search :
TypeError: results[0] is undefined[En savoir plus] map.js:47:21
.onSearch/< http://www.XXX.lxc/pub/static/version1486476873/frontend/Magento/luma/fr_FR/Smile_Map/js/map.js:47:21
bound self-hosted
Geocoder.prototype.geocode/< http://www.XXX.lxc/pub/static/version1486476873/frontend/Magento/luma/fr_FR/Smile_Map/js/geocoder/abstract.js:25:11
bound self-hosted
VS/< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/geocoder.js:5:173
US/a</< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/geocoder.js:3:234
MS http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/geocoder.js:2:60
US/a< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/geocoder.js:3:217
_.bn/</< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/common.js:55:96
vm/< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/common.js:38:414
_.bn/< http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/common.js:55:77
Vm/c http://maps.google.com/maps-api-v3/api/js/27/12/intl/fr_ALL/common.js:49:402
http://maps.googleapis.com/maps/api/js/GeocodeService.Search:1:22
Regards
Zakaria
Magento Version : EE: 2.3.2
Module Store Locator Version : 1.3.9.3
Third party modules :
Nginx: 1.17.0
PHP: 7.2.18
Steps to reproduce:
Admin
Frontend
"smile/module-retailer-elasticsuite-search": "~1.1.3",
"smile/module-store-delivery": "~1.1.9",
"smile/module-store-locator": "~2.0.6",
Magento Version : EE 2.4.0
Module Store Locator Version : see above
Environment : Developer
Third party modules : Magento B2B modules 1.2.0
Can you reproduce this and maybe tell me if it is intended that Smile modules are compatible with 2.4.0 and when?
For existing retailer in admin, it's impossible to remove all opening hours using double-click action. No matter how many days were previously filled, if you try to clean all opening hours data this way, no change will be saved. No error message are displayed
Magento Version : CE 2.2.8
Module Store Locator Version : ^1.3
Environment : Developer mode
Third party modules :
Magento Version : EE 2.3.0
Module Store Locator Version : 1.3.6
Environment : Developer
Third party modules : smile/elasticsuite-for-retailer
metapackage and its dependencies
smile/elasticsuite-for-retailer
and its dependenciesrefreshDisplayedMarkers
of JS component smile-map
provided by module smile/module-map
Creating a new retailer in admin throws an exception if Smile_RetailerOffer is not installed.
Magento Version : 2.2.8 CE
Module Store Locator Version : 1.3.9.2
Environment : Developer
Access the retailer creation form.
Exception #0 (ReflectionException): Class Smile\RetailerOffer\Ui\Component\Offer\Form\Retailer\Options does not exist
As of version 1.x, it was possible to use this module stand-alone. With v2, the autocomplete feature introduces a dependency on some Smile_Elasticsuite*
components, as in, e.g., class Smile\StoreLocator\Model\Autocomplete\Data
, which uses Smile\ElasticsuiteCore\Helper\Autocomplete
and Smile\ElasticsuiteRetailer\Model\ResourceModel\Fulltext\CollectionFactory
. This dependency is not reflected in composer.json
.
Any chance to keep the separation as in v1.x? We would like to keep using Smile_StoreLocator
with the ability to upgrade to v2 at some point :)
Related issue :
Smile-SA/magento2-module-map#33
On a store page get an error in console "Cannot read property 'hasOwnProperty' of undefined" from
js/model/store/schedule.js => "this.openingHours.hasOwnProperty(0)"
Found an issue in view/frontend/web/js/map-mixin.js. You pass wrong arguments in function, or didn't add path uiRegistry
into first argument array of define function (As I see 'uiRegistry' not need in this mixin, so issue in function arguments).
Please remove registry
argument from function.
define([ 'jquery', 'leaflet', 'ko', 'smile-storelocator-store-collection', 'Smile_StoreLocator/js/model/store/schedule', 'jquery/ui' ], function ($, L, ko, **registry**, MarkersList, Schedule) {
There is other issues in console connected to geocoder even after this fix
Magento Version : 2.3.1
Module Store Locator Version : ~1.3.0
Environment : Developer mode
Third party modules : ElasticSuite
Magento Version : 2.2.6
Module Store Locator Version : 1.3.5
Environment : Developer
Third party modules :
Magento Version : 2.2.9
Module Versions :
smile/module-map 1.1.6
smile/module-retailer 1.2.8
smile/module-seller 1.2.5
smile/module-store-delivery 1.1.4
smile/module-store-locator 1.3.9.3
Environment : Developer
With a not logged in customer
TypeError: addrs.isDefaultBilling is not a function (checkout-data-resolver.js:248:31)
In the file vendor/smile/module-store-delivery/view/frontend/web/js/model/store-address.js
there does not seem to be a function called isDefaultBilling. When i add the function and let it return false, the error disappears from my console and i am able to proceed with entering my billing details.
Tested with a not logged in customer, checkout functions as expected, a order can be placed. I have not tested this with logged in customers.
If a TimeSloteInterface is found, return that interface and not an array.
Change
/**
* Retrieve opening hours for a given date
*
* @SuppressWarnings(PHPMD.StaticAccess)
*
* @param RetailerInterface $retailer The retailer
* @param null $dateTime The date to retrieve opening hours for
*
* @return RetailerTimeSlotInterface|null
*/
public function getOpeningHours($retailer, $dateTime = null): ?RetailerTimeSlotInterface
{
$dayOpening = null;
if ($dateTime == null) {
$dateTime = new \DateTime();
}
if (is_string($dateTime)) {
$dateTime = \DateTime::createFromFormat('Y-m-d', $dateTime);
}
$dayOfWeek = $dateTime->format('w');
$date = $dateTime->format('Y-m-d');
$openingHours = $retailer->getExtensionAttributes()->getOpeningHours();
$specialOpeningHours = $retailer->getExtensionAttributes()->getSpecialOpeningHours();
if (isset($openingHours[$dayOfWeek])) {
$dayOpening = $openingHours[$dayOfWeek];
}
if (isset($specialOpeningHours[$date])) {
$dayOpening = $specialOpeningHours[$date];
}
return $dayOpening;
}
Hi,
The Interface \Magento\Framework\DataObject\IdentityInterface
is not implemented on blocks and models.
Map does not load in IE with error message Unable to get property 'name' of undefined or null reference.
Magento Version : CE 2.2
Module Store Locator Version :1.2.2
Environment :
Third party modules :
We can't edit the region on the admin form.
We have an error on checkout about region_id missing.
We can't place order with success
Hi,
Do you have a plan to change the search logic. At the moment it is filtering only local list of the retailers. Is it possible to implement search which will allow us to have logic like google maps have?
Example: If I type a postcode or a city I will get nearest retailers. If there is no retailers in the area I typed than I will get nearest retailers to that area.
The nearby stores feature appears to be a feature present or has been started but not completed
See view/frontend/templates/view/map.phtml, line 97
Magento Version : EE (I don't think the problem depends on the version)
Module Store Locator Version : Latest (2.0.4)
Environment : Developer
Third party modules : Default magento module + store locator
nearby-marker-wrapper-container
not contains storesHi there,
I have a problem with the mobile view of store locator. When I choose store pickup, it opens the store-locator in a modal window. Now, I'm unable to scroll down and tap the "select store" button.
Trying to choose a store for pickup from the checkout/shipping step.
Magento Version : 2.2.6 CE
Module Store Locator Version : 1.2.2
Environment : Developer mode
Third party modules : -
Magento Version : 2.4.1 (I reproduce this issue on a 2.3.3)
Module Store Locator Version : 2.0.6
Environment : Developer
Third party modules : Retailer suite 2.1.0
Magento ver. 2.3.2-p2
Seems something wrong with special_opening_hours fieldset fields which break down whole form
knockout.js:3381 Uncaught SyntaxError: Unable to process binding "html: function(){return content }"
Message: Invalid or unexpected token
at eval ()
at jquery.js:349
at Function.globalEval (jquery.js:350)
at domManip (jquery.js:6089)
at jQuery.fn.init.append (jquery.js:6269)
at jQuery.fn.init. (jquery.js:6375)
at access (jquery.js:4399)
at jQuery.fn.init.html (jquery.js:6338)
at Object.ko.utils.setHtml (knockout.js:942)
at update (knockout.js:4371)
Hi,
Version 1.2.0-alpha5
When i run the command line bin/magento setup:static-content:deploy
I have the error below :
Compilation from source: /var/www/magento2/vendor/magento/theme-adminhtml-backend/web/css/styles.less
Compilation from source:
adminhtml/Magento/backend/en_US/css/styles.less
Warning: file_get_contents(elessar/elessar.css): failed to open stream: No such file or directory in /var/www/magento2/vendor/oyejorge/less.php/lib/Less/Tree/Import.php on line 176
Regards
Currently, user's choice ("Choose this store") is saved in customer's session, so after a while customer must select it again. I think it would make sense to make it more persistant and keep user's selection in cookie with configurable lifetime. There is very little chance that somehow customer would change his preference and therefore it should be saved for longer.
Hello,
Once i declared an opening hour in retailer page on BO, i can't remove it
Regards
Zakaria
Hello,
It seems that you use a class that no longer exists in version 1.2.x (Smile\StoreLocator\Block\Retailer\AbstractView) in class Map.
https://github.com/Smile-SA/magento2-module-store-locator/blob/1.2.x/Block/View/Map.php#L16
Regards,
Choosing store on smile demo https is impossible. The link redirect on http and failed
Magento 2.3
php bin/magento setup:di:compile
Fatal error: Declaration of Smile\StoreLocator\Model\RetailerAddress\Source\Country::getAllOptions() must be compatible with Magento\Eav\Model\Entity\Attribute\Source\Table::getAllOptions($withEmpty = true, $defaultValues = false) in /var/www/cofel/vendor/smile/module-store-locator/Model/RetailerAddress/Source/Country.php on line 67
Hello
If a store exists in tthe backend for a specific country (let's say France for the example) and that we disable the country in magento system configuration, store locator page is broken
Magento Version : M2 CE 2.3.3-p1
Module Store Locator Version : 1.3.9.0
Environment : production
Third party modules : yes but not related
Map should be displayed, even with the store in disabled countries
Map is not displayed for excluded countries in the configuration
This is broken with whatever country you choose.
Problem seems to come from the \Smile\StoreLocator\Block\Search::getMarkers
function probably when loading the address.
Also, you can see that if you go see the french store in Sellers > Store after having disabled the country, the store has no country associated anymore.
Move copyright map mention in correct module map https://github.com/Smile-SA/magento2-module-map
Magento Version : 2.2.5
Module Store Locator Version : 1.3.3
Environment : Developer
Another problem, if you click on other store the old sotre is not in the near stores list
Magento Version : 2.2.9 (Commerce)
Module Store Locator Version : 1.3.9.4
Environment : Production mode
During save or delete of retailer, Magento must request cache flush to Varnish only for needed tags (for example "smile_seller", "smile_store_locator_markers") not FULL cache flush to Varnish.
During save or delete of retailer, Magento requests FULL cache flush to Varnish.
Screens from log:
##.###.###.### - - [24/Oct/2019:15:29:58 0200] "POST /admin/smile_retailer/retailer/save/key/###############/ HTTP/1.1" 302 1014 "https://www.#####.###/admin/smile_retailer/retailer/edit/id/258/key/###############/" ...
##.###.###.### [24/Oct/2019:15:29:59 0200] "PURGE http://www.#####.###/ HTTP/1.1" 200 X-Magento-Tags-Pattern:.*
The " .* " means "everything" or "full".
Each time a POST to /admin/smile_retailer/retailer/save/key/../ is done, a fulll Varnish cache flush is executed.
The "smile/module-retailer" module is related with "smile/module-store-locator" module. And "smile/module-store-locator" module use observer for events "smile_seller_save_after" and "smile_seller_delete_after". These observers clean store locator marker cache when we save or delete of seller (retailer). During execute these events (actions) are trigger other "adminhtml_cache_refresh_type" event which request FULL cache flush to Varnish.
Part of code:
$this->purgeCache->sendPurgeRequest('.*');
On checkout/cart page
When the ajax call bellow is done
{{URL}}/customer/section/load/?sections=compare-products%2Ccustomer%2Ccurrent-store%2Cmessages%2Cwishlist&update_section_id=false&_=148959568112
I have the error bellow :
{"message":"Warning: array_key_exists() expects parameter 2 to be array, null given in /vendor/magento/module-customer/CustomerData/Section/Identifier.php on line 82"}
I Think it's due to the di : vendor/smile/module-store-locator/etc/frontend/di.xml
For now i just quick local fixed that changing the file Magento\Customer\CustomerData\Section\Identifier.php on method markSections adding the condition : isset($sectionsData[$name])
Hope it will help you
Regards
Currently the map zooms to fit all the markers, but is there a possibility to define a default location and zoom?
Hi,
We have created 10000 stores locations. When trying to load the stores page, it takes minutes to load all the stores (actually, we get a server error in the end).
Steps to reproduce:
Expected result: the store map and stores are loaded.
Actual result: the page loads until we get a max_time error
On Magento 2.3 Backoffice > Sellers grid, got a php error "undefined index extension_attributes" on Plugin/RetailerCollectionPlugin.php line 104
on a LXC server
centos7
php 7.2.10
elasticsearch 6.6.1
analysis-icu 6.6.1
analysis-phonetic 6.6.1
Magento Version : CE 2.3.0
Module Store Locator Version :
smile/module-storelocator : 1.3.6
smile/module-map : 1.1.5
Environment : developer mode
Third party modules :
"require": {
"magento/product-community-edition": "2.3.0",
"mageplaza/magento-2-arabic-language-pack": "dev-master",
"mageplaza/magento-2-french-language-pack": "dev-master",
"smile/elasticsuite": "^2.7",
"smile/magento2-library-framework": "^4.0",
"smile/module-backend": "^4.0",
"smile/module-core": "^4.0",
"smile/module-cron": "^4.0",
"smile/module-indexer": "^4.0",
"smile/module-map": "^1.1",
"smile/module-patch": "^1.0",
"smile/module-reconfigure": "^4.0",
"smile/module-retailer": "^1.2",
"smile/module-seller": "^1.2",
"smile/module-store-locator": "^1.3",
"smile/module-varnish": "^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.13.0",
"lusitanian/oauth": "~0.8.10",
"magento/magento2-functional-testing-framework": "2.3.9",
"pdepend/pdepend": "2.5.2",
"phpmd/phpmd": "@stable",
"phpunit/phpunit": "~6.5.0",
"sebastian/phpcpd": "~3.0.0",
"smile/magento2-library-testframework": "^4.0",
"smile/module-debug-toolbar": "^4.0",
"smile/php-codesniffer-rules-magento-2": "^2.0",
"smile/spbuilder": "^4.0",
"squizlabs/php_codesniffer": "3.3.1"
},
Map does not display in IE 11.
Magento Commerce Cloud 2.3.0
Smile Store locator module version - 1.3.7
Map module - 1.1.5
Environment : Production mode
Third party modules : N/A. Issue can be reproduced on Magento 2 base Luma theme
Frontend and browser console screenshot:
Magento Version : 2.2.6
Module Store Locator Version : 1.2.2
Environment : Developer
I can't find a way to change the opening hours table layout. I want the table to start with Monday.
It would be nice if there was a setting to change this.
When store locator is configured to use OpenStreetMap, there is no credit to OpenStreetMap.
It's clearly stated in OpenStreet map copyright that OpenStreetMap contributors should be credited 👍
You are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors.
We require that you use the credit “© OpenStreetMap contributors”. [...] You may do this by linking to this copyright page.
Source : : https://www.openstreetmap.org/copyright
Configure Store Locator to use OpenStreetMap
Magento verisn : Any
Module Store Locator Version : any
Environment : any
When browsing map, the credit should appear in the right-bottom corner of the map.
Magento Version: 2.3.3 (Commerce)
Store Locator Module Version: 2.0.0
Special opening hours are available to manage.
Magento Version : 2 All versions
Module Store Locator Version : 2.0.7
Environment : All
Third party modules : Doesn't matter
Invalid argument supplied for foreach()
on vendor/smile/module-store-locator/Controller/Adminhtml/Retailer/MassSaveHours.php
retailer_ids
Invalid argument supplied for foreach()
on vendor/smile/module-store-locator/Controller/Adminhtml/Retailer/MassSaveHours.php
Preconditions
Magento 2.3
"smile/module-map": "^2.0",
"smile/module-retailer": "1.2.9.1",
"smile/module-seller": "^1.2",
"smile/module-store-delivery": "^1.1",
"smile/module-store-locator": "^2.0",
Magento Version : EE Cloud ver. 2.3.5-p1
Module Store Locator Version :
"smile/module-map": "^2.0",
"smile/module-retailer": "1.2.9.1",
"smile/module-seller": "^1.2",
"smile/module-store-delivery": "^1.1",
"smile/module-store-locator": "^2.0",
Environment : Developer
Third party modules : no
Magento Version : CE 2.3.4
Module Store Locator Version : 2.0.X
Environment : Production
Third party modules :
The CSS in this module can be improved by following Magento standards for implementing mobile first CSS and Magento's media query mixins & @media-common style group. As it currently is, a lot of CSS is loaded twice on the page which is bad for performance and maintainability. Also, some of the CSS selectors are scoped so they will effect every Magento screen, which may sometimes break the layout in a Magento theme.
See:
https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/responsive-web-design/rwd_css.html
Magento Version :2.3.4
Module Store Locator Version :2.0.4
Environment : Developer
Third party modules : na
Additionally, see that there are many CSS rules which are not scoped to the screens they are required on, and which are using unnecessarily high specificity selectors.
For example, #maincontent {}
.
These should be scoped to the store locator screens and should avoid using ID selectors as per Magento's coding standards.
e.g.
.smile_store_locator-store-search .page-main {}
[class*='smile_store_locator'] .page-main {}
//
// Common (styles-m.css)
// _____________________________________________
& when (@media-common = true) {
// your code
}
Lors de l'accès à une page Magasin en front, j'ai une erreur fatale
URL : /stores/nom-du-magasin
Fatal error: Call to a member function getValue() on null in /var/www/spb-magento/releases/master-201703170940/vendor/smile/module-store-locator/Helper/Contact.php on line 51
Magento Version : v2.3.4 CE
Module Store Locator Version : v1.3.9.5; but the related code is not touched since then in the current master
branch
Environment : Developer
Third party modules : Some, yes ;)
The time as set before should be shown for Monday.
Instead, the time is shown as something different:
I tracked this down to be a problem with the method getValues()
in Block/Adminhtml/Retailer/OpeningHours/Element/Renderer.php
. The JavaScript rangebar used to show the ranges expects dates of the DateTime::DATETIME_INTERNAL_FORMAT
format (yyyy-MM-dd HH:mm:ss
) with the current date set. The current implementation of getValues()
however incorrectly uses Zend_Date
's setTime()
method, resulting in a different date (though the time -- which is actually significant for our use-case here -- is still correct). For today, a start date of 2020-11-03 10:00:00
is returned instead of the correct 2020-03-11 10:00:00
.
Zend_Date
's setTime()
method does not really take into account the provided 'h:mm a'
format. I managed to fix this by replacing the module's getValues
method with the following:
private function getValues()
{
$values = [];
if ($this->element->getValue()) {
foreach ($this->element->getValue() as $timeSlot) {
$date = $this->date->date()->format('Y-m-d');
$startTime = $date . ' ' . $timeSlot->getStartTime() . ':00';
$endTime = $date . ' ' . $timeSlot->getEndTime() . ':00';
$values[] = [$startTime, $endTime];
}
}
return $values;
}
I'm sure there are more elegant ways to solve this 😆 Let me know if I should open a PR or you fix it in another way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.