Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3717 Ansichten

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 24
1555
1
Feb. 22
4406
0
Aug. 21
2560
1
März 21
11982
2
Dez. 19
15794