Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: How do I prevent the user from checking out using the event handler?

  1. #1
    jungleau is offline Junior Member
    Join Date
    Nov 2009
    Posts
    9

    Default How do I prevent the user from checking out using the event handler?

    Hi Experts,

    I have been successful on calling my own ASP.NET web page using the Event Handlers. However, how do I pass something back?

    For example, I would like to use "BeginCheckOut" event handler to validate the customer's current shoppingcart. If it's invalid, I would like to show an Error Message and then stop the check cout process.

    So, can I send some kind of error message from my event handler page and stop the checkout process? Or do I have to modify the source code for it?

    Regards
    Jungle

  2. #2
    jungleau is offline Junior Member
    Join Date
    Nov 2009
    Posts
    9

    Default

    Hi Experts,

    Is that really impossible? please let me know.

    I noticed that the Event Handlers call the callout URL pages synchronously. So it should be possible that the event handler can handle some kind of returned message from the callout URL, isn't it?

    Regards,
    Jungle

  3. #3
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    For example, I would like to use "BeginCheckOut" event handler to validate the customer's current shoppingcart. If it's invalid, I would like to show an Error Message and then stop the check cout process.
    What'd be or how'd you determine if the checkout is valid or not? Looks like it's possible, but the returned message will have to be displayed on the callout URL.

  4. #4
    jungleau is offline Junior Member
    Join Date
    Nov 2009
    Posts
    9

    Default

    I can export an XML string in my Callout URL page, for example:

    Response.write ("<CalloutResult>")
    Response.write ("<Successful>False</Successful>")
    Response.write ("<Message>We don't ship books outside Australia.</Message>")
    Response.write ("</CalloutResult>")

    Can AspDotNetStoreFront handle this kind of returned Message from callout URL page without modifying the source code? I can follow whatever XML interface if you have one.

    Regards,
    Jungle