Smart sort order for product images

Issue #595 resolved
Anonymous created an issue

This ticket is with respect to my posting on satchmo-users:


If I am adding only one image, obviously its sort order will be 1. If there's more than one image file submitted and no sort order is defined, simply assign incrementally.

Reported by mengkuan

Comments (2)

  1. Anonymous

    After reading the post, it would be nice to not have those annoying "this field is required" errors and losing whatever image file you previously specified. A super easy solution to this problem is to simply specify a default sort value of 0 for anything that can be sorted. This means that without any other user interaction items will all have the same sort value and be sorted according to whatever the "default" sorting method is. If a user wishes to override the default ordering of "no ordering" they can just alter values from 0. Another option would be to start everything as a default of 1 instead of zero. This makes it very is to have specify a "default" image by giving the main image a sort order of 0. Then again, you could give it a negative sort value I suppose. Either way, simple patch attached.

  2. Log in to comment