Custom theme: What functions do I need to make mp_cart.php work?

Hello there

I'm trying to create a custom theme for Marketpress. Until now, the result isn't that satisfying because there isn't any example theme nor any good documentation. So, I hope you can help me with my issues.

Currently I'm working on the mp_cart.php. The file is created and contains the following code:

<?php get_header(); ?>
<div id="content" class="single product grid-7" role="main">
<div class="article">
<div class="entry-content">
<?php while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<div class="entry-text">
<?php mp_show_cart(); ?>
<?php endwhile; ?>
<?php get_footer(); ?>

Now, when I click on "Checkout" it just returns to the same page. What are the functions I need to add, to make the template work?

Besides that could you please provide a complete example theme to see how it is done correctly? Or do I have to pay another $39 for the framemarket theme?! That would make the whole plugin more expensive than any other shop plugin out there.

  • Mason

    Hiya baum,

    First off, welcome to WPMU DEV!

    To answer your immediate question, try defining it like this:
    <?php mp_show_cart('checkout'); ?>
    Also check the template-functions.php file in MarketPress for plenty of commented functions to get what you're looking for. The cart functions start at around line 710.

    The plugin itself works pretty well with any theme by default. I've set it up with the basic twentyten theme and it looks great - no custom templates required :slight_smile:

    Finally, I'd just point out that the plugin comes with literally no restrictions. You can use it as often as you like - in fact you can do that with every single one of our products for the price of $79 - that's nearly 250 plugins and themes.

    Getting the same developer package for either Shopp or WP E-commerce would cost you $299 or $195 respectively. (and I think our GridMarket theme is the coolest by far :smiley:)


  • baum

    hi masonjames

    Thanks for your help. the 'checkout' parameter did the trick! The $context defaults to something like 'widget' when not set, but not exactly - somehow strange. The template-functions file is great to start with but sometimes the descriptions are quite short.

    And I need to make a custom template because the layout is somewhat different from normal. And it should inherit styles from the rest of the site. The shop is only a part of it. Not like the gridmarket where the shop is the site.

    And yes you're right I can do with plugin whatever I like but sometimes it would be nice that it works without doing anything :slight_smile:. And for now I'm just interested in Marketpress that's why i see no need to upgrade the membership.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.