Skip to content

Instantly share code, notes, and snippets.

@osrecio
Created August 7, 2014 09:06
Show Gist options
  • Save osrecio/ff951e1cc318703b1456 to your computer and use it in GitHub Desktop.
Save osrecio/ff951e1cc318703b1456 to your computer and use it in GitHub Desktop.
Get your store’s current order/shipment/invoice /credit memo number
SELECT core_store_group.name AS group_name, core_website.name AS website_name, core_store.name AS store_name, core_store.store_id, increment_prefix, increment_last_id, entity_type_code
FROM eav_entity_store
INNER JOIN eav_entity_type ON eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
INNER JOIN core_store ON core_store.store_id = eav_entity_store.store_id
INNER JOIN core_store_group ON core_store_group.group_id = core_store.group_id
INNER JOIN core_website ON core_website.website_id = core_store.website_id
WHERE eav_entity_store.store_id != 0 ORDER BY eav_entity_store.store_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment