Changing the marketplace, so product open in new window

Hi,

Im was thinking about how to make it possible, when users browsing the marketplace, then when they click a product and get redirected to subsite, could this happens in a new window maybe? So they still have the marketplace open in a window.

Else if there is another way to sent the user back to the marketplace (main site) after they have been on a subsite for looking a products, then im listening.

Best regards,

  • Bojan Radonic

    Hey there Mikkel,

    Hope you're well today :slight_smile:

    I'm afraid that something like this is not possible out of a box with the current version of MarketPress.

    However this should be fairly easy to achieve with some jQuery :slight_smile:

    I've made a little mu plugin, you can read more about mu plugins here, so all you have to do is download the zip file I've attached, extract it and paste the file in /wp-content/mu-plugins/ via FTP or cPanel for ex, in case you don't have a "mu-plugins" folder you can create one. Once done everything should work out of a box.

    Let me explain what the code in there does, first it checks if this is your main site and if it is then it searches for MarketPress product links that contain ".kreativeshop.dk/", this ensures that it targets only subsite links and it adds attribute to those links which opens them in a new tab.

    Hope this helps and have a great day!

    Cheers,
    Bojan

  • Bojan Radonic

    Hey Mikkel,

    Glad I could help :slight_smile:

    Did you know if there is a way to have a "Add to cart" button on marketplace on main site too? So customer in fact dont need to leave the site if they just push the "Add to cart" button.

    I'm afraid this isn't possible out of a box, at least not in current version of MarketPress. Given that global cart is used I agree that having "Add to Cart" on main site would be beneficial as it would allow customers to simply add these products to cart without leaving that page. What I can do is move this thread to features and feedback and probably pass this to our developers and if there's enough interest for this by other members we'll consider it for future development.

    Also, if you need to customize this then you can post a job in our job board where you can hire a developer to assist further: https://premium.wpmudev.org/wordpress-development/

    Best regards.
    Bojan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.