Tags: Collections, Products
This task watches for newly-paid orders (or newly-fulfilled orders, if you choose), and adds or moves the purchased products to the top of the collection of your choice. Optionally, ignore products that are sold out. Useful for "trending products" functionality. :)
- View in the task library: tasks.mechanic.dev/maintain-a-collection-of-recently-purchased-products
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"collection_maximum_size__number_required": null,
"collection_id__number_required": null,
"ignore_products_that_are_sold_out__boolean": null,
"wait_until_order_is_fulfilled__boolean": null
}
Learn about task options in Mechanic
{% if options.wait_until_order_is_fulfilled__boolean %}
shopify/orders/fulfilled
{% else %}
shopify/orders/paid
{% endif %}
Learn about event subscriptions in Mechanic
This task watches for newly-paid orders (or newly-fulfilled orders, if you choose), and adds or moves the purchased products to the top of the collection of your choice. Optionally, ignore products that are sold out. Useful for "trending products" functionality. :)
This task watches for newly-paid orders (or newly-fulfilled orders, if you choose), and adds or moves the ordered products to the top of the collection of your choice. Optionally, ignore products that are sold out.
Provide this task with ID of a manual collection, which you've configured to be manually sorted. (Learn how to find the collection ID.)
YouTube: Watch the development video!
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!