简体   繁体   中英

Adding shopify collection time frame condition

I need someone to help me with a code that I can use to make a time frame for my bestseller collection on Shopify. Normally, the bestseller automated collection covers all time, but I need it to just cover the best selling products in 30days.

In your Liquid, whenever you render that collection, you have access to all the products currently in the collection. Examine each product. Assuming you somehow have access to a date assigned to the product resource that helps you, you could hide products in the Best Seller list that do not qualify to be shown. That is probably the easiest route you have. Just like hiding search results you don't like, or hiding products that are out of stock, you use Liquid in decide if a product in the Best Seller listing is shown or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM