Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento Store Id not used when loading store markers #21

Open
greg-42droids opened this issue Oct 9, 2017 · 1 comment
Open

Magento Store Id not used when loading store markers #21

greg-42droids opened this issue Oct 9, 2017 · 1 comment

Comments

@greg-42droids
Copy link

Stores are filtered based on which Magento Store they belong to within the "main.phtml" line 157
however, the "limesharp_stockists.js" doesn't filter the same way, displaying all stores even if they are not enabled for the current Magento Store.

I added the followings to enable marker filtering:

"main.phtml"

around line 214:

"limesharp_stockists": {
    // add the store id to the config js object so we can pick it up later
    "storeId" : "<?php echo $storeId; ?>",   

"limesharp_stockists.js"
around line 19:
var magentoStoreId = config.storeId;

around line 119:

// Split the store_id into an array
var magentoStoresEnabled = data.store_id.split(',');
// convert the magentoStoreId into a string so inArray works
magentoStoreId = magentoStoreId.toString();

// Wrap the markers config & .push into this IF statement
if(jQuery.inArray(magentoStoreId, magentoStoresEnabled) !== -1) {
...
}

I hope this helps @ClaudiuCreanga to track down the issue and apply a (potentially more elegant) fix.
Many thanks for this module! It's awesome.

@ClaudiuCreanga
Copy link
Collaborator

Thanks. will apply on next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants