Jump to content

Recommended Posts

Okay, I've tried a few different changes that I've found in this forum. Most of the changes are two years old or more though.

 

I'm currently running PrestaShop 1.4.7.0 and I'm using the RSS Products Feed v0.2 by PrestaShop

 

I know it defaults to the "Featured" products feed when you create it. However, that is useless to me. I need to set it so that I can have the RSS Feed update every time I add a new product so it automatically sends the new product to any place I have my RSS feed set up (ie: Facebook, dlvr.it, my blog).

 

I know some of you have it working, what have you done to get it to work? I really thought something like this would be a standard feature for e-commerce software.

 

Thanks ahead of time!

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 4 weeks later...
  • 4 months later...

Open modules/feeder/rrs.php

 

Find

 

$orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby'));
$orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway'));

Replace with

 

$orderByValues = array(0 => 'date_add', 1 => 'price', 2 => 'name', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'DESC', 1 => 'ASC');

Find

 

$products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true);

Replace with

 

$products = Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, 'date_add', 'DESC');

Now we need to add the pubdate for the product to the rss

 

Find

 

$image = Image::getImages((int)($cookie->id_lang), $product['id_product']);
 echo "\t\t<item>\n";

Add after on a new line

 

echo "\t\t\t<pubDate><![CDATA[".$product['date_add']." ]]></pubDate>\n";

 

Open modules/feeder/feeder.php

 

Find

 

'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,

Replace with

 

'feedUrl' => 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/'.$this->name.'/rss.php'));

 

Find

$this->_html .= Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/rss.php?id_category=<span style="color:red;">{id_category}</span>&orderby='.$orderBy.'&orderway='.$orderWay;
$this->_html .= '<br /><br />'.$this->l('Replace').' <span style="color:red;">{id_category}</span> '.$this->l('by the id category current or "0"');

and change to

$this->_html .= Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/rss.php';

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...
  • 8 months later...
  • 1 month later...

Open modules/feeder/rrs.php

 

Find

 

$orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby'));
$orderWay = Tools::getProductsOrder('way', Tools::getValue('orderway'));
Replace with

 

$orderByValues = array(0 => 'date_add', 1 => 'price', 2 => 'name', 3 => 'date_upd', 4 => 'position'); $orderWayValues = array(0 => 'DESC', 1 => 'ASC');
Find

 

$products = Product::getProducts(intval($cookie->id_lang), 0, ($number > 10 ? 10 : $number), $orderBy, $orderWay, $id_category, true);
Replace with

 

$products = Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, 'date_add', 'DESC');
Now we need to add the pubdate for the product to the rss

 

Find

 

$image = Image::getImages((int)($cookie->id_lang), $product['id_product']);
  echo "\t\t<item>\n";
Add after on a new line

 

echo "\t\t\t<pubDate><![CDATA[".$product['date_add']." ]]></pubDate>\n";
Open modules/feeder/feeder.php

 

Find

 

'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,
Replace with

 

'feedUrl' => 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'modules/'.$this->name.'/rss.php'));
Find
$this->_html .= Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/rss.php?id_category=<span style="color:red;">{id_category}</span>&orderby='.$orderBy.'&orderway='.$orderWay;
$this->_html .= '<br /><br />'.$this->l('Replace').' <span style="color:red;">{id_category}</span> '.$this->l('by the id category current or "0"');
and change to
$this->_html .= Tools::getShopDomain(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/rss.php

 

Thank you so much!!!

 

It's working for PS 1.5.6.1 and no need to change feeder.php

 

Thank you again for sharing

Link to comment
Share on other sites

  • 1 month later...

I have no problem with url of rss,

but I don't know alot about feature of rss in general, so:

 

- what I have to see on my shop, could you attach images for demo please ??

- TM Social : could add follow us : rss: what the url that I have to add then??

- any other useful hint please help me to benifit from this service.

 

thanx alot

Link to comment
Share on other sites

  • 1 month later...

Hello everybody, I need that into my rss is possible to show also two kind of prices.

 

One is the actual price (for example after a discount) and the standard price (the price before any discount applied).

 

What can we do with the code of rss?

 

Looking for your help..

Link to comment
Share on other sites

×
×
  • Create New...