This is an example of how to display "n units purchased in the past week" on Shopify without using an app. Using Shopify Flow, the purchase history for the past week based on the product purchase date is saved in a variant metafield, and then used to display the total number of purchases for the week on the product page.
Example of setting to display "This product was purchased n times in one week" on the product details page without using the app

[Setup Method 1] Create a variation metafield in JSON format named "custom.recent_7days_sales_count"

[Setup Method 2] Create a Flow that "Save the sales quantity to the variant meta field" triggered by the quantity change "Product variant inventory quantity changed"

[(For Rise/Dawn Themes) Setup Method 3] Add a customized Liquid block to the product information section of the product template and insert the code.

