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

Show "No picture" image instead of broken one #16868

Merged
merged 2 commits into from Dec 26, 2019

Conversation

@prestamodule
Copy link
Contributor

prestamodule commented Dec 19, 2019

Questions Answers
Branch? develop
Description? If product doesn't have cover, a broken image is show.
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
How to test? Add a product without cover image into cart and look at cart details

This change is Reviewable

@prestamodule prestamodule requested a review from PrestaShop/prestashop-core-developers as a code owner Dec 19, 2019
{if $product.cover}
<img src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
{else}
<img src="{$urls.no_picture_image.bySize.home_default.url}" />

This comment has been minimized.

Copy link
@micka-fdz

micka-fdz Dec 19, 2019

Hello, I think you should use <img src="{$urls.no_picture_image.bySize.cart_default.url}"> instead.

This comment has been minimized.

Copy link
@matks

matks Dec 20, 2019

Contributor

Thanks for the suggestion 😉

@matks
matks approved these changes Dec 20, 2019
@matks

This comment has been minimized.

Copy link
Contributor

matks commented Dec 20, 2019

Thanks @prestamodule for the nice PR.

I validate this PR but I think we might even improve it further later 🤔because with this PR cart now looks like this:
Capture d’écran 2019-12-20 à 23 15 10

@TristanLDD Could we have a "no picture available" image that is more relevant for such views ? Right now it uses the default one that suits better a page where it's shown bigger.

@Robin-Fischer-PS Robin-Fischer-PS self-assigned this Dec 24, 2019
@Robin-Fischer-PS Robin-Fischer-PS added this to the 1.7.7.0 milestone Dec 24, 2019
@matthieu-rolland matthieu-rolland merged commit 42e98a5 into PrestaShop:develop Dec 26, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@TristanLDD TristanLDD self-assigned this Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.