private:koding:hostcms:modules:shop:elements:otkljuchenie_indeksacii_modifikacij

This is an old revision of the document!


<?php
 
/*
* @author Kuts Artem, KAD Systems (©)
* Отключение индексации модификаций 
 
* В bootstrap.php
// KAD:Предотвращение поиска модификаций
Core_Event::attach('shop_item.onBeforeSave', array('Kad_Shop_Observers_Modnoindex', 'onBeforeSave'));
 
* Запрос на отключение модификаций
update shop_items set indexing = 0 where modification_id != 0 and shop_id = 3
 
*
* Копирование и использование файлов модуля 
* в коммерческих целях ЗАПРЕЩЕНО
*
*/
 
defined('HOSTCMS') || exit('HostCMS: access denied.');
 
class Kad_Shop_Observers_Modnoindex
{
	static public function onBeforeSave($object, $args)
	{
		if ($object->modification_id != 0)
		{
			// Запрет индексации
			$object->indexing = 0;
		}
	}
}
private/koding/hostcms/modules/shop/elements/otkljuchenie_indeksacii_modifikacij.1435321022.txt.gz · Last modified: 26.06.15 в 15:17 by 127.0.0.1