(2015-06-12, 08:53:47)morvy Wrote: Hey Cupuyc1989
you have small bug in quantity logic > you're using !empty so it won't trigger on quantity = 0, but you have a condition to unset item, if there is 0, so instead of !empty you should use isset
Quote:The following things are considered to be empty:
"" (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
$var; (a variable declared, but without a value)
See under "Return Values" section http://php.net/manual/en/function.empty.php ;-)