Warnung: Ajax Search EXTENSIONS Magento – Lösung Ajax Cart ersetzen

Heute wieder erneut Probleme bei einem Magento Shop mit eingekauftem Template von templatemonster.com.

Verschiedenen der dort eingebauten Erweiterungen sind sehr problematisch. Dazu zählt “Ajax Cart” von “Ajax Search EXTENSIONS” und “YOUAMA -Youama Ajax Login and Register”

Daher hier der deutlich Hinweis: Auf jegliche Art von Erweiterungen bei Magento am Besten verzichten!

Unten die Lösung um das Ajax Cart loszuwerden und einen funktionierenden Warenkorb zu erhalten. Der Support von http://templatemonster.com/ ist dort zum Glück super schnell und hilft einem da gut weiter.

Ajax Cart” von “Ajax Search EXTENSIONS

Die besagte Extension sieht soweit hübsch aus. Hat aber den riesen Nachteil, dass diese kein Error Handling hat, wenn die Bestellmenge höher ist als die Lagermenge. Dann passiert einfach Nichts.

Weiter sehr problematisch die YOUAMA -Youama Ajax Login and Register Erweiterung.

Diese erlaubt es nicht, dass ein Kunde erst seine E-Mail bestätigen muss, bevor der Kundenaccount aktiv gesetzt wird. Obwohl dies eine Standardfunktion von Magento ist. Jede Registierung über diese Erweiterung führt leider automatisch dazu, dass der Kundenaccount freigeschaltet ist. Das öffnet Missbrauch Tür und Tor, da so Kunden mit Fake-Emails bestellen können.

 

Lösung Ajax Cart ersetzen:

(1) Ajax Cart im Backend deaktivieren

System -> Ajax Search EXTENSIONS -> Ayax Cart

und dort “enable ajaxcart” auf nein setzen

(2) sidebar_header.phtml modifizieren

Hier die korrigierte sidebar_header.phtml welche ich vom templatemonster Support erhalten habe.

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-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    design
* @package     base_default
* @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
* @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/

/**
* Shoping cart sidebar
*
* @see Mage_Checkout_Block_Cart_Sidebar
*/

?>
<div class=”block-cart-header head-icon-menu”>
<?php $_cartQty = $this->getSummaryCount() ?>
<!–  <h3><?php /*echo $this->__(‘My Cart’)*/ ?>:</h3> –>
<div class=”block-content”>
<?php if ($_cartQty>0): ?>
<div class=”summary”>
<?php if ($_cartQty==1): ?>
<p><?php echo $this->__(‘<strong title=”%s”>%s</strong>’, $this->getUrl(‘checkout/cart’), $_cartQty) ?> </p>
<?php else: ?>
<p><?php echo $this->__(‘<strong title=”%s”>%s</strong>’, $this->getUrl(‘checkout/cart’), $_cartQty) ?> </p>
<?php endif ?>
</div>
<div class=”cart-content”>
<div class=”cart-indent”>
<div class=”cart-content-header”>
<p class=”subtotal”>
<?php if ($this->canApplyMsrp()): ?>
<span class=”map-cart-sidebar-total”><?php echo $this->__(‘ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER’); ?></span>
<?php else: ?>
<span class=”label”><?php echo $this->__(‘Cart Subtotal:’) ?></span> <?php echo Mage::helper(‘checkout’)->formatPrice($this->getSubtotal()) ?>
<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
<br />(<?php echo Mage::helper(‘checkout’)->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper(‘tax’)->getIncExcText(true) ?>)
<?php endif; ?>
<?php endif; ?>
</p>
<?php endif ?>
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
<?php endif ?>
<?php $_items = $this->getRecentItems() ?>
<?php if(count($_items)): ?>
<p class=”block-subtitle”><?php echo $this->__(‘Recently added item(s)’) ?></p>
</div>
<ol id=”cart-sidebar” class=”mini-products-list”>
<?php foreach($_items as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endforeach; ?>
</ol>
<div class=”actions”>
<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>
<button type=”button” title=”<?php echo $this->__(‘My Cart’) ?>” class=”button” onclick=”setLocation(‘<?php echo $this->getUrl(‘checkout/cart’) ?>’)”><span><span><?php echo $this->__(‘My Cart’) ?></span></span></button>
</div>
<script type=”text/javascript”>decorateList(‘cart-sidebar’, ‘none-recursive’)</script>
</div>
</div>
<p class=”mini-cart”><?php echo $this->__(‘<strong title=”%s”>%s</strong>’, $this->getUrl(‘checkout/cart’), $_cartQty) ?> </p>
<?php else: ?>
<div class=”empty”>
<div><?php echo $this->__(‘0’) ?></div>
<div class=”cart-content”>
<?php echo $this->__(‘You have no items in your shopping cart.’) ?>
</div>
</div>
<p class=”mini-cart”><strong>0</strong></p>
<?php endif ?>
</div>
</div>

(3)  CSS einfügen

Hier der CSS Code auch vom templatemonster support

/* shopping cart */

.block-cart-header {
float:right;
clear: right;
position:relative;
cursor: pointer;
}
.block-cart-header:before {
content:”\f07a”;
font-size: 28px;
float: left;
}
.block-cart-header .block-content:before {content:”\xf07a”; display: none; }
.block-cart-header.active .block-content:before {color: #f12a2d;}
.block-cart-header h3{
font-size:15px;
line-height: 20px;
color: #012338;
text-transform: uppercase;
font-weight: normal;
float: left;
margin: 0 5px 0 0;
}
.block-cart-header .subtotal {color: #000; font-size: 14px;}
.block-cart-header p {}
.block-cart-header .summary:hover,
.block-cart-header .empty:hover {cursor:pointer;}
.block-cart-header .btn-remove,
.block-cart-header .btn-edit { float:right; margin: 0 5px 0 0;  }
.block-cart-header .truncated {display:none;}
.block-cart-header .cart-content{
box-shadow: 0 0px 21px rgba(0,0,0,0.11);
-webkit-box-shadow: 0 0px 21px rgba(0,0,0,0.11);
position:absolute;
right:0;
top:43px;
z-index:9;
min-width:280px;
width: 100%;
display:none;
cursor:default;
text-transform: none;
line-height: 20px;
text-align: left;
}
.block-cart-header .empty .cart-content {
background:#fff;
padding:10px;
color:#000;
box-shadow: 0 0px 21px rgba(0,0,0,0.11);
-webkit-box-shadow: 0 0px 21px rgba(0,0,0,0.11);
moz-box-sizing:content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
font-weight: normal;
font-size: 13px;
text-align: left;
}
.block-cart-header .actions { padding:20px 20px 10px; overflow:hidden; background:#fff;}
.block-cart-header .actions button.button {float:left; margin-bottom:10px; margin-right:10px;}
.block-cart-header .actions button.button+button.button {margin-right:0;}
.block-cart-header .mini-products-list li.item {
background: #fff;
box-shadow:inset 0 0px 15px rgba(0,0,0,0.08);
-moz-box-shadow:inset 0 0px 15px rgba(0,0,0,0.08);
-webkit-box-shadow:inset 0 0px 15px rgba(0,0,0,0.08);
border-bottom:1px solid #ececec;
width: 100%;
float: left;
clear:both;
min-height:85px;
padding:20px;
position:relative;
}
.block-cart-header .mini-products-list li.item:first-child {border-top:1px solid #ececec; }
.block-cart-header .mini-products-list .product-image { width:70px; border:1px solid #ededed;}
.block-cart-header .mini-products-list .product-details { margin: 0 0 0 80px; overflow: inherit;}
.block-cart-header .mini-products-list .product-name{ padding-bottom:0px; width:95% !important; overflow: inherit; }
.block-cart-header .cart-content .price{ font-weight:bold; }
.block-cart-header .cart-content-header{ padding:11px 20px; background: #fff;}
.block-cart-header .subtotal .label{ font-weight:normal; padding:0;}
.block-cart-header .subtotal .price { float:right; font-weight:normal;  }
.block-cart-header .mini-cart {display: none;}
.block-cart-header .btn-edit {color: #777777;}
.block-cart-header .btn-edit:hover {color: #ed1111;}

@media only screen and (min-width: 768px) {
.block-cart-header .block-content {float: left;}
.block-cart-header:before {
font-size: 78px;
line-height: 78px;
margin-right: 5px;
color: #7cb119;
}
.block-cart-header .summary,
.block-cart-header .empty {
color: #ffffff;
display: block;
font-size: 21px;
font-weight: bold;
left: 0;
position: absolute;
text-align: center;
text-indent: 5px;
top: 22px;
width: 100%;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.block-cart-header {margin-bottom: 15px;}
}
@media only screen and (max-width: 767px) {
.block-cart-header {
position: absolute;
right: 90px ;
top:-66px;
height: 50px;
padding: 16px 15px 12px 15px;
background: none;
border: 0;
border-left: 1px solid #232323;
z-index: 999;
min-width: 60px;
cursor: pointer;
width: auto;
}
.block-cart-header:after,
.block-cart-header .block-content:before {display: none;}
.block-cart-header:before {font-size: 30px; color: #fff;}
.block-cart-header .block-content {float: left;}
.block-cart-header .mini-cart {display: inline-block; font-size: 16px; padding-left: 13px; color: #fff;}
.block-cart-header .cart-content {left: -152px; top: 51px;}
.block-cart-header h3,
.block-cart-header .empty > div,
.block-cart-header .summary {display: none;}
.block-cart-header .mini-products-list .product-image {width: 35px;}
.block-cart-header .mini-products-list .product-control-buttons {position: absolute; right: 0;}
.block-cart-header .mini-products-list li.item {padding: 10px 40px 10px 10px;}
.block-cart-header .mini-products-list .product-details {margin-left: 45px;}
.block-cart-header .mini-products-list .product-name{ width:80% !important;  overflow: hidden; }
.block-cart-header .actions {padding: 10px 10px 0;}
.block-cart-header button.button span span {padding: 5px 13px; font-size: 12px; }
}

@media only screen and (max-width: 460px) {
.block-cart-header .cart-content {left: -120px;}
.block-cart-header {border: 0;}
}
/* shopping cart */

(4) bei Bedarf JS anpassen scripts.js (falls sich bei Klick auf den Warenkorb nichts tut)

\skin\frontend\dein Template\dein Template\js\scripts.js

Dort gibt es folgenden Skript-Teil

jQuery(‘.top-container .block-cart-header ‘).click(function(){
jQuery(‘.block-cart-header .cart-content’).stop(true, true).slideToggle(300);
jQuery(this).toggleClass(‘active’);
return false
});

Dort muss je nach Aufbau des Templates noch die Klasse angepasst werden. Teilweise ist es “.header” in meinem Fall “.top-container”

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.