Closed shahabhameed closed 2 years ago
Hi,
Thanks for this PR. But tbh I don't understand it. Shouldn't it change to stores? I'll check it later on.
I have changend it from:
var url = window.location.protocol+"//"+window.location.hostname+window.location.pathname; url = (url.substr(-1) != '/' ? url+'/':url)+'ajax/stores';
to:
var url = window.location.protocol+"//"+window.location.hostname; url = (url.substr(-1) != '/' ? url+'/':url)+'stockists/ajax/stores';
I fixed this exactly the same way.
From the admin configuration, if you change the Stockists URL from default "stockists" to let's say "stores", the ajax call to fetch all stores breaks because it changes the route's name. The actual controller should be /stockists/ajax/stores
The broken link is //ajax/stores.
This fix hardcodes the URL back to "stockists" because that is the frontend route name.