sebastiann Posted October 27, 2010 Share Posted October 27, 2010 Hi!Is it possible to get all the products in the RSS output? Now it only get the ones in Featured and I would like to have all. 1 Link to comment Share on other sites More sharing options...
sebastiann Posted October 30, 2010 Author Share Posted October 30, 2010 No ideas? I am stuck on this one, do not get it right Link to comment Share on other sites More sharing options...
d3mon Posted November 15, 2010 Share Posted November 15, 2010 I've been working on this recently. I also wanted to change the RSS feed to show newly added products and not featured products.*Make sure your RSS product feeder is enabled in your shop admin.**Make a backup of your files before making changes.*There are two PHP files to edit:1. /modules/feeder/rss.phpChange Lines 7 and 8: $orderByValues = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'ASC', 1 => 'DESC'); to read: $orderByValues = array(0 => 'date_add', 1 => 'price', 2 => 'name', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'DESC', 1 => 'ASC'); Change Line 16: $products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true); to read: $products = Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, $orderBy, $orderWay); Now browse to: [your shop url]/modules/feeder/rss.php You should now see an RSS list of the latest ten products you added, with the very latest at the top.2. /modules/feeder/feeder.phpChange Lines 58/59/60: $smarty->assign(array( 'feedUrl' => 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/'.$this->name.'/rss.php?id_category='.$id_category.'&orderby='.$orderBy.'&orderway='.$orderWay, )); to read: $smarty->assign(array( 'feedUrl' => 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/'.$this->name.'/rss.php')); This will change the standard URL so that the RSS feed icon in the browser points to the improved RSS feed.HTHP.S. Sorry, I'm new to this forum - is there an FAQ section (or similar) I can post this in to help more people find it? 1 Link to comment Share on other sites More sharing options...
peanut Posted November 21, 2010 Share Posted November 21, 2010 Thanks a lot! It's working, however it doesn't exactly show the latest 10 products, I think it might have something to do with the time settings, not sure if its PS related or server related. However, I'm glad it works coz it now shows 10 products not on the home featured like the original feeder module. So thank you very much! Link to comment Share on other sites More sharing options...
d3mon Posted November 21, 2010 Share Posted November 21, 2010 Thanks peanut. I wasn't sure if the products were exactly the last ten added as the shop I was working on wasn't my own. The code uses a standard Prestashop function - GetNewProducts, which I had assumed would 'do what it said on the tin'. I suppose it is possible that there are some features/bugs in that function that exclude certain products, I'm not sure. Perhaps the admins can shed further light on this. Link to comment Share on other sites More sharing options...
peanut Posted November 21, 2010 Share Posted November 21, 2010 HiI made a small change to your code in rss.php, added what Rocky posted in this forum post:http://www.prestashop.com/forums/viewthread/57484/#271103 . Changed his code from 1 to 0. Now it displays the 10 latest products!! $products = Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, 'date_add', 'DESC'); Thanks! Hope it works for everyone else as well. Link to comment Share on other sites More sharing options...
frosticek Posted November 22, 2010 Share Posted November 22, 2010 Is there any way to change code to list in RSS all the products in shop, sort by date added ? Because now, I see only products I have added after installing RSS.Thank you very much for any help.btw. How can I add tab with RSS settings ? Link to comment Share on other sites More sharing options...
prestadevelop Posted December 5, 2010 Share Posted December 5, 2010 I cant get this to word proparly, anybody who did that? Link to comment Share on other sites More sharing options...
TheHat Posted December 15, 2010 Share Posted December 15, 2010 Hi!Is it possible to get all the products in the RSS output? Now it only get the ones in Featured and I would like to have all. Has anybody solved this? I would like all products show, at the moment i have none showing.Gary Link to comment Share on other sites More sharing options...
luuuciano Posted January 14, 2011 Share Posted January 14, 2011 amazing!Thanks a lot d3mon! thanks for share it!+1 to the FAQ section, this should be added Link to comment Share on other sites More sharing options...
marcus4 Posted March 9, 2011 Share Posted March 9, 2011 Does anybody have a solution for showing all products already, not only the ones added after RSS install? All my products are already in the shop, and just installed RSS so none showing.THANKS!!! Link to comment Share on other sites More sharing options...
AndersIvar Posted April 17, 2011 Share Posted April 17, 2011 Does anybody have a solution for showing all products already, not only the ones added after RSS install? All my products are already in the shop, and just installed RSS so none showing.THANKS!!! +1 for all products in RSS. Link to comment Share on other sites More sharing options...
mmsh Posted June 13, 2011 Share Posted June 13, 2011 hi...please, how to add images to products feed? and if image is not on the server but is hotlinked by url saved on database? thank you :-D Link to comment Share on other sites More sharing options...
xiawa Posted August 9, 2011 Share Posted August 9, 2011 Thanks, this work perfectly. ps: I get the code to render latest product by changing line 16 to this: $products = Product::getNewProducts(intval($cookie->id_lang), 0, 20, false, 'date_add', 'DESC'); Link to comment Share on other sites More sharing options...
yapliren Posted November 11, 2011 Share Posted November 11, 2011 to show all your products $products = Product::getNewProducts(intval($cookie->id_lang), 0, 20, false, 'date_add', 'DESC'); just change 20 to your total products amount, example 100 Link to comment Share on other sites More sharing options...
yesiam Posted November 21, 2011 Share Posted November 21, 2011 Thanks ! Link to comment Share on other sites More sharing options...
Nickless Posted December 8, 2011 Share Posted December 8, 2011 Many thanks d3mon! Was exactly what I was looking for, helped me out a great deal! -Dave Link to comment Share on other sites More sharing options...
CPG2 Posted December 9, 2011 Share Posted December 9, 2011 Hi d3mon Thank you a lot it's working great Please just tell me, I never understood the RSS module, it's necessary to install that module? I try to put the url my.domaincom/modules/feeder/rss.php but it says that it's my domain and it doesn't work... I don't understand this module but the RSS feed icon in the browser points to the improved RSS feed and it's working great. Thanks Link to comment Share on other sites More sharing options...
thegto Posted March 14, 2012 Share Posted March 14, 2012 Hello Sorry to dig the old post, I'm using PS1.4.7.0 at the moment, but this "RSS products feed v0.2 by PrestaShop" doesn't update any new feature products or new products to me. I wonder if the modify code abouve is still work on PS1.4.7.0... I will later when I get to home... btw, I wish that prestashop will up date this module in the newer version ? I think it will be very useful to update the lasted products insead of showing only feature products. Link to comment Share on other sites More sharing options...
franz1386 Posted May 25, 2012 Share Posted May 25, 2012 to show all your products $products = Product::getNewProducts(intval($cookie->id_lang), 0, 20, false, 'date_add', 'DESC'); just change 20 to your total products amount, example 100 Hi Man, sincerely it doesn't work....i'd like to put every products i have in my shop but also putting 100 and not 20 the feed RSS contains only the last 10 products i've added! Any ideas on how to fix it? 1 Link to comment Share on other sites More sharing options...
EGBee Posted December 8, 2013 Share Posted December 8, 2013 Can you upload both the files here? Link to comment Share on other sites More sharing options...
vekia Posted December 8, 2013 Share Posted December 8, 2013 stop posting everywhere, it's hard to reply when you post in all topics related to rss with similar questions one post is enough, thanks in advance. 1 Link to comment Share on other sites More sharing options...
EGBee Posted December 8, 2013 Share Posted December 8, 2013 Different Post has got different Solutions, So i tried all.. No problem. please help me with http://www.prestashop.com/forums/topic/157238-rss-new-products-feed/?p=1486188 Link to comment Share on other sites More sharing options...
alicu90 Posted March 1, 2019 Share Posted March 1, 2019 It works fine in prestashop 1.7.5? I don't find /modules/feeder/rss.php Link to comment Share on other sites More sharing options...
TShah Posted March 5, 2019 Share Posted March 5, 2019 Hello! In the version 1.7.5 the module is ps_feeder. And the file to be concerned with is ps_feeder > controllers > front > rss.php. Also I had to modify the url from back office by going to Configure > Shop Parameters > Traffic & SEO . From there I modified friendly url for this module page refered by ' module-ps_feeder-rss'. Then things worked for me. Hope this helps... 1 Link to comment Share on other sites More sharing options...
alicu90 Posted March 5, 2019 Share Posted March 5, 2019 24 minutes ago, TShah said: Hello! In the version 1.7.5 the module is ps_feeder. And the file to be concerned with is ps_feeder > controllers > front > rss.php. Also I had to modify the url from back office by going to Configure > Shop Parameters > Traffic & SEO . From there I modified friendly url for this module page refered by ' module-ps_feeder-rss'. Then things worked for me. Hope this helps... Thanks for the steps to the file. Do you have idea how to configure to show the last 10/20 products? I need something like this which worked fine https://example.com/module-ps_feeder-rss?id_category=12&orderby=date_add&orderway=desc Link to comment Share on other sites More sharing options...
TShah Posted March 5, 2019 Share Posted March 5, 2019 Hello! I modified for category id and posting the whole function here. I have changed meta tags and number of products to 20. And url would look something like - https://site-url/feed?id_category=16 private function getSmartyVariables() { $id_category = (int)Tools::getValue('id_category'); $id_category = $id_category ? $id_category : Configuration::get('PS_HOME_CATEGORY'); // get categroy name $category = new Category ($id_category,Context::getContext()->language->id); $catName = $category->name; if($catName !== "Home") { $title = "Buy Designer Luxury " . $catName ." CATEGORY META TITLE"; $metas['description'] = "Buy " . $catName ." CATEGORY META DESC"; $generator = "Designer " . $catName ." @ SITE NAME"; $filename = "PATH TO CATEGORY IMAGE" .$id_category . ".jpg"; if(file_exists($filename)){ $logo = $filename; } else { $logo = $this->context->link->getMediaLink(_PS_IMG_ . Configuration::get('PS_LOGO')); } } else { // it is default home category $title = "DEFAULT HOME CATEGORY META TITLE"; $metas['description'] = "DEFAULT META DESC"; $generator = "DEFAULT GENERATOR"; $logo = $this->context->link->getMediaLink(_PS_IMG_ . Configuration::get('PS_LOGO')); } // number of products increased to 20 $number = (int)Tools::getValue('n', 20); //$number = $number > 10 ? 10 : $number; $number = $number > 20 ? 20 : $number; $orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby')); $orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway')); $products = $this->getProducts($id_category, $number, $orderBy, $orderWay); return array( 'products' => $products, 'currency' => new Currency((int)$this->context->currency->id), 'affiliate' => (Tools::getValue('ac') ? '?ac=' . (int)Tools::getValue('ac') : ''), //'metas' => Meta::getMetaByPage('index', (int)$this->context->language->id), 'metas' => $metas, 'shop_uri' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__, //'shop_name' => Configuration::get('PS_SHOP_NAME'), 'shop_name' => $title, 'shop_email' => Configuration::get('PS_SHOP_EMAIL'), 'language_iso' => $this->context->language->iso_code, //'logo' => $this->context->link->getMediaLink(_PS_IMG_ . Configuration::get('PS_LOGO')), 'logo' => $logo, 'generator'=>$generator, ); } Link to comment Share on other sites More sharing options...
prestol Posted October 2, 2020 Share Posted October 2, 2020 for 1.7.7 example.com/module/controller/module-ps_feeder-rss 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