• Resolved jvmdesign

    (@jvmdesign)


    Hi,

    I am running a multisite with woo-commerce do be able to offer my shop in two languages. When I installed the multisite all products that I currently had on my single site was copied, including the product IDs. This was great as I use yotpo for reviews. This means that when I get a review on product A on my English site. Product A gets the same review on my Swedish site. This because product A has det same product ID on both the English and the Swedish site.

    Now to my problem. I want to add more products and I need the new products to have the same product ID on all sites. I can not seem to find any solution for this.

    Any help would be great!

    All the best
    Jacob

Viewing 11 replies - 1 through 11 (of 11 total)
  • Wordpress uses a ‘post ID’ for everything – blog posts, pages, products, customers, orders – so it will be impossible to have the same ID for new products on different sites – for example:

    Add a product, it gets the next available ID – eg: 1000
    Add another products, it gets the next – 1001
    Someone places an order, it gets 1002
    Add a blog post, it gets 1003
    Add another product – it gets 1004
    and so on

    Both sites are not going to have things added in the same order – one, for example, might get more orders than the other!

    Thread Starter jvmdesign

    (@jvmdesign)

    Hi,

    Thanks for you reply. The strange thing is that when I installed the multisite I duplicated the original site(including its products) and all those products now have the same product IDs on both sites. This is great as Yotpo uses the product IDs as identification so when I get a review on product A on my Swedish site, the same product A gets the same review on my English site.

    If you duplicated the site then there’s no reason why they wouldn’t – you copied the database entries that include the IDs. From then on though WordPress simply adds the next ID in sequence no matter what type of content has been added – Product IDs, Order IDs and Post IDs etc are essentially the same thing.

    Unfortunately I don’t think there’s a way round it unless Yotpo can be made to SKUs?

    Thread Starter jvmdesign

    (@jvmdesign)

    ahh cool I understand.
    Is there not any way to edit the product IDs in the database. For example:
    I create a new product on both site and then edit the ID in one of the sites database to match with the other sites database?

    I’m sure you could manually edit them – but I really wound’t recommend it! You would need to be absolutely certain that you change every instance of that ID number – product details, variations etc are stored in multiple locations in the database – it’s not just one line!

    Also, the ID you want to change it to will likely be taken by something else so that will need changing too!

    Thread Starter jvmdesign

    (@jvmdesign)

    Auu that sounds tricky.
    I tried to talk to yotpo but they did not seem interested in changing their setup….

    I guess on option could be to make a bunch of product drafts in site A and then make a new duplicate site. Then I at least have a short term solution for adding new products.

    Or could you see any other possible work-around?

    Yes that would be a short term solution.
    Can’t see a way round it though, the only real option would be for Yotpo to change their method.

    Thread Starter jvmdesign

    (@jvmdesign)

    Thanks for all quick answers!

    Would you see any risk in doing that, making a new duplicate site and the remove the other one?

    I am think interms of orders or such that has already been processed. Just if there is anything that I should look out for or could cause new problems?

    Again, big thanks!

    You’d have to overwrite the entire second site with Site A for it to work though – that would mean all the customers and orders on the second site would be deleted.

    Thread Starter jvmdesign

    (@jvmdesign)

    Hi again,

    Firstly thanks for all help!

    I have deciede to give it a go but now I cannot figure out how to overwrite the site. Could you point me in the right direction?

    jessepearson

    (@jessepearson)

    Automattic Happiness Engineer

    @jvmdesign If you were not able to find a solution, then it would involve copying the whole database from one site to another.

    This doesn’t really sound like a long term solution, though. It may be better to invest in something like WPML to run multiple languages on a single site.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Product IDs on multisite’ is closed to new replies.