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

Thread: reduce stock on checkout in AUTH mode?

  1. #1
    smoreo is offline Member
    Join Date
    Nov 2009
    Location
    Brooklyn, NY
    Posts
    36

    Question reduce stock on checkout in AUTH mode?

    so i basically want to run in AUTH mode and reduce inventory at checkout. I figure this is custom code and i have the source code so, i was looking for help if anyone knows what functions/SQL SPs/ or other objects I have to mod to do this. I am thinking i have to find where the code asks if the site is in AUTH mode or capture mode. Hopefully i can just copy the CAPTURE stock reduction code into the AUTH section and that is it, but i doubt it is that easy.

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

    Default

    The "aspdnsf_AdjustInventory" stored proc is the one that handles the reduction of product's inventory when a purchase is made. From your Gateway.cs class, you can add the line below somewhere under AppLogic.ro_TXModeAuthOnly logic.

    Code:
    DB.ExecuteSQL("aspdnsf_AdjustInventory " + OrderNumber.ToString() + ",-1");
    You also have to look into CaptureOrder.aspx.cs -> Gateway.OrderManagement_DoCapture() method, and make sure the software is not reducing inventory levels any more since you've done it during the AUTH purchases already. This can be a tricky modification, so be very careful of what you're doing as it could possible break the capture logic.