troyrob Posted July 4, 2014 Share Posted July 4, 2014 Hi, I was thinking about the RSS feeder module, by default it returns the default image for a product. Would it be possible to return all images for a product? Where would i begin modifying? Link to comment Share on other sites More sharing options...
vekia Posted July 4, 2014 Share Posted July 4, 2014 rss.php file you have to create there forach loop on $image variable and echo each array item Link to comment Share on other sites More sharing options...
troyrob Posted July 5, 2014 Author Share Posted July 5, 2014 Ok so this section? : if (is_array($image) AND sizeof($image)) { $imageObj = new Image($image[0]['id_image']); echo "<![CDATA[<img src='".$link->getImageLink($product['link_rewrite'], $image[0]['id_image'], 'atmn_normal')."' title='".str_replace('&', '', $product['name'])."' alt='thumb' />"; $cdata = false; } I would echo $image[0] and iterate i.e. $image[1], $image[2] etc?Also, how would i modify the same file to display sale items instead of new products. $id_category = ((int)(Tools::getValue('id_category')) ? (int)(Tools::getValue('id_category')) : Configuration::get('PS_HOME_CATEGORY')); I assume that PS_HOME_CATEGORY neets to change, would it be PS_SALE_CATEGORY ? Link to comment Share on other sites More sharing options...
vekia Posted July 6, 2014 Share Posted July 6, 2014 instead of using $image[0] [1] [2] etc. use foreach loop on $image variable it will be much easier and the only one proper way to dump array as correct code regarding to your section question, no, you trying to do it wrong you have to use totally different method. you wan to dispaly best sellers or products that are currently in sale? Link to comment Share on other sites More sharing options...
troyrob Posted July 6, 2014 Author Share Posted July 6, 2014 Products currently on sale Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now