First time user - Template page?

Hi, I have just installed the plugin...

My question regards pages templates and pages in general.

At the moment, I have a /store/ page working, but I have no such page in my PAGES (Wordpress) and my template as it is an existing site.

I copied one of your CSS in my theme, but there are some design issues in the Grid View (probably conflicting with our existing design) so I will probably have to manage the actual product listing pages, and product pages.

Should I copy the template pages from one of your Theme?
Should the pages be created in my PAGES lists?

I don't have a sidebar either on the store pages... So I don't know where to start to actually have a sidebar and complete control on everything else.

Thank you!

Johanna

  • Jack Kitterhing

    Hi there @Johanna,

    I hope you are well today and welcome to WPMU DEV!

    These are pages that are created automatically by the plugin, so are in effect Virtual and aren't actually created.

    Which CSS issues are you having I'd be happy to advise :slight_smile:

    themeing marketpress can be done either by creating a style or by using the includes functions and hooks to customize the output, I have pasted the themeing marketpress.txt file that you will find in the plugin below.

    What else did you want to change about the pages/display?

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

    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

    Thank you for being a WPMU DEV member!

    Kind Regards
    Jack.

  • Johanna

    Hi Jack and thank you for your quick reply!

    It seems easy enough.

    If I want to choose the first option with Basic Styles, how can I add a sidebar to the shop though?

    Should I add the sidebar into my "content-page.php" with a "If"?

    Is there any is_store() or something similar to do easy tests on store pages?
    It would be great to have one for each page really... Listings, Tags, Cart...

    At the moment, I have no sidebar, and I suppose I'll want to have a sidebar on some pages, maybe a different one on the check out (or none)... etc.

    Thank you!

    Johanna

  • Jack Kitterhing

    Hi there @Johanna

    I hope you are well today.

    Is your structure using standard WordPress functions, and hooks? You don't have a theme at all, just a custom design?

    You'll going to want to call a dynamic sidebar, the following link will help with that. http://codex.wordpress.org/Function_Reference/dynamic_sidebar
    It'll need to be dynamic as you want it to display different sidebars depending on the page.

    Thank you for being a WPMU DEV member!

    Kind Regards
    Jack.

  • Johanna

    Hi Jack,

    Well, I needed to apply a different style on the #content for all store page, so I had to create the store page templates and add a new class to the #content.

    It's working now, but it would be great to have something to test if we are within the store or not.

    So far, I am using bits from FrameMarket as I had some display bug with the grid display when I was using the default css in MarketPress.

    Not perfect, but I'm getting there, thank you!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.