• Resolved Alex

    (@jandru)


    Hi!

    We are migrating our store, but previously we are redesigning and building the store in a staging environment from scrach

    Our problem is related with the message “Parsing failed. Reason: Importing Order(ID) conflicts with an existing post” because we have in this staging site posts with the same ID as the orders we want to import. There are some posts in forum related how this or another this with a proposed workaround.

    Doing this workaround, unmapping the order ID column, works fine but if we want to import again some orders (or all) with the “Update” option, when order exists in the store, the orders are duplicated and not updated.

    Is there some configuration or workaround for solve this?

    Thank you so much

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Alex

    (@jandru)

    Hi again,

    We found a workaround using the transformation option. How? Doing a multiplication with the value of order ID. The transformation example could be [{order_id}*10] and not will match with the existent post ID.

    This works fine with the initial import, but, if you create new content (a page, post, image, etc…) this will create a new row in the posts table with the next ID available, and if you want to import again for add new orders, this will crash by Order(id) conflicts.

    So, is there any way to set the field (or combination) for set unique key if order_id is not selected?

    Thank you so much

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @jandru,

    Thank you for reaching out to us.

    Currently, the order_id serves as the unique identifier during import. However, we can check the possibility of setting other fields as unique identifiers using a code snippet.

    We will keep you updated with the progress.

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @jandru,

    Thank you for waiting.

    We have developed a code snippet to use the order key as a unique identifier. You may copy and paste this code snippet into your active theme’s function.php file, or use any other plugin to achieve this.

    Thread Starter Alex

    (@jandru)

    Hi!

    Firstly, thank you so much for the code snippet. Looks great! We’ll try it in the next few days and tell you something about it

    Again, thank you so much!

    Thread Starter Alex

    (@jandru)

    Hi again,

    We tried the code snippet and it worked super fine!

    Also, following the plugin code for understand a little more the snippet or hook, we believe that there is a typo in the script:

    admin/modules/order/import/import.php

    More exactly in the line 698:

    if('shope_order_placehold' !== $post_table_type && $order_table_type !== $this->post_type){

    Shouldn’t it be shop_order_placehold?

    Thank you so much!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.