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

Status per product inside order possible

Started by Ted, November 04, 2009, 12:32:04 pm

Previous topic - Next topic

Ted

Just a quick question: it is possible (by e.g. the API) to have a status set on a product-by-product basis inside an order?

E.g. the full order (with 3 products) has state PARTIALLY_DELIVERED, because
product 1 is DELIVERED
product 2 is DELIVERED
product 3 is PARTIALLY_DELIVERED

Looking at the API it seems only the complete order itself has a status and not individual products in it, right?

julie

Each order product of the order has its own state and its own custom fields. When an order is created, the state of each order product is set by the createOrder method:

    /**
     * The state of the product when added to the order. It can be user defined and can indicate for
     * example if a product isn't in stock. When the order is created using the CreateOrder API call
     * it is set to the following values:
     * <ul>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_IN_STOCK = The product is in stock</li>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN = Product out of
     * stock but with known availability date</li>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN = Product out of
     * stock and availability date unknown</li>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN = Product
     * not in stock with the required quantity but with known availability date</li>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN = Product
     * not in stock with the required quantity and availability date unknown</li>
     * <li>com.konakart.bl.OrderMgr.ORD_PROD_CUSTOMER_INFORMED_OF_DELIVERY_DATE = Product wasn't in
     * stock but customer has been informed of the delivery date</li>
     * </ul>

In our Enterprise version we supply the source code of a batch job that shows you how to change the state of each order product.