Skip to content

media_gallery_reset not working in multi-store setup #336

@zzrough

Description

@zzrough

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 is global and thus:

  • resetGallery is called with the admin store (respects the attribute scope with getItemStoreIds)
  • addImageToGallery is called with the item store views (does not respect the attribute scope but uses the item store views directly using getStoreIdsForStoreScope)

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 my media_gallery attribute scope to store.

I can provide a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions