Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Calculating the sub total and the total quanity for the simple shopping cart

by

Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple Shopping Cart Tweaks › Calculating the sub total and the total quanity for the simple shopping cart

Tagged: calculate sub total

  • This topic has 0 replies, 1 voice, and was last updated 12 years, 11 months ago by amin007.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • April 20, 2010 at 7:55 am #1094
    amin007
    Participant

    You can use the following bit of code to calculate the sub total and the quantity and use it anywhere on your theme:

    foreach ($_SESSION['simpleCart'] as $item)
    {
    $sub_total += $item['price'] * $item['quantity'];
    $total_items += $item['quantity'];
    }
    echo "Sub Total: ".$sub_total ;
    echo "<br />Total Items: ".$total_items;

  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ