CTDAN Posted April 28, 2010 Share Posted April 28, 2010 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 More sharing options...
CTDAN Posted April 29, 2010 Author Share Posted April 29, 2010 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 More sharing options...
rocky Posted April 29, 2010 Share Posted April 29, 2010 Thanks for posting the solution you found. If your issue is resolved, please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now