diff --git a/classes/CompareProduct.php b/classes/CompareProduct.php index 6a047e8f9..fb87598b1 100644 --- a/classes/CompareProduct.php +++ b/classes/CompareProduct.php @@ -27,19 +27,19 @@ class CompareProductCore extends ObjectModel { - public $id_compare; + public $id_compare; - public $id_customer; + public $id_customer; - public $date_add; + public $date_add; - public $date_upd; + public $date_upd; - protected $fieldRequired = array( + protected $fieldRequired = array( 'id_compare', 'id_customer'); - protected $fieldsValidate = array( + protected $fieldsValidate = array( 'id_compare' => 'isUnsignedInt', 'id_customer' => 'isUnsignedInt' ); @@ -89,7 +89,7 @@ class CompareProductCore extends ObjectModel if ($sql) { $id_compare = Db::getInstance()->getValue('SELECT MAX(`id_compare`) FROM `'._DB_PREFIX_.'compare`'); - $cookie->id_compare = $id_compare; + Context::getContext()->cookie->id_compare = $id_compare; } } return Db::getInstance()->execute(' diff --git a/classes/Tools.php b/classes/Tools.php index e5f21fae5..5860ef909 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1796,10 +1796,10 @@ FileETag INode MTime Size } } - /** - * @desc extract a zip file to the given directory - * @return bool success - */ + /** + * @desc extract a zip file to the given directory + * @return bool success + */ public static function ZipExtract($fromFile, $toDir) { if (!file_exists($toDir)) @@ -1828,6 +1828,9 @@ FileETag INode MTime Size * * @param string $type by|way * @param string $value If no index given, use default order from admin -> pref -> products + * @param bool|\bool(false)|string $prefix + * + * @return string Order by sql clause */ public static function getProductsOrder($type, $value = null, $prefix = false) { diff --git a/themes/default/product-compare.tpl b/themes/default/product-compare.tpl index 7b812b2c8..65980341c 100644 --- a/themes/default/product-compare.tpl +++ b/themes/default/product-compare.tpl @@ -32,7 +32,7 @@ //]]> -
+