ejectcore Posted May 24, 2008 Share Posted May 24, 2008 Hello So far succesfully imported 400 products to prestashop using osc2ps & a few mods, but I now need to display the old oscommerce images with the products. I have added a new field to ps_image_lang called "osc_image" when new ones are added the current image system will be fine, all I need is the custom field to display in product_list.tpl & product.tpl ??? I added osc_image into classesproduct.php (this caused hack attempt to show up on the product page) ??? <?php * Get product images and legends & OSC Image * * @param integer $id_lang Language id for multilingual legends * @return array Product images and legends */ public function getImages($id_lang) { return Db::getInstance()->ExecuteS(' SELECT i.`cover`, i.`id_image`, il.`legend`, il.`osc_image` FROM `'._DB_PREFIX_.'image` i LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).') WHERE i.`id_product` = '.intval($this->id).' ORDER BY `position`'); } ?> also I have added the following line to product-list.tpl (Which doesn't seem to featch the image) ??? <a href="{$product.link}" class="product_img_link" title="{$product.name}"><img src="{$img_prod_dir}{$product.osc_image}" alt="{$product.legend}" /></a> finally I tried adding a new line after 96 of product.php which I am not sure is quite right <?php $cover['id_image'] = intval($product->id).'-'.$cover['id_image']; $cover['osc_image'] = intval($product->id).'-'.$cover['osc_image']; ?> All I need is some one to poin tme in the right direction because i have seemed to of gone wrong somewhere Thanks in advanced Link to comment Share on other sites More sharing options...
Recommended Posts