Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
    • Graphic
    • HTML / PHP / CMS
    • Java
    • PL / SQL
    • Magento
    • python
    • Asterisk
    • C / C++
    • JavaScript
    • Json
    • Magento
      • Cache
      • Configuration
        • Address fix
        • Breadcrumb
        • CMS extension
        • Category banner
        • Category mouse over
        • Currency exchange
        • Customer salutation
        • Customi Shop by
        • Delete order
        • Featured items
        • Fix PayPal bug
        • Footer
        • German tax
        • Google +1 Button
        • GoogleAnalytics fix
        • Image Sitemap
        • Language
        • Lightbox
        • Magento Cron
        • Magento SQLs
        • Magento
        • Magento product back button
        • Market Ready Germany
        • Move Cart to Header
        • Multistore 404 Fix
        • Newsletter import
        • NoRegion
        • PayPal
        • Price on request
        • Redirect language
        • Reflection
        • Remove Add to compare
        • Search by Category
        • Session timeout
        • Set featured products
        • Shadowbox
        • Terms and Conditions
        • Theme
        • Top category offer
        • Update core config data
        • Update footer year
        • Update free shipping
        • Upload field
        • VertNav
        • formal customer name
        • local.xml
        • magento_easy_flags
        • proceed to checkout button
        • recently viewed
        • wishlist
      • Database select
      • Delete unused product images
      • Erase credit card
      • Installation
      • Java Connector
      • Magento code snippet
      • mkMagentoDump.sh
      • snippets
    • OpenOffice / LibreOffice
    • Perl
    • Postfix
    • Regular Expression
    • TLA
    • Tomcat
    • Zenity
    • bash
    • find
    • git
    • ofbiz
    • wildfly
    • xml
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
# xml config
<?xml version="1.0" encoding="UTF-8"?>














# header
./app/design/frontend/default/default/template/page/html/header.phtml
add
<?php echo $this->getChildHtml('topCart')?>


# style
./skin/frontend/default/default/css/styles.css
add
.header .block-cart {
   width:195px;
   float:right;
   margin-bottom:0px;
}

.block-cart .block-content {
    border: none;
    -moz-box-shadow: 0px 0px 0px #0C0C0C;
    background: #E4DFD4;
    height: 47px;
}

.block-cart .amount {
    color:#000000;
    padding-top: 4px;
    text-align: center;
}

.block-cart .summary {
    background:none repeat scroll 0 0 #E4DFD4;
    color:#fff;
    padding: 2px 8px 4px;
}

.block-cart .subtotal {
    background:none repeat scroll 0 0 #470615;
}

# translation
sed -i 's|,"Zum Warenkorb"|,"Warenkorb anzeigen"|g' ./app/locale/de_DE/Mage_Customer.csv
sed -i 's|,"Vers le panier"|,"Consulter panier"|g' ./app/locale/fr_FR/Mage_Customer.csv
sed -i 's|,"Régler mes achats"|,"Caisse"|g' ./app/locale/fr_FR/Mage_Checkout.csv

# ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml
<?php
/**
 * ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml
 *
 * based on ./app/design/frontend/base/default/template/checkout/cart/sidebar.phtml
 */
?>
<div>
    <?php $_cartQty = $this->getSummaryCount() ?>
    <div>
        <strong><span><?php echo $this->__('My Cart') ?></span></strong>
    </div>
    <div>
    <?php if ($_cartQty > 0): ?>
        <div>

                <a>getUrl('checkout/cart'); ?>">
                <?php echo $_cartQty . ' '; ?>
                <?php if ($_cartQty == 1): ?>
                    <?php echo $this->__('Item') ?>
                <?php else: ?>
                    <?php echo $this->__('Items') ?>
                <?php endif ?>
                |
                <?php echo $this->__('Total') ?>: <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
                </a>


                <a>getUrl('checkout/cart'); ?>"><?php echo $this->__('To Cart') ?></a> | 
                <a>getUrl('checkout'); ?>"><?php echo $this->__('Checkout') ?></a>

        </div>
    <?php else: ?>
        <?php echo $this->__('You have no items in your shopping cart.') ?>
    <?php endif ?>
    </div>
</div>

execute this:
mkdir -p ./app/design/frontend/default/default/template/checkout/cart
wget http://www.panticz.de/sites/default/files/magento/cart/topbar.phtml -O ./app/design/frontend/default/default/template/checkout/cart/topbar.phtml


# OPTIONAL: HowTo edit Wishlist
mkdir -p  code/local/Mage/Wishlist/Block
cp ./app/code/core/Mage/Wishlist/Block/Links.php ./app/code/local/Mage/Wishlist/Block/Links.php


# Links
http://www.magentocommerce.com/boards/viewthread/13046/
http://shamimcse05.wordpress.com/2010/12/23/how-to-get-total-cart-item-and-total-price-in-magento/
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung