Mit der neuesten Version (1.2.3) von German Setup Magento kommt ein kleines Problem für alle Shopbetreiber, die einen Shop haben, der Preise im Frontend zuzüglich Mehrwertsteuer und Versand anzeigt. Hinter dem Preis steht nur
Zzgl. %s MwSt., zzgl. Versandkosten
Die Preisinformationen kommen aus der price_info.phtml welche im Ordner app/design/frontend/base/default/template/germansetup zu finden ist. Diese veränderte sich von der vorigen Version zu dieser ein wenig. In der letzten Version war das Problem noch nicht vorhanden.
Eine schnelle und unkomplizierte Möglichkeit das Problem zu lösen, ist die alte price_info.phtml zu verwenden.
Die neue Version enthält folgenden Code:
<?php $shippingCostUrl = Mage::helper( 'germansetup' )->getShippingCostUrl() ?> <?php if( !empty( $shippingCostUrl ) && $this->getIsShowShippingLink() ): ?> <?php if( $this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX ): ?> <?php if( $this->getIsIncludingShippingCosts() ): ?> <span class="tax-details"><?php echo $this->__( 'Excl. %s Tax', $this->getFormattedTaxRate() ) ?><span class="tax-separator">, </span><span class="shipping-cost-details"><?php echo $this->__( 'incl. <a href="%s">Shipping Cost</a>', $shippingCostUrl ) ?></span> <?php else: ?> <span class="tax-details"><?php echo $this->__( 'Excl. %s Tax' ) ?><span class="tax-separator">, </span><span class="shipping-cost-details"><?php echo $this->__( 'excl. <a href="%s">Shipping Cost</a>', $shippingCostUrl ) ?></span> <?php endif ?> <?php elseif( $this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX ): ?> <?php if( $this->getIsIncludingShippingCosts() ): ?> <span class="tax-details"><?php echo $this->__( 'Incl. %s Tax', $this->getFormattedTaxRate() ) ?><span class="tax-separator">, </span><span class="shipping-cost-details"><?php echo $this->__( 'incl. <a href="%s">Shipping Cost</a>', $shippingCostUrl ) ?></span> <?php else: ?> <span class="tax-details"><?php echo $this->__( 'Incl. %s Tax', $this->getFormattedTaxRate() ) ?><span class="tax-separator">, </span><span class="shipping-cost-details"><?php echo $this->__( 'excl. <a href="%s">Shipping Cost</a>', $shippingCostUrl ) ?></span> <?php endif ?> <?php elseif( $this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH ): ?> <?php if( $this->getIsIncludingShippingCosts() ): ?> <span class="tax-details"><?php echo $this->__('incl. <a href="%s">Shipping Cost</a>', $shippingCostUrl) ?></span> <?php else: ?> <span class="tax-details"><?php echo $this->__('excl. <a href="%s">Shipping Cost</a>', $shippingCostUrl) ?></span> <?php endif ?> <?php endif ?> <?php if ($this->getIsShowWeightInfo()): ?> (<?php echo $this->__('Shipping Weight %s', $this->getFormattedWeight()) ?>) <?php endif ?> <?php else: ?> <?php if( $this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX ): ?> <span class="tax-details"><?php echo $this->__( 'Excl. %s Tax', $this->getFormattedTaxRate() ) ?></span> <?php elseif( $this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX ): ?> <span class="tax-details"><?php echo $this->__( 'Incl. %s Tax', $this->getFormattedTaxRate() ) ?></span> <?php endif ?> <?php endif ?>
Die alte Version diesen:
<?php $shippingCostUrl = Mage::helper('germansetup')->getShippingCostUrl() ?> <?php if (!empty($shippingCostUrl) && $this->getIsShowShippingLink()): ?> <?php if ($this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX): ?> <?php if ($this->getIsIncludingShippingCosts()): ?> <span class="tax-details"><?php echo $this->__('Excl. %s Tax, incl. <a href="%s">Shipping Cost</a>', $this->getFormattedTaxRate(), $shippingCostUrl) ?></span> <?php else: ?> <span class="tax-details"><?php echo $this->__('Excl. %s Tax, excl. <a href="%s">Shipping Cost</a>', $this->getFormattedTaxRate(), $shippingCostUrl) ?></span> <?php endif ?> <?php elseif ($this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX): ?> <?php if ($this->getIsIncludingShippingCosts()): ?> <span class="tax-details"><?php echo $this->__('Incl. %s Tax, incl. <a href="%s">Shipping Cost</a>', $this->getFormattedTaxRate(), $shippingCostUrl) ?></span> <?php else: ?> <span class="tax-details"><?php echo $this->__('Incl. %s Tax, excl. <a href="%s">Shipping Cost</a>', $this->getFormattedTaxRate(), $shippingCostUrl) ?></span> <?php endif ?> <?php endif ?> <?php else: ?> <?php if ($this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX): ?> <span class="tax-details"><?php echo $this->__('Excl. %s Tax', $this->getFormattedTaxRate()) ?></span> <?php elseif ($this->getIsIncludingTax() == Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX): ?> <span class="tax-details"><?php echo $this->__('Incl. %s Tax', $this->getFormattedTaxRate()) ?></span> <?php endif ?> <?php endif ?>
Im direkten Vergleich kann man sehen, dass anscheinend eine schönere Differenzierung von Steuer und Versandkosten angestrebt werden sollte. In der alten Version wurden beide noch zusammen genannt:
Excl. %s Tax, incl. <a href="%s">Shipping Cost</a>
in der neuen Version sind diese getrennt.
Nimmt man also die alte Version, muss noch die deutsche Locale angepasst werden und zwar am besten die FireGento_GermanSetup.csv um die Zeile
"Excl. %s Tax, excl. <a href=""%s"">Shipping Cost</a>","zzgl. %s MwSt., zzgl. <a href=""%s"">Versandkosten</a>"
Dann klappt es bis zum Update von FireGento.
Genutzt in Magento Version 1.7. Fragen, Kommentare, Vorschläge? Gerne direkt oder als Kommentar.
Hat super funktioniert! Vielen Dank! Ich habe Magento 1.7.0.2
Der Fehler ist in der 5. Zeile der Datei:
aus
__( 'Excl. %s Tax' ) ?>, __( 'excl. Shipping Cost', $shippingCostUrl ) ?>
sollte
__( 'Excl. %s Tax', $this->getFormattedTaxRate() ) ?>, __( 'excl. Shipping Cost', $shippingCostUrl ) ?>
werden.
Wie sieht es den aus nach dem Update, kann man die datei einfach so ändern? Wenn der Fehler schon seit einigen Monaten bekannt ist wieso korrigieren das die Jungs nicht und bringen ein update dazu verstehe ich nicht 🙁
Man kann es “so einfach korrigieren” wenn natürlich die Datei später mit einer überschrieben wird, die wieder den Fehler beinhaltet, wäre man erneut beim Problem. Am besten einmal https://github.com/firegento/firegento-germansetup im Auge behalten.
Danke!