Welcome Guest, Not a member yet? Register   Sign In
Shopping Cart

I put in this =
<?php echo (count($this->cart->total_items()));  ?>

Which shows 1 once I add 1 item to the cart but adding more items currently there's 6 in it still shows 1, any idea's please?

Thanks in advance...


The reason it's returning 1 is because you're using the PHP count function, which isn't working because of the multi-dimensional array that is being put in it. The cart class' total_items function returns an integer already so the count function isn't needed.

This should return 6 if you have 6 items in your cart:

<?php echo $this->cart->total_items(); ?>

Yer, silly me!! :0 thanks for that, well now i can move on everything else works the update the cart destroy it was just the total items things that was holding me up! Now i can move on with great thanks to you "beaudierman"

You're welcome, I'm glad I could help!

Theme © iAndrew 2016 - Forum software by © MyBB