A question on the cart class.
In the class, the function _save_cart() contains the following code:
...
// Is our cart empty? If so we delete it from the session
if (count ($this->_cart_contents) <= 2)
{
$this->CI->session->unset_userdata ('cart_contents');
// Nothing more to do... coffee time!
return FALSE;
}
...
Why is the cart content validated against count <= 2 instead of count < 1?
It would appear that the save_cart function would remove any order in the session containing ZERO, ONE or TWO items. The comment makes reference to a check for an empty cart, but the code tests for <= 2 items…
Could someone please explain it?
Thanks
Dave
