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.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 08, 2012 @ 10:37
    Kim Andersen
    0

    How to use vouchers i uCommerce

    Hi folks

    I'm trying to implement voucher codes on a uCommerce. So I've created some voucher codes in the back office of Umbraco for the users to use. The discount code should give you a discound of 100 DKK of the order total.

    So I've created a input field on the first step in the checkout, the basket. When a user submits this small form I run the following piece of code:

    <xsl:variable name="voucher" select="umbraco.library:Request('voucher')" />
    <xsl:if test="$voucher!=''">
    <xsl:variable name="addVoucher" select="CommerceLibrary:AddVoucher($voucher)" />
    <xsl:variable name="pipelineResult" select="CommerceLibrary:ExecuteBasketPipeline()" />
    </xsl:if>

    After this I call the GetBasket() to see that the voucher code have been added correctly. And in my basket I can see the following:

    <orderProperties>
    <orderProperty key="voucherCodes" value="4LU4VA,JSTMXM," />
    </orderProperties>

    The only problem I have now is that the order total is still the same as before I added a voucher code.

    What do I miss?

    /Kim A

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 08, 2012 @ 11:13
    Kim Andersen
    1

    By the way, the following screenshot is how my voucher campaign is set up:

    My Default campaign is set to "Enabled" as well.

    /Kim A

  • Søren Spelling Lund 1797 posts 2786 karma points
    Feb 08, 2012 @ 13:28
    Søren Spelling Lund
    0

    I believe it's a caching issue. The vouchers are probably not picked up until after the order is reloaded from the database. I'll test it and include a fix in 2.5 if it turns out to be the case.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Feb 08, 2012 @ 14:42
    Kim Andersen
    0

    Ohh......so there's not some kind of fix to this, without upgrading to 2.5?

    /Kim A

  • Søren Spelling Lund 1797 posts 2786 karma points
    Feb 13, 2012 @ 14:30
    Søren Spelling Lund
    1

    Well there is. Basically you need to reload the order from the database to do it. But it's easier just upgrading to 2.5 now that it's out.

  • Kim Andersen 1447 posts 2196 karma points MVP
    May 22, 2012 @ 10:05
    Kim Andersen
    1

    Just to follow up on this issue: An upgrade of uCommerce did work and solved the problem :)

    Upgraded to v2.6.0.0 and the basket picks up the voucher codes perfectly.

    /Kim A

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2012 @ 15:51
    Søren Spelling Lund
    0

    Thanks for reporting back, Kim. Appreciate it!

Please Sign in or register to post replies

Write your reply to:

Draft