Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3600 Zobrazení

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 24
1384
1
úno 22
4302
0
srp 21
2468
1
bře 21
11829
2
pro 19
15654