Questions about upgrading from MarketPress 2 to the current

So I am upgrading a site that was built in MarketPress 2 to the latest version and I have found many issues. The biggest two are broken uris and depreciated methods.

The current site links to product categories with the following structure: /store/products/category/{category_name}
These just go to 404 pages now. I'd like to keep them the same, but if there is a new default, I'll use it. I just want it to work.

The other issue is the cart page uses a call to get_cart_contents() I've seen a few posts that mention this method in the forum, but the answers are not helpful to me. One says to contact the theme developer (that's me) and the other says to edit the plugin file (not going to do that). So what is the current method to use to get the contents of the cart.

I would have looked at the supplied themes to see how they are now being built in 3, but every reference to the default themes is outdated, and they no longer seem to be included with the plugin. In /marketpress/ui/themes/Theming_MarketPress.txt (and the blog on the site with the same name dated October 2016) makes reference to the /marketpress/marketpress-includes/ directory which is not there.

I am working on my local machine as the current site is live and updating the plugin there would have brought the store down, so I won't be able to provide live links. I can post code or perhaps setup a github repo if that would help. I am not using a pre-made theme, I am using one that I created.

  • James Morris

    Hello Clint,

    I hope you are well today.

    MarketPress 3 uses the same category slug of /store/products/category/. It will return a 404 until there are actual products in that category. Screenshot:

    If you look in /wp-content/plugins/marketpress/includes/public/ you will find the files that contain all the public functions available in MarketPress. If you're wanting to do something as simple as display the cart in a custom template, you could use the ms_cart shortcode in your custom template. All the shortcodes available are inside class-mp-short-codes.php.

    For example:

    <?php echo do_shortcode( '[mp_cart]' ); ?>

    Of course, if you're wanting to do more advanced custom coding, you can refer to the public functions.

    I hope this clarifies a bit.

    Best regards,

    James Morris

  • Clint

    Hey James,

    Thanks for the reply.

    I do have products in the category and I'm still getting the 404. Please see this and this for reference.

    I saw the new functions, but the ones I was using to build the custom cart have been depreciated and not replaced. Using the shortcode just puts a generic cart in my page, not the custom one that my client currently has.

    Shortcode Cart
    Current Cart

    Basically I don't see a way to update this plugin without sacrificing the current design. I know I can update the styles to help it out, but there's no way I can rebuild what I have.

    If I need to put this on a staging server I'm happy to.

    Thanks for your help!

  • James Morris

    Hello Clint,

    Thank you for clarifying the situation a bit more. Yes, if you wouldn't mind, please place the site on a staging server and provide the following information so our devs can take a look and and advise as to the best approach for migrating.

    Please visit the Contact page and complete the form with the following information:

    Select "I have a different question" from the drop-down box.

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    (and port if required)

    - link back to this thread for reference
    - any other relevant urls

    Best regards,

    James Morris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.