Get Order Increment Id in Magento

前端 未结 10 1732
生来不讨喜
生来不讨喜 2020-12-03 21:19

I\'m trying to get the Order Increment Id in Magento, on the success.phtml page so that I can use this for affiliate tracking.

I\'m using the following code, but it

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 21:57

    You can get the increment id using this code snippet:

    $orderId = 12;    
    $order = Mage::getModel('sales/order')->load($orderId);
    $Incrementid = $order->getIncrementId();
    

    Now you can do an echo to the $Incrementid variable and see the increment id.

    I hope this helps.

提交回复
热议问题