本文整理汇总了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);
}
}