Kilobaid Posted June 13, 2013 Share Posted June 13, 2013 Hello, I am running Prestashop 1.5.3.1 My problem it's with images. All the images (generated) are in img/p/ [a folder ex 1,2,3] insteed of /p/11-31-large_default.jpg for example I tried to regenerate all the thumbs. The problem it's that no data feed loads the images. Datafeed Image Code: 'image' => $okazii_DbPrefix.'image', '.$db_tables['product_lang'].'.description, '.$db_tables['image'].'.id_image FROM '.$db_tables['product'].' LEFT JOIN '.$db_tables['product_lang'].' ON '.$db_tables['product'].'.id_product = '.$db_tables['product_lang'].'.id_product AND '.$db_tables['product_lang'].'.id_lang = '.$okazii_language.' LEFT JOIN '.$db_tables['image'].' ON '.$db_tables['product'].'.id_product = '.$db_tables['image'].'.id_product AND '.$db_tables['image'].'.cover =1 $okazii_Product['image_url'] = $okazii_Product['id_image'] > 0 ? "http://" . htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, "UTF-8") . _THEME_PROD_DIR_ . $okazii_Product['id_product'] . "-" . $okazii_Product['id_image'] . "-large_default.jpg" : ''; $Photos = explode("||",$okazii_Product['image_url']); if(count($Photos)>0){ $productPhotos .= "<PHOTOS>"."\r\n"; foreach($Photos as $Photo){ $productPhotos .= "<URL>".$Photo."</URL>"."\r\n"; } $productPhotos .= "</PHOTOS>"."\r\n"; } $altele = ""; Link to comment Share on other sites More sharing options...
Kilobaid Posted June 14, 2013 Author Share Posted June 14, 2013 any1? Link to comment Share on other sites More sharing options...
vekia Posted June 14, 2013 Share Posted June 14, 2013 it's not an issue, this is how prestashop works. your images are stored in the separate directories in the img/p "11-31-large_default.jpg " - this is an method of "mod rewriting" images Link to comment Share on other sites More sharing options...
Kilobaid Posted June 16, 2013 Author Share Posted June 16, 2013 it's not an issue, this is how prestashop works. your images are stored in the separate directories in the img/p "11-31-large_default.jpg " - this is an method of "mod rewriting" images Thanks but why the data-feed doesn't find the images? Link to comment Share on other sites More sharing options...
vekia Posted June 16, 2013 Share Posted June 16, 2013 it's because the htaccess (i suppose) i think that the best way to get working urls to pictures is a $link object and getImageLink function Link to comment Share on other sites More sharing options...
Kilobaid Posted June 16, 2013 Author Share Posted June 16, 2013 it's because the htaccess (i suppose) i think that the best way to get working urls to pictures is a $link object and getImageLink function Thanks for your reply. Can I get an example of that code? or a documentation link, i searched Google but I found nothing Link to comment Share on other sites More sharing options...
Recommended Posts