irl Posted February 10, 2011 Share Posted February 10, 2011 If work with third parties websites (auction?), may desire to list all images assigned to a product under description. Below is what would need to add/change in your php according to your needs. In my case they resize and had to include again 1st image in the description between.Declare new tags e.g. for private $condition = "New"; foreach ($Products AS $Product) { if ($Product['active'] and $Product['price']!=0) { $image = Image::getImages(intval($this->_cookie->id_lang), $Product['id_product']); $expire_date = date('Y-m-d', strtotime("28 days")); $Price = Product::getPriceStatic(floatval($Product['id_product'])); $Category = Product::categoryName($Product['id_category_default']); $count=count($image); $mystr = ""; for($i=0;$i<$count;$i++){ $mystr .= "".'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__. "img/p/" . $image[$i]['id_product'] . "-" . $image[$i]['id_image'] ."-large.jpg" . " ";} $item = "\n" . ""."Code".strtolower(Language::getIsoById($this->_cookie->id_lang))."-".$Product['id_product']."\n" . "<Title><![CDATA[".xml_convert($Product['name'])."]]></Title>\n" . "<![CDATA[".xml_convert($Category)."]]>\n" . "".round($Price)."\n" . "1\n" . "New\n" . "Miami\n" . "Ask" . "<![CDATA[".'http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'img/p/'.$image[0]['id_product'].'-'.$image[0]['id_image'].'-large.jpg'."]]>\n" ."<![CDATA[" .strip_tags($Product['description_short'])." - " .strip_tags($Product['description'])." ".$mystr."]]>\n" . "\n\n"; $this->_addToFeed($item); } } Link to comment Share on other sites More sharing options...
idoneedhelp Posted February 20, 2011 Share Posted February 20, 2011 i am looking for the solution like this. but i am not a PHP pro. can you tell me in a little more detail where to insert this code? in product.tpl or product.php. please tell me how to do it..thanks. Link to comment Share on other sites More sharing options...
Recommended Posts