twister004 Posted April 14, 2011 Share Posted April 14, 2011 I'm facing a problem using Prestashop - Version 1.3.6.0I want to sort my products manually.I have set in the backoffice Default order by:"Position inside category"Default order way: "Ascending"I know I can move the products by pressing the "UP" or "Down" button.Depending on the browser I use I can also "Drag" and "Drop" to the position I want.Now here comes my problem.I "Drag and Drop" my products to the positions I want them to be.But some positions does not seem to be saving.I have spend hours to set them right, but they seem to be mixing anyway.first screenshot, I have dragged al the items to the position I want.refreshing will result in a mixup without any logic.Anyone with an idea that can help me, please send in your comments Link to comment Share on other sites More sharing options...
twister004 Posted April 17, 2011 Author Share Posted April 17, 2011 Bump, no one has the same problem? 1 Link to comment Share on other sites More sharing options...
shokinro Posted April 18, 2011 Share Posted April 18, 2011 I just tried at my demo site, it seems work fine.I only have a few products (sample product from PrestaShop), seem no problem.I am guessing, maybe you have many products and you move them very fast, before thay are refected, you refreshed the page. (depends your server performance and your connection, in some cases, it takes a little bit time).try to do it slowly to see if it changes. 1 Link to comment Share on other sites More sharing options...
werepair Posted April 18, 2011 Share Posted April 18, 2011 yes i have the same problem also, doesnt matter how slow or how fast i move them, also the same problem if i use the up down arrows too. 1 Link to comment Share on other sites More sharing options...
joshua_lee Posted April 23, 2011 Share Posted April 23, 2011 I have the same problem too, even when I use the default theme. It would be nice to sort the products the way that you want. 1 Link to comment Share on other sites More sharing options...
delite Posted April 30, 2011 Share Posted April 30, 2011 same problem with prestashop 1.4.017, anyone have any fix or ideea how can we solve this? 1 Link to comment Share on other sites More sharing options...
salko Posted May 1, 2011 Share Posted May 1, 2011 I have PS 1.4.0.17 and I also have this problem. I opened a thread about this problem, but now I have found this thread, and I'm kind a glad not to be only one with this problem ... So could somebody help us with this?? Is very annoying that we could not sort products in the way we want ... Link to comment Share on other sites More sharing options...
inveostore.com Posted May 2, 2011 Share Posted May 2, 2011 We have just released an unofficial PS 1.3 version with FINAL fix for custom sorting included. Please see PrestaShop 1.3.7.0 SP1 (UNOFFICIAL UPDATE) Link to comment Share on other sites More sharing options...
berta recchia Posted May 24, 2011 Share Posted May 24, 2011 It looks like this problem is still in 1.4.17.The BO sorting gets saved but it doens't show in the front office. I have to open and save EACH category to reorder things every time I update something Any solution ? Link to comment Share on other sites More sharing options...
werepair Posted May 24, 2011 Share Posted May 24, 2011 upgrade to the latest version of prestashop this has now been fixed. Link to comment Share on other sites More sharing options...
Dan1 Posted June 5, 2011 Share Posted June 5, 2011 inveostore.com, thank you for your work. If I just want the product sorting problem fixed, which file do I have to replace? I don't want to overwrite all the PS files, I'm using 1.3.7.Or is there any other solution to the sorting problem? Link to comment Share on other sites More sharing options...
twister004 Posted June 8, 2011 Author Share Posted June 8, 2011 I would like to know also if it's possible to replace just a few files for the fix.Updating the a whole new version, would bring me more problems (compatible modules etc) than I have now Link to comment Share on other sites More sharing options...
Dan1 Posted June 14, 2011 Share Posted June 14, 2011 This problem with the jumping products inside the category is complete BS. I've spent way too much time juggling them around until they settle in an order close to what I want. I don't want to change my PS version. Can someone please provide a fix for this? Link to comment Share on other sites More sharing options...
Dan1 Posted June 14, 2011 Share Posted June 14, 2011 I'm so tired of this problem. Post or pm me a solution and I'll paypal you $20. Link to comment Share on other sites More sharing options...
twister004 Posted June 15, 2011 Author Share Posted June 15, 2011 Got 60 websites running with all products mixed, looks terrible! Link to comment Share on other sites More sharing options...
twister004 Posted July 4, 2011 Author Share Posted July 4, 2011 Bump Up, give us the fix Link to comment Share on other sites More sharing options...
mirifica Posted July 8, 2011 Share Posted July 8, 2011 did you update to 1.4.3? Link to comment Share on other sites More sharing options...
twister004 Posted July 8, 2011 Author Share Posted July 8, 2011 No I can't upgrade to another version.<br/><br/>I have a custom made multishop-, multilanguage en multi currency websites that hangs all together.<br/><br/>Updating will bring me allot more trouble then a simple fix for repositioning the items. Link to comment Share on other sites More sharing options...
mirifica Posted July 8, 2011 Share Posted July 8, 2011 You should consider Mercurial Queues to solve your patch management problem then:http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html Link to comment Share on other sites More sharing options...
twister004 Posted July 12, 2011 Author Share Posted July 12, 2011 Yes that is nice for the future, but not a fix for the problem we are discussing. Link to comment Share on other sites More sharing options...
Peinis Posted July 12, 2011 Share Posted July 12, 2011 I have the same problem too, even when I use the default theme. It would be nice to sort the products the way that you want. i also have the same issue and i hope it will be solved soon Link to comment Share on other sites More sharing options...
[email protected] Posted July 18, 2011 Share Posted July 18, 2011 I have same problem with sorting problem Link to comment Share on other sites More sharing options...
marcibet Posted July 26, 2011 Share Posted July 26, 2011 i use 1.3.7 and i got the same problem. i cant update my shop at the moment, any help?? Link to comment Share on other sites More sharing options...
aura Posted August 19, 2011 Share Posted August 19, 2011 Hi, I'm using 1.43 and getting the same problem with newly added categories only. Im not sure when the problem started, the only thing I can think of, is that I added the Quick Access Module about 6 weeks ago. Found this information from which I was able to resolve the problem, but do not know why it occured in the first place. http://forge.prestashop.com/browse/PSCFI-1596 Link to comment Share on other sites More sharing options...
shopimport.nl Posted August 24, 2011 Share Posted August 24, 2011 I found the root cause and a fix. In file admin/ajax.php search for ajaxProductsPositions and find $product = new Product($id_product); if (Validate::isLoadedObject($product)) { and just after this line add the following: // modification start $product->cleanPositions( $id_category ); if( isset($positions[$position +1]) ) { $pos = explode('_', $positions[$position +1]); $to_product = $pos[2]; $offset = 0; } else if ( isset($positions[$position -1]) ) { $pos = explode('_', $positions[$position -1]); $to_product = $pos[2]; $offset = 1; } $position = 0; if( $to_product) { $result = Db::getInstance()->ExecuteS('SELECT `position` FROM `'._DB_PREFIX_.'category_product` WHERE id_product = '. pSQL($to_product) . ' AND id_category = '. pSQL($id_category) .''); $position = $result[0]['position'] + $offset; } // modification end Root cause of wrong product sort is that the new position was based on the position on the html page and not based on the position within the database. [1] when you have al lot of products and show the products 50 till 100 then if you move product 62 to 61 then it would become 11 (or 10 I forgot) [2] when you delete products then the sort sequence is not in line, so you cannot just count the products on the page. [3] I think with cloning a product it will also clone the position to be identical to original part. I didnt test but noticed identical positions and using the product clone option. I've added code to check the new position based on the sort id of the next product. And if no next product then based on the previous +1 and if this one doesnt exists ( so the product is the only product of the category) then it will get new position 0 (probably this cannot occure but anyway). Hope this will help you as even with 1.4.4 I needed to correct this (also on 1.3.6). 1 Link to comment Share on other sites More sharing options...
twister004 Posted August 25, 2011 Author Share Posted August 25, 2011 WoW thanks sooooo much!!! Shopimport.nl!! Really works great! One of the most important things on my wishlist is now working :-) Link to comment Share on other sites More sharing options...
Dan1 Posted August 26, 2011 Share Posted August 26, 2011 Thank you Shopimport for the modification, and thanks twister for the heads up. I made the change in the ajax.php file, having tried to position a product immediately before and it wouldn't hold the position. After the change I was able to change the position of the same product in the same way and it kept the new position. For a minute every product whose position I changed maintained the new position. Then I noticed that some products still jump around. It seems that the modification works for some products and not others, in any case the sorting is more manageable than before. I'll do some more testing. Link to comment Share on other sites More sharing options...
shopimport.nl Posted August 26, 2011 Share Posted August 26, 2011 Hi Dan1, after reviewing my code I found a possible situation for which it could go wrong and maybe you experienced that one :-) The situation is when the product was located in more than one category. It might have selected the position of the other category. I have modified my code above so this situation should also be fixed. For the insiders... the line I have added: ' AND id_category = '. pSQL($id_category) .''); Link to comment Share on other sites More sharing options...
Dan1 Posted August 26, 2011 Share Posted August 26, 2011 Thanks. In my case the products in question are only in one category. After applying the latest code they still jump around. But they appear to be more manageable than before the fix. Before the fix I could be there for half an hour moving the products around until by chance they settle in an order that's close to what I want. Now it seems to take only a few tries. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted August 26, 2011 Share Posted August 26, 2011 Hi everybody, I have reported this to our developers, and hope to have news for you going forward as they fix this. -Mike Link to comment Share on other sites More sharing options...
kallym Posted September 10, 2011 Share Posted September 10, 2011 Any news on this yet? The code fix mentioned above must be from an older version as my admin/ajax.php did not have the exact line shopimport.nl said to look for. I'm using 1.4.4.0. Here is the code from my file. Where should I add the code fix? Thanks! /* Modify product position in catalog */ if (array_key_exists('ajaxProductsPositions', $_POST)) { $way = (int)(Tools::getValue('way')); $id_product = (int)(Tools::getValue('id_product')); $id_category = (int)(Tools::getValue('id_category')); $positions = Tools::getValue('product'); if (is_array($positions)) foreach ($positions AS $position => $value) { // pos[1] = id_categ, pos[2] = id_product, pos[3]=old position $pos = explode('_', $value); if ((isset($pos[1]) AND isset($pos[2])) AND ($pos[1] == $id_category AND (int)$pos[2] === $id_product)) { if ($product = new Product((int)$pos[2])) if (isset($position) && $product->updatePosition($way, $position)) echo "ok position $position for product $pos[2]\r\n"; else echo '{"hasError" : true, "errors" : "Can not update product '. $id_product . ' to position '.$position.' "}'; else echo '{"hasError" : true, "errors" : "This product ('.$id_product.') can t be loaded"}'; break; } } } Link to comment Share on other sites More sharing options...
[email protected] Posted December 15, 2011 Share Posted December 15, 2011 Any news on this yet? The code fix mentioned above must be from an older version as my admin/ajax.php did not have the exact line shopimport.nl said to look for. I'm using 1.4.4.0. Here is the code from my file. Where should I add the code fix? Thanks! /* Modify product position in catalog */ if (array_key_exists('ajaxProductsPositions', $_POST)) { $way = (int)(Tools::getValue('way')); $id_product = (int)(Tools::getValue('id_product')); $id_category = (int)(Tools::getValue('id_category')); $positions = Tools::getValue('product'); if (is_array($positions)) foreach ($positions AS $position => $value) { // pos[1] = id_categ, pos[2] = id_product, pos[3]=old position $pos = explode('_', $value); if ((isset($pos[1]) AND isset($pos[2])) AND ($pos[1] == $id_category AND (int)$pos[2] === $id_product)) { if ($product = new Product((int)$pos[2])) if (isset($position) && $product->updatePosition($way, $position)) echo "ok position $position for product $pos[2]\r\n"; else echo '{"hasError" : true, "errors" : "Can not update product '. $id_product . ' to position '.$position.' "}'; else echo '{"hasError" : true, "errors" : "This product ('.$id_product.') can t be loaded"}'; break; } } } I have same prohlem, i have 1.4.4. version and have other code. Like kallym Link to comment Share on other sites More sharing options...
rushme Posted December 20, 2011 Share Posted December 20, 2011 hey guys... not sure if this is still a problem, but I'm on 1.3.x and I have fixed this issue. it appears that the homefeatured.php was sorting things by date added instead of by position. so.... in modules/homefeatured.php look for: $products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), 'DATE_ADD', 'DESC'); and change it to $products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10), 'position', 'ASC'); that should now sort the products by position and ASC... so it looks like the way thing look in the back office... home that helps! Link to comment Share on other sites More sharing options...
rogermac Posted December 31, 2011 Share Posted December 31, 2011 Bump. Going back to Kallym's post on 10th September, I have version 1.4.0.17 and have the same script. Calling shopimport.nl your further assistance would be greatly appreciated (or anyone else who can provide a solution of course ) Link to comment Share on other sites More sharing options...
Freeze Posted February 17, 2012 Share Posted February 17, 2012 hi, i've the same problem with version 1.4.5.1 with the same code of others 1.4 versions does anybody found a solution??? I've to reorder a lot of product and order can be modified only by clicking on arrows and...it's very boring and slow Link to comment Share on other sites More sharing options...
kenkoolstra Posted March 11, 2012 Share Posted March 11, 2012 I have the same issue with 1.4.0.17... any ideas anybody ? Link to comment Share on other sites More sharing options...
fabio10 Posted March 20, 2012 Share Posted March 20, 2012 Same problem too. I've find also this bug open http://forge.prestashop.com/browse/PSCFI-4983 on the official prestashop issue tracker but after one month there isn't a reply.... I hope that prestashop team correct this bug as soon as possible because it's very frustrating to order manually every time editing the mysql table with the products position ! Link to comment Share on other sites More sharing options...
cerovic Posted July 18, 2012 Share Posted July 18, 2012 I have the same issue with 1.4.0.17... any ideas anybody ? I also have PS 1.4.0.17 and had same problem. However, when I used shopimport.nl script, it got better. I could not say, that it works for 100%. But I am able to order products in 3-4 attempts. In origin version I had not been able to move some product even if I had move it 100 times. So progress. I also tied new version 1.4.8 and it runs OK in this version. I tired it on same serves as my old version 1.4.0.17. Link to comment Share on other sites More sharing options...
cerovic Posted July 24, 2012 Share Posted July 24, 2012 (edited) . Edited July 24, 2012 by cerkoxxl (see edit history) Link to comment Share on other sites More sharing options...
DenisDenis Posted April 16, 2013 Share Posted April 16, 2013 Version 1.5.4.0 here still the same issue. Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 16, 2013 Share Posted April 16, 2013 Hi DenisDenis, this is not the same issue, you may have the same issue but the reasons for it are not the same. Are you going to Catalog>Products>Filter by Category>and edit "position" (black arrows) on the right. 1 Link to comment Share on other sites More sharing options...
Never_give_up Posted May 7, 2013 Share Posted May 7, 2013 I thought product sort in admin was broken but actually it's not. After rearranging products in "Home" category in admin it didn't show the products rearrange in the front office. It only sorted home feature products accordingly to what I rearranged. It turns out "EACH" category/subcategory in admin has to be rearranged separately to what you want not just Home category. For this to work in ALL categories you have created... you have to open "EACH" category/subcategory that you created in Admin and rearrange products with-in each. Hope this helps. Make sure in Admin you have "Default order by:" set to "Position inside category" under Preference tab and in "Products" link. Link to comment Share on other sites More sharing options...
mowax Posted September 23, 2013 Share Posted September 23, 2013 I have the same problem in 1.5.4.1. I have sorted all products in each category and set Default order by to Position inside category etc. The problem started for me when I first used the drag and drop sorting feature in version 1.4.6.2. I had hoped that upgrading would fix the problem, but it hasn't. Is there a fix going around for 1.5.4.1? Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 23, 2013 Share Posted September 23, 2013 I have the same problem in 1.5.4.1. I have sorted all products in each category and set Default order by to Position inside category etc. The problem started for me when I first used the drag and drop sorting feature in version 1.4.6.2. I had hoped that upgrading would fix the problem, but it hasn't. Is there a fix going around for 1.5.4.1? Hi mowax, when you use the arrows to change the category position, the changes do not reflect on your Front Office? Link to comment Share on other sites More sharing options...
mowax Posted September 23, 2013 Share Posted September 23, 2013 Hi Benjamin, that's right. Both the arrow sorting and drag-drop features have no affect on Front office. Also if I remove the products from the category and re-add them, they reappear in the same position as before and cannot be repositioned. I've noticed this only is a problem in some categories. I think the categories that are affected are the ones I used the drag-drop sorting method on which I believe is what caused it. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 23, 2013 Share Posted September 23, 2013 Hi Benjamin, that's right. Both the arrow sorting and drag-drop features have no affect on Front office. Also if I remove the products from the category and re-add them, they reappear in the same position as before and cannot be repositioned. I've noticed this only is a problem in some categories. I think the categories that are affected are the ones I used the drag-drop sorting method on which I believe is what caused it. Make sure to have a backup and take a look at this fix. You will have to change one line http://forge.prestashop.com/browse/PSCFV-10263 Link to comment Share on other sites More sharing options...
mowax Posted September 23, 2013 Share Posted September 23, 2013 (edited) Thanks for the suggestion, I have applied the change but it had no affect unfortunately. A further observation is that the categories affected are all parent categories. In some cases, products located by default in the subcategories are displayed in the parent category in the Front office, even though they are not listed in the Back office. For example this category: http://www.duratex.co.uk/24-door-mats. In the back-office, this category is empty (apart from subcategories). All these products are from the subcategories and have been populated and sorted randomly. If I add these products to the parent category in the back-office, I cannot reposition them. Hope I'm making sense Edited September 23, 2013 by mowax (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 24, 2013 Share Posted September 24, 2013 Thanks for the suggestion, I have applied the change but it had no affect unfortunately. A further observation is that the categories affected are all parent categories. In some cases, products located by default in the subcategories are displayed in the parent category in the Front office, even though they are not listed in the Back office. For example this category: http://www.duratex.co.uk/24-door-mats. In the back-office, this category is empty (apart from subcategories). All these products are from the subcategories and have been populated and sorted randomly. If I add these products to the parent category in the back-office, I cannot reposition them. Hope I'm making sense Can you do me a favor and toggle the option in Preferences>Products>Default order way (ascending or descending) and see if either way works for you. Link to comment Share on other sites More sharing options...
mowax Posted September 26, 2013 Share Posted September 26, 2013 thanks, I've tried both but they still can't be repositioned. Is there not any way to stop the products from subcategories appearing in their parent category? Link to comment Share on other sites More sharing options...
stottycabanas Posted September 26, 2013 Share Posted September 26, 2013 Mowax, if you want to remove the products from the parent category page, you can edit the file /themes/yourtheme/category.tpl. Add {if !isset($subcategories)} after the line {if $products} and add the closing {\if} after the final </div> Cheers, Dave Link to comment Share on other sites More sharing options...
mowax Posted September 26, 2013 Share Posted September 26, 2013 hi stottycabanas, thank you for your suggestion, I didn't get it to work though. I have this: {if $products} {if !isset($subcategories)} <div class="content_sortPagiBar"> {include file="$tpl_dir./pagination.tpl"} <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} </div> </div> {/if} Does it look correct? I cleared all caches but there is no change Link to comment Share on other sites More sharing options...
stottycabanas Posted September 26, 2013 Share Posted September 26, 2013 mowax, the closing {\if} needs to be lower down, I meant after the final <\div> in the whole file. Red text below denotes the additions. {if $products} {if !isset($subcategories)} <div class="content_sortPagiBar"> {include file="$tpl_dir./pagination.tpl"} <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar"> <div class="sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {include file="./nbr-product-page.tpl"} </div> {include file="./pagination.tpl"} </div> {/if} {/if} Hope that's OK, Dave. 1 Link to comment Share on other sites More sharing options...
stottycabanas Posted September 26, 2013 Share Posted September 26, 2013 Ha! the red didn't work. The second line and the second-to-last line are the additions. Link to comment Share on other sites More sharing options...
mowax Posted September 27, 2013 Share Posted September 27, 2013 thanks stottycabanas, it works. it would be still good to be able to choose which products appear in the parent category, and be able to sort them manually. I will use your method for the time being, as it is better than having a jumbled mess of products. Link to comment Share on other sites More sharing options...
Liofey Posted October 28, 2013 Share Posted October 28, 2013 Any news on this yet? The code fix mentioned above must be from an older version as my admin/ajax.php did not have the exact line shopimport.nl said to look for. I'm using 1.4.4.0. Here is the code from my file. Where should I add the code fix? Thanks! /* Modify product position in catalog */ if (array_key_exists('ajaxProductsPositions', $_POST)) { $way = (int)(Tools::getValue('way')); $id_product = (int)(Tools::getValue('id_product')); $id_category = (int)(Tools::getValue('id_category')); $positions = Tools::getValue('product'); if (is_array($positions)) foreach ($positions AS $position => $value) { // pos[1] = id_categ, pos[2] = id_product, pos[3]=old position $pos = explode('_', $value); if ((isset($pos[1]) AND isset($pos[2])) AND ($pos[1] == $id_category AND (int)$pos[2] === $id_product)) { if ($product = new Product((int)$pos[2])) if (isset($position) && $product->updatePosition($way, $position)) echo "ok position $position for product $pos[2]\r\n"; else echo '{"hasError" : true, "errors" : "Can not update product '. $id_product . ' to position '.$position.' "}'; else echo '{"hasError" : true, "errors" : "This product ('.$id_product.') can t be loaded"}'; break; } } } similar with me. how to fix in prestashop vershion 1.4.6.2 ?? Link to comment Share on other sites More sharing options...
connectcase Posted November 1, 2013 Share Posted November 1, 2013 The products have the same numeric position in the database, that's why you can not position them in the BO. Link to comment Share on other sites More sharing options...
Liofey Posted November 4, 2013 Share Posted November 4, 2013 i found the problem it about the cleanposition method in the admin. It should rearrange the position but it does not working in my website. Could you tell me what's the matter? Link to comment Share on other sites More sharing options...
benjamin utterback Posted November 4, 2013 Share Posted November 4, 2013 Hello all, for v1.5.6 please remember that in order to change the Product Position Within a Category you need to go to Catalog>Products>Filter by Category>Select Category>Click the little black Arrows in Position tab (click twice if needed) > Now you can move up or down or drag your products to the desired position. Please let me know if this works with you Link to comment Share on other sites More sharing options...
cagrie Posted January 30, 2014 Share Posted January 30, 2014 (edited) hi benj, doing exactly as you said, filtering products by category and trying to reposition, with no luck. they keep reverting back to original positions. 1.5.6.2 here and the problem still persists. just as nowak's problem. products in certain categories cannot be re positioned. very frustrating. if anyone has a solution, please advise. thank you. Edited January 30, 2014 by cagrie (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 30, 2014 Share Posted January 30, 2014 hello your problem is related only to certain categories or to whole catalog? if second, it can be related to ajax queries, it's worth to check browser console then for errors Link to comment Share on other sites More sharing options...
cagrie Posted January 30, 2014 Share Posted January 30, 2014 naah, certain categories. besides, now and then it works not pretty but I changed the positions from the database, k for now. Link to comment Share on other sites More sharing options...
innercode Posted January 31, 2014 Share Posted January 31, 2014 (edited) similar with me. how to fix in prestashop vershion 1.4.6.2 ?? Hi, Just add: $product->cleanPositions( $id_category ); After (~326 line): if ($product = new Product((int)$pos[2])) { Don't forget surround block with { } inside if You don't have to do anything after that, just sort products in category. I had only messed up positions, like 1, 5, 14, 32 etc, but it should work if you have duplicate positions too. Tried in PS v1.4.8. Thanks shopimport.nl for initial code Edited January 31, 2014 by innercode (see edit history) Link to comment Share on other sites More sharing options...
jartau Posted April 1, 2014 Share Posted April 1, 2014 I have a version 1.4.8.2 of PS, my solution has been add a new line in admin/ajax.php at line 316: $way = (int)(Tools::getValue('way')); $id_product = (int)(Tools::getValue('id_product')); $id_category = (int)(Tools::getValue('id_category')); Product::cleanPositions($id_category); $positions = Tools::getValue('product'); Sorry for my English Link to comment Share on other sites More sharing options...
drolex Posted August 27, 2014 Share Posted August 27, 2014 PrestaShop 1.6 still can't sort products. Link to comment Share on other sites More sharing options...
drolex Posted August 28, 2014 Share Posted August 28, 2014 I found that if some products have the same position number (even 0) then drag and drop position changing does not work. I think that qualifies as a bug. I was using SQL to quickly add products to categories and setting the position to default (0), which wouldn't allow me to re-position them in the back office. I started using the id_product for the position to have unique positions, and then I could re-position in the back office; however, it's still not perfect. If I have positions like 452, 784, 792, 810, etc., I can move 792 to the top and it will become 0, but the others will keep their number. Then, if I try to move something down the list below non-re-positioned products it won't work. For example, if I then try to move 452 to the bottom, it will just stay where it is. I'm guessing it would get the position 1 or something low, but the others are still 784 and 810. Link to comment Share on other sites More sharing options...
SaLiC Posted October 27, 2014 Share Posted October 27, 2014 Hi I have the same problem as you others have explained. When I try to reposition in BO it does not completely take affect in front. Se below. I tried moving back and forth, some will reposition, others wont. I use PrestaShop 1.5.6.2 Link to comment Share on other sites More sharing options...
musicmaster Posted October 27, 2014 Share Posted October 27, 2014 You can try product-sort from the free script Triple Edit (http://www.prestashop.com/forums/topic/185401-free-script-product-mass-edit-category-multi-edit-order-edit/). It is limited to 1000 articles per category (500 for Prestashop 1.4). As a bonus it will renumber your positions, so that they become a regular 0,1,2,3, etc. again - what enables future moving the BO. Link to comment Share on other sites More sharing options...
SaLiC Posted October 27, 2014 Share Posted October 27, 2014 Thanks it looks good!! Is it posible to only show active products? And I would preffere the image as no. 2? Is this possible to change? Maybe you can explain me how it can be done? Link to comment Share on other sites More sharing options...
musicmaster Posted October 27, 2014 Share Posted October 27, 2014 Is it posible to only show active products? And I would preffere the image as no. 2? Inactive products have positions too. Image no.2???? Link to comment Share on other sites More sharing options...
SaLiC Posted October 27, 2014 Share Posted October 27, 2014 Sorry, as the second colon in the table (or actually the 3rd) Link to comment Share on other sites More sharing options...
markop1 Posted August 1, 2015 Share Posted August 1, 2015 I have the same problem in 1.6.0.14. I have set the product positions in Catalog > Products > Filter by Category, in every category (not just the Home category). In BO everything seems fine, but the problem is that the positions are not reflected in FO for the 2nd level categories. For example: - Home (positioning works fine) -- 2nd Level Cat (doesn't work) ---- 3rd Level Cat (works) Preferences > Products > Pagination is set to Position Inside Category, Ascending. I'm using a custom theme. What files should I need to look into to sort this issue? Many thanks for your replies. Link to comment Share on other sites More sharing options...
markop1 Posted August 3, 2015 Share Posted August 3, 2015 To answer my own question, the solution was to disable the "Layered navigation block" module for the affected categories. You do that by going to the module, click on Configure > Filters Templates > Edit and then deselect categories that are giving you problems. I'm not sure why this module would affect default sorting (by Position Inside Category), though. Link to comment Share on other sites More sharing options...
musicmaster Posted August 3, 2015 Share Posted August 3, 2015 Layered Navigation has the option to show also the subcategories. You get then those products mixed with the main cat products. Maybe you has that option enabled? 1 Link to comment Share on other sites More sharing options...
Xtra Think Posted December 4, 2015 Share Posted December 4, 2015 Hi,For those who still have this problem and if you have blocklayered module activated on your store then here is what i did to fix the problem.1- Go to blocklayered.php file2- Go to getProductByFilters function3- line 2013/2014 add this "AND cp.id_category = '.(int)$id_parent.'" 4- Save and enjoy Rachid Chihabi Link to comment Share on other sites More sharing options...
yay Posted December 22, 2015 Share Posted December 22, 2015 Hi, For those who still have this problem and if you have blocklayered module activated on your store then here is what i did to fix the problem. 1- Go to blocklayered.php file 2- Go to getProductByFilters function 3- line 2013/2014 add this "AND cp.id_category = '.(int)$id_parent.'" 4- Save and enjoy Rachid Chihabi Could you specify where that line should go? Or attach your blocklayered.php? Our line numbering doesn't seem to match. Link to comment Share on other sites More sharing options...
kjcllc Posted October 14, 2017 Share Posted October 14, 2017 After trying all the multitudinous options people suggested, I figured out a simple thing that doesn't require coding, changing any additional settings beyond the 'position inside' one often mention, etc. When looking at your product list in the back office, look just to the right of the word "Position" in the header row above the products. There's an arrow up & down beside it... click the UP ^ arrow, which causes them to change in the order of the position # letting you to be able to view them by "position" in the back office. Therefore, when you re-sort/organize your products up & down, it 'sticks' because it's sorted by position, not ID, name or some other option. Be sure to click the radio box beside the product you're moving before using the cross-hairs to drag it up or down. It doesn't work most of the time if you don't check that box. When nothing else worked, this worked for me. Hope it works for you too. P.S. I use a WordPress site that does this same thing, and that's how I figured out to try it in Prestashop too. Link to comment Share on other sites More sharing options...
Recommended Posts