Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4314 Tampilan

I have a list of products, and each have multiple variants. I look into product.template and product.product models, in which product.product inherits from product.template.

I want to program the script to insert those product:

for product in product list:

     Create a product to product.template

     Add all its variants to product.product

Is it the correct way to do this?

However, why can't we insert product to the template model, but only add extra info to the product model? Is there any document explaining how to do it?

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jun 24
2154
1
Feb 22
5144
0
Agu 21
3086
1
Mar 21
12744
2
Des 19
16586