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 3 of 3

Thread: Reset forced voided orders?

  1. #1
    BloomerBeak is offline Member
    Join Date
    Oct 2007
    Location
    Davao City
    Posts
    76

    Question Reset forced voided orders?

    Hello.

    Is there a way to reset the status of a forced voided order to "pending"?
    ***Melay***
    Web Developer
    Philippines

  2. #2
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    If you have access to Sql Server Management Studio, or you could do it in the 'Advanced > Run SQL' box in the admin site, but you get no feedback.

    Code:
    UPDATE [Orders] SET [TransactionState] = 'PENDING' WHERE [OrderNumber] = x
    replace x with the order number.

    But what the ramifications of doing this is, who knows!
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  3. #3
    BloomerBeak is offline Member
    Join Date
    Oct 2007
    Location
    Davao City
    Posts
    76

    Exclamation solution

    Hi Esedirect!

    Thanks! I almost forgot about the "Advanced > Run SQL" feature...^_^
    I started with that code, but then there were more than that when force voiding an order, I read.

    I did this
    Code:
    aspdnsf_AdjustInventory <orderNumber>,-1
    where -1 means to remove the inventory again when it was restored during the force void (1 is to restore the inventory).
    and
    Code:
    update Orders set VoidTXCommand=NULL, TransactionState='PENDING', VoidedOn=NULL, IsNew=1 where OrderNumber=<orderNumber>
    This works, the order was back to 'Pending'. But as you've said, I don't know the ramifications of such action. ^_^
    This is just for simple orders, no coupons or giftcards, or anything else. When I looked at the code, there are more to it than just what I did. More complicated orders, more complicated solution for this problem.

    Thanks again.
    Last edited by BloomerBeak; 09-15-2010 at 06:46 AM.
    ***Melay***
    Web Developer
    Philippines