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

[eluser]the_unforgiven[/eluser]
Hi all,

I'm getting the following error:

Code:
A PHP Error was encountered

Severity: Warning
Message:  Invalid argument supplied for foreach()
Filename: inc/header.php
Line Number: 76

On or around the above mentioned line is this:

Code:
<img src="&lt;?php echo base_url(); ?&gt;images/bag.png" width="29" height="29" alt="Cart" />&nbsp;You have: <a href="&lt;?php echo base_url(); ?&gt;">
   &lt;?php $cart = $this->session->userdata('cart');
    if (count($this->session->userdata('cart'))){
    $count = 1;
     foreach ($this->session->userdata('cart') as $PID => $row) {    
        echo $row['count'];
           }  
     }
   ?&gt;
</a> <span>items in your cart</span>

This is the shopping cart for Claudia's Kids but ive changed some of it like instead of having $_SESSION has Ci didn't like it changed to $this->session->...... can someone hlep me please?

Thanks.


Messages In This Thread
Shopping Cart - by El Forum - 06-06-2012, 05:15 AM
Shopping Cart - by El Forum - 06-06-2012, 05:19 AM
Shopping Cart - by El Forum - 06-06-2012, 05:20 AM
Shopping Cart - by El Forum - 06-06-2012, 05:26 AM
Shopping Cart - by El Forum - 06-06-2012, 05:31 AM
Shopping Cart - by El Forum - 06-06-2012, 05:34 AM
Shopping Cart - by El Forum - 06-06-2012, 05:39 AM
Shopping Cart - by El Forum - 06-06-2012, 07:41 AM
Shopping Cart - by El Forum - 06-06-2012, 08:10 AM
Shopping Cart - by El Forum - 06-06-2012, 11:00 AM
Shopping Cart - by El Forum - 06-06-2012, 01:44 PM
Shopping Cart - by El Forum - 06-06-2012, 01:59 PM
Shopping Cart - by El Forum - 06-06-2012, 02:09 PM
Shopping Cart - by El Forum - 06-06-2012, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB