Skip to main content
fix item_id to entity_id
Source Link
ProxiBlue
  • 9.9k
  • 3
  • 34
  • 60

The number you are using is the increment_id

In magento you have the sequencial inctement_id, which is the visible order id.

Internally magento uses item_identity_id, which is used to link data.

The ->load uses the item_identity_id by default.

If you change your code to

$order = Mage::getModel('sales/order')->load($incrementId, 'increment_id');

You should get the order loaded.

The number you are using is the increment_id

In magento you have the sequencial inctement_id, which is the visible order id.

Internally magento uses item_id, which is used to link data.

The ->load uses the item_id by default.

If you change your code to

$order = Mage::getModel('sales/order')->load($incrementId, 'increment_id');

You should get the order loaded.

The number you are using is the increment_id

In magento you have the sequencial inctement_id, which is the visible order id.

Internally magento uses entity_id, which is used to link data.

The ->load uses the entity_id by default.

If you change your code to

$order = Mage::getModel('sales/order')->load($incrementId, 'increment_id');

You should get the order loaded.

Source Link
ProxiBlue
  • 9.9k
  • 3
  • 34
  • 60

The number you are using is the increment_id

In magento you have the sequencial inctement_id, which is the visible order id.

Internally magento uses item_id, which is used to link data.

The ->load uses the item_id by default.

If you change your code to

$order = Mage::getModel('sales/order')->load($incrementId, 'increment_id');

You should get the order loaded.