WooZone Amazon price update not working Fix (Solution 2017)

/, Woozone, Wordpress/WooZone Amazon price update not working Fix (Solution 2017)

Woozone (Products synchronization) Price Update Solution

This is my solution for Woozone Products synchronization problem fix

The code will click on “Sync Now” Button for each product in the List
You can delete already updated products (for this month for example August)

Woozone price update does not work anymore for me, so I have made this code to automatically update over 2000 products.

Instructions (javascript code)

1. Open the link in Chrome : https://…./wp-admin/admin.php?page=WooZone_synclog
2. Select 500 product per page (MAX , more will break the website)
3. Press F12
4. Put the code in the console and press enter

var seconds = 10;
// How much seconds to wait between updates , 10 seconds is good

var currentMonth = " Aug /";
// To delete already updated products this month

var rows = document.getElementsByClassName("WooZone-sync-table-row ");
var table = document.getElementsByTagName("table")[1];
var textRow = "";
var buttonRow = null;

function initiateTimeOut(i) {
  setTimeout(function() { doStuff(i) }, 1000 * seconds);
}
function doStuff(i) {
    console.log(i);
	
	textRow = rows[i].innerText;
	
	if(textRow.indexOf(currentMonth) >= 0){
		table.deleteRow(i);
		console.log(i + " deleted");
	}else{
		
		if(rows[i]){
			button = rows[i].getElementsByTagName("button");
			console.log(i + " updated");
			button[0].click();	
		}
	}
	
    i++;
    if (i <= rows.length) {
        initiateTimeOut(i); 
    }
}

initiateTimeOut(0);

“I’ve updated WooZone and I’m having problems with the Synchronization module”
The basic functionalty of WooZone is to let you import products from Amazon into your WordPress + WooCommerce website.
But if the synchronization module for the price update is not working , you will have issues with Amazon putting at risk your account, because you are showing wrong product prices on your affiliated website.

By | 2017-08-29T18:11:36+00:00 August 29th, 2017|6 Comments

6 Comments

  1. AndreiW August 29, 2017 at 7:35 pm - Reply

    Life saver,thank you amigo!

  2. ChrisV August 31, 2017 at 6:48 am - Reply

    Hi Adrian,

    Thanks a lot, for a really neat solution to the sync problem. I followed the instructions and placed the code in the console and hit enter. It paused for a while and then returned this below the script:

    initiateTimeOut(0);
    undefined
    VM2830:16 0
    VM2830:22 0 deleted
    VM2830:16 1
    VM2830:22 1 deleted
    VM2830:16 2
    VM2830:22 2 deleted

    I have three Amazon products on my site with several variations each. When I hit enter, the Sync log didn’t show any syncs had been performed? What detailed settings do you recommend? I stopped the auto re-load but should I disable the WP_CRON too?
    Also do I need to manually change the date in this script each month?
    I’m not sure what is happening here, could you explain it a bit more for me please?
    Thanks,
    Chris.

    • adrianweb August 31, 2017 at 5:35 pm - Reply

      1. You have only 3 products ? How many Sync Now buttons do you see in the page ?
      2. The log says “deleted” because i used this code to update the products that haven’t been updated from July.
      3. You don’t have to make any settings

      To update all your products use this code :

      var seconds = 10;
       
      var rows = document.getElementsByClassName("WooZone-sync-table-row ");
      var table = document.getElementsByTagName("table")[1];
      var buttonRow = null;
       
      function initiateTimeOut(i) {
        setTimeout(function() { update(i) }, 1000 * seconds);
      }
      function update(i) {
          console.log(i);
              
              if(rows[i]){
                  button = rows[i].getElementsByTagName("button");
                  console.log(i + " updated");
                  button[0].click();  
              }
           
          i++;
      	
          if (i <= rows.length) {
              initiateTimeOut(i); 
          }
      }
       
      initiateTimeOut(0);
      
      

      For more you can contact me on Facebook, I will help you.

  3. JeffS September 8, 2017 at 8:36 pm - Reply

    Seems to have worked – thanks!

  4. Melissa September 15, 2017 at 9:11 pm - Reply

    WOW awesome it really worked, thank you! i had no idea i could run a script like that in crhome console, pretty neat! Saved me from scrapping woocommerce just because of amazon affiliate pricing issue!!

  5. ebk October 9, 2017 at 4:53 pm - Reply

    thank you. is this code will sync all products prices automatically each day or i should enter it everytime i want to update prices

Leave A Comment