Karldupont Posted October 11, 2012 Share Posted October 11, 2012 Do someone know why I get a strange prblem in the datasheet area of my products the item appears three times instead of one. ??? Link to comment Share on other sites More sharing options...
shacker Posted October 15, 2012 Share Posted October 15, 2012 in default theme is the same? Link to comment Share on other sites More sharing options...
Karldupont Posted October 15, 2012 Author Share Posted October 15, 2012 Hi Yes same with default theme sometimes the duplicates go out with some products but it's still there when I post a new product: now just 2 instead of 3... very strange Link to comment Share on other sites More sharing options...
vion431 Posted October 15, 2012 Share Posted October 15, 2012 I have same problem, but i hope to solve it:) Link to comment Share on other sites More sharing options...
Karldupont Posted October 15, 2012 Author Share Posted October 15, 2012 If you find a fixed solution tell me about, it's so bad to cannot use the datasheet features ... Link to comment Share on other sites More sharing options...
shacker Posted October 16, 2012 Share Posted October 16, 2012 have you imported products with cvs? Link to comment Share on other sites More sharing options...
Karldupont Posted October 16, 2012 Author Share Posted October 16, 2012 No, never used the CVS Link to comment Share on other sites More sharing options...
shacker Posted October 17, 2012 Share Posted October 17, 2012 what third party modules you have installed? Link to comment Share on other sites More sharing options...
Karldupont Posted October 17, 2012 Author Share Posted October 17, 2012 Sorry I don't understand what you mean by " third pardty modules" ? do you want to know the name of all the modules that I have add to my theme ? Link to comment Share on other sites More sharing options...
shacker Posted October 17, 2012 Share Posted October 17, 2012 i mean not default prestashop modules (from forum or purchased) Link to comment Share on other sites More sharing options...
Karldupont Posted October 18, 2012 Author Share Posted October 18, 2012 Oh yes I added some modules such as "prestaloveaddthis, magicthumb trial, domfacebooklike" Ithink that's all Link to comment Share on other sites More sharing options...
shacker Posted October 18, 2012 Share Posted October 18, 2012 can disable tese module t otest? Link to comment Share on other sites More sharing options...
Karldupont Posted October 18, 2012 Author Share Posted October 18, 2012 I just tried but noting happened always the same bug (before I used to work with prestashop 1.5 0.17 with this add modules and all was ok no bug, so it's a bug with prestashop 1.5 1.0 I suppose) Link to comment Share on other sites More sharing options...
Federman Posted February 26, 2013 Share Posted February 26, 2013 I have the same problem. Any ideas. Link to comment Share on other sites More sharing options...
benjamin utterback Posted February 26, 2013 Share Posted February 26, 2013 Hi Federman, I think the best chance would be to make a new thread. This is a pretty old thread. You also need to be specific, when you the "same problem" that means that you are on 1.5.1.. Link to comment Share on other sites More sharing options...
Aldi M Posted February 26, 2013 Share Posted February 26, 2013 @Federman: I think that problem is solved. Check out this link: http://forge.prestas...owse/PSCFV-4913 Link to comment Share on other sites More sharing options...
Federman Posted March 1, 2013 Share Posted March 1, 2013 Hello Benjamin and Aldi Thanks for your reply. I have the version 1.5.2 The answer of "Aldi M" helped me a lot, and locate the error is in the new products module. http://forge.prestas...owse/PSCFV-4913 Thank you very much. Link to comment Share on other sites More sharing options...
BnB Posted March 1, 2013 Share Posted March 1, 2013 Hi guys, I am also suffering with the same problem now on 1.5.1. When I deactivate the "new product block" module everything is fine again. But I don't want to deactivate this module because I like it. Is there a way to change the code of the "new product block" in order to solve this problem?? Hope you have a solution for this... Link to comment Share on other sites More sharing options...
Aldi M Posted March 2, 2013 Share Posted March 2, 2013 @BnB: In the link I provided above, try to follow the instruction at the bottom of the forum by Vincent AUGAGNEUR. Link to comment Share on other sites More sharing options...
BnB Posted March 2, 2013 Share Posted March 2, 2013 OK thanks Aldi M but I can't figure out what I should change in the code. Vincent AUGAGNEUR says "you can modify the file /classes/Product.php line 3169" at line 3169 of product.php I have this: WHERE `id_product` IN ('.implode($product_implode, ',').') What have to be changed in this code? Thanks for your quick reply! Link to comment Share on other sites More sharing options...
Aldi M Posted March 2, 2013 Share Posted March 2, 2013 @BnB: Hmmm... not sure but I'm guessing it's due to the different version you're using. I used v.1.5.2. Try search for 'function cacheFrontFeatures' in your editor. It should be in the 3rd line from the bottom within that function that you should change from this: self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][] = $row; ...to this: if (!isset(self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_product']])) self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_product']] = $row; Take note, though, that I haven't tried this myself as I already hacked my theme to fix this issue before I found this solution. Link to comment Share on other sites More sharing options...
Federman Posted March 2, 2013 Share Posted March 2, 2013 You have to change the function code (cacheFrontFeatures) in the / classes / product.php line 3162 or 3169. And replace it with the following code: public static function cacheFrontFeatures($product_ids, $id_lang) { if (!Feature::isFeatureActive()) return; $product_implode = array(); foreach ($product_ids as $id_product) if ((int)$id_product && !array_key_exists($id_product.'-'.$id_lang, self::$_cacheFeatures)) $product_implode[] = (int)$id_product; if (!count($product_implode)) return; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT id_product, name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.(int)$id_lang.') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.(int)$id_lang.') LEFT JOIN '._DB_PREFIX_.'feature f ON (f.id_feature = pf.id_feature) WHERE `id_product` IN ('.implode($product_implode, ',').') ORDER BY f.position ASC'); foreach ($result as $row) { if (!array_key_exists($row['id_product'].'-'.$id_lang, self::$_frontFeaturesCache)) self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang] = array(); if (!isset(self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']])) self::$_frontFeaturesCache[$row['id_product'].'-'.$id_lang][$row['id_feature']] = $row; } } This code is the same function but taken from the 1.5.3 version of prestashop. I hope this helps. Link to comment Share on other sites More sharing options...
Recommended Posts