Index: branches/5.2.x/units/products/products_tag_processor.php =================================================================== diff -u -N -r14872 -r14908 --- branches/5.2.x/units/products/products_tag_processor.php (.../products_tag_processor.php) (revision 14872) +++ branches/5.2.x/units/products/products_tag_processor.php (.../products_tag_processor.php) (revision 14908) @@ -1,6 +1,6 @@ Application->Phrase($fieldlabel); $option_params['name'] = $params['block_options']; @@ -481,7 +481,7 @@ function PrepareSearchResults($params) { - $names_mapping = $this->Application->GetVar('NamesToSpecialMapping'); + $names_mapping = $this->Application->GetVar('NamesToSpecialMapping', Array ()); if($this->Application->GetVar('search_type') == 'advanced' || !getArrayValue($names_mapping, $this->Prefix, 'search_results')) { @@ -754,4 +754,22 @@ $edit_tab_presets['Default'] = $edit_tab_preset; $this->Application->setUnitOption($this->Prefix, 'EditTabPresets', $edit_tab_presets); } + + /** + * Checks, that current product is in compare products list + * + * @param Array $params + * @return string + * @access protected + */ + protected function InCompare($params) + { + $object =& $this->getObject($params); + /* @var $object kDBItem */ + + $products = $this->Application->GetVarDirect('compare_products', 'Cookie'); + $products = $products ? explode('|', $products) : Array (); + + return in_array($object->GetID(), $products); + } } \ No newline at end of file