So this is doable, but unfortunately there is no way to do it without a pretty significant rewrite. I'm assuming that you have some way to identify the different between the two quote items besides price. If that's the case:
sales/quote_item: representProduct()
the rewrite configuration in your module:
<?xml version="1.0"?>
<config>
<global>
<models>
<sales>
<rewrite>
<!--Your full class name should be specified-->
<quote_item>Namespace_Module_Model_Sales_Quote_Item</quote_item>
</rewrite>
</sales>
</models>
</global>
</config>
the original function:
public function representProduct($product)
{
$itemProduct = $this->getProduct();
if (!$product || $itemProduct->getId() != $product->getId()) {
return false;
}
/**
* Check maybe product is planned to be a child of some quote item - in this case we limit search
* only within same parent item
*/
$stickWithinParent = $product->getStickWithinParent();
if ($stickWithinParent) {
if ($this->getParentItem() !== $stickWithinParent) {
return false;
}
}
// Check options
$itemOptions = $this->getOptionsByCode();
$productOptions = $product->getCustomOptions();
if (!$this->compareOptions($itemOptions, $productOptions)) {
return false;
}
if (!$this->compareOptions($productOptions, $itemOptions)) {
return false;
}
return true;
}
our function:
public function representProduct($product) {
$parentResult = parent::representProduct($product);
//if parent result is already false, we already have a different product, exit.
if ($parentResult === false) {
return $parentResult;
}
$itemProduct = $this->getProduct();
/*
* do our check for 'same product' here.
* Returns true if attribute is the same thus it is hte same product
*/
if ($product->getSomeAttribute() == $itemProduct->getSomeAttribute()) {
return true; //same product
} else {
return false; //different product
}
}
If this function returns true, the products will be combined in the cart as the same item and thus you'll just increase your qty by the new qty amount.
If this function returns false, the products will look different and will appear as different items in the cart.