当前位置: 首页>>代码示例>>PHP>>正文


PHP Commande::save方法代码示例

本文整理汇总了PHP中Commande::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Commande::save方法的具体用法?PHP Commande::save怎么用?PHP Commande::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Commande的用法示例。


在下文中一共展示了Commande::save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Commande();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Commande'])) {
         $model->attributes = $_POST['Commande'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->comkey));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:E-SOFTinc,项目名称:Mailnetwork_Yii,代码行数:17,代码来源:CommandeController.php

示例2: actionPaypalPayment

 public function actionPaypalPayment()
 {
     $customer_model = new Customer();
     $commande_model = new Commande();
     $customer_model->attributes = Yii::app()->user->getState('Customer');
     $commande_model->attributes = Yii::app()->user->getState('Commande');
     if (sizeof($customer_model->search()->getData()) == 0) {
         $customer_model->bilsignupip = CHttpRequest::getUserHostAddress();
         $customer_model->save();
         $commande_model->bilkey = $customer_model->bilkey;
         $commande_model->comdebut = date("Y-m-d");
         $commande_model->save();
     } else {
         $customerTemp = $customer_model->search()->getData();
         $customer_model->bilkey = $customerTemp[0]->attributes['bilkey'];
     }
     if (isset($_POST['payment_status'])) {
         if ($_POST['payment_status'] == "Completed" || $_POST['payment_status'] == "Pending") {
             $city = Goodcity::model()->findByPk($_POST['item_number']);
             $this->sendEmailConfirmation($customer_model, $city, $commande_model, $_POST['txn_id'], $this->getInvoiceTotals($customer_model, $commande_model));
             $this->render('application/2-orderform', array('goodcity' => $city, 'thanks' => true, 'payment_type' => "paypal", 'payment_method' => "email", 'order_totals' => $this->getInvoiceTotals($customer_model, $commande_model), 'customer_model' => $customer_model, 'commande_model' => $commande_model, 'auth_code' => $_POST['txn_id']));
         } else {
             $this->redirect(array('user/order', 'transactionError' => true));
         }
     } else {
         $city = Goodcity::model()->findByPk($commande_model['comgoodcitykey']);
         $this->redirect(array('user/signup', 'city' => $commande_model['comgoodcitykey']));
     }
 }
开发者ID:E-SOFTinc,项目名称:Mailnetwork_Yii,代码行数:29,代码来源:UserController.php


注:本文中的Commande::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。