Commit c83df947ff5690abb357e1b148f2d26e7ca12b3d
1 parent
f066c677
id => email
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/app/frontend/controllers/MenuController.php
... | ... | @@ -484,6 +484,9 @@ class MenuController extends \controllers\ControllerBase |
484 | 484 | 'count_items' => $count_items |
485 | 485 | ]; |
486 | 486 | $this->session->set( 'in_cart', $in_cart ); |
487 | + | |
488 | + $count = count($in_cart); | |
489 | + | |
487 | 490 | //save basket in DB |
488 | 491 | if ($this->session->get('isAuth')) { |
489 | 492 | $data = [ |
... | ... | @@ -492,9 +495,10 @@ class MenuController extends \controllers\ControllerBase |
492 | 495 | ]; |
493 | 496 | $this->models->getBasket()->addData($data); |
494 | 497 | } |
498 | + else { | |
499 | + $count .= 'Count items in basket: '.$count; | |
500 | + } | |
495 | 501 | |
496 | - | |
497 | - $count = count($in_cart); | |
498 | 502 | } |
499 | 503 | |
500 | 504 | die( json_encode( $count ) ); | ... | ... |