跳至內容
選單
此問題已被標幟
2 回覆
4891 瀏覽次數

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.

 

頭像
捨棄

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

最佳答案

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?

頭像
捨棄

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.

作者

Hi Luke. THX.

作者 最佳答案

Hi Luke, Can you try again?


 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
2月 16
4777
3
5月 24
937
4
3月 22
17390
2
12月 21
1829
0
10月 21
2987