Всё. Сам разобрался уже.
Делается это так:
1) В catalog/view/theme/default/template/common/header.tpl вставляем div корзины куда Вам нужно с кодом:
<div id="cart_in_header">
<?php
$cart_number = $this->cart->countProducts();
if ($cart_number == 0) {echo $text_items1;}
else if ($cart_number == 1) {echo $text_items2;}
else if ($cart_number == 2) {echo $text_items3;}
else if ($cart_number == 3) {echo $text_items3;}
else if ($cart_number == 4) {echo $text_items3;}
else {echo $text_items4;}
?>
</div>
2) В catalog/controller/common/header.php вставляем после:
$this->data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
следующие строки:
$this->data['text_items1'] = sprintf($this->language->get('text_items1'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$this->data['text_items2'] = sprintf($this->language->get('text_items2'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$this->data['text_items3'] = sprintf($this->language->get('text_items3'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$this->data['text_items4'] = sprintf($this->language->get('text_items4'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
3) В catalog/language/russian/common/header.php добавляем:
$_['text_items1'] = 'В корзине пусто';
$_['text_items2'] = 'В корзине %s товар на сумму %s';
$_['text_items3'] = 'В корзине %s товара на сумму %s';
$_['text_items4'] = 'В корзине %s товаров на сумму %s';
4) В catalog/controller/checkout/cart.php вставляем после:
$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
вот это:
$pusto = sprintf($this->language->get('text_items1'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$odintovar = sprintf($this->language->get('text_items2'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$dvatovara = sprintf($this->language->get('text_items3'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$mnogotovarov = sprintf($this->language->get('text_items4'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
$cart_number = $this->cart->countProducts();
if ($cart_number == 0){
$json['summa'] = $pusto;}
else if ($cart_number == 1){
$json['summa'] = $odintovar;}
else if ($cart_number == 2){
$json['summa'] = $dvatovara;}
else if ($cart_number == 3){
$json['summa'] = $dvatovara;}
else if ($cart_number == 4){
$json['summa'] = $dvatovara;}
else{
$json['summa'] = $mnogotovarov;}
5) В catalog/language/russian/checkout/cart.php добавляем:
$_['text_items1'] = 'В корзине пусто';
$_['text_items2'] = 'В корзине %s товар на сумму %s';
$_['text_items3'] = 'В корзине %s товара на сумму %s';
$_['text_items4'] = 'В корзине %s товаров на сумму %s';
6) В catalog/view/javascript/common.js добавляем в двух местах после:
$('#cart_total').html(json['total']);
вот это:
$('#cart_in_header').html(json['summa']);