Cart is not working probarly in custom theme
Posted: Thu Apr 08, 2021 9:32 pm
Hey guys!
I'm facing some problems with my cart, it does not update correctly when removing an product it's giving another interface.
So here is my code.
When removing my product i get fallowing after update
Have also changed in the common.js
The image does not fetch
also i would like to get this part removed
(0 produkt(er) - 0 kr) and only keep the value of (0 kr)
The correct tanslate would be for english (0 products - 0 euro)
Thank you guys in advance!
I'm facing some problems with my cart, it does not update correctly when removing an product it's giving another interface.
So here is my code.
Code: Select all
<div id="cart" class="btn-group">
<button type="button" data-toggle="dropdown" data-loading-text="Loading..." class="btn btn-inverse btn-lg dropdown-toggle">
<div class="float-left">
<img src="catalog/view/theme/2020/image/cart.svg" alt="cart">
<sup id="cart-products">0</sup> </div>
<span id="cart-total" class="nowrap">
<span class="slash hidden-md hidden-sm hidden-xs" style="
">Varukorg</span>
0 kr</span></button>
<ul class="dropdown-menu pull-right">
<li>
<div class="table empty">
<div class="table-cell"><i class="global-cart"></i></div>
<div class="table-cell">Din varukorg är tom!</div>
</div>
</li>
</ul>
</div>
When removing my product i get fallowing after update
Code: Select all
<div id="cart" class="btn-group">
<button type="button" data-toggle="dropdown" data-loading-text="Loading..." class="btn btn-inverse btn-lg dropdown-toggle" aria-expanded="false"><sup id="cart-products"></sup><span id="cart-total" class="nowrap"> <span class="slash"><span class="slash">Varukorg</span>0 produkt(er) - 0 kr</span></span></button>
<ul class="dropdown-menu pull-right"><li>
<div class="table empty">
<div class="table-cell"><i class="global-cart"></i></div>
<div class="table-cell">Din varukorg är tom!</div>
</div>
</li></ul>
</div>
Code: Select all
$('#cart > button').html('<img src="catalog/view/theme/2020/image/cart.svg" alt="cart"><sup id="cart-products"></sup><span id="cart-total" class="nowrap"> <span class="slash"></span>' + json['total'] + '</span>');
also i would like to get this part removed
(0 produkt(er) - 0 kr) and only keep the value of (0 kr)
The correct tanslate would be for english (0 products - 0 euro)
Thank you guys in advance!