Jump to content

[SOLVED]Getting Products in Cart before payment


Recommended Posts

Is there anyway I can get the products in a Cart before the user pays for the items in the cart? I've been looking around a few of the Cart Class functions and I've seen 'containsProduct();' function. I've managed to return the value of this function in Smarty but at the moment I can only see it as an Array(), tried to extract the data with a foreach but to no avail. Anyone know how I can get what I need from this? Even another method would be Helpful

Link to comment
Share on other sites

Worked it out!

in the php file for what you need the variable simply assign 'global $cart' then assign $cart->getProducts() to the variable of your choosing. This will return a multidimensional array in the tpl and then it's just a case of reiterating through the arrays with foreach loops, very handy!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...