Beispiel #1
0
 public function hookShoppingCart($params)
 {
     if (!Validate::isLoadedObject($params['cart'])) {
         die(Tools::displayError('Cart parameter is missing.'));
     }
     global $smarty;
     $points = LoyaltyModule::getCartNbPoints($params['cart']);
     $smarty->assign(array('points' => $points, 'voucher' => LoyaltyModule::getVoucherValue($points)));
     return $this->display(__FILE__, 'shopping-cart.tpl');
 }
Beispiel #2
0
 public function hookShoppingCart($params)
 {
     include_once dirname(__FILE__) . '/LoyaltyModule.php';
     global $smarty;
     if (Validate::isLoadedObject($params['cart'])) {
         $points = LoyaltyModule::getCartNbPoints($params['cart']);
         $smarty->assign(array('points' => (int) $points, 'voucher' => LoyaltyModule::getVoucherValue((int) $points)));
     }
     return $this->display(__FILE__, 'shopping-cart.tpl');
 }
Beispiel #3
0
 public function hookShoppingCart($params)
 {
     include_once dirname(__FILE__) . '/LoyaltyModule.php';
     if (Validate::isLoadedObject($params['cart'])) {
         $points = LoyaltyModule::getCartNbPoints($params['cart']);
         $this->smarty->assign(array('points' => (int) $points, 'voucher' => LoyaltyModule::getVoucherValue((int) $points), 'guest_checkout' => (int) Configuration::get('PS_GUEST_CHECKOUT_ENABLED')));
     } else {
         $this->smarty->assign(array('points' => 0));
     }
     return $this->display(__FILE__, 'shopping-cart.tpl');
 }
Beispiel #4
0
 public function hookShoppingCart($params)
 {
     if (!Validate::isLoadedObject($params['cart'])) {
         foreach (debug_backtrace() as $line) {
             echo "{$line['file']}:{$line['line']}:{$line['function']}<br>";
         }
         die(Tools::displayError('Cart parameter is missing.'));
     }
     global $smarty;
     $points = LoyaltyModule::getCartNbPoints($params['cart']);
     $smarty->assign(array('points' => $points, 'voucher' => LoyaltyModule::getVoucherValue($points)));
     return $this->display(__FILE__, 'shopping-cart.tpl');
 }