Forum Replies Created

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

    (@ameephillips)

    I just toggled the setting on and off and it appears to have now removed the cron event. I’m not sure what caused it to schedule a database maintenance event since I haven’t touched the setting in many months. Perhaps it was linked to me recently updating the plugin.

    I will be sure to check when I update this plugin in future since for me the impact of it occurring is the site requiring a full restore.

    Thread Starter amee

    (@ameephillips)

    Hi,

    I’m confused by this response. Are you suggesting that the cron event I referenced does not originate from this plugin?

    I know that the cron event is taking place because whenever a particular table in my database is optimised it crashes my website. It is why when I saw my website was crashed I immediately knew to check my cron events for evidence of your plugin having run database optimisation (despite the fact I had toggled it to off when I previously identified that it was crashing my website). Sure enough the timing of this cron event correlates precisely with when the website crashed.

    I deleted the cron event, but there is one scheduled for this Friday, this time with the hook:

    siteground_optimizer_database_optimization_cron

    and the action:

    SiteGround_Optimizer\Database_Optimizer\Database_Optimizer->optimize_database()

    Screenshots taken moments ago of both the cron event scheduled and the database optimisation being toggled off are below:

    https://ibb.co/nkFsFD7
    https://ibb.co/rKB4X68

    Thread Starter amee

    (@ameephillips)

    Brilliant. Thank you.

    Thread Starter amee

    (@ameephillips)

    So I did manage to get it working as I described.

    from:

    //Order the products
    public function order_products( $output_array, $title_index ) {
    $product = array();
    foreach ( $output_array as $key => $row ) {
    $product[$key] = $row[$title_index];
    }
    array_multisort( $product, SORT_ASC, $output_array );
    return $output_array;
    }

    to:

    //Order the products
    public function order_products( $output_array, $sku ) {
    $sku = array();
    foreach ( $output_array as $key => $row ) {
    $sku[$key] = $row[$sku];
    }
    array_multisort( $sku, SORT_ASC, $output_array );
    return $output_array;
    }

    It looks correct to me, but if you can see any issue with it please let me know.

    Thread Starter amee

    (@ameephillips)

    Thanks for the quick reply. Whilst that is of course true, I find the HTML export to be the best feature of this plugin as it displays the images, rather than a link. This makes it excellent for quickly producing a pdf listing of products that can be referred to offline. That is the use case that leads me to want to sort by SKU when exporting to HTML – sorting by any other attribute doesn’t help me as we have sorted our products by SKU reference. As I mentioned I tried editing the plugin to do it but my skills weren’t up to the task. It would be a great enhancement to the tool but if it isn’t possible to edit the plugin to do so then I will have to accept that.

    • This reply was modified 4 years, 4 months ago by amee.
Viewing 5 replies - 1 through 5 (of 5 total)