Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
4898 Näkymät

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
Hylkää

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

Paras vastaus

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
Hylkää

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.

Tekijä

Hi Luke. THX.

Tekijä Paras vastaus

Hi Luke, Can you try again?


 

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
helmik. 16
4778
3
toukok. 24
937
4
maalisk. 22
17393
2
jouluk. 21
1829
0
lokak. 21
2988