This commit is contained in:
rMalie
2011-08-24 15:57:10 +00:00
parent 9a90513393
commit 74843c4060
20 changed files with 58 additions and 20 deletions
+1
View File
@@ -1673,6 +1673,7 @@ class ProductCore extends ObjectModel
$cur_cart = new Cart($id_cart);
}
$cart_quantity = 0;
if ((int)($id_cart))
{
if (!isset(self::$_cart_quantity[(int)($id_cart).'_'.(int)($id_product)]) OR self::$_cart_quantity[(int)($id_cart).'_'.(int)($id_product)] != (int)($quantity))
+8
View File
@@ -461,13 +461,21 @@ class SearchCore
$wordIdsByWord[$product['id_shop']][$product['id_lang']]['_'.$word] = 0;
}
$existingWords = $db->ExecuteS('SELECT word FROM '._DB_PREFIX_.'search_word WHERE word IN ('.implode(',', $queryArray2).') GROUP BY word');
if($existingWords)
foreach($existingWords as $data)
unset($queryArray[$data['word']]);
if (count($queryArray))
{
// The words are inserted...
$db->Execute('
INSERT IGNORE INTO '._DB_PREFIX_.'search_word (id_lang, id_shop, word)
VALUES '.implode(',',$queryArray));
}
if (count($queryArray2))
{
// ...then their IDs are retrieved and added to the cache
$addedWords = $db->ExecuteS('
SELECT sw.id_word, sw.word