WordPress.org

Forums

MarketPress - WordPress eCommerce
[resolved] Sub Page custom page templates (8 posts)

  1. nickmeloy
    Member
    Posted 1 year ago #

    Hey, was wondering how I can change the sub page default templates, since they are not actual "pages" within wp.

    https://wordpress.org/plugins/wordpress-ecommerce/

  2. David
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @nickmeloy,

    Greetings and thanks for your question! :)

    MarketPress uses a series of templates that you can easily customize per our detailed guide here:
    http://premium.wpmudev.org/blog/the-easy-guide-to-theming-marketpress/

    I hope that helps but please feel free to ask if you have any questions. We'll be here to assist!

    Cheers,
    David

  3. nickmeloy
    Member
    Posted 1 year ago #

    Hey David,

    I got the templates to work, but the "mp_cart.php" with "mp_show_cart" function is not working properly. If i remove the template file, it works fine.

    Not sure if theres another function that could be used.

    Thanks,
    Nick

  4. David
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi Nick,

    Thanks for your reply. Could you please elaborate on what you mean about it not "working properly"?

    Does the cart not display correctly when you use that custom template? Does the checkout page not display correctly?

    Looking forward to your reply. :)

    Thanks,
    David

  5. nickmeloy
    Member
    Posted 1 year ago #

    David,

    When using my template and the aforementioned function, it only displays the shortcode on page as text "[mp_show_cart]" and not the actual cart view. This does not happen when I delete my template file, though.

    This carries over to checkout as well...

    I'm not sure if there's some kind of conditional items I need in my template for this shortcode to work properly.

    Thank you!
    Nick

  6. David
    WPMU DEV Support Staff
    Posted 12 months ago #

    Hi Nick,

    Thanks for clarifying that. Could I ask how you're displaying the page content in the template?

    Were you attempting to use the shortcode itself within the template?

    If so, you could instead use the functions provided in the following:
    \wordpress-ecommerce\marketpress-includes\template-functions.php

    In this case, mp_show_cart().

    Or maybe you just need to ensure the content itself is having the proper filter applied like so?

    $content = apply_filters('the_content', $content);

    That would then allow any shortcodes within the page contents to be executed.

    Does that help?

    Cheers,
    David

  7. nickmeloy
    Member
    Posted 12 months ago #

    Hey David,

    Yes, I was attempting to use the shortcode itself within the template, which i had successfully done on all of the other templates.

    I will try that filter and get back to you.

    Thank you very much,
    Nick

  8. David
    WPMU DEV Support Staff
    Posted 12 months ago #

    Hi Nick,

    You're most welcome, glad to help. Hope that's going well for you, please feel free to ask if you have any questions.

    We're here to help! :)

    Cheers,
    David

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MarketPress - WordPress eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.