app-generator / ecommerce-django-stripe

Django Stripe Sample - Soft UI Design (Free Sample) | AppSeed
https://blog.appseed.us/django-stripe-mini-ecommerce/
Other
60 stars 17 forks source link

Edit Product - Images management #17

Closed app-generator closed 2 years ago

app-generator commented 2 years ago

By default, the MAIN image is provided in all cases because comes by default from Stripe.

The template.html uses img_card as the main source of information.

    {_%  if product.img_card|first in 'http' %_}
      style="background-image: url('{{product.img_card}}');"
    {_% else %_}
      style="background-image: url('data:image/png;base64,{{product.img_card}}');"
    {_% endif %_}

On the top of the page, the MAIN image should be used in all cases.

later, on the card, if not provided the MAIN IMAGE is used.


The bug that derives from this is visible for newly created products that have no image displayed on the top:

django-stripe-issue-3

app-generator commented 2 years ago

validated. Ty @MySecondLanguage