Jump to content

Can't get Incremental Order Numbers to work


Dirty Butter

Recommended Posts

First of all, I have used successfully my heavily edited old Sequential Order Number Mod for years. As I created my edited 6.2.1 upgrade test site I took all the mod code out.  I deleted the config line in the tables that belonged to the Sequential Order mod.

The current database is using the existing modded order numbers as the custom_oid. The last custom_oid is 2016-PC-3265 on this test site. There are 2032 orders in the Store Overview. I have not been able to figure out any settings for the Incremental Number Format that creates 2016-PC-3266 as the next order number. I do have the %Y-PC part working properly.

I've tested several attempts by decoding the database config, deleting the values that deal with the custom numbers and then encoding. This gives me a chance to try different settings and Preview again.Frankly I've tried so many different things that I'm too confused and need help.

 

My last attempt:

next order number should be 3266

there are 2032 orders before creating another one

difference is 1047, so I used that as the Increment Increase

Preview correctly shows 2018-PC-3266 as next order number, so I saved the store setting and cleared cache

Then I created a new test order

New order number is 3843!

 

 

Link to comment
Share on other sites

Is your test site using the production database that the production site uses?

You are saying there are non-standard-format order numbers in the 'custom_oid' column of CubeCart_order_summary? So, would you also say there are standard-format order numbers in the 'cart_order_id' column?

Link to comment
Share on other sites

The oldest orders before I started using the mod have standard numbers in the cart_order_id column. But once I started using the mod, both the cart_order_id and the custom_oid columns have the new format.

I honestly don't remember if I tried it on the site that has my edited files but the standard database with current plugins. I'll do some testing and be back. No, I think I at some point I copied over some database tables from live to that test site, so it creates the same odd behavior.

1. I'll try making a few dummy orders with standard cart_order_id and then try the incremental on the install I have that is the upgraded version of my live site.

But I have one totally stock site, as there are things that cannot be tested on the Demo site.

2. If testing after creating a few standard orders on my upgraded from live test does not work - I'll try it on that stock one. I can always make another pure install if I need to. I'll create some standard orders, then try the incremental and see what happens.

Link to comment
Share on other sites

1. Totally stock install DOES work.

So then I tried a few things on MY database test sites:

1. I checked on dirtybutterestates that already had Sequential Order Number mod, and deleted the mod incremental number references in the database.

2. I used decode/encode Base64 to get the config in the database table back to Standard. Then I again created the Incremental settings I hoped to achieve. Preview shows 2018-EC-70.  (The order_id shows 69 as the last current. So does that have something to do with the code calculation?)

It should have been 52 if it did what I wanted it to, but I could live with 70, as that is past any existing order numbers. BUT the result was 2018-EC-17.

3.  I then tried editing the database column, removing the 2018-EC-17, changing it to the next sequence number format I wanted it to be and cleared cache.  That gave me 2018-EC-51 which  showed correctly in Admin Order List.

4. I then tried making another order with everything left alone. That order had 2018-EC-18. I made another order with a different customer. And it's STILL at 2018-EC-18. And I made another order with another customer, and it is STILL at 2018-EC-18.

It makes no sense at all!!

If I understood the code process of how the sequence is created, maybe I could figure out how to fix this. If not, I'll either have to try to put all the Sequential Order number data back in the database and put all the code back in the files and try to use it with 6.2.1 with Standard settings - OR I'm stuck at 6.1.15 - OR go back to standard numbering. whether I wanted to or not.

 

Link to comment
Share on other sites

So I've now tested the copy of plushcatalog database that I had upgraded to 6.2.1 again - the one I initially commented about in this thread.

The last modded order number was 2018-PC-3265. I did NOT try to manually change the database entry to what I had wanted it to be. That action seemed to mess up the estates database.

The first order I made using the Incremental Store Settings created 2018-PC-3843. It's not what I wanted, but I can live with it, as 3843 is larger than any other number in the database.

The next orders correctly changed to 3484 and 3485.

Just to see what number would show up in the Preview now (did not save) - the Preview with existing settings (increment increase=1047). But the Preview shows 3306.

Maybe it's the Preview part that is causing me to pick the wrong interval settings to Save???

Link to comment
Share on other sites

  • 3 weeks later...

Some progress :)

https://forums.cubecart.com/topic/54130-how-to-wipe-out-incremental-number-attempt/?do=findComment&comment=234274

 

I've run into a different kind of issue on my dirtybutterestates store. This is an extremely low volume store that's basically my live test site. Over the years I've tested all kinds of ordering and customer code issues on this site. So the latest order ID number in the database is a lot higher than the last Sequential Order Number order number. I really needed a negative number increment to actually get the Incremental system to arrive at the actual next order number.

But the Incremental Order number code in Admin will not accept negative numbers. So I ended up with a gap in numbers, but that's a reasonable result for my needs. It remains to be seen if anyone else has as much trouble as I've had getting the Incremental order numbering system to work for them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...