Obtenir l'url de l'image dans prestashop

J'ai besoin de faire un feed pour mon site web pour une comparaison de site. Il doit être une instruction sql.
Pour l'instant j'ai ceci:

select  pl.name as Titel,
    ROUND(p.price*1.21,2) as Price,
    replace(concat('http://', ifnull(conf.value,'domain/'), cl.name, '/', p.id_product, '-' , pl.name, '.html'),' ','-') as Link,
     concat('http://', ifnull(conf.value,'domain'), '/img/p/', p.id_product, '-' , pi.id_image, '.jpg') as "Image-location",
     cl.name as Categorie,
    p.id_product AS ID
from dbrb_product p
left join dbrb_image pi on p.id_product = pi.id_product
left join dbrb_product_lang pl on p.id_product = pl.id_product
left join dbrb_category_lang cl on p.id_category_default = cl.id_category
left join dbrb_configuration conf on conf.name = 'dbrb_SHOP_DOMAIN'
left join dbrb_product_carrier x on p.id_product = x.id_product
group by p.id_product

Mais maintenant avec la nouvelle prestashop version 1.6 de l'image ne fonctionne plus.

Maintenant le chemin de l'image est: domain.com/img/p/number/number/number/image.png
Je ne comprends pas la logique, quelqu'un peut-il me dire?

Il y a aussi un autre problème que j'ai à traiter, parce qu'il y a certains produits qui ont la même image.

Quelqu'un peut-il remplir le code SQL ou m'aider?

Merci!

OriginalL'auteur user2874583 | 2014-07-10