*************ШАБЛОН*************
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:hostcms="http://www.hostcms.ru/"
exclude-result-prefixes="hostcms">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8" indent="yes" method="html" omit-xml-declaration="no" version="1.0" media-type="text/xml"/>
<!-- МагазинКорзинаКраткая -->
<xsl

ecimal-format name="my" decimal-separator="," grouping-separator=" "/>
<xsl:template match="/shop">
<div class="mt-cart">
<div class="little-cart-info">
<div class="cart-ico">
<i class="fa fa-shopping-cart"></i>
</div>
<xsl:choose>
<!-- В корзине нет ни одного элемента -->
<xsl:when test="count(shop_cart) = 0">
<div class="empty-cart">
<div>0 товаров — 0 грн.</div>
</div>
</xsl:when>
<xsl:otherwise>
<div class="full-cart">
<div>
<xsl:variable name="totalQuantity" select="sum(shop_cart[postpone = 0]/quantity)" />
<!-- Вывод общих количества, веса и стоимости товаров -->
<xsl:value-of select="$totalQuantity"/>
<xsl:text> </xsl:text><xsl:call-template name="declension"><xsl:with-param name="number" select="$totalQuantity"/></xsl:call-template>
<xsl:text> — </xsl:text><xsl:value-of select="format-number(total_amount, '### ##0,00', 'my'

"/><xsl:text> </xsl:text><xsl:value-of disable-output-escaping="yes" select="shop_currency/name"/>
</div>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="more-cart-info">
<xsl:choose>
<!-- В корзине нет ни одного элемента -->
<xsl:when test="count(shop_cart[postpone = 0]) = 0">
<div class="cart-item-list-empty">В корзине нет ни одного товара</div>
</xsl:when>
<xsl:otherwise>
<div class="cart-item-list">
<xsl:apply-templates select="shop_cart[postpone = 0]/shop_item" />
</div>
<div class="cart-link"><a href="/shop/cart/">В корзину</a><i class="fa fa-long-arrow-right"></i></div>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:template>
<xsl:template match="shop_item">
<div class="cart-item">
<a class="cart-item-image" title="{name}" href="{url}">
<xsl:choose>
<xsl:when test="image_small != ''">
<img alt="{name}" src="{dir}{image_small}" />
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</a>
<div class="cart-item-details">
<div class="cart-item-name">
<a href="{url}"><xsl:value-of disable-output-escaping="yes" select="name"/></a>
</div>
<div class="cart-price">
<xsl:value-of disable-output-escaping="yes" select="price"/><xsl:text> </xsl:text><xsl:value-of disable-output-escaping="yes" select="/shop/shop_currency/name"/>
</div>
</div>
</div>
</xsl:template>
<!-- Склонение после числительных -->
<xsl:template name="declension">
<xsl:param name="number" select="number"/>
<!-- Именительный падеж -->
<xsl:variable name="nominative">
<xsl:text>товар</xsl:text>
</xsl:variable>
<!-- Родительный падеж, единственное число -->
<xsl:variable name="genitive_singular">
<xsl:text>товара</xsl:text>
</xsl:variable>
<xsl:variable name="genitive_plural">
<xsl:text>товаров</xsl:text>
</xsl:variable>
<xsl:variable name="last_digit">
<xsl:value-of select="$number mod 10"/>
</xsl:variable>
<xsl:variable name="last_two_digits">
<xsl:value-of select="$number mod 100"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$last_digit = 1 and $last_two_digits != 11">
<xsl:value-of select="$nominative"/>
</xsl:when>
<xsl:when test="$last_digit = 2 and $last_two_digits != 12 or $last_digit = 3 and $last_two_digits != 13 or $last_digit = 4 and $last_two_digits != 14">
<xsl:value-of select="$genitive_singular"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$genitive_plural"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
***********ТДС****************
<?php
$oShop = Core_Entity::factory('Shop', Core_Array::get(Core_Page::instance()->libParams, 'shopId'

);
// Проверять остаток на складе при добавлении в корзину
$bCheckStock = TRUE;
// ------------------------------------------------
// Обработка формы "Оплата через систему QIWI Кошелек"
// ------------------------------------------------
if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'bill'

{
// Получаем ID заказа
$order_id = intval(Core_Array::getRequest('bill_id'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
return TRUE;
}
}
// ------------------------------------------------
// Обработка запросов от Яндекс.Денег
// ------------------------------------------------
if (isset($_POST['action']) && isset($_POST['invoiceId']) && isset($_POST['orderNumber']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getPost('orderNumber'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
header("Content-type: application/xml"

;
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
}
}
if (isset($_REQUEST['type']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getPost('pay_for'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
header("Content-type: application/xml"

;
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
die();
}
}
// ------------------------------------------------
// Обработка уведомления об оплате от IntellectMoney
// ------------------------------------------------
if (isset($_REQUEST['orderId']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getRequest('orderId'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
}
}
// ------------------------------------------------
// Обработка уведомления об оплате от Interkassa
// ------------------------------------------------
if (isset($_REQUEST['ik_shop_id']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getRequest('ik_payment_id'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
}
}
// ------------------------------------------------
// Обработка уведомления об оплате от ROBOKASSA
// должно быть только в настройках типовой дин. страницы
// ------------------------------------------------
if (isset($_REQUEST['SignatureValue'])
// для отличия от SuccessURL/FailURL
&& !isset($_REQUEST['Culture']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getRequest('InvId'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
}
exit();
}
// ------------------------------------------------
// Обработка уведомления об оплате от PayAnyWay
// ------------------------------------------------
if (isset($_REQUEST['MNT_OPERATION_ID']))
{
// Получаем ID заказа
$order_id = intval(Core_Array::getRequest('MNT_TRANSACTION_ID'

);
$oShop_Order = Core_Entity::factory('Shop_Order'

->find($order_id);
if (!is_null($oShop_Order->id))
{
// Вызов обработчика платежной системы
Shop_Payment_System_Handler::factory($oShop_Order->Shop_Payment_System)
->shopOrder($oShop_Order)
->paymentProcessing();
}
exit();
}
// Добавление товара в корзину
if (Core_Array::getRequest('add'

)
{
$shop_item_id = intval(Core_Array::getRequest('add'

);
if ($shop_item_id)
{
$oShop_Cart_Controller = Shop_Cart_Controller::instance();
$oShop_Cart_Controller
->checkStock($bCheckStock)
->shop_item_id($shop_item_id)
->quantity(Core_Array::getRequest('count', 1))
->add();
}
// Ajax
if (Core_Array::getRequest('_', FALSE))
{
ob_start();
// Краткая корзина
$Shop_Cart_Controller_Show = new Shop_Cart_Controller_Show(
$oShop
);
$Shop_Cart_Controller_Show
->xsl(
Core_Entity::factory('Xsl'

->getByName(
Core_Array::get(Core_Page::instance()->libParams, 'littleCartXsl'

)
)
->couponText(Core_Array::get($_SESSION, 'coupon_text'

)
->show();
echo json_encode(ob_get_clean());
exit();
}
}
if (Core_Array::getGet('action'

== 'repeat'

{
$guid = Core_Array::getGet('guid'

;
if (strlen($guid))
{
$oShop_Order = $oShop->Shop_Orders->getByGuid($guid);
if (!is_null($oShop_Order))
{
$aShop_Order_Items = $oShop_Order->Shop_Order_Items->findAll();
$oShop_Cart_Controller = Shop_Cart_Controller::instance();
foreach ($aShop_Order_Items as $oShop_Order_Item)
{
$oShop_Order_Item->shop_item_id && $oShop_Cart_Controller
->checkStock($bCheckStock)
->shop_item_id($oShop_Order_Item->shop_item_id)
->quantity($oShop_Order_Item->quantity)
->marking($oShop_Order_Item->marking)
->add();
}
}
}
}
if (!is_null(Core_Array::getGet('ajaxLoad'

))
{
$aObjects = array();
if (Core_Array::getGet('shop_country_id'

)
{
$oShop_Country_Location = Core_Entity::factory('Shop_Country_Location'

;
$oShop_Country_Location
->queryBuilder()
->where('shop_country_id', '=', intval(Core_Array::getGet('shop_country_id'

));
$aObjects = $oShop_Country_Location->findAll();
}
elseif (Core_Array::getGet('shop_country_location_id'

)
{
$oShop_Country_Location_City = Core_Entity::factory('Shop_Country_Location_City'

;
$oShop_Country_Location_City
->queryBuilder()
->where('shop_country_location_id', '=', intval(Core_Array::getGet('shop_country_location_id'

));
$aObjects = $oShop_Country_Location_City->findAll();
}
elseif (Core_Array::getGet('shop_country_location_city_id'

)
{
$oShop_Country_Location_City_Area = Core_Entity::factory('Shop_Country_Location_City_Area'

;
$oShop_Country_Location_City_Area
->queryBuilder()
->where('shop_country_location_city_id', '=', intval(Core_Array::getGet('shop_country_location_city_id'

));
$aObjects = $oShop_Country_Location_City_Area->findAll();
}
$aArray = array('…'

;
foreach ($aObjects as $Object)
{
$aArray['_' . $Object->id] = $Object->name;
}
echo json_encode($aArray);
exit();
}
// Удаляение товара из корзины
if (Core_Array::getGet('delete'

)
{
$shop_item_id = intval(Core_Array::getGet('delete'

);
if ($shop_item_id)
{
$oShop_Cart_Controller = Shop_Cart_Controller::instance();
$oShop_Cart_Controller
->shop_item_id($shop_item_id)
->delete();
}
}
// Запоминаем купон
if (!is_null(Core_Array::getRequest('coupon_text'

))
{
$_SESSION['hostcmsOrder']['coupon_text'] = trim(strval(Core_Array::getRequest('coupon_text'

));
}
if (Core_Array::getPost('recount'

|| Core_Array::getPost('step'

== 1)
{
$oShop_Cart_Controller = Shop_Cart_Controller::instance();
$aCart = $oShop_Cart_Controller->getAll($oShop);
// Склад по умолчанию
$oShop_Warehouse = $oShop->Shop_Warehouses->getDefault();
foreach ($aCart as $oShop_Cart)
{
$quantity = Core_Array::getPost('quantity_' . $oShop_Cart->shop_item_id);
// Количество было передано
if (!is_null($quantity))
{
$oShop_Cart_Controller
->checkStock($bCheckStock)
->shop_item_id($oShop_Cart->shop_item_id)
->quantity($quantity)
->postpone(is_null(Core_Array::getPost('postpone_' . $oShop_Cart->shop_item_id)) ? 0 : 1)
->shop_warehouse_id(
Core_Array::getPost('warehouse_' . $oShop_Cart->shop_item_id, !is_null($oShop_Warehouse) ? $oShop_Warehouse->id : 0)
)
->update();
}
}
}
$Shop_Cart_Controller_Show = new Shop_Cart_Controller_Show($oShop);
Core_Page::instance()->object = $Shop_Cart_Controller_Show;
Я СРАВНИЛ ШАБЛОН ТОТ ЧТО БЫЛ И НОВЫЙ АДАПТИВНЫЙ
#little_cart - Это ID
.little_cart - Это класс
но в новом ID нет вообще, а класс корзины называется .little-cart, заменил в .js но не помогло