logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
IDAutomation  
#21 Posted : Thursday, October 22, 2020 9:53:52 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Here's the whole page (took me a while to figure out how to screenshot the long page ;) )

Screenshot_2020-10-22 AbleCommerce Store.png (279kb) downloaded 1 time(s).
shari  
#22 Posted : Thursday, October 22, 2020 12:16:57 PM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
I have confirmed that the issue is with max order number. We have a validation in place that restricts the order number to be less than 99999999.


The actual bug was that the validation message wasn't appearing mentioning that the Next Order number is not valid.
The validation issue is already fixed and will be available in the next release.

Now to fix your issue you need to make a code change in controller.

1- Open Website\Areas\Admin\Controllers\StoreController.cs
2- Search for the code

Code:
[NonAction]
        private void UpdateNextOrderNumber(StoreModels storeModel)
        {
            storeModel.OrigNextOrderNumber = store.NextOrderId;
            storeModel.MinValue = (_storeRepo.GetMaxOrderNumber() + 1);
            storeModel.MaxValue = 99999999;
            storeModel.NextOrderId = storeModel.OrigNextOrderNumber;
            if (store.NextOrderId > 99999999)
            {
                storeModel.NextOrderIdLabel = storeModel.OrigNextOrderNumber;
                storeModel.ShowNextOrderId = false;
            }
        }

3- Replace with

Code:
[NonAction]
        private void UpdateNextOrderNumber(StoreModels storeModel)
        {
            storeModel.OrigNextOrderNumber = store.NextOrderId;
            storeModel.MinValue = (_storeRepo.GetMaxOrderNumber() + 1);
            storeModel.MaxValue = Int32.MaxValue;
            storeModel.NextOrderId = storeModel.OrigNextOrderNumber;
            if (store.NextOrderId > Int32.MaxValue)
            {
                storeModel.NextOrderIdLabel = storeModel.OrigNextOrderNumber;
                storeModel.ShowNextOrderId = false;
            }
        }


4- Compile the code
5- Now from admin config store page enter 1214864426 in Next Order Number field
6- It should now allow you to save the form.

Best of luck!

ray22901031  
#23 Posted : Thursday, October 22, 2020 12:23:07 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Our site is still in development,, but our order numbers are 10 digits in length. Is the next version going to restrict my order numbers to be less than 10 digits in length?

Thanks
IDAutomation  
#24 Posted : Thursday, October 22, 2020 12:55:54 PM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Thanks Shari, I will try that out tonight and let you know.
IDAutomation  
#25 Posted : Thursday, October 22, 2020 6:30:19 PM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
The new code worked but we had wanted to be able to use the numbers from 80000ish to 999999999. As the larger #'s were a trigger to let us know what system the order came from initially. Is there a work around for that?
ray22901031  
#26 Posted : Thursday, October 22, 2020 6:33:26 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
As per my post above his and to further clarify the question, we also need to use large numbers (about 10 digits) because the first two numbers serve a specific purpose.

Glad they finally figured out this problem for you.
-Ray
shari  
#27 Posted : Friday, October 23, 2020 5:16:10 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
The new code worked but we had wanted to be able to use the numbers from 80000ish to 999999999. As the larger #'s were a trigger to let us know what system the order came from initially. Is there a work around for that?


I think you can do this by explicitly adding the desired next order id number in the database (ac_Stores table). And to enforce the upper limit to 99999999, you will need to revert the changes you applied yesterday.
But, in this case, you will not be able to use the store config page.
IDAutomation  
#28 Posted : Friday, October 23, 2020 8:26:08 AM(UTC)
IDAutomation

Rank: Member

Groups: Authorized User, Developers
Joined: 11/13/2018(UTC)
Posts: 23

Thanks: 16 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: shari Go to Quoted Post


I think you can do this by explicitly adding the desired next order id number in the database (ac_Stores table). And to enforce the upper limit to 99999999, you will need to revert the changes you applied yesterday.
But, in this case, you will not be able to use the store config page.


So I could make changes, then change the code back and continue using the lower numbers? but if I ever want to make a change to the store configuration I would have to rechange the code?

It would be a PIA but if bossman wants to keep the lower numbers, this would be a workaround?

shari  
#29 Posted : Friday, October 23, 2020 8:34:15 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
So I could make changes, then change the code back and continue using the lower numbers? but if I ever want to make a change to the store configuration I would have to rechange the code?


Yes, you have to go through these steps and this is a workaround.
thanks 1 user thanked shaharyar for this useful post.
IDAutomation on 10/23/2020(UTC)
Users browsing this topic
Guest (13)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.