This is an old revision of the document!
Поюключаем с помощью: cart.php
<?php defined('HOSTCMS') || exit('HostCMS: access denied.'); /** * Kad_Shop_Cart_Userprice_Priceobserver. * @author KAD artem.kuts@gmail.com Core_Event::attach('Shop_Item_Controller.onAfterCalculatePrice', array('Kad_Shop_Cart_Userprice_Priceobserver', 'onAfterCalculatePrice')); * * Копирование и использование файлов модуля * в коммерческих целях ЗАПРЕЩЕНО * */ class Kad_Shop_Cart_Userprice_Priceobserver { static public function onAfterCalculatePrice($object, $params) { $shop_item = $params[0]; if (isset($shop_item->id) && isset($_COOKIE['price_' . $shop_item->id])) { $aPrice = $object->getAPrice(); $aPrice['price_discount'] = $_COOKIE['price_' . $shop_item->id]; $object->setAPrice($aPrice); if (isset($_COOKIE['name_' . $shop_item->id])) { $shop_item->name = $_COOKIE['name_' . $shop_item->id]; } } } }