Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4876 Vistas

Hi!

I have a problem with this line.

<span  t-field="product.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>

 

Return is wrong, just an empty box shown.

The product image is correct in shop by list view.

I tried the followings.

(image_small, image_medium) nothing change.

I listed out the sourche the web will shown the image data as string as well.

I try diff. file formats, like png, bmp, jpg >> no change.

When I try this: It wiil be shown as well :

<img src="data:image/jpeg;base64,amF2YS5pby5GaWxlSW5wdXRTdHJlYW1AMTdlMDYwMA=="/>

It will be ok. (How can I put the product.image into the image data, {amF2....} unfortunatelly I am beginer in javascript...)

Best Regards

L.

 

Avatar
Descartar

Try this. I have copy and pasted it from the shopping cart confirmation page.

Mejor respuesta

Hi Klacus,

I can't seem to post code in the comments for some reason. Please see the following snippet:

<span t-field="line.product_id.image_small" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>

Where exactly are you trying to place the image? Is it on a product page, on an order line or some other placement?

Avatar
Descartar

Hi. I put the image into the product_template image, and image_small, and image_medium. Originally I upload the image in the Product form. (In the list on webshop it 's ok, shown as well. Inside the system also ok, in the Kanban, and in the form view) That's why I don't understand the situation...

Hi Klacus, I'll look into this and post back if I find anything that might help.

Autor

Hi Luke. THX.

Autor Mejor respuesta

Hi Luke, Can you try again?


 

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
feb 16
4773
3
may 24
934
4
mar 22
17387
2
dic 21
1828
0
oct 21
2985