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