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

Add fallback images from configurable product if child products have no images. #22

Conversation

Bashev
Copy link

@Bashev Bashev commented Sep 13, 2023

Most of the time when we are using configurable products with children which have no differences in images (like size, length or similar) different image is not required, but need to be send to FB.

The PR add (as fallback) parent product images to child products which have no their own images.

Description (*)

Story

Bug

Task

Fixed Issues (if relevant)

  1. Fixes Fallback images for configurable products. #37

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Copy link
Contributor

@singhramanpreett singhramanpreett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Bashev,

Thanks for making these changes.

I think we should fall back to parent images in case no images are present for child product in ProductRepository class's loadParentProductData function, as we are doing fallback to parent product's values for other fields as well in this class. Would be better to keep all fallback logic as same place.

https://github.com/magento/meta-for-magento2/blob/main/app/code/Meta/Catalog/Model/ProductRepository.php#L81

@singhramanpreett
Copy link
Contributor

@magento run all tests

…ages-from-configurable-product-to-childs

# Conflicts:
#	app/code/Meta/Catalog/Model/ProductRepository.php
@Bashev
Copy link
Author

Bashev commented Apr 7, 2024

Seems to be fixed already with commit f3fb4c2

@Bashev Bashev closed this Apr 7, 2024
@Bashev Bashev deleted the add-images-from-configurable-product-to-childs branch April 7, 2024 13:27
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

Successfully merging this pull request may close these issues.

Fallback images for configurable products.
2 participants