We can have a better solution, without override or modify PaymentModule.php
so Mail.php send an Array for product. We only 6 keys, but we have the id product. It's alll we need for the tpl;
smarty var for url img cannot work because product in Mail is a simple Array, but we not need img with the url rewrite inside an email.
and in htaccess we can find line like this
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
order_conf_product_list.tpl
{foreach $list as $product} {assign var='defaultImage' value=Product::getCover($product['id_product'])} // we have now the ID image //// tr, td etc.... <img src="DOMAINNAME/{$defaultImage['id_image']}-medium_THEMENAME/{$defaultImage['id_image']}-medium_default.jpg" width="110" height="120"/> //// replace DOMAINENAME by https://www.yourdomaine //// replace THEMENAME by your name theme //// tr, td etc.... {/foreach}
this code work because all image name is related to id and the rewrite inside default htaccess work well.
and if you look in ftp you see for id 40 :
- p/4/0 => 40-small_default.jpg, 40-medium_default.jpg,40-large_default.jpg, etc......