Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Luke Alderton 192 posts 509 karma points
    Jun 06, 2012 @ 14:13
    Luke Alderton
    0

    Dynamic Order Line Properties

    Hi,

    I'm trying to add an order property to an item in the basket, I can add a top level order property using:

    <xsl:variable name="result" select="CommerceLibrary:SetOrderProperty('gift_message', 'Happy birthday!')"/>

    And I've tried adding a property to a specific item using:

    <xsl:variable name="basket" select="CommerceLibrary:GetBasket()"/>
     
    <!-- Grab the index of the first line item -->
    <xsl:variable name="firstLineItemIndex" select="$cart/purchaseOrder/lineItems/*[1]/@index"/>
     
    <!-- Now set a dynamic order property on the line item with that index -->
    <xsl:variable name="result" select="CommerceLibrary:SetOrderProperty(@firstLineItemIndex, 'serial_number', 'ZX456-123')"/>

    The above code was taken from: http://www.publicvoid.dk/DynamicOrderPropertiesAddingCustomInformationToBasketsOrdersAndOrderLines.aspx

    However when I run this on the website, it displays 'uCommerce Developer Edition' at the top of the page, I was wondering if what I aam trying to do is specific to the Developer Edition and if so what I could do to get around this?

    Thanks in advance!

  • Luke Alderton 192 posts 509 karma points
    Jun 06, 2012 @ 16:28
    Luke Alderton
    0

    Sorry about the formatting above, I seem to have gotten around the problem I was getting however I'm not too sure how to get the line item order property back when I'm in the checkout, any tips for doing this?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 18, 2012 @ 13:42
    Søren Spelling Lund
    0

    The order properties are included with the XML when you do a CommerceLibrary:GetBasket(). There will be an element for the order itself and for each of the order lines.

Please Sign in or register to post replies

Write your reply to:

Draft