6 replies [Last post]
Pipolaye's picture
Offline
Joined: 05/23/2012
Juice: 32
Was this information Helpful?

Hello there,

I have an issue and I can't find a way to fix it.

My online shop is working really good, my products are displayed with a grid view, randomly.

However, I would like to have a link "order by price, cheaper first" which would be like "www.myshop.com/products?order=price&start=asc" for example.

I know it is not possible by updating my view for now because I'm using the grid one.

But is there a way to overwrite a "uc_catalog.module" function in my template.php to be able to get these 2 variables into the db query? I'm going crazy, I couldn't find a way to do it.

I also tried to create new views based on the original, but it doesn't work the way I want. It only works on the main page of my shop and not in the subsections...

Thank you so much for your help!

Please let me know if you need further details.

PS: I'm using Drupal 7.14 + Ubercart 3.1

Pipo

end user's picture
Offline
Joined: 01/11/2008
Juice: 1738
Re: How to change products order in a grid view
Pipolaye's picture
Offline
Joined: 05/23/2012
Juice: 32
Hello End User, This is

Hello End User,

This is exactly what I want! Have you got any tips to do that?

end user's picture
Offline
Joined: 01/11/2008
Juice: 1738
Re: How to change products order in a grid view

Go to

/admin/structure/views/view/uc_catalog/edit/catalog_grid

Expand the Advanced section of the view

Add a Relationship and select Taxonomy terms on node and select Catalog under Vocabularies. Click Apply

Under Sort Criteria add Sort criteria Product: Sell price. Check Expose this sort to visitors, to allow them to change it Click apply then save the view.

There is a small issue of the catalog view still showing the price form on the UC front page but I got to see if that can be removed from the front page.

Pipolaye's picture
Offline
Joined: 05/23/2012
Juice: 32
Re: How to change products order in a grid view

Thank you for your tip End User,

I tried but for some reasons I ignore, when I checked the "Expose this sort to visitors, to allow them to change it" button and click on "validate", it doesn't save it... I'll try to figure out what's going on tonight.

Anand yrh, I'm going to try to create my own view, thank you for the advice!

Anand yrh's picture
Offline
Joined: 03/06/2009
Juice: 316
Hello friend,You can also

Hello friend,

You can also use Views and build your own beautiful products pages, you can also add filters using views. (^_^).

1. Create a view
2. Display products based on Taxonomy terms (optional)
3. Display all latest products and add views filters for end user.
4. Theme the products page as you wish
5. Add a teaser lines below the products
6. Add 'Add to cart' button (Ajax can be used here)
7. Have your own url

of-course catalog uses views to do this but in this case you are free to experiment and you can also have different theme for every product pages. Smiling

Regards,
AnAnD | www.myclicksstory.com

Pipolaye's picture
Offline
Joined: 05/23/2012
Juice: 32
It Works!

Hey guys,

Finally I found the issue with the sorting: The Theme Developer Module.

Because of that module I couldn't save the "Expose this sort to visitors, to allow them to change it" checkbox state to yes.

Thanks everybody for your help! I will show you the final website online soon!

Have a nice day.