Fatal error: Class 'Mage_Checkout_Block_Total_Default' not found

aunda

Grünschnabel
Hallo liebe tutorials-Forumler.

Seit Tagen lese ich all diese sehr hilfreichen Threads + Posts. In den meisten Fällen haben Sie mir immer sehr geholfen.

Nun schreibe ich zum 1. Mal selbst hier, da ich absolut ratlos bin.

Folgendes Problem möchte ich kurz schildern:

Ich habe auf der magento/checkout/cart/ Seite keinen zur Kasse-Button mehr, statt dessen kommt an dieser Stelle folgende Fehlermeldung:

Fatal error: Class ‘Mage_Checkout_Block_Total_Default’ not found in magento/app/code/core/Mage/Tax/Block/Checkout/Grandtotal.php on line 33

kann mir jemand Helfen...ich weiß nicht mehr weiter!

Inhalt dieser Datei..!

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Tax
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* Subtotal Total Row Renderer
*
* @author Magento Core Team <core@magentocommerce.com>
*/

class Mage_Tax_Block_Checkout_Shipping extends Mage_Checkout_Block_Total_Default
{
protected $_template = 'tax/checkout/shipping.phtml';

/**
* Check if we need display shipping include and exlude tax
*
* @return bool
*/
public function displayBoth()
{
return Mage::getSingleton('tax/config')->displayCartShippingBoth($this->getStore());
}

/**
* Check if we need display shipping include tax
*
* @return bool
*/
public function displayIncludeTax()
{
return Mage::getSingleton('tax/config')->displayCartShippingInclTax($this->getStore());
}

/**
* Get shipping amount include tax
*
* @return float
*/
public function getShippingIncludeTax()
{
return $this->getTotal()->getAddress()->getShippingInclTax();
}

/**
* Get shipping amount exclude tax
*
* @return float
*/
public function getShippingExcludeTax()
{
return $this->getTotal()->getAddress()->getShippingAmount();
}

/**
* Get label for shipping include tax
*
* @return float
*/
public function getIncludeTaxLabel()
{
return $this->helper('tax')->__('Shipping Incl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
}

/**
* Get label for shipping exclude tax
*
* @return float
*/
public function getExcludeTaxLabel()
{
return $this->helper('tax')->__('Shipping Excl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
}
}


Gruss
Andreas
 
Zuletzt bearbeitet:
Hallo,

bitte fasse den Code nächstes mal in [ php] [/php ] Tags ein, so ist das Ganze viel leichter zu lesen. Habe das mal für dich erledigt:

PHP:
<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_Tax
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * Subtotal Total Row Renderer
 *
 * @author Magento Core Team <core@magentocommerce.com>
 */

class Mage_Tax_Block_Checkout_Shipping extends Mage_Checkout_Block_Total_Default
{
    protected $_template = 'tax/checkout/shipping.phtml';

    /**
     * Check if we need display shipping include and exlude tax
     *
     * @return bool
     */
    public function displayBoth()
    {
        return Mage::getSingleton('tax/config')->displayCartShippingBoth($this->getStore());
    }

    /**
     * Check if we need display shipping include tax
     *
     * @return bool
     */
    public function displayIncludeTax()
    {
        return Mage::getSingleton('tax/config')->displayCartShippingInclTax($this->getStore());
    }

    /**
     * Get shipping amount include tax
     *
     * @return float
     */
    public function getShippingIncludeTax()
    {
        return $this->getTotal()->getAddress()->getShippingInclTax();
    }

    /**
     * Get shipping amount exclude tax
     *
     * @return float
     */
    public function getShippingExcludeTax()
    {
        return $this->getTotal()->getAddress()->getShippingAmount();
    }

    /**
     * Get label for shipping include tax
     *
     * @return float
     */
    public function getIncludeTaxLabel()
    {
        return $this->helper('tax')->__('Shipping Incl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
    }

    /**
     * Get label for shipping exclude tax
     *
     * @return float
     */
    public function getExcludeTaxLabel()
    {
        return $this->helper('tax')->__('Shipping Excl. Tax (%s)', $this->getTotal()->getAddress()->getShippingDescription());
    }
}

Die Fehlermeldung bedeutet übersetzt, dass er eine Klasse nicht finden kann. Hier fehlt der include der Datei mit der Klasse. Da dies schon eine fertige Lösung ist, denke ich nicht dass du da was ändern solltest um Folgefehler zu vermeiden.

Hast du von der Software die aktuellste Version installiert? Falls es sich um einen Bug handelt, wurde dieser vielleicht schon behoben und das Problem löst sich so zu sagen von selber.

Gruß
BK
 
Hallo,

Danke für deine super schnelle Antwort, habe festgestellt das der Ordner Total in Checkout nicht vorhanden war, nur hat sich die fehlermeldung nun geändert

Fatal error: Class 'Mage_Tax_Block_Checkout_Grandtotal' not found in /var/www/web69/html/magento/app/code/core/Mage/Core/Model/Layout.php on line 465

Ich benutze die Version 1.4.1.1

Gruss
Andreas
 
Zurück