Jump to content

Subcategories-Products ordering in Category View


Tribal6

Recommended Posts

Hi all

The ordering of products in a category is set to 'ordering'. That works as it should.

But if the category has subcategories, the products should be grouped by its categories:

cat1
 cat2
  product c2-o1 (orderingNr 1)
  product c2-o2 (orderingNr 2)
  product c2-o3 (orderingNr 3)
 cat3
  product c3-o1 (orderingNr 1)
  product c3-o2 (orderingNr 2)
  product c3-o3 (orderingNr 3)

Products listing when viewing category 1:
[c2-o1] [c3-o1] [c2-o2]
[c3-o2] [c2-o3] [c3-o3] 

But client want
[c2-o1] [c2-o2] [c2-o3]
[c3-o1] [c2-o2] [c3-o3] 

 

In other words now the products are not grouped by category, just all (subcategories-)products sorted by ordering.
(SQL: ...ORDER BY product.ordering ASC

Instead of
(SQL: ...ORDER BY cat.ordering ASC, product.ordering ASC)

How can I achive this? I've tried to change the search query, but without success so far. Is there a option for that in the configuration that I've missed, or is there a module that can handle that?

 

I am grateful for any hint.
Thanks 
Roger

Edited by Tribal6 (see edit history)
Link to comment
Share on other sites

That is a puzzling and unclear question. 

You don't say what query you use. So I don't know which tables you have linked to and what "ordering" is defined as.

In principle the second type of query you show should work. You could also use the product's id_category_default field or the category's nleft field.

 

Link to comment
Share on other sites

I don't understand what is puzzling or unclear about this question. What is missing?

I have tried to find out which query is responsible for this result, respectively where an adjustment could be made, but I have not found the right place yet.

And with the postet SQL ordering clause, I'm just trying to explain what I'm trying to accomplish. It is not from a existing query.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...