• Welcome to KonaKart Community Forum. Please login or sign up.
 

com.konakart.bl.OrderMgr and order statuses...

Started by GrapeApe, May 25, 2009, 05:42:00 am

Previous topic - Next topic

GrapeApe

Hello again!

So this question is about order statuses.  I know that you can add/delete/update order status in the admin app.  My question is, how does this affect the order status constants in com.konakart.bl.OrderMgr? 

For example, if I add a new order status called "new order status", would I have to modify the code for "com.konakart.bl.OrderMgr" so that there's a constant called com.konakart.bl.OrderMgr.NEW_ORDER_STATUS.  I ask because in the sample payment module code (AuthorizenetAction, etc), there seems to be constants for all the other order statuses...but I'm unsure how these constants would interact with order status changes in the admin app.

Thank you!

- Bit Pushing Primate

julie

The order status constants refer to the Order Statuses that we supply in our standard DB script and so you shouldn't need to change those. When you add an order status, a new unique id is created which you can use directly in your code. As you can see from the javadoc, the default statuses are:

    /**
     * PENDING Order Status. It is the state that the order receives when it is first created and
     * saved in the database. If the order may go ahead without payment (i.e. Cash on Delivery) then
     * through the administration tool the state can be changed to PROCESSING.
     */
    public static final int PENDING_STATUS = 1;

    /**
     * PROCESSING Order Status. This state can be set through the administration tool. It means that
     * the order has been accepted and is being processed.
     */
    public static final int PROCESSING_STATUS = 2;

    /**
     * DELIVERED Order Status. This state can be set through the administration tool. It means that
     * the order has been delivered to the customer. This state is set automatically by KonaKart if
     * the order consists of only Digital Download products since the Digital Download products are
     * delivered instantly and automatically through the creation of download links..
     */
    public static final int DELIVERED_STATUS = 3;

    /**
     * WAITING_PAYMENT Order Status. The order is blocked until payment arrives. This state is set
     * automatically when waiting for the response from a payment gateway.
     */
    public static final int WAITING_PAYMENT_STATUS = 4;

    /**
     * PAYMENT_RECEIVED Order Status. Payment has been received for the order. Through the
     * administration tool, the state of the order may now be set to PROCESSING.
     */
    public static final int PAYMENT_RECEIVED_STATUS = 5;

    /**
     * PAYMENT_DECLINED Order Status. This state is set when payment has been declined from a
     * payment gateway.
     */
    public static final int PAYMENT_DECLINED_STATUS = 6;

    /**
     * PARTIALLY_DELIVERED_STATUS Order Status. This state can be set through the administration
     * tool. It means that som eof the order items have been delivered to the customer. This state
     * is set automatically by KonaKart if the order consists of some Digital Download products and
     * some physical products. The Digital Download products are delivered instantly.
     */
    public static final int PARTIALLY_DELIVERED_STATUS = 7;

If you add a new one, the new id will be 8 and so on.

GrapeApe

Thank you, Julie!

So basically, if we add a new OrderStatus, it's not important that it integrates with the "prebuilt" order status constants in anyway?  Is that the right?  But I'm guessing we can't delete any of those prebuilt order statuses either or the system might get wonky...

-Hairball