BUG: Sort by price and pagination for products with same price

Started by servlet, September 15, 2015, 21:25:09 PM

Previous topic - Next topic

servlet

I think there is a bug. I will try to explain.
I have a category with 50 products. All products have one price e.g. $5. Products per page are 10, and we have 5 pages.
When you have products with the same price an they are more then product per page some of products are displayed on the next (all) pages. No logic explanation. Sometimes second page is with the same products from first page. Visitors cannot see all of products. VM display some products on all pages and some products are not displayed ever.
I start test with VM 2.6.16 than 2.6.18 and finished with 3.0.9.

If it is a bug I think solution will be second parameter for sorting if in first parameter we have a products with the same values.
If it is a bug it is a serious bug because sort by price is most used option in e-shops.

Please test it.
Please write.
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

It is indeed not so simple. The problem is that from sql point, there is no order. So depending on collation and mysql engine you get different orders. Sometimes it is the same, sometimes not.

The new default ordering is now "Ordering, productName". So as long the ordering is everywhere=0, it is sorted by name. We may add a seconed ordering, so when the price is the same, it uses the next ordering.

The question is, what should we use? The virtuemart_product_id would be 100% safe. But sorting by last modified could be also interesting.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

Thanks for the replay Milbo.

I think the better way for second ordering will be "choosable" - user deside.
If you set last modified it is no so good. Reason: some users (advanced or pro) import a lot of products through mysql or using CSVI like me. In this case all products will be with same value of "last modified". I think this is an option but it is gut if user can choose and another options.
Other option:
Product ID is better than last modified but it is not perfect too. It will be good as an option.

THE BEST WAY but like an option too:

New column in sql for product details: ORDERING
All in Joomla have an ordering - vm categories too... but not for products...
The "ordering" will be the best if in the first rule we have same values for some products.
I think the "ordering" will be good to be included for both - first rule and for second rule. Some users can decide to sort only using first rule - ordering.

I think these three options are good for start.

I was write in other user post (not head topic) about need of ordering for custom fields. There is the same problem. When refresh a page custom fields are with different order very time... every product have different ordering of custom fields. This is not good for customers. What happen if you have 4-5 drop down custom fields like me.
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

There is ordering of product, but per category, old topic. You must set a category filter first.

Next, also the customs have ordering (within their group) AND customfields per product have an ordering. Dont know what is not working in your case.

Btw, I almost solved it using ids.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

Milbo, what is your decision about second parameter? When will be implemented?
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

Please try vm3.0.11.4, I worked on that, it does still not work perfect, but a lot better
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

Он-лайн магазин за фототапети http://mishelfoster.com

servlet

Hello
I am looking for this option in 3.0.12 but I cant find field for second rule.
Please post screen shot and mark this option. I dont see any difference with old versions...
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

The problem still exist. No fields for second and third rules for sorting.
VM 3.0.18
Он-лайн магазин за фототапети http://mishelfoster.com