If you have this bug in your prestashop:
all product same position = 1
and you can try to drag to sort. after save and reload position is not change.
follow my guide to fix
create a file in your root web name as correct_product_position.php:
require(dirname(__FILE__).'/config/config.inc.php');
$sql = 'select * from `'._DB_PREFIX_.'category_product`';
$data = Db::getInstance()->executeS($sql);
$category = array();
foreach ($data as $value) {
$category[$value['id_category']][] = $value;
}
foreach ($category as $catrow) {
$i = 0;
foreach ($catrow as $row) {
$sql = '
UPDATE `'._DB_PREFIX_.'category_product` cp
SET cp.`position` = '.(int)$i.'
WHERE cp.`id_product` = '.(int)$row['id_product'].'
AND cp.`id_category`='.(int)$row['id_category'];
Db::getInstance()->execute($sql);
echo $sql;
$i++;
}
}
after that
you run https://yoursite.com/correct_product_position.php
this code will help you correct position
see my result: like a dream