سؤال

I need to convert the cart icon having the following CSS

.minicart-wrapper .action.showcart:before{
font-size: 35px;
line-height: 33px;
color: #8f8f8f;
content: '\e611';
font-family: 'icons-blank-theme';
margin: 0;
vertical-align: top;
display: inline-block;}

current icon

into simple text like Cart(0) convert it into text

هل كانت مفيدة؟

المحلول

You can hide icon using CSS, please don't remove the class action show cart from your override phtml file i.e <a class="action showcart" href="<?= $block->escapeUrl($block->getShoppingCartUrl()) ?>" it will remove the icon but pop up will not open.

please try the below CSS to remove cart icon.

.minicart-wrapper .action.showcart::before,
.minicart-wrapper .action.showcart.active::before{
    display: none;
}

نصائح أخرى

The CSS property content is creating a cart icon just remove it

.minicart-wrapper .action.showcart:before{
font-size: 35px;
line-height: 33px;
color: #8f8f8f;
font-family: 'icons-blank-theme';
margin: 0;
vertical-align: top;
display: inline-block;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top