Hi,
You should just add a check on the file 'cart' of the 'checkout' view via the menu Display->Views and add such code:
<?php
$total = 0;
foreach($this->products as $product){ $total+=$product->cart_product_quantity; }
if($total%6){
$app =& JFactory::getApplication();
$app->enqueueMessage('Not possible');
$this->nextButton = false;
}
Or you can also do it with manual shipping methods. Suppose that all your products weight 1kg. You could create shipping methods with range restrictions from 5.5 to 6.5, from 11.5 to 12.5, etc. And the system wouldn't find any shipping method when the weight wouldn't be in these ranges and wouldn't let the user finish the order.