quarta-feira, janeiro 06, 2016

Change that IncrementI_D with order_id orderid

Magento: Change that Increment ID - Merchant ProtocolMerchant Protocol





Magento: Change that Increment ID

Magento EcommerceIf you are just starting to use Magento, or you have a Magento that is integrating with another processing system, then it is likely that you don’t want to use the default order numbering increment. If you just need to change the starting number to avoid colliding with existing orders or to make the Magento order numbers resemble an order numbering system that is compatable or similar to what you used before Magento.
In any case you have decided to change the increment ID for your orders.  The fast and easy way is to just change the value in the database.  There are basically two steps.
Step 1.  Find the Store ID.
Even if you have only one store, you don’t want to guess at your store ID.  Log into mysql and run this query.
SELECT store_id, name FROM core_store;
This will return your store name and its ID.
Step 2.  Update the order increment ID for your store.
Run this query.
UPDATE eav_entity_store SET increment_last_id = [new order value]  WHERE store_id =[your store id] and  entity_type_id  =[check your entity id];
Make sure to put in the new increment value where [new order value] is, and your store id where [[your store id] is in this query.
Changing other increments.
If you need to change the other increment values like the Invoice Increment or the Shipment Increment, use the same query in Step 2, but change the entity_type_id to 16 for invoices and 19 for shipments.  You can find these and other entity type ID values in the eav_entity_type table.

Nenhum comentário: