2

I have achieved to show item number only in the mini cart header with following changes.(OpenCart 2.2.0.0)

catalog/language/<YOUR_LANG>/common/cart.php

Find

"Shopping Cart %s item(s) - %s"

Replace this

"Shopping Cart %s"

Above modification working is fine in default. but, It is not work when add or remove item from mini-cart. Does show default style.

This is work on page load after above our modification.

Shopping Cart: 1

but, I have click on "Add to Cart" button & then add item in minicart. So, it will display again this default style. also, does not work when click on remove button in minicart for remove item from minicart

Shopping Cart: 1 item(s) - $602.00

Any help would be greatly appreciated. Thanks

DigitCart
  • 2,980
  • 2
  • 18
  • 28
HDP
  • 4,005
  • 2
  • 36
  • 58

1 Answers1

2

You have to modify these two file:

catalog/language/Your_lang/common/cart.php
catalog/language/Your_lang/checkout/cart.php

First one is used for default text, and second called for events such add or delete.

DigitCart
  • 2,980
  • 2
  • 18
  • 28
  • I already modify first one. also, Here, I am not talk about Chekout cart page. My issue is, when, I have click on Add To Cart button from Home page. So, It item add in minicart. So, that's time, minicart heading is default style. It will not still display only item. – HDP Jul 17 '16 at 04:36
  • modify above files works for me on any page, including home page, did you try? – DigitCart Jul 17 '16 at 04:45
  • Thanks, I needed this. For OpenCart 3.0.3.2 I figured I need both language files `catalog/language/en-gb/common/cart.php` and `catalog/language/en-gb/checkout/cart.php` to get the same results. – Al John Aug 23 '21 at 19:53
  • @emgx That's great! – DigitCart Aug 25 '21 at 06:39