How to set Order Number to Custom value

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

How to set Order Number to Custom value

Post by ImmortalLogic » Mon Dec 07, 2015 8:04 am

In previous versions of AbleCommerce, there was an option to set the desired OrderID to start and increment (I think) in Admin. However with version 10 and 11, I cannot see how to do this. I have tried manually setting the database to the value we want to begin with but it always reverts back to the original order number (with some increments due to fake transcations). What is the best way to modify the order number/id starting point?

Thanks.

rmaweb
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Fri Sep 10, 2010 9:41 am

Re: How to set Order Number to Custom value

Post by rmaweb » Mon Dec 07, 2015 9:01 am

Hello ImmortalLogic,

In the admin section go to Configure -> Store -> General and look on the left side of the page under the Order Settings heading.
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3

User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Re: How to set Order Number to Custom value

Post by ImmortalLogic » Tue Dec 08, 2015 5:13 am

Thanks for your response but it only displays a value in label and not text box. It does not seem as if it can be modified. Changing it in the database works for one order, then it moves back to the the original 10 digit order number. How can we set our custom order number?

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: How to set Order Number to Custom value

Post by Katie » Tue Dec 08, 2015 9:39 am

Someone has customized this page so you can't change the order number. This field has always been available for editing.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Re: How to set Order Number to Custom value

Post by ImmortalLogic » Tue Dec 08, 2015 10:43 am

Katie,

That is not possible--no one has customized the page. I am the only one to work on this project and after installing version 10, this is what I see using the version 10 files. The version we used before was editable.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: How to set Order Number to Custom value

Post by Katie » Tue Dec 08, 2015 10:57 am

Maybe it was changed to be compatible for a plug-in? If you have a stock version of the R10 files, then you can compare the files for /Admin/Store/StoreSettings.aspx. I am sure this field has always been editable.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: How to set Order Number to Custom value

Post by jguengerich » Tue Dec 08, 2015 11:05 am

I believe this may be the problem: In /Admin/Store/StoreSettings.aspx.cs, in the UpdateNextOrderNumber() method (which is called in Page_Load), is the following code:

Code: Select all

            if (store.NextOrderId > 99999999)
            {
                NextOrderIdLabel.Text = OrigNextOrderNumber.Value;
                NextOrderIdLabel.Visible = true;
                NextOrderId.Visible = false;
                NextOrderNumberRangeValidator1.Enabled = false;
                NextOrderNumberRangeValidator1.Visible = false;
            }
This hides the text box and shows a label with the value instead.
Maybe someone from AbleCommerce can say why that's there?
Jay

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: How to set Order Number to Custom value

Post by Katie » Tue Dec 08, 2015 11:20 am

I don't know why, so we'll have to get some input from someone in the dev team. They have already gone home for the day, so we'll have to wait until tomorrow for an answer.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Re: How to set Order Number to Custom value

Post by ImmortalLogic » Tue Dec 08, 2015 11:48 am

Thanks for your help jguengerich and Katie!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: How to set Order Number to Custom value

Post by mazhar » Wed Dec 09, 2015 5:23 am

It seems like current value in Store.NextOrderId field exceeding the validation limits making it read only. I see you noted that you are able to correct in database but it reverts back. May be some customization or cached values is saved back reverted direct database edit? You should try this, first recycle app pool and make sure to not access the website while you are making change in db, then change the value in database to your desired value. You can calculate the value by simply finding the maximum order number in ac_Orders table and then increment that value by one. Then recycle app pool once again and access the admin panel. Let's see if it reverts the value again or it sticks this time.

Also please run the query and see what is the maximum order number you have?
SELECT MAX(OrderNumber) FROM ac_Orders

Post Reply