Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Order Item Status Contribution


metricbikes

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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

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();

Link to comment
Share on other sites

  • 8 years later...

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! :)

Link to comment
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. 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
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

Link to comment
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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...