Change next order ID value

Category: X-Cart Snippets
Added:
Enter Price $
SKU SKU80
Quantity

If you've just opened a new store, you may not want customers to see low order ID's.

Let's say you want the next order ID to be 5000, apply this SQL patch...

ALTER TABLE xcart_orders AUTO_INCREMENT = 5000;

Note, in later v4.6.x versions, you can do this from tools > maintenance.

You can use the same method for other tables, changing x to whatever value you want...

ALTER TABLE xcart_categories AUTO_INCREMENT = x;
ALTER TABLE xcart_products AUTO_INCREMENT = x;
ALTER TABLE xcart_manufacturers AUTO_INCREMENT = x;
ALTER TABLE xcart_extra_fields AUTO_INCREMENT = x;
ALTER TABLE xcart_pages AUTO_INCREMENT = x;
The website uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy.
More Information