Can I edit MarketPress per site? Is there a manual?

I would like to edit the layout of the MarketPress pages but it seems that any changes to it would apply to all sites in my network that use it. Here's what I'd like to do:

Remove "Catagorized in" or move it to below the purchase option for the item displayed.

Can I remove "Have a User Account?" section of shopping basket?

Is there a manual for this plugin?

Martin

  • Martin Koss

    So I guess the answer to my question about a manual is 'no'?

    I'm no idiot when it comes to hacking WP but having just spent $400+ I don't expect to have to guess my way through getting the plugins working as I need them.

    The one and only reason I bought this membership was when I saw the MU Ecommerce plugin with variable pricing options. However, I've spent all day waiting for answers as so much of it needs to be explained but there is no manual - or so it seems.

    I didn't spend over $400 to play guessing games and hope the answers are in the forum.

    Sorry if this seems somewhat harsh but...

    I've attached an image with arrows showing bits I can't get right. Like;
    how can I have a thumbnail on the item that shows up in the category and in the shopping cart but NOT in the item itself.
    How can I remove the link to the category...
    How can I make the layout the way my client needs it?

    And, as I asked earlier: If I edit the plugin for this site, does that make the same customisations apply to every site? If it does then it is not an MU plugin.

    Please take some time to respond in detail. I would sincerely appreciate your help and one line answers is not helping at all.

    Martin

  • Aaron

    First off I assume you are using the 2.0 beta so expect some bugs in it that we're working through.

    So I guess the answer to my question about a manual is 'no'?

    Sorry missed that. We are currently working on one.

    how can I have a thumbnail on the item that shows up in the category and in the shopping cart but NOT in the item itself.

    You don't insert the image in the post, set it as the featured image on the create product screen.

    How can I remove the link to the category...

    It looks like a css issue when using product variations in 2.0 beta. We'll get that fixed.

    How can I make the layout the way my client needs it?

    MarketPress has robust custom themeing support to make it look exactly how you want it. For details you can view the readme file linked to on the presentations settings page.

    If I edit the plugin for this site, does that make the same customisations apply to every site? If it does then it is not an MU plugin.

    No, every site is it's own independent store with it's own unique settings on the Products -> Settings page.

    I hope that answers most of your questions.

  • Martin Koss

    I haven't added an image to the product. I have both image options set to use WP thumbnail size (which is 150 x 150). I get the original size image and a 150 x 150 in the category view and in the product page.

    Yes I am using 2.0 beta. As I mentioned, I was sold on the Ecommerce with Variations but after I signed up and downloaded the previous version I found IT didn't actually have variations.

    I had a look at the readme file and looked for the editable files, mp_cart.php etc., but gave up hunting.

    I gotta say this plugin has cost me more wasted time than any plugin I've used in the past. I should have created a handful of sites today and infact I haven't finished a single site.

    Unhappy - you bet!

  • Martin Koss

    Thank you David.

    Yes. I am trying to achieve what I would expect to be able to achieve from a premium plugin.

    $400+ to get my hands on a premium ecommerce solution that has given more grief than I've ever had from free plugins... So, please excuse me if I seem somewhat beyond the extent of my patience.

    I want one picture displayed in the category view, one picture shown in the item view, and a thumbnail shown in the shopping cart. I'd also like to control how the pages are displayed - remove the link back to the category, change how the text is displayed...

    Martin

  • DavidM

    Hi Martin,

    As Aaron mentioned, we're in the process of working out tutorials for the plugin and in the meantime, we'll do our best to get you as much details as possible regarding customization.

    To start with, besides all the included shortcodes, there are a number of template functions you can use within your own theme files to customize the display as you like. They're documented by way of comments in the following file in the MarketPress folder.
    marketpress\marketpress-includes\template-functions.php

    This all is mentioned, along with information regarding CSS customization, in the following file:
    marketpress\marketpress-includes\themes\Themeing_MarketPress.txt

    Regarding the image you posted, I believe your current theme is displaying the featured image twice, once perhaps as the smaller thumbnail. Could you maybe try seeing how it displays using the default WordPress Twenty Ten theme?

  • Martin Koss

    The theme I was working with earlier looks best but, as I explained, the dynamicly created pages (shopping cart, etc) are not placing <title> tags in so I get the page title at the very top of the pages before the theme kicks in.

    If I could fix that I would be all good to go... I sent Aaron the theme (Catalyst). I can't hand a project over to my client that isn't right and I can't not give them the theme they wanted. I am reaching a very desperate state as I bought the subscription today (well, yesterday now) in order to finish the project - and I haven't.

    It's extremely unusual for a plugin not to work 100% with Catalyst - in fact, I've never known one not work with it or it's predecessor (Frugal).

    Any news on that yet?

    Thanks for looking into it.

    Martin

  • DavidM

    Hi Martin,

    I've just tried out the theme myself on a test site with MarketPress and it's not duplicating the featured image. I'm not sure why your site is.

    Regarding the default.css, I believe that would have been the case for the prior non-beta version. We'll get that sorted during the beta process.

    Regarding those mp_product-PRODUCTNAME.php and other files, the instructions read:
    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.

    So basically, the plugin looks for those files and if it doesn't find them, then it resorts to your theme's files.

  • DavidM

    The best starting point for those files normally is the theme you're using, where you could, for instance, start with your theme's single.php file as a foundation for mp_product.php.

    Given the theme you're currently working with, I'm not quite sure where to begin, as it doesn't use general WordPress theme files like single.php. I did find the following reference for working with it and custom post types (MarketPress products are a custom post type).
    http://catalysttheme.com/forum/archive/index.php/t-88.html

    I'll take a closer look into these things though. It looks like it could be a very simple process according to that page I just mentioned.

  • Martin Koss

    Morning David.

    Phew! My head hurts...

    I don't mind getting my hands dirty in WP but this is going way over my head. Additionally, because Catalyst is such a solid theme, I don;t want to dabble where I don;t know what I'm doing.

    With regard to the them I showed you that had 2 images showing in the product, the 'single.php' file looks like this:
    ___________________
    <?php
    get_header();

    if (have_posts())
    {
    while (have_posts())
    {
    art_page_navi();
    art_post();
    comments_template();
    }
    art_page_navi();
    } else {
    art_not_found_msg();
    }

    get_footer();
    ___________________
    That's it!

    Do I know the anatomy of every theme in use on my network? No. But it seems to me that, in order to get full customisation of the presentation of a store I need to have an intimate understanding of every theme.

    Afterall, I'm just trying to run a network and provide a few bells and whistles to the blogs in that network.

    Just to clarify; and hope you can tell me if I'm looking at this right.

    Editing 'template-functions.php' would change the look / layout of all stores in the WPMU network.
    Adding new template files to a theme will only modify the site that uses that particular theme.

    So we're best to leave 'template-functions.php' as is to avoid messing up all sites.

    In order to customise the look of the product pages, the category pages and the store, etc.,

    1. Break down the anatomy of the installed theme.
    2. Understand where in the theme the php code needs to go to display products the way we want them.
    3. Create a new file (eg: mp_product.php) that replicates the existing 'page.php'
    4. Understand the anatomy of MarketPress.
    5. Figure out what short_codes etc, are required to display shop content.
    6. Add html / php / shortcodes to the new files to set-up the presentation of the store.

    Seems like an awful lot of work when all I want to do is replicate something like

    <tr>
    <td colspan="2">Product Title Goes Here</td>
    </tr>
    <tr>
    <td>Product Image Here</td>
    <td>Product Description Text</td>
    </tr>
    <tr>
    <td>Variations Drop-Down</td>
    <td>Add To Cart</td>
    </tr>

    I know tables are old-hat but the above was an easy way of explaining the simplicity of what my client wants. That took 30 seconds to write - yet I've now used up almost 24 hours trying to work out how to achieve it.

    Martin

  • Tammie

    I'm going to step in and offer some help for those having the categories meet variations and clash issue.

    This is because of a float: right; which is totally happy until we get a few categories going on then we get a clash and a very small category section.

    A few solutions:

    1. The ultimate solution in my opinion when you have a custom theme is to go with a template just for this page. To do this create a new file called mp_product.php. Make sure you copy EVERYTHING a page on your site would have. MarketPress takes the page template (page.php) and adds it's content in the_content(); bit along with title and whatever else hooks you have. Doing this you can control things a bit more.

    Personally I like to create a function called myfunction_product_meta() put this in functions.php for your theme or any 'where I put my functions files' :slight_smile:

    function myfunction_product_meta() {
       global $post;
    
       //don't filter outside of the loop
     	if ( !in_the_loop() )
    		  return $content;
    
       $content = '<div class="product-meta-details">';
       $content .= mp_category_list($post->ID, '<span class="grid_mp_product_categories">' . __( 'Categorized in ', 'mp' ), ', ', '</span>');
       $content .= mp_tag_list($post->ID, '<span class="grid_mp_product_tags">', ', ', '</span>');
       $content .= '</div><hr/><div class="product-meta-details">';
       $content .= mp_product_price(false);
       $content .= mp_buy_button(false, 'single');
       $content .= '</div><hr />';
    
       return $content;
     }

    If you look here I have split around things a little more using a hr and div so that it means the product_price and buy now is in a different container. To me this makes sense as they are the same UX elements. Depends on what way you want to roll with things really.

    As a bit of extra stuff here is what I have in an example mp_product.php:

    <?php // custom template for product single view
    get_header();
    ?>
    	<div id="content">
    		<h1><?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 myfunction_product_meta(); ?>
    			</div>
    				<?php endwhile; else: ?>
    					<p><?php _e( 'Sorry, no posts matched your criteria.', TEMPLATE_DOMAIN ) ?></p>
    				<?php endif; ?>
    	</div>
    <?php get_sidebar(); ?>
    <?php get_footer() ?>

    Downside to this is if a new version comes you could hit a problem but it gives you control over things a bit more so the 'ultimate' solution I'd say.

    2. For those not wanting to go that route we're going to look at the CSS. Now, the problem is a long category list and the float: right on the price block. So, lets solve that one:

    form.mp_buy_form {
        float: none;
    }

    You may have to whack the horrible !important on that depending on your theme. But that stops all floating so is a bit of a hammer approach to it.

    Lets have a bit of a look at other CSS options...

    Clear right on the product categories as the right float is issue - bit of the other side of coin to above method:

    .mp_product_categories {
        clear: right;
    }

    Don't like clearing.. no problem :slight_smile:

    .mp_product_categories {
        overflow: hidden;
        width: 100%;
    }

    As you can see there are numerous methods around that one. Hopefully this will help those having display issues. My ultimate recommendation is if you love the theme taking time to learn the templating in MarketPress truly is worth it. It's a very very very powerful part of this plugin and shouldn't be ignored as an option.

  • Martin Koss

    Wow Tammie... That sure is one serious explanation. I shall have to clear my mind and go through it.

    Using my preferred theme I can make do with CSS edits. My biggest problem with my preferred theme, though, is the stray page titles of Shopping Cart (etc) that show up at the very top of my pages.

    Aaron has a copy of Catalyst but I've not heard back.

    Basically, the dynamically generated Shopping Cart isn't getting the title wrapped in <title> tags.

    Other than that, I could use Catalyst - as preferred.

    Martin

  • Aaron

    I've been trying to figure out Catylist. Best I can figure is their weird custom functions screw up the 'wp_title' filter so plugins can't hook into it properly. It's not MarketPress fault.

    EDIT
    Ok, seems they add the <title> tags in via the wp_title filter, so any plugin that filters wp_title after the theme does will remove the <title> tags. Best option is to set the priority in the theme till later, so line 17 from /lib/catalyst-header.php goes from:
    add_filter( 'wp_title', 'catalyst_site_title_wrap', 20 );
    to
    add_filter( 'wp_title', 'catalyst_site_title_wrap', 200 );

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.