Created
December 2, 2011 13:58
-
-
Save razbakov/1423322 to your computer and use it in GitHub Desktop.
Order Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$order = new Mage_Sales_Model_Order(); | |
$incrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); | |
$order->loadByIncrementId($incrementId); | |
/** @var $order Mage_Sales_Model_Order */ | |
$cookieModel = Mage::getModel('core/cookie'); | |
// Save order ad origin as order field | |
$params = $cookieModel->get('ad_origin'); | |
if (false != $params) { | |
$order->setData('ad_origin', $params); | |
$order->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment