Jump to content
UsingOSC

osc 2.3.1 Unique Order Number

Recommended Posts

I'd like to use this add on in my store. It says 2.3.1 compatible but I could not find the file in installation step 7)a. Have asked around but did not get a working solution.

 

Anyone can help, please!!!

Share this post


Link to post
Share on other sites

@@UsingOSC

 

Open d_orders.php with Edit plus, the mentioned change is line number 44 from step 7 a)


Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Share this post


Link to post
Share on other sites

@ \catalog\admin\includes\modules\dashboard


Like post..hit LIKE button.

 

osCommerce | Joomla | WordPress | Magento | SEO | CakePHP | CI

 

Guaranteed Website Speed Optimization!!

Share this post


Link to post
Share on other sites

Hrm...seems like a pretty old thread, but ...you have to take the "-" out of the date("dmy-His") entry.  Otherwise it truncates the number, excluding time, and all orders place on the same day would have the same number.

 

My problem is that it breaks PayPal.  Works great for invoice numbers but I get [TEP STOP] when I try to check out with PP.  I double-checked paypal_standard.php and all instances of (int)$order_id have been changed to $order_id.  Not real sure where to look for the problem.

 

And what's the chances I need to do the same to the IPN listener?...or any other PP associated files?

 

Suggestions?

Edited by Supertex

Share this post


Link to post
Share on other sites

Best is, not to use this add-on or any other in this direction.

 

Leave the order number in the database in peace, same with any other auto incrementing ids, sooner or later you will mess up while changing them

 

If you want a different order number to appear on your invoices or anywhere else, then do it in php, in the file you are showing the order number. 

 

You could create a function say "format_order_number($order_id)" that will reformat the order number by adding a date, or id, or the name of your pet and then, at each place where the order id is going to the screen, pass it through this function first

Share this post


Link to post
Share on other sites

Yeah...I thought about this all night.  Too easy to orphan an order - or worse.  

 

I was thinking of adding orders_invoice_id to the appropriate tables and instead of changing the order number/id, just adding a function that will use this addon's mechanic to create the invoice number at the same time the order_id is created. Then just change the files that display order number, and the only place order_id matters is in the mechanics.

 

Only thing I'd like to change is that instead of using the timestamp in the invoice number, I'd rather it just use ymd + 001 and increment by one per order per day.  9 is a more reasonable length than 12.  Not sure what the logic to do that would involve.

 

Would still be a pain to keep track of modifying new files, but at least no issues from orders that are not recorded...

Edited by Supertex

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

×