motou / magento2-store-locator-stockists-extension

Stockists store locator extension for magento2 using google maps
MIT License
67 stars 44 forks source link

Map does not load when custom URL path is defined in Admin #3

Closed Sam-PUMP closed 7 years ago

Sam-PUMP commented 8 years ago

When choosing anything other then 'stockists' ie: store-finder, then the map graphic does not load. However It works perfectly when stockists is used.

ClaudiuCreanga commented 8 years ago

this is a bug and will be fixed in a future version. you can fix it manually in view/frontend/web/js/limesharp_stockists.js and replace var url = window.location.protocol+"//"+window.location.host + "/stockists" + '/ajax/stores'; with var url = window.location.protocol+"//"+window.location.host + "/store-finder" + '/ajax/stores';

Let me know.

Joe-Whitehead commented 8 years ago

Hi,

I came across this error and applied your suggested action however I am still experiencing the issue. Where it should appear: /find-a-retailer/ajax/stores?=1480077664926 but this shows a 404 If I navigate to /stockists/ajax/stores?=1480077664926 then it shows the file with the stockists.

Sam-PUMP commented 7 years ago

Yes @Joe-Whitehead is right, it still does not work after solution is applied. Thanks

ClaudiuCreanga commented 7 years ago

Does /find-a-retailer/ (or /store-finder) work and only the map doesn't work?

If that's the case then with that change it should work. Did you try redeploying and making sure the change is in pub/ folder?

Joe-Whitehead commented 7 years ago

@ClaudiuCreanga Yes the page works, but the map does not load. I made your change, cleared the cache and all generated files, redeployed static content and it still continued to show this error.

ErvinLlojku commented 7 years ago

I confirm that the map works after updating the file vendor/limesharp/stockists/src/view/frontend/web/js/limesharp_stockists.js

image

Enjoy coding!

vishalpawar-tudip commented 7 years ago

@ErvinLlojku Yes, I did it but showing error " GET http://localhost/magento2/stockists/ajax/stores?_=1488177647290 500 (Internal Server Error)".

Please help us to fix the problem.

ClaudiuCreanga commented 7 years ago

This has been fixed in 2.0

axovel commented 6 years ago

We can fix this issue easily by adding a url rewrite rule from Magento Admin. Go to Admin >> Marketing >> Url Rewrites and add a new Url Rewrite like below image

image