コード例 #1
0
ファイル: Checkout.php プロジェクト: dioscouri/f3-shop
 public function acceptOrder()
 {
     if ($this->order()->save()) {
         $this->order()->accept();
         $this->setOrderAccepted();
         // delete all scheduled abandoned cart notifications
         \Shop\Models\CartsAbandoned::deleteQueuedEmails($this->cart());
         $this->cart()->remove();
         \Dsc\System::instance()->get('session')->set('shop.just_completed_order', true);
         \Dsc\System::instance()->get('session')->set('shop.just_completed_order_id', (string) $this->__order->id);
     }
     return $this;
 }
コード例 #2
0
ファイル: Carts.php プロジェクト: dioscouri/f3-shop
 protected function afterSave()
 {
     parent::afterSave();
     // cart has been updated,
     // so delete all scheduled abandoned cart notifications
     \Shop\Models\CartsAbandoned::deleteQueuedEmails($this);
     // and reset its array of email notifications
     $this->abandoned_notifications = array();
     $this->store();
 }