Combine parent productname with variant productname ?
I've been trying to do this for hours now ... but I just get the Razor kinda way of doing things. In the file view-order-line-overview.cshtml I have a problem in line 109 if I'm listing a variant.
Let's say that I'm selling dogfood and the productname is "Super Duper Dogfood" and it comes in 3 variants, 3kg, 5kg and 10kg.
When I add these to the cart it only shows the name of the variant and not the combination of product + variant (Super Duper Dogfood - 3kg)
How do I do this ?
@if(current product is variant) { get parent productname + current productname
} else {
get current productname
}
The way to do this is to have a property named "productName" at the variant node - 3kg, 5kg and 10kg. Then in that property write the entire name. "Super Duper Doogfood - 3kg" etc. If you have configured your store to use the property alias "productName" for the product name - then TC will fetch the right name.
No you have not. The drop down will list the node name and the productName property will be copied to the order line when a new one is created. Standard starter Kit behaviour.
Combine parent productname with variant productname ?
I've been trying to do this for hours now ... but I just get the Razor kinda way of doing things.
In the file view-order-line-overview.cshtml I have a problem in line 109 if I'm listing a variant.
Let's say that I'm selling dogfood and the productname is "Super Duper Dogfood" and it comes in 3 variants, 3kg, 5kg and 10kg.
When I add these to the cart it only shows the name of the variant and not the combination of product + variant (Super Duper Dogfood - 3kg)
How do I do this ?
Thanx in advance
The way to do this is to have a property named "productName" at the variant node - 3kg, 5kg and 10kg. Then in that property write the entire name. "Super Duper Doogfood - 3kg" etc. If you have configured your store to use the property alias "productName" for the product name - then TC will fetch the right name.
Kind regards
Anders
Yeah, but won't you have the complete productname in the variant dropdown then? I'm running with your starter kit.
Right now it looks like the attached, which is how the client likes it.
Hi Sebastian,
No you have not. The drop down will list the node name and the productName property will be copied to the order line when a new one is created. Standard starter Kit behaviour.
/Rune
Nice ... thanx
This also solves this thread: Link
is working on a reply...