Understanding Filters and Sorting - Struggling....

  • Posts: 55
  • Thank you received: 2
12 years 7 months ago #73033

Hi,

I am still struggling a bit getting my head round filters and sorting my products how i want them and im probably doing it all wrong

I have attached a screenshot of how i have currently got my offline shop working.

On the left you will see categories of books, which i want sorted by title name when clicked on, which was working fine, as i set the "Ordering Field" to "product_name" under Parameters for products.

Now I have been asked to give the option of sorting by author name which I have setup a custom text field for . I have then published a hikashop filter module on the left hand side called "Books by Author" as you can see on the screenshot. I setup a filter, type list, apply on sort, and sort by author which appears to work fine.

I have two problems with this setup:

1) Once I have sorted by author whenever i click on the categories on the left it will always sort by author and I cant get it to automatically sort by product_name anymore. I would like if possible that once I click on the category again it returns to sorting by product_name

2) After sorting by author name - i click on a product and it shows me the the details - but if i then click the back button I get page not found with a popup option to resend the data. What have i done wrong!


Hope someone can help as im struggling!

Thanks

Dave

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26253
  • Thank you received: 4040
  • MODERATOR
12 years 7 months ago #73226

Hi,

Filter sorting are stored in the user session. So when the user would change the page, the sort type would be the same.
So, if the customer change the category, the sorting would be kept.
The solution is to include the default "sort option" in the url of your categories links. So when the customer would click on it, the sorting would be reset to this value.

After that, when you change the "sort column" or the "sort direction", data is passed thought POST.
It means that a form is submit to your website including all filter options.
That's why, when your browser go back in his history, see that the page were a "POST" page and ask you to re-submit the form.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 12 years 7 months ago by Jerome.
The following user(s) said Thank You: dlarge

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum