| @@ 327-339 (lines=13) @@ | ||
| 324 | $transaction->save(); |
|
| 325 | } |
|
| 326 | ||
| 327 | public function update() |
|
| 328 | { |
|
| 329 | // Check for current transaction |
|
| 330 | $transaction = new TransactionModel(); |
|
| 331 | $session = new Ajde_Session('AC.Shop'); |
|
| 332 | if ($session->has('currentTransaction') && $transaction->loadByPK($session->get('currentTransaction'))) { |
|
| 333 | $this->updateFromCart($transaction); |
|
| 334 | } |
|
| 335 | Ajde_Session_Flash::alert(trans('Your order has been updated', 'shop')); |
|
| 336 | $this->redirect('shop/transaction:setup'); |
|
| 337 | // $this->setAction('view'); |
|
| 338 | // return $this->view(); |
|
| 339 | } |
|
| 340 | ||
| 341 | public function cancel() |
|
| 342 | { |
|
| @@ 341-353 (lines=13) @@ | ||
| 338 | // return $this->view(); |
|
| 339 | } |
|
| 340 | ||
| 341 | public function cancel() |
|
| 342 | { |
|
| 343 | // Edit existing transaction? |
|
| 344 | $transaction = new TransactionModel(); |
|
| 345 | $session = new Ajde_Session('AC.Shop'); |
|
| 346 | if ($session->has('currentTransaction') && $transaction->loadByPK($session->get('currentTransaction'))) { |
|
| 347 | $transaction->payment_status = 'cancelled'; |
|
| 348 | $transaction->save(); |
|
| 349 | $session->destroy(); |
|
| 350 | } |
|
| 351 | Ajde_Session_Flash::alert(trans('Your order has been cancelled', 'shop')); |
|
| 352 | $this->redirect('shop'); |
|
| 353 | } |
|
| 354 | ||
| 355 | public function payment() |
|
| 356 | { |
|