I got it to work with PrestaShop 1.5.4.1 and WordPress 3.5.2.
In the file wp-prestashop-cs.php:
There are two lines (93, 140) with
SELECT i.position FROM ps_product p
CHANGE TO
SELECT i. id_image FROM ps_product p
NOTE: “position” had back ticks around it. Replace “position” with “id_image” – I can’t get the inline back ticks to display properly here.
There are two lines (101,148) with:
$image_path = $image_folder . "/". $product_id . "/".$id_image."/" . $product_id.$id_image."-" . $image_size."_default.jpg";
CHANGE TO
$ps_image="";
$splits=strlen ( $id_image );
for ($ii = 0; $ii < $splits; $ii++)
{
$ps_image.=substr($id_image, $ii,1)."/";
}
$image_path = $image_folder . "/".$ps_image.$id_image."-" . $image_size."_default.jpg";
Not only has the directory system changed for images, but maybe the way they are stored in the database too. I started with a clean install of PrestaShop 1.5.4.1
It works for me, but the following lines (103,150) where there’s a short “if” to determine whether the url exists would likely still produce another bogus image link
if(!url_exists($image_path)){
$image_path = $image_folder . "/". $product_id ."/" . $product_id."-" . $image_size."_default.jpg";
So like I said, these changes got the plugin working for me, however the page loading hangs noticeably while fetching those images and links and product names. The query for returning the image id seems a bit overzealous. The Prestashop table “ps_image” contains the image id and the product id, which is all you need for the actual image instead of three LEFT JOINs to other tables. Prestashop runs slow in general on my host (Hostgator) Maybe this plugin would work better if it was an AJAX call that waited till after the page loaded.