Manually controlling Magento Synchronisation

When installing the Codisto Connect extension in your Magento environment, a full Magento synchronisation is started, this copies stock levels, product codes, descriptions and product images. A copy is taken so that we can react to eBay without placing load on your Magento instance. For example we can resize images to meet eBay policies and respond to eBay events without any impact on Magento resources.

After the first full synchronisation (usually a few minutes) the Magento server starts sending signals on catalogue changes to keep the stock levels and prices in sync in near real time.

The Magento synchronisation process is architected as a 'Magento Indexer'. This means you can see from within the Magento control panel when the indexing process is taking place, just visit System > Index Management.

The benefit of being a Magento indexer is you can use the Magento Indexer command line tools to take control over Magento synchronisation to eBay within your own scripts.

For example, after updating all your prices and stock levels directly into the database through an automated process, you can call the Magento Indexer process to initiate a Magento to eBay synchronisation. When running processes of this nature (that bypass the Magento middleware) no automatic change signals will take place. Meaning, you rely on the daily full sync to catch up.

To use the Magento Indexer command line tools, open a shell on your Magento host:

  • go to cd <MAGENTO_INSTALL_DIR>/shell
  • run php -f indexer.php info

You will see an entry called codistoebayindex

To initiate a synchronisation simply run:

  • php -f indexer.php -- -reindex codistoebayindex

It will say:

  • eBay Index index was rebuilt successfully in 00:00:00

This is correct, as the index will be repopulated asynchronously.

You can run this command as often as you like, however, the Magento synchronisation process has limits in place to ensure that it is only run once. Once you start the process, subsequent reindex commands will queue behind until the first reindex process has completed.