Question about changing products sold for a limited time to 'draft' or 'archive product'.

I am using an application that accepts sales only during a set time period, but if I put an item in my cart during the sale period, I can purchase it after the sale period ends.
We would like to address this issue with a store-side setting.

I am thinking that by manually changing the settings to “Draft” or “Archive product” for the product after the sale period, it would be possible to prevent payment even for products in the cart.

1 Like

Hello @JP1192 ,

I think it is much better to create a condition which clears the cart once sales ends.

Regard
Guleria

Can you just set the inventory quantity of the product to 0 once you want to stop selling it?

This will block customers from purchasing it at the Checkout stage, even if it’s still in their cart (assuming you have unticked the Continue selling when out of stock option).

Thanks for your reply!

Since the product is made to order, it is sold with ‘Continue selling when out of stock’ checked at 0 stock.

Am I correct in assuming that if I remove this check when the acceptance period ends, it will behave as desired?

By the way, can’t I just ‘archive’ it?

Thanks for your reply!
You mean customize your store using languages such as liquid and JavaScript, right?
It might be a little difficult because I don’t have knowledge of those.

1 Like

I mean once the sale ends, clear the cart of each active user.

Yes it needs JavaScript which runs after every interval to check either sale is live or ends.
If it ends clear the cart of every user.