Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Issue With Order Id Rate Topic   - - - - -

 
  • RagingRaven
  • Member
  • Trial users
  • Join Date: 26-Mar 13
  • 44 posts

Posted 22 August 2016 - 07:34 AM #1

I wanted to add this topic to the "Issues & Troubleshooting" segment, but for some reason I can't create a new topic there.

 

 

I'm having an issue with new orders being added to the database with a strange order id (16777215) and new orders failing because it's trying to add new orders to the datbase with the same id.

It started happening when the setting Initial order ID value under Settings → General got changed to something like 2016001.
Even though 2016001 seems like a normal number to me, it got added to the database as 1677215 and the second order failed because it also wanted to be added as 1677215.

So I deleted the value in Initial order ID value.
I deleted all existing orders in the admin panel (both normal and incomplete orders), deleted all Abandoned / Live carts and checked the database to see if any orders remained (but it was empty).

 

The new orders got added as order id 1 and 2 and after some more testing it appeared to be working, so after removing order 1 and 2 the next order was 3, but the one after that again got added as 1677215 and the one after that fails again.
 

I've been looking to find a solution, but can't find what's causing this.

 

I'm using version 4.3.8.

 

 

 

 

Sorry, service is temporarily unavailable



 
  • RagingRaven
  • Member
  • Trial users
  • Join Date: 26-Mar 13
  • 44 posts

Posted 22 August 2016 - 07:36 AM #2

P.S. the "Sorry, service is temporarily unavailable" message is what I get when placing a new order now after I choose a payment method.
I wanted to edit my post, but somehow I also can't do that it seems.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17405 posts

Posted 22 August 2016 - 07:49 AM #3

16777215 - is the maximum value for the field with the integer type

 

Check the latest order ID (e.g. 541). Then log in the phpMyAdmin and run the following query:

ALTER TABLE cscart_orders AUTO_INCREMENT = 542;

(Max order ID + 1)


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10607 posts

Posted 22 August 2016 - 07:03 PM #4

Or go to the "Operations" tab in phpMyAdmin for the cscart_orders table and change that value there.  In the Table Options area there is an input box for the AUTO_INCREMENT value.  Change it to the next order_id you want to use.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • RagingRaven
  • Member
  • Trial users
  • Join Date: 26-Mar 13
  • 44 posts

Posted 22 August 2016 - 09:34 PM #5

Thanks.

eComLabs's suggestion appears to have worked.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17405 posts

Posted 23 August 2016 - 07:53 AM #6

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 202 posts

Posted 29 May 2018 - 10:42 AM #7

I have just discovered we have been experiencing this error with customers being unable to place orders over the bank holiday weekend!

 

The order numbers randomly shot up from 8626 to 16777215+

 

I managed to reduce back down the auto increment value to get the cart working again - I have no idea why this heppened and am very concerned?

 

This is a few days after upgrading to the latest version and it was working fine over those days.

 

:?


Stores: CCTV Kits & www.jmtb.co.uk

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10607 posts

Posted 29 May 2018 - 05:52 PM #8

Given that it's auto-increment, it is either incremented by 1 for each order placed or someone reset it via either the cs-cart admin UI, programatically (hack)  or via something like phpMyAdmin.

 

Are you using the new responsive admin?  It's the newest piece in the puzzle.  And since phones are notorious for fat-finger inputs (or errant auto-fills), that could be the source of your problem.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 202 posts

Posted 29 May 2018 - 06:25 PM #9

But this is done only via the database isn't it the increment value?

 

How can i be done from CSCART?


Stores: CCTV Kits & www.jmtb.co.uk

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10607 posts

Posted 29 May 2018 - 06:56 PM #10

On the Settings/General tab there is a field called "Initial order ID value" that can be set to change the "next auto increment value" in the database.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • amdowney
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 202 posts

Posted 29 May 2018 - 07:17 PM #11

it was blank - is there any reason not to increase the max integer length just in case?


Stores: CCTV Kits & www.jmtb.co.uk

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10607 posts

Posted 29 May 2018 - 11:49 PM #12

Yes there is.  It is referenced all over the place in various tables.  Sometimes by 'order_id' and sometimes by 'object_id'.
I'd find/fix the root of the problem rather than trying to treat the symptom.  Blank is okay, it just means it wouldn't be updated.  I think it gets set to blank if the settings are changed and it is less than or equal to the current auto_increment value from the orders table (not verified).


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.