Support » Plugin: Post Date Randomizer » Not Randomizing many Woocommerce Products.

  • Resolved techjockey

    (@techjockey)


    First thank you for making that change and allowing custom post types. I have around 13000 woocommerce products on my website, it fails when i try to randomize the dates.

    However it works fine on my other post types where the number is very less.

Viewing 9 replies - 1 through 9 (of 9 total)
  • techjockey

    (@techjockey)

    i think we should be able to set the limit on the number of posts to randomize, that should solve the problem.

    Plugin Author wellbeingtips

    (@wellbeingtips)

    Hi,
    The problem can be because there are quite a lot of products and your server can’t handle it.
    What error do you get when you try to randomize 13k products?

    techjockey

    (@techjockey)

    it just lost the connection when executing that SQL query… there should be some limit
    or an filter set to control how many items can be changed at once.

    Plugin Author wellbeingtips

    (@wellbeingtips)

    I will think of a good but still simple solution to this. My wish is to keep the plugin as simple as possible.

    Please try this (manual) solution if it will work:

    F.E. if you want to randomize the dates of ~13k products. You can split them to 3 groups with 4.500 products (4.500 should work).
    1. Make 4 500 posts published and other as a draft and add date for randomization e.x start: 1. Jan. 2014 end 31. Dec. 2014. randomize them and then make them draft.
    2. The second group make them published and then randomize add date 1. Jan. 2015 end 31. Dec. 2015 (continue the date from the previous group).
    3. Same as above.

    *Assuming your website is still in development.. another way this shouldn’t be done.
    * Groups: You can create groups/split the posts by adding different product categories or different user.

    Thank you for responding team. I do not wish to randomize all products at once rather no would like to do so.

    I think randomize products per category or choosing between two dates will be more relevant strategy.

    please see this plugin for reference – https://wordpress.org/plugins/wp-random-post-dater/

    I know for a free plugin this is much of an effort, just want to contribute to the development of it wherever possible.

    Thank you again for creating wonderful plugin.

    Plugin Author wellbeingtips

    (@wellbeingtips)

    Thanks, TJ.
    You are reading my mind, I was looking on the possibility to implement the category option similar as per that plugin.

    Please give me a few days to look for the best solution.

    awesome, looking forward to it. Thanks

    Ok, for now i have mitigated the issue by limiting the number of posts…

    //* Get all the posts
    $posts = get_posts( array( ‘numberposts’ => 20, ‘post_status’ => ‘any’,’post_type’=>$cr_type )

    Plugin Author wellbeingtips

    (@wellbeingtips)

    The extension where you can choose taxonomies (randomize by category/tag) is ready to be tested. If interested please contact me ansateza@yahoo.com

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