// BugFix in Product compare

This commit is contained in:
mDeflotte committed 2011-12-05 15:30:01 +00:00
1 parent 37aba4c30b
commit 6ed69c323b
3 files changed
+15 -12

No files matched your search

+7 -7
View File
@@ -27,19 +27,19 @@
class CompareProductCore extends ObjectModel 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_compare',
'id_customer'); 'id_customer');
protected $fieldsValidate = array( protected $fieldsValidate = array(
'id_compare' => 'isUnsignedInt', 'id_compare' => 'isUnsignedInt',
'id_customer' => 'isUnsignedInt' 'id_customer' => 'isUnsignedInt'
); );
@@ -89,7 +89,7 @@ class CompareProductCore extends ObjectModel
if ($sql) if ($sql)
{ {
$id_compare = Db::getInstance()->getValue('SELECT MAX(`id_compare`) FROM `'._DB_PREFIX_.'compare`'); $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(' return Db::getInstance()->execute('
+7 -4
View File
@@ -1796,10 +1796,10 @@ FileETag INode MTime Size
} }
} }
/** /**
* @desc extract a zip file to the given directory * @desc extract a zip file to the given directory
* @return bool success * @return bool success
*/ */
public static function ZipExtract($fromFile, $toDir) public static function ZipExtract($fromFile, $toDir)
{ {
if (!file_exists($toDir)) if (!file_exists($toDir))
@@ -1828,6 +1828,9 @@ FileETag INode MTime Size
* *
* @param string $type by|way * @param string $type by|way
* @param string $value If no index given, use default order from admin -> pref -> products * @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) public static function getProductsOrder($type, $value = null, $prefix = false)
{ {
+1 -1
View File
@@ -32,7 +32,7 @@
//]]> //]]>
</script> </script>
<form method="get" action="{$link->getPageLink('products-comparison')}" onsubmit="true"> <form method="post" action="{$link->getPageLink('products-comparison')}" onsubmit="true">
<p> <p>
<input type="submit" id="bt_compare" class="button" value="{l s='Compare'}" /> <input type="submit" id="bt_compare" class="button" value="{l s='Compare'}" />
<input type="hidden" name="compare_product_list" class="compare_product_list" value="" /> <input type="hidden" name="compare_product_list" class="compare_product_list" value="" />