9
Answers
Vote up!
0
Vote down!

Sorting product list manually

hi,
We need to have a manual sort on product listing in categories.
So that the admin is able to sort products as they need it for each category assignation.

It seems we would need a nodequeue in the category taxonomy and modify the collection_products view to sort by it.

But I can't get it done.
Any clue?

thannks!

Asked by: Mastap
on January 27, 2014

9 Answers

Vote up!
0
Vote down!

Example:

In "winter clothing" collection, we need a certain pant to be near the top
while in "summer clothing" we might want them a fit further in the list....

Answer by: Mastap
Posted: Jan 28, 2014
Vote up!
0
Vote down!

You mean that with Draggable_Views, within the taxonomy term (category), I would be able to SORT the products that belong to this category?

The product listing page would react on this?

Answer by: Mastap
Posted: Jan 28, 2014
Vote up!
0
Vote down!

Yes.. We already tried this as described in the definition in nodeorder module. But it seems that the DrupalCommerce view does not offer the weight_in_tid in the sort options. Maybe a relationship is wrong, or the view is already altered by DrupalCommerce view... Something was wrong.

We ended up sorting the view by altering it programatically like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function hook_views_post_execute(&$view) {
if ('collection_products' == $view->name) {
$orders = array();

foreach($view->result as $row) {
$nid = $row->entity;
$tid = $view->args[0];
$weight = db_query("SELECT weight FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid", array(':nid' => $nid, ':tid' => $tid))->fetchField();
$orders[] = $weight;
}

array_multisort($orders, SORT_ASC, $view->result);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The hard way. ;)

Answer by: Mastap
Posted: Jan 30, 2014

Comments

Hi Mastap,
I am attempting to do this myself, please could you let me know how I implement this suggestion of yours.

Many thanks in advance
Alex

- Alex Overton on October 27, 2014
Vote up!
0
Vote down!

As sorting products manually in each category (term) is really hot in shops to maximise convertion, there must be a general solution for this in Drupal Commerce? Does anyone have solution to this? I can't imagine not a single Drupal web shop is using this feature.

I'll be continuing my search :-)

Greets

Fernly
Answer by: Fernly
Posted: Feb 20, 2014

Comments

Manual sorting of nodes on a per taxonomy basis

I figured it out. But it's not very well documented in my opinion and that... I find very strange. Even stranger is the low amount of question people are asking about this. It's like nobody cares to manually order the products per category from a marketing point of view.

Or there is super easy solution out there that everybody is using and I just...missed.

The most usable solution is the module which is most used for manual sorting: DraggableViews.
The secret lies in the fact that you have to use native draggableviews sorting and activate the arguments handling of the draggableviews sort criteria. Don't use the Field API. One display of the view will be used as front-end page and one display will be used as sorting page (back-end).
More information about the setup can be found here: https://drupal.org/node/283498

A issue I ran into and solved: https://drupal.org/node/1813746#comment-8506599

- Fernly on February 21, 2014

Manual sorting of nodes on a per taxonomy basis

I figured it out. But it's not very well documented in my opinion and that... I find very strange. Even stranger is the low amount of question people are asking about this. It's like nobody cares to manually order the products per category from a marketing point of view.

Or there is super easy solution out there that everybody is using and I just...missed.

The most usable solution is the module which is most used for manual sorting: DraggableViews.
The secret lies in the fact that you have to use native draggableviews sorting and activate the arguments handling of the draggableviews sort criteria. Don't use the Field API. One display of the view will be used as front-end page and one display will be used as sorting page (back-end).
More information about the setup can be found here: https://drupal.org/node/283498

A issue I ran into and solved: https://drupal.org/node/1813746#comment-8506599

- Fernly on February 24, 2014
Vote up!
0
Vote down!

Manual sorting of nodes on a per taxonomy basis.

I figured it out. But it's not very well documented in my opinion and that... I find very strange. Even stranger is the low amount of question people are asking about this. It's like nobody cares to manually order the products per category from a marketing point of view.

Or there is super easy solution out there that everybody is using and I just...missed.

The most usable solution is the module which is most used for manual sorting: DraggableViews.
The secret lies in the fact that you have to use native draggableviews sorting and activate the arguments handling of the draggableviews sort criteria. Don't use the Field API. One display of the view will be used as front-end page and one display will be used as sorting page (back-end).
More information about the setup can be found here: https://drupal.org/node/283498

A issue I ran into and solved: https://drupal.org/node/1813746#comment-8506599

Fernly
Answer by: Fernly
Posted: Feb 21, 2014
Vote up!
0
Vote down!

Manual sorting of nodes on a per taxonomy basis

I figured it out. But it's not very well documented in my opinion and that... I find very strange. Even stranger is the low amount of question people are asking about this. It's like nobody cares to manually order the products per category from a marketing point of view.

Or there is super easy solution out there that everybody is using and I just...missed.

The most usable solution is the module which is most used for manual sorting: DraggableViews.
The secret lies in the fact that you have to use native draggableviews sorting and activate the arguments handling of the draggableviews sort criteria. Don't use the Field API. One display of the view will be used as front-end page and one display will be used as sorting page (back-end).
More information about the setup can be found here: https://drupal.org/node/283498

A issue I ran into and solved: https://drupal.org/node/1813746#comment-8506599

Fernly
Answer by: Fernly
Posted: Feb 21, 2014
Vote up!
0
Vote down!

Same problem! Not found solution for sort products manualy, when using view with facet search.
Does anyone have solution to this?

Answer by: Dr.Osd
Posted: Jul 9, 2014

Comments

Don't use node order in 2017, it has some weird bugs. Use Draggable Views instead.

- mazze on December 6, 2017