Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastian Dammark 583 posts 1407 karma points
    Jul 13, 2013 @ 02:42
    Sebastian Dammark
    0

    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 }

    Thanx in advance

  • Anders Burla 2560 posts 8256 karma points
    Jul 14, 2013 @ 01:43
    Anders Burla
    100

    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 

  • Sebastian Dammark 583 posts 1407 karma points
    Jul 14, 2013 @ 02:03
    Sebastian Dammark
    0

    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.

  • Rune Grønkjær 1372 posts 3103 karma points
    Jul 15, 2013 @ 09:26
    Rune Grønkjær
    0

    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

  • Sebastian Dammark 583 posts 1407 karma points
    Jul 15, 2013 @ 10:27
    Sebastian Dammark
    0

    Nice ... thanx

    This also solves this thread: Link 

Please Sign in or register to post replies

Write your reply to:

Draft