PrestaShop / hummingbird

77 stars 73 forks source link

In Shopping cart - If you check the Customized button, there's a warning #612

Open florine2623 opened 4 months ago

florine2623 commented 4 months ago

Describe the bug and add attachments

When I add a customization to a product, if I check the customization in the Shopping cart, I have a warning :

Screenshot 2024-03-22 at 16 00 22

getimagesize(http://develop:8888/en/upload/86cae4ab669495998bcc14d5974e0b6e): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /Users/fHea/Desktop/develop/var/cache/dev/smarty/compile/hummingbirdlayouts_layout_full_width_tpl/70/12/42/7012426849de68e689ac7f8cab09d2eb050ff3e3_2.file.product-customization-modal.tpl.php on line 96

Expected behavior

Should look like the modal in the details order page :

Screenshot 2024-03-22 at 16 08 44

Steps to reproduce

  1. Go to BO > Create a product with a customization
  2. Go to FO > Add product with custom to cart
  3. Click on "Customized" button
  4. SeeWarning :x:

PrestaShop version(s) where the bug happened

9.0.0

PHP version(s) where the bug happened

8.1

tblivet commented 2 months ago

Hello @nicosomb 👋

I'm able to reproduce the issue, but I believe we cannot fix it without editing the core. The warning appears in debug mode when the .tpl file tries to get the image size dimensions to display it in a modal.

This functionality wasn't implemented in the classic theme, so maybe this feature can be postponed for later?

nicosomb commented 2 months ago

@amine-O what's your opinion about this issue?

amine-O commented 2 months ago

If it's not implemented on Classic, I don't see the emergency of doing it now @tblivet are you able to reproduce it also on the Classic theme ?

tblivet commented 2 months ago

@amine-O In the Classic theme, we don't have this warning because the element that throws the warning is only introduced in Hummingbird.

amine-O commented 2 months ago

Ok let's postpone it then, we'll see if it's needed later

Hlavtox commented 2 months ago

No getimagesize call should be in the template, theme should be just the view. If some more info is needed, we should provide it from the core. 👍