本文整理汇总了PHP中OrderState::model方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderState::model方法的具体用法?PHP OrderState::model怎么用?PHP OrderState::model使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderState
的用法示例。
在下文中一共展示了OrderState::model方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionCustomer
public function actionCustomer()
{
$model = new Order();
$errorMessage = null;
if (isset($_GET['order_id']) && Order::model()->isValidateOrderId($_GET['order_id'])) {
$model = $this->loadExistOrder($_GET['order_id']);
$model->order_info = OrderState::model()->getStateZnByStateId($model->order_state_id) . $model->remark;
$model->product_name = Product::model()->getProductNameByProductId($model->product_id);
$model->order_photos = Photo::model()->findAllByAttributes(array('product_id' => $model->product_id));
} else {
$model->unsetAttributes();
$errorMessage = Yii::t('order', 'Order is not exist!');
}
$this->layout = false;
$this->render('_customer', array('model' => $model, 'message' => $errorMessage));
}
示例2: actionSearch
public function actionSearch()
{
$model = new Order();
$errorMessage = null;
if (isset($_GET['order_id']) && Order::model()->isValidateOrderId($_GET['order_id'])) {
$model = $this->loadExistOrder($_GET['order_id']);
$model->order_info = OrderState::model()->getStateZnByStateId($model->order_state_id) . $model->remark;
//Open when the product model is finished
//$model->product_name = Product::model()->getProductNameByProductId($model->product_id);
} else {
$model->unsetAttributes();
$errorMessage = '订单号不存在!';
}
$this->layout = false;
$this->render('_customer', array('model' => $model, 'message' => $errorMessage));
}