hello

i would like to be able to sort the way products are displayed in 'all products' page.
the only solution that i found around this subject is changing the creation date, what i dont see very professional to give to a client :)
i would like something like draggable views, but, at the moment, none of the modules that sort in views support entities...
i can sort creating an integer field on the product, but it is not very usable to have to enter numbers for a long list of products or if you need to rearrange, you have to edit many products.
i imagine that some of you had this need and i would apreciate if you tell to me how you solved it.
thanks a lot :)

Comments

jsacksick’s picture

Are you looking for something like this ? http://drupal.org/project/weight

candelas’s picture

thanks @jsacksick :)
i looked yesterday on it, but it uses the sticky field to weight and i use sticky in other thing, so i cant use it.

today i spoke with pcambra in the chat and he told to me that the draggable views works for him with commerce kickstart (edit: he tells to me that it was with commerce).
but he orders using tabledrag [1] for ordening.
i didnt know about this possibility, but monday i have a meeting with the client and i am very late.
so, depending on the meeting, i will see if i can give more time now to this or we can go at the moment with my simple solution (they have a fixed amount of products).

since, i think, new people using kickstart may want to sort these views, i try to document in this issue how i resolve it.
also, i think that in chat it is difficult to explain and maybe i got something wrong o explain bad when i talk with pcambra :)
any help on this is wellcome :)

how i am now:

i have an integer field in the product to order.
in views, in "products" "products/list"and "collection/%" i use it in the sort criteria and everything works perfect.
draggable views ok

as soon i try to use draggable views, i get this errors:

Notice: Undefined index: sorts in options_form() (line 32 of /xxx/sites/all/modules/draggableviews/handlers/draggableviews_handler_fieldapi.inc). =>

Warning: Invalid argument supplied for foreach() in options_form() (line 32 of /xxx/sites/all/modules/draggableviews/handlers/draggableviews_handler_fieldapi.inc). =>

draggable views problem

i am following a issue in draggable views with this error https://drupal.org/node/1751610 (i searched for the error but there are few results).

edit: i have tried with draggable views 7.x-2.0, 7.x-2.0-beta1 (pcambra told to me he was using this one in commerce (not in kickstart) and 7.x-2.x-dev

thanks for any input :)

[1] http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_add_tabledrag/7

candelas’s picture

if in the second image i select as handler the FieldAPY and choose as a field my integer field, i get the same errors.

cn313’s picture

Commerce Kickstart has a sort method installed by default (powered by Search API), the sort block appears on the all products page.

See it for yourself http://demo.commerceguys.com/ck/products

candelas’s picture

@cn313, i know, thanks.
but what i need it is to be able to sort with a mechanism similar to draggable views, which means that the products can be rearranged by Drag'n'Drop in a view similar to the products management.

joshmiller’s picture

Assigned:Unassigned» joshmiller

Documentation Tasks Cleanup. This is on my list and will be done soon.

candelas’s picture

thanks @joshmiller, thanks for assigning yourself this task.

i have also tried to put draggable views in admin/commerce/products/list in the view Commerce Backoffice: Products. i dont get any error but it doesnt work.

in this draggable views issue , one of the maintainers is studding how to solve it. maybe you can collaborate.

thanks :)

bojanz’s picture

@joshmiller
While this is a fun problem to solve, it shouldn't be a priority in the docs queue (we need to cover the functionality that we do have first)

iStryker’s picture

I am the co-maintainer of draggableviews. I have taken a look at this issue. If you create a product field called 'weight' then use FieldAPI. If you do not want to, then use Native.

The problem is with the sort field.

On the order sort page/block, you should see:
Draggableviews sort handler correct
But with commerce kickstart I see:
Draggableviews sort handler options removed

On the display page with this sort order you will see "Display sort as" like this:
Display page draggableviews UI

Commerce Kickstart removes the option_form settings, that is what is cause this error, and preventing draggableviews from working. I don't understand how it removes it, hopefully someone can shine a light on this.

candelas’s picture

thanks @iStryker for giving time to this issue. i neither know how they take away that...

iStryker’s picture

Ok, scratch my #9 comment. I got FieldAPI, Native handler and the way to sort them confused.

I managed to get this working for both FieldAPI and Native handlers using Draggableviews-7.x-2.x-dev and Commerce Kickstart 7.x-2.0-beta2 (sorry beta2 is the only test enivornment I have).

In the image above you have Native selected, but you do not have "Draggableviews: Weight", You need this to use Native handler.
In the image I see you have "Content: Product order". If this is a field, then you need to use the FieldAPI handler.

candelas’s picture

Issue summary:View changes

Hello again

After a year my client asked to add 2 new products. Since I had to reorder the product list in Commerce Kickstart, I tried again to add Draggable Views, but now it is not possible to add this kind of field. It doesn't appears in the field list to add. I imagine that is because it is an entity or something with Search Appy. If I create a view from 0 in the same installation Commerce Kickstart I could.

I used the last dev version in Draggable Views and the last stable distribution on Commerce Kickstart 7.x-2.12.

Any idea on how I can get it? I searched in internet but I didn't find any solution :)

candelas’s picture

Version:7.x-2.0» 7.x-2.x-dev
Category:Support request» Feature request
lsolesen’s picture

Category:Feature request» Support request
Status:Active» Closed (won't fix)

We are not going to include draggable views or other sort of manual sorting modules in CK 2.x. You need to implement this yourself. If you ever do, you are more that welcome to document your efforts here.

S@ilor’s picture

Hi Lars,

I quite frankly do not understand such a statement. Draggable Views is mentioned in several pages as the recommended method to make life a little easier for content managers in Commerce/Commerce Kickstart (see here: https://drupalcommerce.org/site-builders-guide/click-and-drag-manual-mer...)

I would personally be happy to be faffing about, and set this up myself, but like @candelas, I also do not get the options to add sorting with Draggable Views, when editing the Product Display view. It simply does not appear as an option. However, it does so in other views. So there must be something blocking in this particular view.

I will be greatly appreciated, if this issue could be solved, as there are no other viable method to my knowledge.

MrPaulDriver’s picture

I'd like to chime in with S@ilor because from a merchandising angle, displaying products is fundamental to the running of a shop.

Draggable views is the 'go to' solution with Views and that it is incompatible with commerce product displays is very disappointing indeed.

The sorting block provides some very limited utility for buyers, but is pretty useless for shop owners who need 'easy to use' granular control for product placement.

In the real world shop owners want to promote top sellers, loss leaders and sale items. A shop owner instinctively knows this stuff and should not be forced into complicated or abstract workarounds for something they ought to be able to do with their eyes shut.

A review of this important functionality would be most welcome, as would a change of status to 'should fix'.

MrPaulDriver’s picture

Component:Documentation» Code
MrPaulDriver’s picture

Title:Sort on 'All Products' page» Provide Draggable Views compatibility for product display views