ok, I see.
To start with, you can get the total quantity using the following code:
$cartName->TotalColumn("Quantity")
where "cartName" is the name of your eCart object.
to determine if a number is a multiple by another number, you use division and look at the remainder, you can return the remainder using the modulus operator (%). the following code will check if the quantity is divisible by 6:
if($cartName->TotalColumn("Quantity") % 6 == "0")
i think the best way to do this for you site will be to use this if statement around the checkout button on the cart display page:
<?php if($cartName->TotalColumn("Quantity") % 6 == "0") { ?>
<checkout button here>
<?php } else { ?>
the total quantity of your order must be a multiple of 6 before you can checkout
<?php } ?>
on the checkout pages, you can use the same if statement to redirect to the cart page if the quantity is not a multiple of 6, add this code just before the doctype tag on the checkout pages:
<?php
if($cartName->TotalColumn("Quantity") % 6 != "0") {
header("Location: cart.php");
}
?>