luxor Posted November 17, 2006 Posted November 17, 2006 I would like to have a text output of the cart quanity and total $ amount currently in the cart on every page of site. Is it in a cookie, or is it in a database table? If it's in a database table, which table is it? how would you pull the proper data for the current user? using the session id?....
luxor Posted November 17, 2006 Author Posted November 17, 2006 by the way, the site is outside osc folder, using sts template.
Guest Posted November 17, 2006 Posted November 17, 2006 The info is in the $cart object - you can show them like this: Quantity: <?php echo $cart->count_contents(); ?> Total: <?php echo $currencies->format($cart->show_total()); ?> Sonia
luxor Posted November 17, 2006 Author Posted November 17, 2006 thanks for reply. when i place that code i get the following error: Fatal error: Call to a member function on a non-object in public_html/nov/root/top_below_bar.php on line 13 which includes do i need?
Guest Posted November 17, 2006 Posted November 17, 2006 Sorry - I dont need to use STS, so am not familiar with it. That code works fine in a standard osCommerce. Sonia
Guest Posted November 17, 2006 Posted November 17, 2006 you need to call application_top-php into your file to use the osCommerce classes and functions (and session) require('includes/application_top.php'); Sonia
luxor Posted November 17, 2006 Author Posted November 17, 2006 yes this should do it, but my site files where i need to show cart info are outside the osc dir. so the include files that are found in the application_top php are not being loaded with adsolute directory path. I did try to make every include absolute. However, it's seem like an endless operation to make the include files inside these included files absolute as well.
Guest Posted November 17, 2006 Posted November 17, 2006 Would it not be simpler to move your files? Sonia
Recommended Posts
Archived
This topic is now archived and is closed to further replies.