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.

  • Sean Mooney 131 posts 158 karma points c-trib
    Sep 07, 2010 @ 16:11
    Sean Mooney
    0

    Custom Error From Pipeline Task

    I have a custom pipeline task that checks the capacity of an event every time the cart is updated. I want to return a custom error if the capacity is full, letting the user know that they can not register for that event.

    The only thing that I can see is to:

    Return PipelineExecutionResult.Error 

    However that just says that there was an error executing the pipeline, which could have happened in any number of tasks. How would you suggest I return a custom message/value so that i know what task returned the error?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 07, 2010 @ 18:45
    Søren Spelling Lund
    0

    Hi Sean,

    I have a feature request which covers this exact scenario. Until we create the extension to the pipeline system you can use the following trick to make it work:

    You can use dynamic order properties to set values on your order or order line. Using this technique you can set a custom message on the order which you can then display on the site for your customer to see.

    Basically you'd do the following in your pipeline task:

    purchaseOrder["Message"] = "Sorry. Capacity for the selected event is full."

    The order property will be part of the XML output when you do a CommerceLibrary:GetBasket() in your XSLT. From there you can display it however you want.

    Hope this helps.

  • Sean Mooney 131 posts 158 karma points c-trib
    Jun 09, 2011 @ 21:00
    Sean Mooney
    0

    Hello Søren,

    I'm starting up a new UCommerce project and was wondering if that feature request you mentioned made it into the current release?

    -Sean

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 09, 2011 @ 21:46
    Søren Spelling Lund
    0

    Hi Sean,

    Sorry. It hasn't. The outlined method is still the way to go.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jun 09, 2011 @ 21:47
    Søren Spelling Lund
    0

    Could I interest you in a full marketing suite or recurring payments instead perhaps? :)

Please Sign in or register to post replies

Write your reply to:

Draft