1 reply [Last post]
djulow's picture
Joined: 02/21/2013
Juice: 4
Was this information Helpful?

Hello, I am currently in the process of creating a shop for a winemaker.

He sends his bottles only per box of 6.

He wants the buyer can not validate the order if the number of bottles in the basket is not a multiple of 6. if the basket contains 5 bottles, a message says the buyer to add one more bottle to match the condition expedition "box of 6 bottles."

Is that possible with Ubercart and Rules?

DanZ's picture
Joined: 08/07/2011
Juice: 1734
It should be possible. There

It should be possible.

There is a new Rules event called "Customer starts checkout" that is fired when the customer clicks on the "Check out" button. Upgrade to Ubercart 7x.-3.4 and use that.

I'm not sure if there is a built-in condition you can use to check if the number of products is divisible by six. If not, it would be easy enough to use a custom PHP condition or write a small module to do the job.

The Rules action (if the number of products isn't divisible by six) should be to print a message and redirect back to the cart page.