How to modify a woocommerce ready theme for March

  • Bob

    Many ecommerce themes such as one I am working on now come "woocommerce ready" and have pages set up for that. How would I reconfigure the pages to look and work flawlessly with marketpress my ecommerce tool of choice? So I can create multiple themes for many ecommerce businesses that a novice could easily set up and configure their ecommerce store on my MU.

    All the Best,
    Bob

  • Bob

    This is what I am trying to do.. I want to modify existing templates to look an perform perfectly with marketpress.

    Here are my questions...

    1. Which one of the 3 methods below would I need to use..Easy, Advanced or the 10 lines of CSS in the last comment below?

    2. When I copy and rename my theme's page.php file to mp_product.php where do I put the store template files exactly?

    I'm learning more and more each day with your help that is why I signed up for 15 months from the start! Thank you

    There are two methods to create custom designs for MarketPress stores:

    Basic Styles:

    Basic styles are comprised of a css file and an optional images folder that is loaded
    and applied on store pages. To create a basic style:

    1. Create a css file in the /wp-content/marketpress-styles/ directory with your custom styles. It
    may be easiest to copy our default.css theme and modify it.
    2. Make sure to add the custom theme header with your theme's name at the top of the css file:
    /*
    MarketPress Style: CUSTOMNAME
    */
    Including this header will cause your custom theme to show in the dropdown on the
    Store Settings -> Presentation page so it may be selected.
    3. You can also optionally create a subdirectory for your css images in the /wp-content/marketpress-styles/ folder and
    link to images within it with relative urls like "image-folder/my-image.jpg".

    Advanced Themes:

    MarketPress uses custom post types to display it's products. This means that you can use
    the same WP theme templating system you are familiar with. We simply provide a customized
    subset of template functions so you don't have to worry about dealing with post meta. Template
    functions are fully documented and can be found in the /marketpress/marketpress-includes/template-functions.php file.

    E.g. to create a custom product page:

    1. Make a copy of the page.php template file in your theme directory and rename it mp_product.php

    2. mp_product.php must use the mp_* functions instead of the_content(), see template-functions.php for a list of functions relevant to products.

    MarketPress searches your current theme folder for template files specific to store pages. If
    a template file does not exist it loads the theme's page template instead. Just like WP, the
    plugin will search for templates in order of priority from top to bottom. Here are possible
    file names for store templates in order:

    Single Product Page
    mp_product-PRODUCTNAME.php
    mp_product-PRODUCTID.php
    mp_product.php

    Store Page
    mp_store.php

    Cart/Checkout Page
    mp_cart.php

    Order Status Page
    mp_orderstatus.php

    Product List Page
    mp_productlist.php

    Product Category List Page
    mp_category-CATEGORYSLUG.php
    mp_category-CATEGORYID.php
    mp_category.php
    mp_taxonomy.php
    mp_productlist.php

    Product Tag List Page
    mp_tag-TAGSLUG.php
    mp_tag-TAGID.php
    mp_tag.php
    mp_taxonomy.php
    mp_productlist.php

    --------------------------------------------------
    Global Listings - Will only work on main site/blog
    --------------------------------------------------
    Product List Page
    mp_global_products.php
    mp_productlist.php

    Product Category List Page
    mp_global_category-CATEGORYSLUG.php
    mp_global_category.php
    mp_global_category_list.php

    Product Tag List Page
    mp_global_tag-TAGSLUG.php
    mp_global_tag.php
    mp_global_tag_list.php

    I hope that helps!

    I am marking this issue as resolved.
    In case you need any further instructions and/or clarifications, don't hesitate to reopen this issue and post an update on your current status.

    Cheers,
    Ari.

    THU MAR 21 2013, 4:15:13 AM (0)

    ncongo INACTIVE

    62 #1540 GIVE POINTS
    Thanks for the referential reply. This does make it appear relatively straightforward and simple. Is there any way to ease the customization process to load the main site's header and footer without creating a custom theme per say by hours of CSS style coding. Please confirm.

    Regards...William

    THU MAR 21 2013, 4:30:21 AM (0)

    aristath STAFF

    16528 #4 GIVE POINTS
    In my experience MarketPress will work out-of-the-box with most themes. The amount of customization needed is usually no more than 10 lines of css... The above custom templates etc are only used if you want to really customize your template files etc.

    If for example you download the FrameMarket theme and take a look at it's GridMarket child theme, you'll see that template files are really easy!
    The single products template looks like this:
    <?php // custom template for product single view
    get_header();
    ?>
    <div id="content">
    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="product-photo"><?php mp_product_image(true, 'single', null); ?></div>
    <div class="product-details">
    <div class="content-box">
    <?php the_content(); ?>
    </div>
    <?php echo framemarket_product_meta(); ?>
    </div>
    <?php endwhile; else: ?>
    <p><?php _e( 'Sorry, no posts matched your criteria.', 'framemarket' ) ?></p>
    <?php endif; ?>
    <?php comments_template( '', true ); ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer() ?>
    Cheers,
    Ari.

  • Michelle Shull

    Hi Bob! This is a pretty ambitious task! You've really been pushing yourself to learn, that's great!

    I've got a short answer, and a longer answer for you. : )

    Short answer: It's possible to do what you want to do, but it's pretty complicated, and not something I'd tell a relative beginner to take on without the guidance of an expert. It's also a bit out of scope for what we can hash out in a forum, because there are a lot of details.

    Longer answer: The issues come up with, like you noticed, the names of different functions. So even though Market Press and Woo Commerce do similar things, Woo might call one part Woo Ham Sandwich and we'd call it MP Turkey Burger. (It's lunch time, pardon my food metaphors.) Getting one to play nicely with the other is a matter of renaming those functions so the theme knows what to do with them, or editing the theme to change all the names of the functions in there to match MarketPress. So there are going to be multiple edits, in multiple files, across multiple directories, just to hope we can make it work.

    The way I see it, you've got two good options.
    1. Hire one of our Wonder Devs who is an expert in themes, especially Woo themes, if you can find one, through our jobs board to make these edits for you. OR
    2. Consider finding an alternative to Woo's theme. Our Frame Market and Grid Market themes will play very nicely with just about any theme out there, as long as that theme wasn't already set up to work with a different ecommerce platform.

    Hope this helps!