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 7071417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:41:07+00:00 2026-05-28T05:41:07+00:00

I am using Magento eCommerce and I have modified my header.phtml via the Blank

  • 0

I am using Magento eCommerce and I have modified my header.phtml via the Blank template. Code, this is my code but it shows blank.

 <?php $cartQty = $this->getSummaryCount() ?>
    <?php if ($cartQty>0): ?>

            <?php if ($cartQty==1): ?>
                <?php echo $this->__('<a class="cartgo" href="%s">(1 ITEM)</a>', $this->getUrl('checkout/cart')) ?>
            <?php else: ?>
                <?php echo $this->__('<a class="cartgo" href="%s">(%s ITEMS)</a>', $this->getUrl('checkout/cart')) ?>
            <?php endif ?>


    <?php endif ?>
  • 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-05-28T05:41:08+00:00Added an answer on May 28, 2026 at 5:41 am

    There was an answer to a link before by someone called SUHUR I think, I was going to reward him with the answer but it seems he deleted his own post?

    He linked to this: http://nothingtopost.wordpress.com/tag/how-to-get-total-cart-item-in-magento/

    I modified my code and this works now on .phtml files.

    <?php
          $count = $this->helper('checkout/cart')->getSummaryCount();  //get total items in cart
          $total = $this->helper('checkout/cart')->getQuote()->getGrandTotal(); //get total price
          if($count==0)
          {
            echo $this->__('<a href="/checkout/cart" class="cartgo">(0 ITEMS)</a>',$count);
          }
          if($count==1)
          {
            echo $this->__('<a href="/checkout/cart" class="cartgo">(1 ITEM)</a>',$count);
          }
          if($count>1)
          {
            echo $this->__('<a href="/checkout/cart" class="cartgo">(%s ITMES)</a>',$count);
          }
          echo $this->__('', $this->helper('core')->formatPrice($total, false));
        ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building a website using a PHP based Ecommerce product Magento. The problem I have
I'm using magento 1.5. I have a requirement to install a third-party ecommerce package.
We are using Magento as our eCommerce platform. We have Oracle apps in which
I am using Magento 1.5 and have around 33,450 products on my site. 32000
I'm trying to create a custom module using Magento's EAV structure and have been
I am developing a payment Module for Magento. I did this using this tutorial
I'm getting all my active special products using this code that I've found somewhere:
I`m using Magento 1.3 and I want to test the new 1.4, but is
The way I am using Magento is like this: We are using Magento admin/dashboard
I am using Magento ver1.5.1. I have the DB in a live serve and

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.