Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
4284 Lượt xem

Is there a way for the internal code or SKU to be show under the product name on the website or do you have to do this manually for each product

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

To do this without code and keep it supported via updates:
-Enable developer mode
-Go to Website > Configuration > Websites
-Go to the "Product Page Extra Fields" and add "Internal Reference" here
It will be displayed on all products in the shop.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

this didnot work for me .. donot know what i am missing

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

How would this work for variants? 

Ảnh đại diện
Huỷ bỏ

Got the same problem with variants. It's not showing up.

Câu trả lời hay nhất

Hi,

To display the internal code (SKU) under the product name on your Odoo website, follow these steps:

1) Activate developer mode and Go to Technical > User Interface > Views.
2) Search for the key 'website_sale.product'.
3) Open the appropriate view template and place the default_code in the desired location. For example:

<p t-if="product.default_code">
    <span t-esc="product.default_code"/>
</p>


Save your changes, and the SKU will now display under the product name on your website.


Hope it helps

Ảnh đại diện
Huỷ bỏ

When update module it will be lost :))

this didnot work and taking help from chatgpt i found product.default_code is not passed on by odoo

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
1049
2
thg 12 24
1291
1
thg 9 24
1310
2
thg 1 23
6697
0
thg 2 21
2535