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

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?

アバター
破棄
関連投稿 返信 ビュー 活動
1
6月 24
1478
1
2月 22
4358
0
8月 21
2525
1
3月 21
11902
2
12月 19
15729