Product sorting in catalog

Posts: 34
Joined: 08/07/2007

The default sort is alphabetical. Is there way to stop it from doing this and to sort by weight (not the weight of the product: -10 to 10 style used to order stuff?) The only weight i saw in the product edit page is for shipping weight.

Posts: 17
Joined: 08/07/2007

You might want to use either "nodeorder" or "Node Queue" depending on how you set up your shop/catalog.

I'm using node queue to build my catalog.

Both modules are available on drupal.org

Posts: 151
Joined: 08/07/2007
AdministratorNot Kulvik

Ubercart does not support this yet. We are definitely working on this. Perhaps Ryan or Lyle can add this to there battle plan and give you a better idea of when it will be available. It should happen in the next month for sure.
Peace,
Andy

Posts: 34
Joined: 08/07/2007

I'll have a look at those modules. Thanks!

Posts: 2243
Joined: 08/07/2007
AdministratoreLiTe!

Can do, Andy.

Posts: 34
Joined: 08/07/2007

i couldn't get node order to work correctly. i am working with the "weight" module, but it doesn't seem to have an effect. in the uc_product table is there a way to add an invisible field so i can put the weight there. is there something in the code that tells tapir the default sort? i'm going to check it a bit, but if someone knows off the top of their head...

Timothy (not verified)

Thanks to the developers for a great product. Wondering if there are plans to have Ubercart keep track of best sellers, and also to have Ubercart sort products according to their popularity?

Posts: 4
Joined: 01/09/2008

go to admin/store/settings/tables/uc_product_table (tapir settings) and change the display order changing which field is showing first (example, set weight of price to -4, or any other value under the rest to order by price).

Publicidad en internet

Posts: 14
Joined: 02/07/2008

Maybe add an option in Ubercart settings for selecting sorting field and store it as variable_set('uc_catalog_sort_field',$value)?

And after that modify uc_catalog.module from

<?php
 
if (empty($_REQUEST['order'])){
   
$order = 'p.ordering, n.title';
  }
?>

to
<?php
 
if (empty($_REQUEST['order'])){
   
$order = variable_get('uc_catalog_sort_field','p.ordering').', n.title';
  }
?>

For example, for using nodeorder sorting method you can set variable as variable_set('uc_catalog_sort_field','tn.weight_in_tid').

Posts: 18
Joined: 09/14/2007
Bug Finder

That is something I'd be interested in as well, having certain catalog pages automatically sorted by a specified field in the table