Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate total sales during a particular time period #1987

Open
Yatoom opened this issue Jun 11, 2022 · 1 comment
Open

Calculate total sales during a particular time period #1987

Yatoom opened this issue Jun 11, 2022 · 1 comment
Labels
type: enhancement The issue is a request for an enhancement.

Comments

@Yatoom
Copy link

Yatoom commented Jun 11, 2022

Is your feature request related to a problem? Please describe.

Within the storefront-best-selling-products homepage section, the best-selling products are calculated over the total sales for each product. However, we would like to show the best-selling products over - for example - the last 6 months.

Describe the solution you'd like

I would like to set a startDate parameter that accepts a DateTime object. I can then calculate the datetime of 6 months ago and pass this value to the startDate. Storefront will then display the best-selling products based on the sales in those last 6 months.

Describe alternatives you've considered

There is a paid plugin, which allows you to decide whether to calculate best sellers based on total sales or total sales during a particular time period. https://woocommerce.com/document/best-sellers/

@Yatoom Yatoom changed the title Calculate best selling products over a period Calculate total sales during a particular time period Jun 11, 2022
@tomasztunik tomasztunik added the type: enhancement The issue is a request for an enhancement. label Jun 14, 2022
@tomasztunik
Copy link
Contributor

Thanks for the feature idea @Yatoom. I can see myself using this as well, and we'll review if it is possible to implement it on the storefront level.

We are also working on updating how product listing works for WooCommerce Blocks and we'll be updating these blocks to use QueryLoop behind the scene. It should make it possible to give much more control over how and what we list in product grids/lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants