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.

  • saravana 26 posts 45 karma points
    May 25, 2013 @ 12:21
    saravana
    0

    I've Changed the order statuses in sql table, but the order after checkout is placed in "Processing" instead of "New Order"

    Below is the default status table

    Below is the edited one

     

    After Checkout process the order is placed in "Processing" instead of "New Order".

     

    I refered the below link and understood that we should do changes in checkout pipeline. Please help me in how to code the custom "ConvertBasketToPurchaseOrder" . 

    http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/24002-Order-Status-Order-Flow

    Thanks in advance

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 27, 2013 @ 10:22
    Søren Spelling Lund
    0

    Hi Saravana,

    uCommerce will always use the ID of the status to load up the order status it needs. This means that even though you have changed status ID 1 to "New Order" uCommerce is still using it for baskets. Effectively all your baskets have become "New Order", which may be fine if that's what you're after.

    Similarly order status ID 2 (formerly New Order) is used by the pipelines to convert the basket to an order (New Order). This is done in the checkout pipeline. Again this is fine if you want new orders to be in the processing state when they're done.

    uCommerce uses four different "magic" states:

    1 Basket: Initial state for orders that are considered baskets.

    2 New Order: When basket is converted to order. (Done checkout pipeline in the ConvertBasketToOrder step).

    1000000 Requires Attention: Set when an error occurs during payment processing in the backend, such as capturing, refunding, or voiding a transaction.

    1000002 Processing: When dealing with an asynchronous payment gateway such a Google or Amazon. As two callbacks are received: First one that auth request is received (but not processed yet) and second one callback when the request is processed and we have a "Yes payment is alright" or "No, payment couldn't be authorized". Order is automatically put into the "New Order" status after this if the payment is good.

     

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 27, 2013 @ 10:22
    Søren Spelling Lund
    0

    Can I ask what you need to accomplish with the order workflow changes? There are other ways of modifying the flow to your needs.

  • saravana 26 posts 45 karma points
    May 27, 2013 @ 11:29
    saravana
    0

    Hi Soren,

    Thanks a lot.

    As you specified in the link http://our.umbraco.org/projects/website-utilities/ucommerce/ucommerce-support/24002-Order-Status-Order-Flow , I've have created custom "ConvertBasketToPurchaseOrder" and configured. Below is my coding

    public class IConvertPurchasetoNewOrder : IPipelineTask<PurchaseOrder>
    {
    public PipelineExecutionResult Execute(PurchaseOrder Order)
    {
    var newOrderStatus = OrderStatus.Get(1);
    var orderService = ObjectFactory.Instance.Resolve<IOrderService>();
    orderService.ChangeOrderStatus(Order, newOrderStatus);
    Order.Save();
    return PipelineExecutionResult.Success;
    }
    }

    It works with some issues i.e after every checkout a null order which is to be in "basket" is created in "NewOrder" folder. So I've changed again the orderstatus Id's as below and it's works with no issues.

    1  Basket
    2  New Order
    3  Processing
    4  Shipped
    5  Delivered
    6  Cancelled

     

    Thanks again

Please Sign in or register to post replies

Write your reply to:

Draft