[eluser]HA[/eluser]
Ahh... Found the issue.
I'm not sure if it is functionally something you'd want to change in the CI core, but the reason I was having a problem was I wasn't using the optional 'options' array to store my items attributes, I was instead adding attributes directly to the items itself (which is also documented usage).
In the Cart class's _insert function (line 140) it is documented that:
Code:
// We now need to create a unique identifier for the item being inserted into the cart.
// Every time something is added to the cart it is stored in the master cart array.
// Each row in the cart array, however, must have a unique index that identifies not only
// a particular product, but makes it possible to store identical products with different options.
// For example, what if someone buys two identical t-shirts (same product ID), but in
// different sizes? The product ID (and other attributes, like the name) will be identical for
// both sizes because it's the same shirt. The only difference will be the size.
// Internally, we need to treat identical submissions, but with different options, as a unique product.
// Our solution is to convert the options array to a string and MD5 it along with the product ID.
// This becomes the unique "row ID"
Perhaps a better implementation would be to apply a "random" string to apply MD5 to to create its 'rowid', in case the optional 'options' array isn't being used (or isn't being changed).
Of course, that would only be in the case you did indeed *always* want the user to be able to create cart items with all duplicate attributes naively!