wecreateyou
Expert
Super Volunteer
Member Likes (0)
I want to add a cart widget using code rather than drag and drop from admin. What's the code for that. specifically the shopping cart.
Thanks.

Responses (2)
WPMU DEV Fanatic (joined October 2009) Likes (0)
Hi wecreateyou,
You could use mp_show_cart() for that! It's documented via comments on line 729 of marketpress-includes/template-functions.php, where you'll find more details on it.
The $context parameter lets you specify 'widget' to output the code used in the widget, like so:
function mp_show_cart('widget')You'll just have to work out a way to get that fit into your theme's widget area though.
-David
Member (joined September 2008) Likes (0)
Thanks I appreciate that!
Become a member