Quote Originally Posted by DrByte View Post
You don't need it, because you're not using it ... at least, not in that function.
First, because payment modules are not activated on the shopping cart page, there's no way the $productsArray will have any data in it anyway.
I thought because we were in the same session some vars might had content ... (that was just in theory).


Quote Originally Posted by DrByte View Post
Second, every function starts clean, and knows nothing about any other variables outside itself. That's just how PHP has always worked. Each function is its own scope. The only way to get around that is to pass parameters to it or to global certain variables, and using global is an older convention only applicable to procedural code, whereas PHP is headed towards object-oriented code instead.Yes, as I said, unless you're ON the shopping cart page when the payment module is instantiated and called, none of the shopping cart data is available to you anyway.
If you want to mimic similar behavior you'll have to copy and duplicate the code to do that.
ok, so the cart data is stored in tables? So I can query them and retrieve it? ...

Quote Originally Posted by DrByte View Post

You're not merely writing another payment module here. It's more like you're re-architecting a whole new checkout.

Yes, more like it, as this system overrides all the functions and takes only raw data from the cart. So in PHP OOP there is no way to 'store' an array and reuse its contents, not even in a SESSION(I am really not familiar with PHP OOP)?