Where can i find an example of how to create 2 attributes for a product and then all the variation?
I can create a product with 2 attributes but then how to reproduce the "Create variations from all attributes" button behaviour?
Dim oProdNew As Product = New Product()
oProdNew.name = "Product 1"
oProdNew.price = 12.65
oProdNew.regular_price = 12.65
oProdNew.description = "This is product 1"
oProdNew.type = "variable"
oProdNew.stock_quantity = 10
oProdNew.attributes = New List(Of ProductAttributeLine) From {
New ProductAttributeLine With {
.name = "Color",
.position = 1,
.variation = True,
.visible = True,
.options = New List(Of String) From {
"Green",
"Red",
"Blue"
}},
New ProductAttributeLine With {
.name = "Size",
.position = 2,
.variation = True,
.visible = True,
.options = New List(Of String) From {
"XS",
"S",
"M",
"L",
"XL"
}}
}
Where can i find an example of how to create 2 attributes for a product and then all the variation? I can create a product with 2 attributes but then how to reproduce the "Create variations from all attributes" button behaviour?