Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8340275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:08:11+00:00 2026-06-09T05:08:11+00:00

How can i get total value in cart without flat rate? That means by

  • 0

How can i get total value in cart without flat rate?

That means by using this code:

$totals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();

i got each products sub total.

So i used this code:

$subtotal = $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); 

now i got the total value that included the flat-rate also.

for example:

here i got 35 as total but this include 20 product price + 15 flat-rate.

So i want to get only the total of all products price in carts.

How can i get this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:08:12+00:00Added an answer on June 9, 2026 at 5:08 am

    you want to get the subtotal then

    Mage::getSingleton('checkout/cart')->getQuote()->getSubtotal(); 
    

    don’t be afraid to use xdebug and debugging sessions within your IDE to observe what values the variables have inside objects. Simplest way to see what you need is to dump variables to display like

    print_r(Mage::getSingleton('checkout/cart')->getQuote()->getData()); 
    

    and just see which variable has the value you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this code for add cart to payment. while clicking buttons that
How can I get the total physical memory in bytes of my Linux PC?
Hey. How can I get a total number of rows in a file (do
For some reason i can't get the variable 'total' to define at all... I
Can get all triples with value null in specific field? All people with date_of_birth
I can get this to work: [<DllImport(user32.dll)>] extern bool GetClientRect(nativeint, RECT*) let getClientRect hwnd
You can get a list of databases using PRAGMA database_list or a list of
When I want get total value of memory in C# I found a kernel32
I have a Total value that I need to distribute among several rows in
How can I get the total minute for sql datetime? Let's say: select getdate()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.