Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

error in application.php in while using session


nidhitiwari

Recommended Posts

Posted

i use this code in includes/application_top.php , to store front and back images in session. // code to add the product images in session

if(isset($_SESSION['cart']['contents'][$qty]))

{

//$_SESSION['qty'] = $HTTP_POST_VARS['qty'];

$_SESSION['front_image']=$HTTP_POST_VARS['front_image'];

$_SESSION['back_image']=$HTTP_POST_VARS['back_image'];

 

}

 

but i got an error

Cannot use object of type shoppingCart as array in D:\nidhi\xampp\htdocs\printmaza\includes\application_top.php on line 388

plz reply me soon..

Sonal

Posted

Cart is not an array but an object.

 

Here you have

($_SESSION['cart']['contents'][$qty])).

 

which is possible will cart is an array.

you need to use cart class functions to do this checks.

 

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...