Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Adding query to header

Wanting to add a count of items in the users shopping cart in the header. Looks like this is the user had 3 items in the cart:
Shopping Cart (3)
I want to populate the (3) with the a method in the "Cart_model"
I put this code in the _blocks/header.php file
$cartItems = $this->Cart_model->countItemsInCart($cartId);

It throws an error:
Severity: Notice

Message: Undefined property: MY_Loader::$Cart_model

Filename: _blocks/header.php

What's the way to get around this?


Sign In or Register to comment.