Can I display full content and meta for each product using product list?

I have a client site with 3 types of products: Seminars, Classes, and DVDs. There are only a few seminars, so I have listed each of those using the single product shortcode on the "Seminars & Retreats" page and I like how that displays with full content and product meta.

There are many more classes and DVDs, so I want to use the product list shortcode to display all classes (or all DVDs) on each of those pages. But I do not get the full content and I don't get the quantity info. Does the product list shortcode have options to display each product in a way that matches the options in the single product shortcode?

I don't want my client to have to add in each product's shortcode to the corresponding page every time he adds a product.

Alternatively, how would I code a custom category page to display each product "in full"?

  • tinymachine

    No, sorry but that doesn't answer my question at all. I'll try to be clearer, but it sounds like you didnt even look at my links or what I uploaded.

    I am "retro-fitting" MarketPress into an existing site for ease of product maintenance.

    I have three pages in which I want to display all products associated (classes, retreats, DVDs). I created product categories.

    I want the entire product to be displayed on each of these pages, along with all the other products in that same category. I want someone to be able to select a quantity as well as see the price and add to cart. I want the full description to be displayed as well. I do *not* want someone to have to make another click to see the (single) product page.

    I would LOVE to do this with the shortcode for product list (on the corresponding Page), giving that shortcode a category...but it seems I am not given the option of displaying the full description, nor the full meta (with quantity).

    So if I can't do it that way, I'd like to make mp_category.php work for me, and if you see the above product category link...it's not working for me yet as I'm clearly doing it wrong. I can probably figure out what's wrong with the HTML/CSS display end myself, but I'd need the PHP to display only ONE category of products (it's currently displaying every product) and with full descriptions and full meta (price, quantity, add to cart)

    Thanks in advance.

  • tinymachine

    bump :slight_smile:

    So I think I can be a little clearer here. I am asking for 2 things.

    1) Display QUANTITY in my product meta when displaying a list of products on a page. I have "show quantity" set to YES in the Single Product settings. While in function mp_product_list, it calls function mp_buy_button() and within that....

    //add quantity field if not downloadable
    	      if ($mp->get_setting('show_quantity') && empty($meta["mp_file"])) {

    returns "false" thereby not displaying quantity when in a list. So when I have a set of single product shortcodes manually making a "list", quantity is displayed (see http://www.tinymachineconsulting.com/dev_tangora/seminars-retreats/), and when I try to use a product_list shortcode, quantity is NOT displayed (see http://www.tinymachineconsulting.com/dev_tangora/class-schedule/)

  • tinymachine

    2) I want to display the full content when displaying a list of products within a category.

    Settings allow me to choose Title only or Title with Excerpt, but I want full content. I understand that this is not available using the shortcode, so is there anyway to use PHP to get this result in a custom mp_category.php?

    The more I look at the code included, the more I think not...but would love any suggestions.

    Meanwhile: Enhancement request to have settings for product list like:
    Display: [ ] Title Only [ ] Title + Excerpt [ ] Title + Full Content

  • tinymachine

    Thanks to this tutorial, I was able to figure out how to do this in a custom template page. In case anyone else is wanting to do this, here is what I did:

    1) Copy category.php from the twentytwelve theme into my custom theme directory and rename it mp_category.php

    2) Edit mp_category.php to make it display my theme's <div> tags etc

    3) Replace the standard loop with:

    /* Start the Loop */
    while ( have_posts() ) : the_post();
         echo do_shortcode('[mp_product title="1" content="full" image="list" meta="1"]');
    endwhile;

    4) Remove "Category Archive: " from page heading so it only displays the Category name
    <h1 class="archive-title"><?php printf( __( '%s', .....

    5) Updated all of my Product Categories to have proper names and descriptions so they are displayed at the top of the page of each product category page.

    This leaves me with what I wanted: a "page" that contains a list of products in a category, with Product Title and Full Content, and the meta displaying Price, Quantity & Add to Cart/Buy button.

    I know it's simple to those that understand the loop :slight_smile: but I just needed a good example...as provided in that tutorial. Hope this can help someone.