コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4883 ビュー

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
4773
3
5月 24
935
4
3月 22
17389
2
12月 21
1828
0
10月 21
2985