Tags/topics: 
1
Answers
Vote up!
2
Vote down!

How do I disable a product on checkout completion?

I have a site where every product is unique and will never be duplicated. I need to be able to disable a product when it is purchased (on checkout completion). Is there a way to do this using rules or something, without having to install the stock module?

Asked by: skenley
on November 6, 2014

1 Answer

Vote up!
1
Vote down!

skenley,

On checkout completion, you could load the product entity of every line item in the order (with a loop), and set the "status" data value to "disabled," then force save the entity.

Josh

Josh Miller
Answer by: Josh Miller
Posted: Dec 10, 2014