MarketPress and Post Type Converter issue

Hi,

I have run into a weird plugin conflict where the result is that regular posts are displayed as products on the Global Marketplace.

This seems to be happening to posts that used to be of the Product type but where converted to Post with the plugin Post Type Converter https://wordpress.org/plugins/post-type-converter/

On the vendors own site, these posts no longer appear on his shop page as products but they remain there on the Global Marketplace page as if they where products. I went into the vendors site and converted some of those posts back to product and cleared all product fields like SKU and price but this only changed the price to 0 on the global marketplace. It did not remove them...

You can see this live on http://aufildudoux.fr/marche/ where the first three are products but all others are posts.

Is there any way to get these posts off the global products list?

Thanks :slight_smile:

  • Tyler Postle

    Hey Ravan,

    Hope you're doing well today and thanks for your question!

    Gotta say, this is first time I've seen this happen :p

    Sounds like it is still recognizing them by their original post type.

    A workaround we could do here is use the shortcode instead. If you remove the global network marketplace link from the:

    Network admin > Settings > MarketPress. then that page will no longer be there and you can create your own page on your main site then place this shortcode in it:

    [mp_list_global_products category="test-category"]

    use a category unique to your products :slight_smile:

    Let us know if this does the trick for you!

    All the best,
    Tyler

  • RavanH

    Hi Tyler, thanks for the suggestions!

    Sounds like it is still recognizing them by their original post type.

    Does MP actually check the post type? Or does it recognize products by different means? Or does the Post Type Converter plugin not actually change post type? It's confusing how something that seems straight forward, can still go wrong :wink:

    I tried the shortcode without category before but that resulted in the same post inclusion. The thing is that this is on a network where I'm not in charge of choosing product categories. The shop onwer(s) are.

    So maybe simply showing a global category cloud will work? I'll test :slight_smile:

  • RavanH

    Hmmm... no. Turns out that both the global list by category and following category links still show converted posts and products together.

    I looked in the DB and noticed there is a dedicated global products table. Inside it, these converted posts are listed but still with their old product permalink. Funny, because on the site front end global products list the new (correct) permalinks are used.

    Anyway, could I simply remove these wrong/old entries from the DB table? Or will this cause issues? Or is there a way to force a rebuild of the global products table from the network admin?

  • aristath

    Hello there @RavanH, I hope you're well today!

    When a product is created, edited or deleted from the WordPress dashboard, MarketPress automatically takes care of updating the data in the global table in the database.
    However, the post types changer plugin does not trigger the default WordPress actions and does what it does directly in the database.
    Since the plugin overrides WordPress core and its actions, MarketPress can't trigger the deletion of these global products in the database and you ended up with invalid global products.

    Since you've already changed the post type of these the only way I can think of to fix this issue would be manually deleting the invalid products rows from the global products table in the database.

    I hope that helps!

    Cheers,
    Ari.

  • Tyler Postle

    Hey Ravan,

    Hope you're doing well today!

    Manually in the DB is the only way I know of that would for sure work too. I'll flag the developer for feedback in-case he knows of anything else(possibly using post indexer), just keep in mind that developer response times can be slower since they have a lot of other responsibilities :slight_smile:

    Let us know if you have any further questions in the meantime Ravan!

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.