Patch for variable reference problem

Fixed a typo where the function was referring to the wrong cart items. I'm pretty sure this isn't referring to a global, just want to make sure.