Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3707 มุมมอง

Hello,


I want to add a hyperlink to the product positions in the web sale form. Well, it works, but only when the product is published to the web.

I try:

<a t-if="line.product_id.product_tmpl_id.website_published" t-att-href="'/shop/product/%s' % line.product_id.product_tmpl_id.id" target="_blank"> <span t-field="line.name"/> </a>

<span t-if="line.product_id.product_tmpl_id.website_published != True" t-field="line.name"/>


But this will only work, when the product is published.
if the product is not published, I get "Error 500".


It seems I can´t display: product_tmpl_id.website_published when the product is not published.


Has someone an idea?


Thank you!


อวตาร
ละทิ้ง

Yes, this would be possible, but then I have to think always to publish the products.

Well, that's one of the main jobs of a responsible for a webshop ;-)

คำตอบที่ดีที่สุด

My idea: publish the product. If you don't want it to be visible to the public, make it not accessible by the public user by assigning proper user/access rights.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 24
1637
1
มิ.ย. 23
3959
0
มิ.ย. 23
1755
0
พ.ค. 22
2546
inherit and change website sale view V15 แก้ไขแล้ว
2
พ.ค. 22
3346