AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Missing Save Button in Terms/Conditions
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).
|
|
|
|
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!
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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?
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
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
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?
|
|
|
|
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.
|
1 user thanked shaharyar for this useful post.
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
Missing Save Button in Terms/Conditions
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close