Add drag and drop for positioning of products in category

Hi,
there is a built in mechanism in cs-cart to manually set the position of the product in category:
https://docs.cs-cart.com/latest/user_guide/manage_products/categories/sorting_products_by_position.html

Could you please add option to use drag and drop mechanism for setting the position of a product. Right now typing digits in the position field is really time consuming in big product categories. There is already a mechanism to do this in cs-cart:

https://docs.cs-cart.com/4.1.x/core/front-end/microformats.html

Sorted list¶

Such list can be seen, for example, on the currency edit page: when a row is dragged, its position is changed.

  • cm-sortable assigned to a container of sortable rows (cm-sortable-row).

Example: Currency list in the administration panel.

  • cm-sortable-id-* - an ID of a particular row in a cm-sortable container. A value after cm-sortable-id- is passed in a request and used to store changes.
  • cm-sortable-items - assigned to a container for draggable blocks in the administartion panel.
  • cm-sortable-row - assigned to a draggable table row. The row must be placed in a cm-sortable container.

This small change would make life of store admins much easier. I’ve seen it done in othere e-commerece store engines.

@imac, @ikoshkin - could you share your thoughts about this improvement?

Thanks in advance for reply!

1 Like

Btw, does anyone know how to quickly implement it?

I’ve tried to add to design/backend/templates/views/products/manage.tpl line 22:

<div class="table-responsive-wrapper longtap-selection" cm-sortable data-ca-sortable-table="products" data-ca-sortable-id-name="product_id">

and to line 126:
cm-sortable-row cm-sortable-id-{$product.product_id}

but it doesn’t work

Any help would be appreciated

1 Like

The “drag and drop position” for a menu must also be configured in code, adding a class to the template is definitely not enough.
Position of products in categories is a not a widely used functionality (at least from our experience), so I don’t think implementing it is worth the time. Maybe you could set up the products positions through database?

1 Like

Yeah, this functionality is not widely used but in my opinion it’s because ot the implementation. Adding drag and drop would make things much easier.

Even better, it would be great to drag and drop products to change the position from the storefront.

@imac could you add it as a feature request to your backlog?

Hi!

I have created a new feature request for the developers. It doesn’t guarantee that it will be made in the near future, but it does guarantee that this idea won’t get lost after a while :slight_smile:

2 Likes