Esempio n. 1
0
 /**
  * @return bool
  *
  * @param OnlineShop_Framework_ICart $cart
  */
 public function isReserved($cart = null)
 {
     $reservation = OnlineShop_Framework_VoucherService_Reservation::get($this->model->getToken(), $cart);
     if (!$reservation->exists()) {
         return false;
     }
     return true;
 }
Esempio n. 2
0
 /**
  * Checks if checkout data voucher tokens are valid reservations
  */
 protected function validateVoucherTokenReservations()
 {
     foreach ($this->getVoucherTokenCodes() as $code) {
         $reservation = OnlineShop_Framework_VoucherService_Reservation::get($code, $this);
         if (!$reservation->check($this->getId())) {
             unset($this->checkoutData["voucher_" . $code]);
         }
     }
 }