Post by PaAl » Thu Jul 15, 2021 5:28 am

Hi
I have a strange issue when try to change the cart icon on opencart 3.0.3.7.
if add a ne item in the cart, randomly the icon is not showing correctly but come back in the original default theme icon

Code: Select all

<i class="fa fa-shopping-cart"></i>
instead of my personal code

Code: Select all

<span class="material-icons-outlined">local_grocery_store</span>
i have made the change in default theme cart.twig, common.js and default css, with an opencart clean installation, this issue show up when jquery update html page (if the page is refreshed after adding the icon is showing correctly) but "index.php?route=common/cart/info" return the correct html code.

Code: Select all

<div id="cart" class="btn-group btn-block">
  <button type="button" data-toggle="dropdown" data-loading-text="Caricamento in corso..." class="btn toggle"><span class="material-icons-outlined">local_grocery_store</span><span id="cart-total">1</span></button>
     ....  
i have tried to clear chrome cache, opencart cache, disable opcache, clear nginx cache and disable sendfile on nginx.conf but with no result.

is possible to try this on this page, adding red camera on cart https://agricolalechiocciole.com/index. ... duct_id=30

Newbie

Posts

Joined
Thu Jul 15, 2021 4:52 am

Post by PaAl » Fri Jul 16, 2021 6:23 pm

I found the solution, I write it if it happens to others, in "product/product.twig" is necessary to modify the javascript

Code: Select all

				$('#cart > button').html('<span id="cart-total"><span class="material-icons-outlined">local_grocery_store</span> ' + json['total'] + '</span>');
I don't understand the reason of this script, if the correct html code is already passed through jquery, but wok.

Newbie

Posts

Joined
Thu Jul 15, 2021 4:52 am

Post by fairwarning » Tue Jul 20, 2021 2:45 am

I'm new to opencart, and a fresh install recently, version 3.0.3.7, and not live just yet. I just updated the favicon, but did this through the admin>system>settings>image, and replaced the icon image with my websites favicon, converting it to png. This worked for me for all of my pages. Maybe I'm not understanding what you're experiencing. But, will keep this in mind should mine act up.

Newbie

Posts

Joined
Fri Jul 09, 2021 12:33 am
Who is online

Users browsing this forum: No registered users and 125 guests