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.

  • Badzi 7 posts 27 karma points
    Sep 21, 2010 @ 11:18
    Badzi
    0

    Additional informations for a product

    Hello,
    In our shop solution we need to sell "Subscriptions".
    
    For example a Father can buy a "Monthly subscription" in the Swimming pool for his son.
    In this case, when the father add the product in the basket, we would like to store additional information regarding the child.
    We would like to store : firstname, lastname, date of birth of the son and so on.
    
    Is there any way to do this regarding the actual implementation of uCommerce ?
    Thanks for your help
  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 21, 2010 @ 19:51
    Søren Spelling Lund
    0

    There absolutely is a way to do it and it's called dynamic order properties. Basically you can add new properties to the order/basket itself or individual order lines.

    To set an order level property use the following:

    CommerceLibrary:SetOrderProperty('firstname', 'Blaise')

    To set a order line level property use this:

    CommerceLibrary:SetOrderProperty(0, 'firstname', 'Blaise')

    Where 0 is the order line index to put the property on.

    You can check out the docs at http://www.ucommerce.dk/docs/html/M_UCommerce_Xslt_TransactionLibrary_SetOrderProperty_1.htm and http://www.ucommerce.dk/docs/html/M_UCommerce_Xslt_TransactionLibrary_SetOrderProperty.htm

    Hope this helps.

  • Badzi 7 posts 27 karma points
    Sep 22, 2010 @ 19:45
    Badzi
    0

    Thank you Soren for your help.
    I did some basics tests and it seems to work perfectly.
    Thanks a lot

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 24, 2010 @ 08:44
    Søren Spelling Lund
    0

    Perfect. Glad to be of help.

  • dillorscroft 198 posts 192 karma points
    Sep 24, 2010 @ 19:02
    dillorscroft
    0

    How are these values retrieved?  Is it easy to pull them out in the order confirmation email?

    Actually are there any examples of order confirmation emails as the sample site contains nothing?

  • dillorscroft 198 posts 192 karma points
    Sep 24, 2010 @ 19:26
    dillorscroft
    0

    Whilst looping through the line items I can see in XSLT how to get the values back from the orderproperties.  Is there not an extension in the commerce.library to do the same thing?

    <xsl:value-of select="./orderProperties/orderProperty [@key='KEY']/@value"/>

    DC

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 27, 2010 @ 10:00
    Søren Spelling Lund
    0

    The properties are part of the XML structure so you'd just loop through those.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 27, 2010 @ 10:54
    Søren Spelling Lund
    0

    Forgot to mention that you can use GetPurchaseOrderByGuid to retrieve the values. Check out the docs at http://www.ucommerce.dk/docs/html/Overload_UCommerce_Xslt_TransactionLibrary_GetPurchaseOrder.htm

Please Sign in or register to post replies

Write your reply to:

Draft