Commit ee3f3d20097a0e9a2012e5d40bf10602bf6082ba
Merge branch 'discount' of gitlab.artweb.com.ua:Alex/semena
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
src/app/frontend/controllers/MenuController.php
@@ -421,14 +421,14 @@ class MenuController extends \controllers\ControllerBase | @@ -421,14 +421,14 @@ class MenuController extends \controllers\ControllerBase | ||
421 | 421 | ||
422 | 422 | ||
423 | //discount | 423 | //discount |
424 | -// $discount = $this->models->getDiscount()->getActiveData(); | ||
425 | -// if (!empty($discount)) { | ||
426 | -// $discount = $discount[0]; | ||
427 | -// } | ||
428 | -// if ($this->common->applyPromoCode($discount, $cart_items['items'])) { | ||
429 | -// $this->common->countOrderSum($cart_items); | ||
430 | -// $cart_items['total_price'] = $cart_items['total_sum']; | ||
431 | -// } | 424 | + $discount = $this->models->getDiscount()->getActiveData(); |
425 | + if (!empty($discount)) { | ||
426 | + $discount = $discount[0]; | ||
427 | + } | ||
428 | + if ($this->common->applyPromoCode($discount, $cart_items['items'])) { | ||
429 | + $this->common->countOrderSum($cart_items); | ||
430 | + $cart_items['total_price'] = $cart_items['total_sum']; | ||
431 | + } | ||
432 | // | 432 | // |
433 | 433 | ||
434 | foreach($cart_items['items'] as $k => $item) { | 434 | foreach($cart_items['items'] as $k => $item) { |