I want to add to the header "Number of Items in Cart " function to show: shopping cart: 0 items $0.00. Please advise
I want to add to the header "Number of Items in Cart " function to show: shopping cart: 0 items $0.00. Please advise
There is already a setting for the shopping_cart page to show totals ...
Check your setting in the Configuration ... Layout Settings ...
Shopping Cart - Show Totals
Show Totals Above Shopping Cart?
0= off
1= on: Items Weight Amount
2= on: Items Weight Amount, but no weight when 0
3= on: Items Amount
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I am not talking about the side box, I want the script to add to site_header file that will include the items in cart function
That is not for the sidebox that is for the shopping cart page ...
The header_php.php file for the shopping_cart has the following information in how it builds the totals that are displayed at the top of that page that may help you ...
Code:/* $shipping_weight = 0; require(DIR_WS_CLASSES . 'order.php'); $order = new order; require_once('includes/classes/http_client.php'); // shipping in basket $total_weight = $_SESSION['cart']->show_weight(); $total_count = $_SESSION['cart']->count_contents(); require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; $quotes = $shipping_modules->quote(); */ $totalsDisplay = ''; switch (true) { case (SHOW_TOTALS_IN_CART == '1'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; case (SHOW_TOTALS_IN_CART == '2'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . ($shipping_weight > 0 ? TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT : '') . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; case (SHOW_TOTALS_IN_CART == '3'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Again I ma not talking about the shopping cart page itself, but the header of the site, If you look at the attached image you'll see in the header right below the search a line that says:
shopping cart: 0 items $0.00
That is the function I want to add to my header, thanks again
And I just gave you the code that is used on the shopping_cart page that you could use in the header of your shop and customize it to always show the shopping cart totals ...
Other than write all the code for you and load it to your site ... what is missing here?![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I am sorry, I did not make myself clear. In the admin portion there is a space under: Design-> Upload Design Date called Design Banner 1: I need the actual script that will pull the info I wanted as in the image to show the items in cart etc. I entered a script for the search box and I need one for the cart items one.
The script you gave me I have already, but I need a way to pull that info and present it in the header
I posted the code above that contains the explination of the code and 3 different methods to display the Shopping Cart Totals ...
Pick one of the methods that you like, or build your own line of totals from what is in the code, and add it to your customized templates and overrides so it shows in the header file where you want to see it ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!