Copied to clipboard

Flag this post as spam?

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


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Dec 03, 2012 @ 08:56
    Rasmus Fjord
    0

    Can i change the title of an orderline through C#?

    Hey =)

    Im on "fire" from a monday morning with questions :)

    I was wondering if i can change the displayed title of an orderline. I know its taking it from the product node but is there a way to override it or something like that ?

    Because im making a "Coupon code" feature and the codes are based on a percentage reduction of price. But it would be great on the orderline added to write something like 

    "[Coupon node Name] 10% discount" on the orderline.

    Bonus question 

    What event should I hook into when quantity is changed on an orderline, is it just orderlinechanged but how to check if the quantity is upped or downed ? 

     

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Dec 03, 2012 @ 09:01
    Rune Grønkjær
    0

    Hi Rasmus,

    I usually just display the productName order line property. As it's generated from the node automatically by Tea Commerce it's set to read only. That means you cannot change the value from the client. You can still change the value using the C# api just like we talked about in this thread: http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/36643-Adding-a-property-through-C

    /Rune

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Dec 03, 2012 @ 09:26
    Rasmus Fjord
    0

    Yeah its because the "product" is a hidden product with a price of 0 for discount purposes. Combined with a couponcode node where i get the details of how much should actually be deducted. But when the discount orderline is added I want that the name should be something like "Rabatkort 10%". 

    I will give it a try :)

    Btw how about my secret bonus question :)

  • Rune Grønkjær 1372 posts 3103 karma points
    Dec 03, 2012 @ 09:32
    Rune Grønkjær
    0

    Oh, the bonus question. The Orderlinechanged event is where you want to go. You cannot se if the quantity has gone up or down. You just know what it is.

    /Rune

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Dec 03, 2012 @ 09:33
    Rasmus Fjord
    0

    Arh okay good enough for me, got a method for the rest :)

Please Sign in or register to post replies

Write your reply to:

Draft