PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Total Sales vs Popularity

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

What is the difference between Total Sales and Popularity?

Also, when I set the default sort of a table to Total Sales, the sorted results do not reflect the actual historic sales of the products. Do total sales only include sales numbers from a specific period?

Hello

What is the difference between Total Sales and Popularity? - In fact, this is the same thing, but sorting has a different implementation.

Please  drop me  exact  link to  the  issue

Link data added to private area.

Hello

I checked  it - https://c2n.me/4e6lldd  - products are sorted correctly

I checked our sales quantities for this category and the sort order displayed on the category page does not match our actual sales quantities at all. (See screenshot links in the private area.)

What criteria is the Total Sales ordering using?

BTW, your screenshot is showing a 404 error.

Hello

What criteria is the Total Sales ordering using? - Each product has a meta field - total_sales. And my plugin sorts by this value correctly - https://c2n.me/4e7cfcY

OK. We had imported all of our original sales data and it appears that the total_sales value is not updated if sales data is imported. So that explains why sorting was not working.

You mentioned that sorting by Total Sales and Popularity are the same thing, but are implemented differently. Can you elaborate on this difference?

Hello

Sort  by  Total Sales:

this is added to the query arguments

$args['order'] = 'desc';

$args['orderby'] = 'meta_value_num';
$args['meta_key'] = 'total_sales';

 

Sort by popularity: This is added to SQL request

' wc_product_meta_lookup.total_sales DESC, wc_product_meta_lookup.product_id DESC ';

But as you can see, the sort uses the same fields.