Jump to content
metricbikes

New Order Item Status Contribution

Recommended Posts

Is anyone interested in developing a contribution that would assign a per item status instead of just a order status?

 

I can envision the same type drop down menu for each item that is used as the order status. For example an order has four line items. Each line item would have a status option similar to the status assigned to the entire order.

 

So a four line item order would have an over all order status such as partial ship then the order would be opened via the admin panel and each line item would have an individual status.

 

I have searched the available contributions and cannot find a working contribution that does this - or anything similar. If you are interested in helping develop one, please let me know.

 

Thanks.

Steve

Share this post


Link to post
Share on other sites
Is anyone interested in developing a contribution that would assign a per item status instead of just a order status?

 

I can envision the same type drop down menu for each item that is used as the order status. For example an order has four line items. Each line item would have a status option similar to the status assigned to the entire order.

 

So a four line item order would have an over all order status such as partial ship then the order would be opened via the admin panel and each line item would have an individual status.

 

I have searched the available contributions and cannot find a working contribution that does this - or anything similar. If you are interested in helping develop one, please let me know.

 

Thanks.

Steve

 

 

I also need this ability, and I'm willing to pay for it!!

 

IMO, its a requirement to take osCommerce from an order taking front end to full inventory management and sales backorder management.

 

Kent

Share this post


Link to post
Share on other sites

Come on, there has to be someone else interested in this also!!

 

This is an extremely important modification!

 

One of the biggest problems in osCommerce as it stands now is its inability to distinguish between two items on the same order -- for example, if one item is in stock and the other is not. If you ship the one item, how do you tell on osCommerce that the other still needs to be shipped?

 

This contribution could help solve that problem.

Share this post


Link to post
Share on other sites

OK, if no one is interested, could someone explain why? Why wouldn't you want this modification on your store?

Share this post


Link to post
Share on other sites

Does anyone have experience with the business to business contributions who could say how this issue is handled in them? Has someone already written the necessary code to do this?

Share this post


Link to post
Share on other sites

1. Create a new column on the order_products table called status_id

2. Modify the admin\orders.php script to display the status_id (use the status name)

 

To simplify the process you could use the existing names for the order status. ie preserving the same association between status_id and status names. Then create a new status called "back ordered".

 

So now the next part is to force the orders.php script to switch the order status to back ordered state if one of the products is in that state.

 

This is where the orders.php updates the status

		  tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . (int)$oID . "'");

 

so before doing the above you check if any products shown in the order_products table for a particular order have their status to back ordered. If the do you switch the $status variable to back-ordered.

 

Finally for the catalog end when you are in the checkout_process.php where the stock is updated you could simply set the status_id in the orders_products table based on stock.

 

		if ( ($stock_left < 1) && (STOCK_ALLOW_CHECKOUT == 'false') ) {
	  tep_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
// Set the status_id for back-order here - Example
status_id = 5;
	} else {
//  Set the status_id as available
status_id = 0;
	}

 

and few lines down

 

	$sql_data_array = array('orders_id' => $insert_id, 
						'products_id' => tep_get_prid($order->products[$i]['id']), 
						'products_model' => $order->products[$i]['model'], 
						'products_name' => $order->products[$i]['name'], 
						'products_price' => $order->products[$i]['price'], 
						'final_price' => $order->products[$i]['final_price'], 
						'products_tax' => $order->products[$i]['tax'], 
// Set the status id for each product in the orders_products table
						'status_id' => $status_id, 
						'products_quantity' => $order->products[$i]['qty']);
tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
$order_products_id = tep_db_insert_id();

Share this post


Link to post
Share on other sites

Would LOVE a contribution that would offer a separate status per item.  My issue is how to handle the situation when a customer buys 2 products and returns 1 of them.  Or, as mentioned above, one item ships, but another on the same order is backordered?

 

This is an OLD thread, but maybe in the 8 years since it was posted, there might be more interest or knowledge on this situation?  I don't know if enigma1's code actually works, but I plan to try it! :)

Share this post


Link to post
Share on other sites

I think the easiest way is to use the comments section in the order editor. There is an addon that lets you choose from pre-defined comments, if wanted. But it seems typing in a comment stating "item 1 shipped. item 2 on backorder." and then marking the overall status as Partially Shipped, or something like that would be a simple thing to do. But I've not ran across a need for this so maybe I'm missing the point. 

Share this post


Link to post
Share on other sites

I use something similar to what @@Jack_mcs says. It does not happen often as I try to make sure that items in the store are available for sale in the right quantities. Keeping the stock accurate negates the need for something like this. You can also set check stock and allow checkout to ensure that negative quantity sales do not occur.

 

When the problem does occur all I do is to print out another invoice or packing slip, and mark which item is out of stock and send it when it comes in stock. Its old fashioned but it works.

 

The trouble with automating a simple process is that you can make it too complicated. If you mark an item as partially shipped, order the item missing, and someone else enters the new stock, how do you know that there is one awaiting back order. Is there a message on the product screen when adding new stock to let someone know that one item is to go to xxx customer. If not then your stock count will again be wrong if someone does not reduce the stock when the item is sent as it has already been deducted and sold.


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

For me, I don't have a way to accurately report for accounting/tax purposes when a customer orders multiple items on an order, then returns one of them.  If I make the enter order status as "shipped," then the total amount of the sale is reportable, not just the amount of the items that were kept.  If I enter the order status as "returned," then none of the products kept are reported as sold.  I wonder how others handle this?  For accounting/tax purposes, I use the "Monthly Sales" report, which pulls based on the order status in the database, which does not have the ability to account for partial returns on an order. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×