Post by danielmedia74 » 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.

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>
Have also changed in the common.js

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>');
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!

Newbie

Posts

Joined
Thu Apr 08, 2021 9:21 pm

Post by paulfeakins » Fri Apr 09, 2021 6:32 pm

Your theme seems to be called 2020 and perhaps it's the problem. You should ask the theme developer.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by danielmedia74 » Sun Apr 11, 2021 10:16 am

paulfeakins wrote:
Fri Apr 09, 2021 6:32 pm
Your theme seems to be called 2020 and perhaps it's the problem. You should ask the theme developer.
Yea i know, i just want it to keep the same layout after removal of the product from cart, as it refresh and add a new layout.

Newbie

Posts

Joined
Thu Apr 08, 2021 9:21 pm

Post by straightlight » Sun Apr 11, 2021 10:24 am


Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Bing [Bot] and 258 guests