* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6844 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class DiscountControllerCore extends FrontController { public $auth = true; public $php_self = 'discount'; public $authRedirection = 'discount'; public $ssl = true; public function process() { $discounts = Discount::getCustomerDiscounts($this->context->language->id, $this->context->customer->id, true, false); $nbDiscounts = 0; foreach ($discounts AS $discount) if ($discount['quantity_for_user']) $nbDiscounts++; $this->context->smarty->assign(array('nbDiscounts' => (int)($nbDiscounts), 'discount' => $discounts)); $this->setTemplate(_PS_THEME_DIR_.'discount.tpl'); } }