-
Notifications
You must be signed in to change notification settings - Fork 307
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
media_gallery_reset not working in multi-store setup #336
Comments
I would be interested by a PR ! thx for your work |
After more testing, I see the media gallery attribute scope is not respected (custom backend and not the EAV one so it always goes down to the store scope, whatever the attribute scope is set to -- "global" or "store view"). Now, coming back to magmi, the actual behavior is to:
So I've got two questions for the PR: (1) I'd be tempted do the opposite of what I suggested earlier: use But it seems to me the intent of
Deleting from Also, (2) maybe you'd like a more backward compatible solution? We could keep I, for one, would just go for (1) (using |
The intent for media_gallery_reset is to indeed remove images from the It seems that magento "scope" management is indeed clumsy when it comes to Thx a lot for contributing. Seb 2015-10-07 10:53 GMT+02:00 Stéphane Démurget [email protected]:
|
The dangerous thing with the way resetGallery is currently set up is it will remove all images from gallery first, thus also removing every label through foreign key cascades. This is problematic if some images should remain with their corresponding labels in some store which is not in the current CSV for whatever reason. On the other hand, if resetGallery only removes the values from emgv for the current store the endImport cleanup won't "accidently" remove unwanted images, because values for them remain. I'm still puzzling out the last bit. I'll open a PR when I'm done. |
@zzrough @bjoern-tantau also see #483 (including the comments to the PR. |
Since #329 the situation regarding image in multi-store setup has greatly improved. I had all store view images positions set to 0, and now they are correctly incremented from 1 to N.
I'm using
media_gallery_reset=1
because I need to have a different order from time to time for a given store view.My
media_gallery
scope isglobal
and thus:resetGallery
is called with the admin store (respects the attribute scope withgetItemStoreIds
)addImageToGallery
is called with the item store views (does not respect the attribute scope but uses the item store views directly usinggetStoreIdsForStoreScope
)Both seems to join on the same data and in the same way. Is this normal that they do no work on the same stores ?
I feel they should both use
$this->getItemStoreIds($item, $gattrdesc["is_global"])
and I should change mymedia_gallery
attribute scope to store.I can provide a PR for this.
The text was updated successfully, but these errors were encountered: