Warenkorb in Sidebar auf Startseite entfernen

      Warenkorb in Sidebar auf Startseite entfernen

      Ich würde gerne den Warenkorb in der Sidebar nur angezeigt haben, falls sich Produkte im Warenkobr befinden.
      Es gibt dazu schon einen thread rackspeed.de/forum/magento-fra…ure-entfernen-168#post705

      Hat aber leider bei mir noch nicht geklappt, da ich nicht exakt weiß wie ich sidebar.phml anpassen soll.

      Im Moment sieht es so aus:

      PHP-Quellcode

      1. ?>
      2. <?php if ($this->getIsNeedToDisplaySideBar()):?>
      3. <div class="block block-cart">
      4. <?php $_cartQty = $this->getSummaryCount() ?>
      5. <div class="block-title">
      6. <strong><span><?php echo $this->__('My Cart') ?></span></strong>
      7. </div>
      8. <div class="block-content">
      9. <?php if ($_cartQty>0): ?>
      10. <div class="summary">
      11. <?php if ($_cartQty==1): ?>
      12. <p class="amount"><?php echo $this->__('There is <a href="%s">1 item</a> in your cart.', $this->getUrl('checkout/cart')) ?></p>
      13. <?php else: ?>
      14. <p class="amount"><?php echo $this->__('There are <a href="%s">%s items</a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?></p>
      15. <?php endif ?>
      16. <p class="subtotal">
      17. <span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
      18. <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
      19. <br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
      20. <?php endif; ?>
      21. </p>
      22. </div>
      23. <?php endif ?>
      24. <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
      25. <div class="actions">
      26. <?php echo $this->getChildHtml('extra_actions') ?>
      27. <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
      28. </div>
      29. <?php endif ?>
      30. <?php $_items = $this->getRecentItems() ?>
      31. <?php if(count($_items)): ?>
      32. <p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
      33. <ol id="cart-sidebar" class="mini-products-list">
      34. <?php foreach($_items as $_item): ?>
      35. <?php echo $this->getItemHtml($_item) ?>
      36. <?php endforeach; ?>
      37. </ol>
      38. <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
      39. <?php else: ?>
      40. <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
      41. <?php endif ?>
      42. </div>
      43. </div>
      44. <?php endif;?>


      Storefront: Onlineshop für TCM, Heilpraxis & Wohlbefinden | Fuchsbau

      Dankeschön
      Ich kann es aktuell nicht testen aber folgendes müsste funktionieren:

      PHP-Quellcode

      1. <?php if ($this->getIsNeedToDisplaySideBar()):?>
      2. <?php $_cartQty = $this->getSummaryCount() ?>
      3. <?php if ($_cartQty>0): ?>
      4. <div class="block block-cart">
      5. <div class="block-title">
      6. <strong><span><?php echo $this->__('My Cart') ?></span></strong>
      7. </div>
      8. <div class="block-content">
      9. <div class="summary">
      10. <?php if ($_cartQty==1): ?>
      11. <p class="amount"><?php echo $this->__('There is <a href="%s">1 item</a> in your cart.', $this->getUrl('checkout/cart')) ?></p>
      12. <?php else: ?>
      13. <p class="amount"><?php echo $this->__('There are <a href="%s">%s items</a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?></p>
      14. <?php endif ?>
      15. <p class="subtotal">
      16. <span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
      17. <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
      18. <br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
      19. <?php endif; ?>
      20. </p>
      21. </div>
      22. <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
      23. <div class="actions">
      24. <?php echo $this->getChildHtml('extra_actions') ?>
      25. <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
      26. </div>
      27. <?php endif ?>
      28. <?php $_items = $this->getRecentItems() ?>
      29. <?php if(count($_items)): ?>
      30. <p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
      31. <ol id="cart-sidebar" class="mini-products-list">
      32. <?php foreach($_items as $_item): ?>
      33. <?php echo $this->getItemHtml($_item) ?>
      34. <?php endforeach; ?>
      35. </ol>
      36. <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
      37. <?php else: ?>
      38. <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
      39. <?php endif ?>
      40. </div>
      41. </div>
      42. <?php endif ?>
      43. <?php endif;?>
      Magento Hosting | Cloud Server | Shopware Hosting | Elasticsearch Hosting
      Unsere Hosting-Lösungen nutzen ultraschnelle SSDs und sind jederzeit skalierbar.