Lakestone Posted April 29, 2010 Share Posted April 29, 2010 I'd like to show how many products a customer has put in the cart inside the top, just like "4 units, total: $445". How do I get these kind of values? Do I have to write my own module, or is there some kind of API somewhere?Cheers! Link to comment Share on other sites More sharing options...
rocky Posted April 29, 2010 Share Posted April 29, 2010 Have you tried using the "User info block v0.1" near the bottom of the Modules tab? It almost does what you want. It displays "Cart: 4 products". You could probably modify it to display the total too. Link to comment Share on other sites More sharing options...
Lakestone Posted April 30, 2010 Author Share Posted April 30, 2010 Have you tried using the "User info block v0.1" near the bottom of the Modules tab? It almost does what you want. It displays "Cart: 4 products". You could probably modify it to display the total too. Thanks but the thing is that I'm designing my own theme and would like to get specific values to print in different locations. Where can I see all available values to retrieve? Link to comment Share on other sites More sharing options...
rocky Posted April 30, 2010 Share Posted April 30, 2010 See the file init.php for a list of the variables that are available to all TPL files. Most of the variables are at the bottom of the file. The first block of variables after the "if" are the variables that are available when "v1.1 theme compatibility" is turned off under Preferences. The second block of variables after "else" are the variables that are available when "v1.1 theme compatibility" is turned on. Two useful variables are the $cookie and $cart objects. The $cookie object gives you access to the customers name and whether they are logged in. The $cart object gives you access to what's currently in the customer's cart. See classes/Cart.php for the data and functions for the cart object. 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