Author Topic: BUG: Sort by price and pagination for products with same price  (Read 1742 times)

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
BUG: Sort by price and pagination for products with same price
« on: September 15, 2015, 21:25:09 pm »
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.
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #1 on: October 05, 2015, 11:05:04 am »
No one check this problem?
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: BUG: Sort by price and pagination for products with same price
« Reply #2 on: October 09, 2015, 08:56:16 am »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #3 on: October 09, 2015, 09:31:56 am »
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.
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: BUG: Sort by price and pagination for products with same price
« Reply #4 on: October 09, 2015, 09:40:41 am »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #5 on: November 09, 2015, 16:38:23 pm »
Milbo, what is your decision about second parameter? When will be implemented?
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: BUG: Sort by price and pagination for products with same price
« Reply #6 on: November 10, 2015, 00:12:30 am »
Please try vm3.0.11.4, I worked on that, it does still not work perfect, but a lot better
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #7 on: November 10, 2015, 09:44:48 am »
Thank you for information.
I will try it.
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #8 on: January 03, 2016, 10:07:44 am »
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...
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com

servlet

  • Jr. Member
  • **
  • Posts: 348
  • Business optimization
    • Фототапети
  • VirtueMart Version: 3.2.2
Re: BUG: Sort by price and pagination for products with same price
« Reply #9 on: October 21, 2016, 09:45:47 am »
The problem still exist. No fields for second and third rules for sorting.
VM 3.0.18
I am using: Joomla 3.7.2 VM 3.2.2
Он-лайн магазин за фототапети http://mishelfoster.com