Vote up!
Vote down!

How to require a certain product to be bought before checkout.

I have a site that sells trees and other items. I require that only 1 tree be bought per transaction. I also require that a tree must be bought every transaction. I don't want the checkout to go through if there is no tree is the shopping cart.

What I tried with rules is this:

Completing the checkout process


Order contains a particular product
Parameter: Order: [commerce-order], Product SKU: Six Foot Tree, Operator: =


Complete checkout for an order
Parameter: Order in checkout: [commerce_order]

Could you let me know what I am doing wrong? It is not working.

Is there a simpler way to do this.

Asked by: nanaofosu
on October 15, 2012

1 Answer

Vote up!
Vote down!

Here's a rule export that reacts when a user goes from "shopping" to "checkout" ...


I would create an additional condition to see if they *do not* have a particular product in the Order and then redirect them to a page that describes how to continue checkout or perhaps automatically add a product to the order, etc.


Josh Miller
Answer by: Josh Miller
Posted: Jan 9, 2013