Giter VIP home page Giter VIP logo

magento2-module-store-locator's People

Contributors

afoucret avatar coosos avatar fdec avatar igorsit avatar ihorkvasnitskiy avatar jayd59 avatar livca-smile avatar pierrelemaguer avatar prigentmatthieu avatar pusachev avatar rakibabu avatar rbayet avatar romainruaud avatar vfayard avatar vipra93 avatar

Stargazers

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

Watchers

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

magento2-module-store-locator's Issues

Store details link leads to 404 page when URL key for store is custom

Preconditions

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.

Steps to reproduce

  1. Login to Backend.
  2. Go to Sellers -> Retailers.
  3. Add new Retailer:
    a. Set "Test retailer" as the "Retailer Name" field value.
    b. Set "retailer-custom-url" as the "URL Key" field value.
  4. Go to Frontend.
  5. Open store list page.
  6. Find created Retailer marker.
  7. Click on "Details" button.

Expected result

The store details page is opened.

Actual result

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.

Search a store

Error on Checkout

Preconditions

Magento Version : EE: 2.3.2

Module Store Locator Version : 1.3.9.3

Environment : Production Mode
smile_storelocator_region_id

Third party modules :
Nginx: 1.17.0
PHP: 7.2.18

Steps to reproduce

Steps to reproduce:
Admin

  1. Navigate to Admin > Stores > Configuration > General > State Options. Choose Australia in State is Required for list.

Frontend

  1. Log in as an existing customer. Customer can have default shipping/billing address.
  2. Add one or a few products to the cart and proceed to Checkout.
  3. On Shipping step choose Delivery my order in store address and select any store from the list on the popup provided by Smile_StoreLocator extension.
  4. Click on Next button.

Expected result

  1. the customer is navigated to Payment step.

Actual result

  1. the error message Please specify a regionId in shipping address. Is displayed.

Magento 2.4.0 throws Uncaught TypeError: Cannot read property 'map' of null

Preconditions

  • Magento 2.4.0
  • Magento B2B modules 1.2.0
        "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

Steps to reproduce

  1. Activate Smile store locator, store delivery modules
  2. Go to checkout or customer account
  3. Open developer console and there you see the JS error (only in 2.4.0)

Expected result

  1. No JS error in frontend

Actual result

Bildschirmfoto 2020-09-14 um 16 21 15

Can you reproduce this and maybe tell me if it is intended that Smile modules are compatible with 2.4.0 and when?

Can't remove all opening hours from retailer

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

Preconditions

Magento Version : CE 2.2.8

Module Store Locator Version : ^1.3

Environment : Developer mode

Third party modules :

  • ElasticSuite
  • StoreDelivery
  • Map
  • RetailerOffer
  • RetailerOfferInventory

Steps to reproduce

  1. Go to an existing retailer admin page
  2. If no opening hours are defined, create it for at least one day
  3. Double-click on all defined opening hours to remove them
  4. Save retailer

Expected result

  1. Opening hours should be removed

Actual result

  1. Retailer is saved, but removed opening hours were ignored

[M2.3] Map not displayed on store view page

Preconditions

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

Steps to reproduce

  1. Install smile/elasticsuite-for-retailer and its dependencies
  2. Configure in admin Smile Map to use either OSM or Gmap with valid API keys
  3. Create a Retailer in admin with valid coordinates
  4. In frontend, use the store locator to display the list / maps of shops/retailers, select the retailer created in admin and click on the "Details" link

Expected result

  1. The shop/retailer page should be displayed with the store address, a mini-map (OSM or Gmap) centered on the store, and additional information if available
    image

Actual result

  1. The map is not displayed
  2. CSS do not seem to be correctly applied
  3. A javascript error is visible in the browser console, it can be "too much recursion" or "Maximum call stack size exceeded" leading to the method refreshDisplayedMarkers of JS component smile-map provided by module smile/module-map

image

Ghost dependency with Smile_RetailerOffer

Creating a new retailer in admin throws an exception if Smile_RetailerOffer is not installed.

Preconditions

Magento Version : 2.2.8 CE
Module Store Locator Version : 1.3.9.2
Environment : Developer

Steps to reproduce

  1. Go to Magento 2 Admin
  2. Sellers > Retailers
  3. Add New Retailer

Expected result

Access the retailer creation form.

Actual result

Exception #0 (ReflectionException): Class Smile\RetailerOffer\Ui\Component\Offer\Form\Retailer\Options does not exist

https://pastebin.com/NvVb6jcC

v2 introduces dependency on Smile_Elasticsuite*

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 :)

Wrong arguments in view/frontend/web/js/map-mixin.js

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

Opening Hours

On a store page

The store is indicated as closed but it should be "Opened" (it was 15h45 when i made my tests)
opening_hours

Also, it don't show the others opening hours of the week
opening_hours_week

Thanks

Error when send email to shop

Preconditions

Magento Version : 2.2.6

Module Store Locator Version : 1.3.5

Environment : Developer

Third party modules :

Steps to reproduce

  1. Go to store contact form
  2. fill the form
  3. click on submit

Expected result

  1. Success message : Thanks for contacting us with your comments and questions. We'll respond to you very soon.

Actual result

  1. Error message : We can't process your request right now. Sorry, that's all we know.
    => Template file 'submitted_form.html' is not found.

TypeError: addrs.isDefaultBilling is not a function

Preconditions

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

Steps to reproduce

With a not logged in customer

  1. Add a product to your cart
  2. Go to the checkout
  3. Enter your email
  4. Select a store to deliver
  5. Click next to go to your billing address

Expected result

  1. Being able to enter your billing address

Actual result

  1. Checkout loader does not disappear
  2. In the js console there is an error: 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.

Fix @return value ?RetailerTimeSlotInterface and not array

* @return RetailerTimeSlotInterface[]

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;
}

Map does not load in IE

Map does not load in IE with error message Unable to get property 'name' of undefined or null reference.

Preconditions

Magento Version : CE 2.2

Module Store Locator Version :1.2.2

Environment :

Third party modules :

Steps to reproduce

Expected result

Actual result

  1. [Screenshot, logs]

store delivery doesn't work

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

Search Logic

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.

Nearby stores do not work

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

Preconditions

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

Steps to reproduce

  1. Created 3 shops nearby in the magento BO
  2. Go to one of the store pages

Expected result

  1. Get nearby stores in bottom of page

Actual result

  1. nearby-marker-wrapper-container not contains stores

Mobile modal window store locator problem

Hi 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.

Preconditions

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 : -

Steps to reproduce

  1. Use an iPhone
  2. Select store pickup from the checkout/shipping page
  3. Try to set the chosen store

Expected result

  1. I should be able to scroll down and tap the corresponding button.

Actual result

  1. I can select the store from the list or from the map, but can't tap the button, because I can't scroll down to it.
    img_e1249

Cannot choose a store from the store page

Preconditions

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

Steps to reproduce

  1. Create one (or more) retailer
  2. Go to the store page from the store locator
  3. Click on the "Choose this store" button

Expected result

  1. The store is selected: i saw a success message or/and in the header, i saw "My store : XXX"

Actual result

  1. Nothing happens
  2. I see an error message in the browser console:

image

New Retailer form doesn't work

Magento ver. 2.3.2-p2
i23dadDzh2
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)
image

Static deploy on production environnement KO

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

Keep user's selected store in cookie

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.

Country::getAllOptions() must be compatible

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

Store locator page broken when some countries are disabled

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

Preconditions

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

Steps to reproduce

  1. Log in the backend
  2. Go to Sellers > Store
  3. Create a new one in France
  4. Flush cache, go to frontend on the /stores page : map shows up
  5. In the backend : stores > configuration > general > general > country options
  6. In the allowed countries, disable the country "France"
  7. Save
  8. Flush cache, go to frontend on the /stores page : map does not shows up

Expected result

Map should be displayed, even with the store in disabled countries

Actual result

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.

Current store is display in shop(s) nearby list

Preconditions

Magento Version : 2.2.5

Module Store Locator Version : 1.3.3

Environment : Developer

Steps to reproduce

  1. Search stores by city (like "Paris") - it takes at least 2 results
  2. Click on "Details" or on marker

Expected result

  1. In "X shop(s) nearby" list, other stores near the current store

Actual result

  1. Current store is in the "shop(s) nearby" list

Another problem, if you click on other store the old sotre is not in the near stores list

During save or delete of retailer, Magento requests FULL cache flush to Varnish.

Preconditions

Magento Version : 2.2.9 (Commerce)

Module Store Locator Version : 1.3.9.4

Environment : Production mode

Steps to reproduce

  1. Login to Backend.
  2. Go to Sellers -> Retailers.
  3. Select any Retailer and go to Retailer page.
  4. Click "Save" button (even without changes of retailer).

Expected result

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.

Actual result

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('.*');

Can't pass through the checkout steps when current store is not set by customer

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

Initial location

Currently the map zooms to fit all the markers, but is there a possibility to define a default location and zoom?

Performance issue when having more than 10000 stores

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:

  1. Create 10000 store locations
  2. Try to access to the stores page

Expected result: the store map and stores are loaded.
Actual result: the page loads until we get a max_time error

On BO > Sellers Grid : "undefined index extension_attributes"

On Magento 2.3 Backoffice > Sellers grid, got a php error "undefined index extension_attributes" on Plugin/RetailerCollectionPlugin.php line 104

Preconditions

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"
},

Steps to reproduce

  1. On Magento 2.3 Backoffice
  2. Go to Sellers grid
  3. Got a php error

Expected result

  1. Grid should be loaded

Actual result

  1. "undefined index extension_attributes" on line 104
  2. line 104 is if ($data[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]), should be if (isset($data[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]))

Google Map in Store locator for Magento 2 does not work in IE 11

Map does not display in IE 11.

Preconditions

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

Steps to reproduce

  1. Install the modules on base luma theme and enable the extension
  2. Open IE 11 browser and add product to cart and navigate to Checkout on Shipping page
  3. Select store pickup and view the map

Expected result

  1. Map should be displayed

Actual result

  1. Map is not displayed.

Frontend and browser console screenshot:

image

Small design improvements

Hello, a few suggestions of improvements to the native design of the store locator:

  • remove the shadow below the panels
  • change the colors of the icons to blue (same as button)

See the result below
storeloc

Happy new year :)

Opening Hours

Preconditions

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.

OpenStreet map copyright is missing

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

Preconditions

Configure Store Locator to use OpenStreetMap

Magento verisn : Any

Module Store Locator Version : any

Environment : any

Expected result

When browsing map, the credit should appear in the right-bottom corner of the map.

Special opening hours are not available in BE

Preconditions

Magento Version: 2.3.3 (Commerce)
Store Locator Module Version: 2.0.0

Steps to reproduce

  1. Go to Admin -> Sellers -> Retailers.
  2. Click "Add New Retailer" button.
  3. Special opening hours group.
  4. Add special Opening Hours
  5. Check form.

Expected result

Special opening hours are available to manage.

Actual result

Special opening hours are not available to manage.
Screen Shot 2020-01-06 at 1 00 17 pm

Invalid argument supplied for foreach() $retailerIds on `vendor/smile/module-store-locator/Controller/Adminhtml/Retailer/MassSaveHours.php`

Preconditions

Magento Version : 2 All versions

Module Store Locator Version : 2.0.7

Environment : All

Third party modules : Doesn't matter

Steps to reproduce

  1. Select All Retailer from Grid for enabling or Mass Editing Opening Hours
  2. Got Invalid argument supplied for foreach() on vendor/smile/module-store-locator/Controller/Adminhtml/Retailer/MassSaveHours.php
  3. Seem the mass action doesn't determine the Select All. As far from the code review we just realize it just collect the parameter retailer_ids

Expected result

  1. All the Retailer should be updated opening hours without any problem

Actual result

  1. [Screenshot, logs] Invalid argument supplied for foreach() on vendor/smile/module-store-locator/Controller/Adminhtml/Retailer/MassSaveHours.php

Opening hours does not reflect properly after save

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

Steps to reproduce

  1. Add/Edit any retailer information
  2. change the opening hours time and save

Expected result

  1. Selected opening hours should show/display

Actual result

  1. wrong hours are shown.

hours issue

Cannot get module to display on different stores/storeviews

Preconditions

Magento Version : CE 2.3.4

Module Store Locator Version : 2.0.X

Environment : Production

Third party modules :

  • bitexpert/magento2-force-customer-login: 4.1,
  • klevu/module-search: 2.3,
  • magenest/core: 1.2,
  • magenest/module-cfsampledata: ~2.3.0,
  • magenest/module-widget: 1.0.4,
  • mailchimp/mc-magento2: 102.3,
  • smile/module-store-locator: 2.0,
  • swissup/highlight: 1.6

Steps to reproduce

  1. Install Smile Store Locator module using composer
  2. Setup:upgrade and deploy static content
  3. Configure settings in the backend

Expected result

  1. I expected the module to display on all of my different stores/storeviews. Instead it only displays on the main website.
  2. From what I can tell, there is also no option to change which store view it displays on.

Actual result

  1. The module only displayed on the main website. I cannot find the settings to enable it on other storeviews.

Refactor CSS for performance and better maintainability

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

Preconditions

Magento Version :2.3.4

Module Store Locator Version :2.0.4

Environment : Developer

Third party modules : na

Steps to reproduce

  1. On a clean Magento install with Store Locator installed check styles-l.css & styles-m.css for CSS rule a.geolocalize:before.
  2. This CSS selector occurs in each file.

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 {}

Expected result

  1. This CSS needs to only occur once, in styles-m.css, if Magento's mobile first approach to CSS is followed.
  2. A similar issue is occuring for many CSS selectors which do not follow Magento CSS standards. The @media-common is not be used.
    i.e.
//
//  Common (styles-m.css)
//  _____________________________________________
& when (@media-common = true) {
    // your code
}

Actual result

  1. Lots of CSS selectors are being duplicated causing unnecessary CSS to be loaded more than once.

Erreur fatale sur page magasin

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

getValues() of time slots are incorrect

Preconditions

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 ;)

Steps to reproduce

  1. Create a retailer, add Opening Hours for Monday as "10:00 - 13:00":
    Screenshot from 2020-03-11 01-15-07
  2. Click on Save and Continue Edit
  3. Go to Opening Hours again

Expected result

The time as set before should be shown for Monday.

Actual result

Instead, the time is shown as something different:
Screenshot from 2020-03-11 01-18-14

Possible solution

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.

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.