How to install phantomjs & casperjs

To install phantomjs & casperjs, do not use your distribution packages, you won’t have the right versions and your casperjs version will not be compatible with phantomjs version.

Instead, follow theses simple steps :

#phantomjs
cd /opt
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
tar xjvf phantomjs-1.9.7-linux-x86_64.tar.bz2
ln -s ln -s phantomjs-1.9.7-linux-x86_64 phantomjs
ln -s /opt/phantomjs/bin/phantomjs /usr/local/bin

#casperjs
cd /opt
wget https://codeload.github.com/n1k0/casperjs/legacy.zip/1.1-beta3
unzip 1.1-beta3
ln -s n1k0-casperjs-4f105a9/ casperjs
ln -s /opt/casperjs/bin/casperjs /usr/local/bin/

To test it, simply run the casperjs command

root@bigone:/opt# casperjs
CasperJS version 1.1.0-beta3 at /opt/casperjs, using phantomjs version 1.9.7
Usage: casperjs [options] script.1 [script argument [script argument ...]]
      casperjs [options] test [test path [test path ...]]
      casperjs [options] selftest
      casperjs [options] __selfcommandtest

Options: 

--verbose   Prints log messages to the console
--log-level Sets logging level
--help      Prints this help
--version   Prints out CasperJS version
--engine=name Use the given engine. Current supported engine: phantomjs and slimerjs

Read the docs http://docs.casperjs.org/

Magento import product image

How to import product image with the magento import tools ?
It’s quite easy, when you know how to fill your import file and put your file in the right directory.

The directory : create if needed a /media/import/ direcory in your magento root file, in my case it’s /home/www/eshop/media/import/
Paths in the import tool are always relative to you media/import directory.

The imported file : on you image or small_image columns, you need to put your file name prefixed by a “/”.

Some examples:
picture file ==> string in the import file
/home/www/eshop/media/import/product1.jpg ==> /product1.jpg
/home/www/eshop/media/import/ProductPage/product1.jpg ==> /ProductPage/product1.jpg

Hope this will help you.