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

Get also none product image thumbnails via API #3207

Closed
2 of 9 tasks
cewald opened this issue Jul 10, 2019 · 2 comments
Closed
2 of 9 tasks

Get also none product image thumbnails via API #3207

cewald opened this issue Jul 10, 2019 · 2 comments
Labels
3: Medium complexity feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can P3: Normal Priority mark - normal priority
Milestone

Comments

@cewald
Copy link
Contributor

cewald commented Jul 10, 2019

What is the motivation for adding / enhancing this feature?

At the moment it seems only to be possible to fetch product images thumbnails via the api (for Magento 1 and 2).

As I implement some CMS data to our Vue-Storefront I noticed that it might be a good core feature to also fetch images which are not in the `/media/catalog/product" folder.

In fact this is a feature which is deeply implemented everywhere in the core and theme and you would need to extend the API as well if you ad a new endpoint. This will be a lot of code changes.

I think the best way would be to extend the current getThumbnail() by a path parameter which might be set in the config.json for the different types (cms/product).

What are the acceptance criteria

  • Add new parameter to method getThumbnail() to add a /media path with default product path as default parameter to get product images as usual to prevent to change the theme and core modules at all places
  • Add two new paths to VSF config in images for product_path and cms_path
  • Change API base imgUrl in magento1 and magento2 platform settings to /media base path without /catalog/product or maybe use assetPath
  • Serve backwards compatibility for old path in api settings

Can you complete this feature request by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a normal feature request. This should be available on https://test.storefrontcloud.io and then after tests this can be added to next Vue Storefront version. In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • (Pick this option only if you're sure) This is an important improvement request for current Release Candidate version on https://next.storefrontcloud.io and should be placed in next RC version. In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • (Pick this option only if you're sure) This is a critical improvement request for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version. In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Additional information

none

@cewald cewald added the feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can label Jul 10, 2019
@cewald cewald changed the title Get images via API also for none product images Get also none product image thumbnails via API Jul 10, 2019
@pkarw
Copy link
Collaborator

pkarw commented Jul 10, 2019

It's good idea - for sure this should be configurable./extendable (the way we generate thumbnails). Related to https://github.com/DivanteLtd/vue-storefront/issues/3160

@filrak maybe we just can have a mutator hook on generating the thumbnail? It makes a lot of sense and it's very general purpose kind of hook

@cewald
Copy link
Contributor Author

cewald commented Jul 10, 2019

I opened a PR: #3209

@pkarw pkarw added 3: Medium complexity P3: Normal Priority mark - normal priority labels Jul 11, 2019
@patzick patzick added this to the 1.11.0-rc.1 milestone Jul 16, 2019
@patzick patzick closed this as completed Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Medium complexity feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can P3: Normal Priority mark - normal priority
Projects
None yet
Development

No branches or pull requests

3 participants