本文整理匯總了PHP中unknown_type::getOrder方法的典型用法代碼示例。如果您正苦於以下問題:PHP unknown_type::getOrder方法的具體用法?PHP unknown_type::getOrder怎麽用?PHP unknown_type::getOrder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類unknown_type
的用法示例。
在下文中一共展示了unknown_type::getOrder方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: shipmentContainsTracking
/**
* Check if a tracking number as already been imported
*
* @param unknown_type $shipment
* @param unknown_type $tracking
*/
private function shipmentContainsTracking($shipment, $tracking)
{
$exist = false;
if ($shipment->getOrder()) {
foreach ($shipment->getOrder()->getTracksCollection() as $track) {
if (is_object($track->getNumberDetail())) {
if ($track->getNumberDetail()->gettracking() == $tracking) {
$exist = true;
}
}
}
}
return $exist;
}
示例2: _isChosenMethod
/**
* Each payment method has it's own observer. When one of thos observers is called, this checks if it's
* payment method is being used and therefore, if this observer needs to do anything.
*
* @param unknown_type $observer
*/
protected function _isChosenMethod($observer)
{
return (bool) $observer->getOrder()->getPayment()->getMethod() === $this->_code;
}
示例3: loadOrderAfter
/**
*
* This function is called when $order->load() is done.
* Here we read our custom fields value from database and set it in order object.
* @param unknown_type $evt
*/
public function loadOrderAfter($evt)
{
$order = $evt->getOrder();
$model = Mage::getModel('custom/custom_order');
$data = $model->getByOrder($order->getId());
foreach ($data as $key => $value) {
$order->setData($key, $value);
}
}