/* Отображение корзины */ ?>
= $cart->get_quantity_notifications() ?>
if ($cart->get_item_count()): ?>
$items = $cart->get_items() ?>
$has_discount_column = $items->get_field_sum('OriginalPrice') - $items->get_field_sum('ItemPrice'); ?>
/* Корзина пуста */ ?>
else: ?>
= NETCAT_MODULE_NETSHOP_CART_EMPTY ?>
endif ?>
cart;
if (isset($_GET['ClearCart'])) {
$cart->clear();
header("Location: {$_SERVER['HTTP_REFERER']}");
exit;
}
// Сбрасываем купон
if ($coupon_clear = $input->fetch_post('coupon_clear')) {
$coupons = $netshop->promotion->get_registered_coupons();
foreach ($coupons as $i => $coupon) {
if ($coupon_clear[$i]) {
$netshop->promotion->unregister_coupon_code($coupon['code']);
}
}
}
// Активирум купон
elseif ($coupon_add = $input->fetch_post('coupon_add')) {
if ($netshop->promotion->register_coupon_code($coupon_add)) {
ob_end_clean();
header("Location: {$_SERVER['HTTP_REFERER']}");
exit;
}
}