Magento : Reset Order, Invoice .. ID Number

Hello,,

After the upgrade to magento 1.8.1, I decide to test the checkout process to be sure all is working correctly: After the test, the Id number must be resetted to the original value. The easier way is to execute the following SQL query in the mySQL database.

You will find below the SQL query howto reset the id of the invoice, order, …

UPDATE eav_entity_store
 INNER JOIN eav_entity_type
 ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
SET eav_entity_store.increment_last_id = '100000001'
WHERE eav_entity_type.entity_type_code = 'order'
 AND eav_entity_store.store_id = 1;

UPDATE eav_entity_store
 INNER JOIN eav_entity_type
 ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
SET eav_entity_store.increment_last_id = '100000001'
WHERE eav_entity_type.entity_type_code = 'invoice'
 AND eav_entity_store.store_id = 1;
UPDATE eav_entity_store
 INNER JOIN eav_entity_type
 ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
SET eav_entity_store.increment_last_id = ‘100000000’
WHERE eav_entity_type.entity_type_code = 'shipment'
 AND eav_entity_store.store_id = 1;
UPDATE eav_entity_store
 INNER JOIN eav_entity_type
 ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
SET eav_entity_store.increment_last_id = '100000003'
WHERE eav_entity_type.entity_type_code = 'creditmemo'
 AND eav_entity_store.store_id = 1;

I hope It was useful.,

Nicolas Portais
Author Photographer

 

Ce contenu a été publié dans Magento, avec comme mot(s)-clé(s) , , , , . Vous pouvez le mettre en favoris avec ce permalien.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Captcha (solve the arithmetic equation) * Time limit is exhausted. Please reload CAPTCHA.