Подскажите, я использую "умную" корзину, которая подставляет слова в зависимости от кол-ва товара. Раньше она нормально работала с вашим модулем через vqmod, а теперь я вижу что немного изменился код. Вот привожу кусок кода из файла smarty_cart.xml который работал со старой версией вашего модуля :
<file name="catalog/controller/checkout/simplecheckout_cart.php">
<operation>
<search position="replace">
<![CDATA[$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));]]>
</search>
<add>
<![CDATA[
switch (isset($this->request->cookie['language']) && $this->request->cookie['language']) {
case 'ru':
$json['total'] = $this->plural_tool(
$this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0),
$this->currency->format($total),
array('товар','товара','товаров'));
break;
case 'ua':
$json['total'] = $this->plural_tool(
$this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0),
$this->currency->format($total),
array('товар','товару','товарів'));
break;
default:
$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));
}
]]>
</add>
</operation>
</file>
До обновления на версию simple 3.3.0 этот код работал, а теперь в админке в журнале ошибок вижу:
---------- Date: 2012-12-20 18:49:21 ~ IP : ----------
REQUEST URI : /checkout/
MOD DETAILS:
modFile : /var/www/----/data/www/-----.com.ua/vqmod/xml/smarty_cart.xml
id : OCU Smarty Cart
version : 1.5.1
vqmver : 1.2/10.08.2011
author : Eugene Kuligin (a.k.a. Shaman)
SEARCH NOT FOUND (ABORTING MOD): $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));
открываю simplecheckout_cart.php и вижу несколько другой код, который vqmod и не находит:
$current_theme = $this->config->get('config_template');
if ($current_theme == 'shoppica' || $current_theme == 'shoppica2') {
$this->data['cart_total'] = $this->currency->format($total);
} else {
$this->data['cart_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));
}
Подскажите, как правильно мне изменить мой smarty_cart.xml чтобы корзина снова работала.
Спасибо! :)