• Hi,

    I need to split orders on if a condition is met. Is there any way I can add a conditional statement to the order splitting? Any guidance on this would be much appreciated.

    Thanks!!
    Kevin

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter kjphilips

    (@kjphilips)

    I bought the premium version of this plugin, I didn’t see any options for this there. Any ideas? Please PM me if you have the chance. Thanks!!

    Hi, sorry for the delay.

    Unfortunately it isn’t possible for now. But what do you have in mind? Maybe I can do something about it.

    Thread Starter kjphilips

    (@kjphilips)

    No worries and thanks for responding.

    I have a variable product and would like to have the option in my extension to enable the splitting. Maybe setting a boolean if true then split order.

    so I would add a callback function on the woocommerce_payment_complete action and if the order object contained the meta and value was true then we can split the order.

    I already have my plugin built and I just need to add the conditional to trigger your order splitting. ??

    Also is there anyway I could retain the order numbers instead of renaming them, I need this for our fullfilment company.

    so if parent order is 1234 instead of renaming the suborder 1234-1 and 1234-2 I can just keep the actual post id.

    If this is beyond the provided support please PM me so we can discuss. ??

    Thread Starter kjphilips

    (@kjphilips)

    I am having a new issue, when I enable the pro plugin I am unable to access my orders screen in the dashboard. It just sits loading.

    I have disabled all plugins except WC and Multi Order for WooCommerce I am not getting debug info unless I stop mysql If I do then I get the following error…

    [15-Aug-2018 01:39:42 UTC] PHP Warning: mysqli_query(): (08S01/1053): Server shutdown in progress in /var/www/html/wp-includes/wp-db.php on line 1924

    [15-Aug-2018 01:39:42 UTC] WordPress database error Server shutdown in progress for query SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id AND mt1.meta_key = ‘_alg_mowc_is_suborder’ ) LEFT JOIN wp_postmeta AS mt2 ON ( wp_posts.ID = mt2.post_id ) LEFT JOIN wp_postmeta AS mt3 ON (wp_posts.ID = mt3.post_id AND mt3.meta_key = ‘_alg_mowc_sort_id’ ) WHERE 1=1 AND (
    (
    ( wp_postmeta.meta_key = ‘_alg_mowc_is_suborder’ AND wp_postmeta.meta_value NOT IN (‘1′,’on’) )
    OR
    mt1.post_id IS NULL
    )
    AND
    (
    mt2.meta_key = ‘_alg_mowc_sort_id’
    OR
    mt3.post_id IS NULL
    )
    ) AND wp_posts.post_type = ‘shop_order’ AND ((wp_posts.post_status = ‘wc-pending’ OR wp_posts.post_status = ‘wc-processing’ OR wp_posts.post_status = ‘wc-on-hold’ OR wp_posts.post_status = ‘wc-completed’ OR wp_posts.post_status = ‘wc-cancelled’ OR wp_posts.post_status = ‘wc-refunded’ OR wp_posts.post_status = ‘wc-failed’)) GROUP BY wp_posts.ID ORDER BY CAST(mt2.meta_value AS CHAR) DESC, CAST(mt3.meta_value AS CHAR) ASC LIMIT 0, 20 made by WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
    [15-Aug-2018 01:39:42 UTC] PHP Warning: Error while sending QUERY packet. PID=2826 in /var/www/html/wp-includes/wp-db.php on line 1924
    [15-Aug-2018 01:39:46 UTC] PHP Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /var/www/html/wp-includes/wp-db.php on line 1531

    this shows the query that is being run.

    We have a lot of orders in our table. Is there any way to increase the speed.

    Would it be faster if there were no suborder id’s?

    The order splitting works well, and the front end loads fast. I am just unable to view the orders.

    If you have the time please send me your email address I would like to consult with you if you have the time.

    Thanks!!

    • This reply was modified 6 years, 3 months ago by kjphilips.
    • This reply was modified 6 years, 3 months ago by kjphilips.

    Hello,

    Can you please use our site to contact me?
    WordPress doesn’t allow email exchanges on their forums.

    I just saw your github issue

    Thread Starter kjphilips

    (@kjphilips)

    I sent an email last night. ??

    • This reply was modified 6 years, 3 months ago by kjphilips.

    I can create 2 new options on admin’s settings:

    1. Allow to choose if you want to enable/disable the sorting.
    2. Show the original post id or the fake.

    Would you like it?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘conditional spliting of orders’ is closed to new replies.