Jump to content

how to change products order in category


carlitus

Recommended Posts

hi,

 

I want my customer can hange the order that products apperas in a category but I don't find where is that field to change position order.

 

in prestashop 1.7 seems I can not drag and drop when filtering products by category, like I could do in prestashop 1.6

 

any idea?

Link to comment
Share on other sites

You can sort products with drag and drop when you list them as products in a category.

 

However, for that option to be available they have to be sorted by order and rising. When you (accidentally) clicked on one of the headers the products will be presented sorted in that way and the drag and drop option will disappear.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

In 1.7 it's:

Click 'Products' in admin 

Click 'Filter by Categories' in the top right

Click the radio button to the right of 'Home' (clicking 'home' won't select it)

Rearrange position of product by click/drag

Click 'Save & Refresh' in the header of the positions column

Fixed

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...
On 20.10.2017 at 4:21 PM, clemenlg said:

Hi,

I've PrestaShop 1.7.2.0, and if I filter products by category, I can see the position column, but not the arrows (as you can see in the picture).

What's wrong?

Regards

59ea07123929f_Sinnombre.thumb.png.cec7d234ee8cdaf76b48ec9f2aefc60c.png

Below "Position" you have button in polish version they translate "Reorder" as "Order again" not "Change order". Maybe they make same mistake in your language. You need to click this button. :)

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

Hello,

I have the same problem in PS 1.7.2.4. Only I do not see a sorting/ordering column:

image.thumb.png.626b6a82eb6ea5a9a0f7d7e95725b51a.png

 

This is what I get when viewing the sql query (cog top right). I did not make any changes:

SELECT SQL_CALC_FOUND_ROWS p.`id_product`  AS `id_product`,
 p.`reference`  AS `reference`,
 p.`price`  AS `price`,
 p.`id_shop_default`  AS `id_shop_default`,
 p.`is_virtual`  AS `is_virtual`,
 pl.`name`  AS `name`,
 pl.`link_rewrite`  AS `link_rewrite`,
 sa.`active`  AS `active`,
 shop.`name`  AS `shopname`,
 image_shop.`id_image`  AS `id_image`,
 cl.`name`  AS `name_category`,
 0 AS `price_final`,
 pd.`nb_downloadable`  AS `nb_downloadable`,
 sav.`quantity`  AS `sav_quantity`,
 IF(sav.`quantity`<=0, 1, 0) AS `badge_danger` 
FROM  `a7si_product` p 
 LEFT JOIN `a7si_product_lang` pl ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = 4 AND pl.`id_shop` = 1) 
 LEFT JOIN `a7si_stock_available` sav ON (sav.`id_product` = p.`id_product` AND sav.`id_product_attribute` = 0 AND sav.id_shop = 1  AND sav.id_shop_group = 0 ) 
 JOIN `a7si_product_shop` sa ON (p.`id_product` = sa.`id_product` AND sa.id_shop = 1) 
 LEFT JOIN `a7si_category_lang` cl ON (sa.`id_category_default` = cl.`id_category` AND cl.`id_lang` = 4 AND cl.id_shop = 1) 
 LEFT JOIN `a7si_category` c ON (c.`id_category` = cl.`id_category`) 
 LEFT JOIN `a7si_shop` shop ON (shop.id_shop = 1) 
 LEFT JOIN `a7si_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.`cover` = 1 AND image_shop.id_shop = 1) 
 LEFT JOIN `a7si_image` i ON (i.`id_image` = image_shop.`id_image`) 
 LEFT JOIN `a7si_product_download` pd ON (pd.`id_product` = p.`id_product`) 
WHERE (1 AND state = 1)
 
ORDER BY  `id_product` asc
 
LIMIT 0, 20
;

 

Any ideas why I do not have this option? How to fix it?
Change the ORDER BY inside the query? If so.. To what value?

 

Thanks!

Edited by Tomasci
added query (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

if you can't see arrow keys for ordering products, you can double click on Position button on top of the Position column.

 

Click 'Products' in admin 

Click 'Filter by Categories' in the top right

Double Click Position button on top of the Position column

Rearrange position of product by click/drag

Click 'Save & Refresh' in the header of the positions column

Fixed

Link to comment
Share on other sites

  • 1 year later...

For newer versions of Prestashop (mine is 1.7.6.3):

  • Select a category you want to sort (you can also sort subcategories)

image.png.a39cd067e926b1549279d6c88aa747bf.png

 

  • You can now see the "Position" column and click on the "Reorder" button to change product positions

image.thumb.png.8bb373e33a434586a23484ca46c78115.png

 

  • Drag and Drop to reorder the products. Click on "Save & refresh". Done!
  • If you don't want to save the changes just reload the page

image.thumb.png.60ff5d9fa5e1865fbd7f6a6f1688c049.png

Edited by ByteEmotions
picture update (see edit history)
  • Like 1
Link to comment
Share on other sites

On 12/18/2017 at 6:30 AM, rkk said:

In 1.7 it's:

Click 'Products' in admin 

Click 'Filter by Categories' in the top right

Click the radio button to the right of 'Home' (clicking 'home' won't select it)

Rearrange position of product myprepaidcenter by click/drag

Click 'Save & Refresh' in the header of the positions column

Fixed

Its working but sometimes when refresh is done it shows some kind of error but only sometimes .

Thanks for sharing information 

peace

Ronald

Edited by Ronald1379 (see edit history)
Link to comment
Share on other sites

is there a faster way to sort products in a category on 1.7.6.4 becaus i you have to order in a category with more then 100 products its not easy. it would be better to set the numbers in a form field and save.

any solution or better way?

thansk and regards

Martin

Link to comment
Share on other sites

  • 2 months later...

Hi mbrandner, 

you can theoretically access your Database (e.g with phpMyAdmin tool from your webhosting provider) and change column

position 

in DB table 

`ps_category_product`

DB table `ps_category_product` is a table which stores Position (position) for unique combination of Product (id_product) in Category (id_product)

  

image.thumb.png.1478abb690654e846051e8b3469111b6.png

 

So the information in  DB table `ps_category_product` is exactly the same sorting Position that can be set from within administrative user interface in Catalog >> Product >> selection of Category >> button Reorder (as described above by multiple posts)

image.thumb.png.110afd5d81f5f0a6c509dd449b758d5f.png

 

Step by step do to that: 

  1. find out a way how to access your database via phpMyAdmin from your webhosting provider
  2. type DB login link into the browser, it could be something like e.g. db-phpmyadmin.mydomain.com and log in
  3. find table `ps_category_product` by clicking through list of database tables
  4. edit rows in the table by ending numbers under column position 
  5. alternatively you can write an SQL script to edit for you 
  6. alternatively you can export whole table into excel, edit the table in excel to your liking, and then re-import into the table again. be careful with keeping all IDs 

 

Hope this helps. 

Best Regards, Martin Mi

Dataquo, s.r.o. 

www.dataquo.eu

 

 

Link to comment
Share on other sites

  • 1 month later...

You can use Prestools to sort order. You can list all products, and then you have a field to set the position you want on each product.
Prestashop 1.7 has a big limit: the pagination in admin products is max 300 products per page, and the drag&drop is working on single page. So, you can't manage categories with more than 300 products. Not possible to move products from page to page.

  • Sad 1
Link to comment
Share on other sites

  • 6 months later...
On 11/2/2018 at 11:21 PM, parzar said:

if you can't see arrow keys for ordering products, you can double click on Position button on top of the Position column.

 

Click 'Products' in admin 

Click 'Filter by Categories' in the top right

Double Click Position button(talktowendys survey) on top of the Position column

Rearrange position of product by click/drag

Click 'Save & Refresh' in the header of the positions column

Fixed

Its working fine now but sometimes when i try to refresh , it shows some kind of error but only sometimes .

Thanks for Awesome information 

Bye.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...