How to download remote amazon images with Woozone?

You have used remote images from amazon and now you want them on your server, but changing Woozone settings gives you an error : this product has no assets to be downloaded.

Download amazon images into your server after using Woozone with remote images.

Run this query in phpMyAdmin :

UPDATE `wp_amz_assets` SET `download_status` = "new" WHERE `download_status` = "remote";

This will allow you to download the assets.

Update this code in : /wp-content/plugins/woozone/modules/assets_download/init.php
line 308

Because you already have a thumbnail and gallery images, this must be cleanead.

public function get_asset_by_postid( $nb_dw, $post_id, $include_variations, $inprogress=false, $include_err=false, $include_invalid_post=false ) {
			update_post_meta($post_id, "_thumbnail_id", "");
			update_post_meta($post_id, "_product_image_gallery", "");
			return $this->get_asset_generic(0, $nb_dw, $post_id, $include_variations, $inprogress, $include_err, $include_invalid_post);
}

Then go to : wp-admin/admin.php?page=WooZone#!/cronjobs

The cronjob downloads 100 assets per hour. You can enable/disable the cron to download them faster.

Run in console :

var myVar = setInterval(myTimer, 60000);

function myTimer() {
    document.querySelectorAll("tr[data-cron_id='assets_download'] > td")[7].getElementsByTagName("input")[0].click();
}

Alternative method :

Visit : /wp-admin/admin.php?page=WooZone_assets_download

Download this extension or similar : https://chrome.google.com/webstore/detail/run-javascript/lmilalhkkdhfieeienjbiicclobibjao

And paste this code :

document.getElementsByClassName("WooZone-form-button-small WooZone-form-button-success WooZone-download-assets-btn")[0].click();

This code will click on “download assets button” every time the page loads.

If some assets does not download run this sql query :

UPDATE `wp_amz_assets` SET `download_status` = "new" WHERE `download_status` = "inprogress";

Another alternative :

var i =0;
setInterval(function(){
document.getElementsByClassName("WooZone-form-button-small WooZone-form-button-success WooZone-download-assets-btn")[i].click();
i++;
console.log("Done " + i);
}, 30000);

And comment window.location.reload() in /wp-content/plugins/woozone/modules/assets_download/app.assets_download.js
on line 202 and 257