Framemarket template

Hello there !
I'm trying to use framemarket on marketpress. I see there is a file called "mp_global_products.php". My guess was that it is used when products are listed on a page. Well, is seems my guess was wrong. Both mp_list_global_produtcts() and framemarket_mp_list_global_products() functions have their own output but neither of them make use of the template.
Could you please tell me WHERE is this template used or HOW to activate its utilization ?

Thanks !
Cyprien

  • aecnu

    Greetings cyprien :slight_smile:

    the problem is you are addressing the Parent Template and not the Child template which in this case is Grid Market located within the themes sub directory of Framemarket.

    Upload Grid Market as its own theme and go forward from there activating and using Grid Market and not modifying the Parent Frame Market and all should go well :slight_smile:

    Joe :slight_smile:

  • cyprien

    I've installed gridmarket in the themes directory. No problem with that part. The website is properly configured : global shortcodes are not restricted and global cart is activated.
    The thing is :
    On my main page (index.php) i call the framemarket_mp_list_global_products() function. I would have thought this would have called the template. Well, it seems it does not. So... i don't understand.

  • aecnu

    Greetings cyprien :slight_smile:

    I am not sure but I believe that is just calling an interface to the data but not a template so to speak.

    I am not sure what you are trying to accomplish but this may be the answer Custom Market Press Theme Plugins

    In addition, there are many short codes to various MarketPress items.

    and last but not least ..... All MarketPress shortcodes begin with 'mp' such as [mp_store_navigation], [mp_list_categories], and [mp_popular_products]

    Joe :slight_smile:

  • Philip John

    Hiya!

    On my main page (index.php) i call the framemarket_mp_list_global_products() function.

    Have you done so within in GridMarket then? I ask because you say you're using GridMarket which should automatically show global products if configured and so you shouldn't need to add anything.

    What exactly are you trying to achieve? That's the one thing missing from your post. It's much easier for us to help if we know exactly what it is you are trying to do.

    Thanks,
    Phil

  • cyprien

    Hello there ! Sorry for the delay.
    I know gridmarket automatically shows global products. But what if you want to change the html ? What if you want to write your own display for products ?
    Anyhow, i thought the templates files (mp_product, mp_productlist, mp_category, etc.) were used for that purpose. Could you just explain to me when (and by which piece of code) are these templates files used?
    Thanks !

  • Aaron

    Did you not look at the themeing readme in the plugin? Here it is pasted:

    Themeing MarketPress
    -------------------------------------------------------------------------------

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

    Basic Themes:

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

    1. Create a css file in the /marketpress/themes/ 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 Theme: 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 directory for your images in the /themes/ 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/template-functions.php file.

    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

  • cyprien

    Hi!
    Last question on this subject!

    The mp_category.php file is, in fact, the template displaying all products of a certain category. But what i want is to change each product's template. Looking at the code, i see the layout is hardcoded in the framemarket_grid_mp_list_products function.

    Example of what i want to do :
    Let's say that for each product i have added a custom meta information and want to display it on my pages, along with all the other information (price, description, etc.). Tthe only solution i have is to change this function's code and add my own HTML ?

    $content .= '<div class="mp_product_meta">';
          //price
          $meta = mp_product_price(false, $post->ID, false);
          //button
          $meta .= mp_buy_button(false, 'list', $post->ID);
          $content .= apply_filters( 'mp_product_list_meta', $meta, $post->ID );
          $content .= '</div>';

    Thanks!
    Cyprien

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.