menu

Saleor Commerce

The world’s fastest growing open-source e-commerce platform with billions of dollars transacted. Powered by Python, GraphQL, ReactJS and PWA.

Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Design
view-forward
# Development
view-forward
# Saleor 3.0
view-forward
# Saleor Features
view-forward
Team

Best Sellers

May 27, 2020 at 10:53am
I'm trying to display best selling products on my page and I found reportProductSales but I cannot use it as it requires staff permissions. Is there any other way to do this or how can I change the query permissions?

May 27, 2020 at 11:30am
This query is meant for dashboard and we use it to render the home page information:
like-fill
1
  • reply
  • like
  • reply
  • like
That's why it requieres admin permission and cannot be accessed by unauthorized users.
  • reply
  • like
You can change admin user permission in the dashboard in Configuration > Staff Members section.
  • reply
  • like
Yes but I want to have best selling products on my home page. Any way I can do this?
  • reply
  • like

May 28, 2020 at 11:14am
Custom code will be needed, no way to get this out of the box. I would approach it this way:
  • create custom plugin
  • trigger it daily / weekly
  • plugin will find most popular items based on sold numbers
  • top 10 products would be added to collection 'Best selling Products'
  • you can query this collection for ex on homepage
Collections are good idea, because you can share url to all those products in for example mailing (ex: https://pwa.saleor.io/collection/summer-collection/1/ )
like-fill
5
  • reply
  • like