Contributions
RSS Feed 0.1
This file allows you to have an RSS 0.92 valid feed of your products.
There are a few config options in the top of the file, but it's mostly plug and play, getting all of the requisite info from the application_top.php and configure.php files
Expand All / Collapse All
This correct a bug when your server don't accept the php function getallheaders()
RSS FEED - MANUAL UPGRADE DOCUMENTATION from v1.2 to v2.0 (by faaliyet)
-Included documentation file for manual upgrade.
**Upgrade from v1.2 to v2.0
That's All.
-Cleaned up the code by making use of more default osCommerce functions
-Added an option to show catalog/categorie/manufacturer feeds (uses the same syntax as the osC index.php page)
-Added optional GET parameter "html={boolean]" to enable/disable html content (most feed readers doesn't have to much problems with html)
-Fixed the lastupdate time to be GMT
small update for previous installation.
in cataog/rss.php file
-Find:
header('Content-Type: application/xml; charset=utf-8');
header("Last-Modified: " . tep_date_gmt($last_modified));
-And replace with:
header('Content-Type: application/xml');
header("Last-Modified: " . tep_date_raw($last_modified));
no file...
Muchos clientes al pedir los ficheros no envían la cabecera If-Modified-Since si así
fuera, la respuesta sería un 304 Not Modified (de 84 bytes). Es decir las posibilidades
de gastar ancho de banda son:
1. Que el RSS se haya actualizado y nos lo bajemos (7KB)
2. Que el RSS NO se haya actualizado y nos lo bajemos (7KB)
3. Que el RSS NO se haya actualizado y recibamos un código 304 (84 bytes)
El primer caso y el tercero son correctos, el segundo no lo es, en un mundo perfecto
todos los programas actuarían perfectamente entre ellos y estos detalles no pasarían.
Suponiendo en el caso anterior que “sólo” el 10% de las peticiones no requieran
volver a bajar el RSS y lo hagan suponen un gasto de 700MB frente a los 8.2MB que
deberían ser. Casi 90 veces más gasto por un detalle a priori insignificante.
Si desea más información siga el siguiente enlace:
http://sigt.net/archivo/explicacion-de-la-cabecera-if-modified-since.xhtml
This release fixes a invalid characters bug in buy link.
This release fixes a security bug that allowed a SQL injection.
More info here:
http://forums.oscommerce.com/index.php?showtopic=254845&st=80
and:
http://www.bisente.com/blog/2007/07/31/corregido-bug-en-oscommerce-rss-feed/?lan=english
This is a modified version of Ralph2's plugin that adds Ecommerce tags to the feed.
More info on the Ecommerce RSS module here:
http://shopping.discovery.com/erss/
More info on the plugin here:
http://www.bisente.com/proyectos/oscommerce-rss-feed-ecommerce/?lan=english
Sample live feed with Ecommerce tags:
http://www.valquirias.com/rss.php?ecommerce=1
- Incorporated a shop logo to the feed
- Several bugfixes regarding: information box link and footer link. These links weren't working properly with multi language shops
Many thanks to Patrick Veverka and everyone else who has put some work into this fine contribution!
- Incorporated the possibility to decide whether a particular product should or should not be added to the feed
- Several bugfixes regarding: link rel, information box link and footer link. These links weren't working properly with multi language shops
- Incorporated the category tag, which makes it possible to have a feed reader (e.g. IE7's feed reader) filter products based on the categories they're in. This means that a feed will only show the products of the category which the customer has selected.
- Incorporated a changelog file
- Incorporated "more info" and "buy now" buttons to the feed and the package
- Incorporated a better looking RSS icon
- Incorperated a directory structure within the package
- Incorperated the possibility to set the number of articles displayed by the feed in the admin area
- Fixed the duplicate items bug
- Fixed the problems with adding images to a feed
- Improved the header code
- Improved the code which places the RSS icon on the pages of a webshop
- Made the feed output rss version 2.0 compliant
- Renamed to the README.txt to install.txt and cleaned up the text
- cleaned up the code of rss.php
- Translated the French sentences within rss.php into English
- Changed the extension of the RSS icon from PNG to JPG
- Opened a support thread on the forum which can be found here: http://forums.oscommerce.com/index.php?showtopic=254845
There have been reports that RSS 0.9 does not work for many people. Please try an earlier version before resorting to 0.9.
0.9 should only be tried IF you experience headers already sent issues with the earlier version.
Attached file is merely the instruction text.
I had Headers Already Sent errors with the previous version 0.8.3. Checked around for answers on the forum. Wasn't the only one with this problem, but no one had a solution.
I've modified an older, working version that did not have Headers Already Sent errors, added the encode_utf8, the date fix to prevent mulitiples of the product displaying, added more detail to the README file, added instructions on how to have all
of your product showing in the feed, etc.
This is the full version. I'm not a programmer, but was able to get this to work on my site, and have it validate. Maybe a real programmer will take an interest and check the code for cleanliness.
Hope this helps others who have experienced difficulties with the latest and/or older versions not validating.
I was experiencing some troubles when navigating through my site (aerotronic.nl) with FF.
Now I have the explanation and solution. Some links were an output of the navigation class. As the RSS page is called by FF on the first page visit after page load, the navigation class registers this as last requested page by the user. By echoing a link produced by the navigation class (on product_info I have placed a back link), you'll see that it will write rss.php?languaga=nl or so.
Therefore you should remove the rss.php page from the last visited pages with:
$navigation->remove_current_page();
(place after require('includes/application_top.php'); )
Great contribution! Thanks!
download is a dummy .txt
The feed from RSS Feed 0.8.3 + update does not validate at the W3C Feed validator (http://validator.w3.org/feed/).
To fix this, one small change is required
Replace (line 114):
$added = $row['products_date_added'];
with:
$added = date(r,strtotime($row['products_date_added']));
This still leaves a warning about a problematic date in lastBuildDate.
I don't know how to fix this right now.
(The download is a text file with these instructions)
Same as RSS Feed 0.8.3 (Full package) except included code for products date added.
I had problems in Safari's RSS since the publish date was wrong, it showed the actual time right now. Every time the feed updated I got duplicates of every product, ending up in hundreds of them. This is now fixed, the date when the products was added is now the publish date.
Some bugfixes from the previus release. The changes are in the code placed in the instructions file. It works like a charm!
Replaced all "iconv" functions for "utf8_encode" since it wasn't working in my hosting with Simple Template System (STS) and now it does.
----- ENGLISH -----
Convert in UTF-8 and sanityze the title and a few others strings;
Commented the <price> tag;
----- FRANÇAIS -----
Convertit en UTF-8 et nettoie aussi le titre et autres chaînes ;
Commenté la balise <price> ;
Works great, but the instructions were alittle garbled. This is just an easier to read install file in English.
----- ENGLISH -----
Now RSS feed is in UTF-8;
Special chars seems now to be okay;
Let leave HTML tags in $name and $desc, everybody seems to do like this;
We should drop the RSS tag <price> wich is not RSS compliant:
http://feedvalidator.org/
----- FRANÇAIS -----
Feed RSS maintenant en UTF-8 ;
Laissons les balises HTML dans $name et $desc, tout le monde semble le faire ;
On devrait supprimer la balise <price> qui n'est pas RSS compliant :
http://feedvalidator.org/
Simply Replace the following lines in rss.php.:
$link = HTTP_SERVER . DIR_WS_CATALOG;
// Uncomment this line out if you are using SEO links (Apache Rewrite URL)
//$link .= "product_info.php/products_id/" . $id . "&language=" . $lang_code;
// Comment out this line if you are NOT using SEO links
$link .= "product_info.php?products_id=" . $id;
With:
// Ultimate SEO Links for RSS (Added: 10 May 2005, Gareth Houston)
$link = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $id) ;
Ajout des caractères spéciaux
Addition of the special characters
----- ENGLISH -----
Added support for subcategories.
Subcategory IDs are denoted by parentcategory_subcategory and were being
ignored as the product to category table only lists the final subcategory
for the product, not it's parent category.
This is now fixed as if rss.php finds a category ID with x_y or x_y_z is takes the
last component to be the category for the product to category table lookup.
----- ENGLISH -----
Fixed little bug where products with status set to "red" where listed<br>
Added support for french accents
Added tax when item subject to tax
----- FRANÇAIS -----
Correction d'un bug qui listait des produits dont l'etat etait sur "rouge"<br>
Ajout de la gestion des accents francais
Ajout de la TVA lorsque l'article y est soumis
Demo here : http://www.mafianumerique.com/catalog/rss.php
(check out source to view image links)
----- ENGLISH -----
Fixes a typo on $cpath (must be $cPath)
----- FRANÇAIS -----
Correction d'une faute de frappe sur $cpath (doit être $cPath)
----- ENGLISH -----
Come back of the description & image field, as it was the case in v0.2.
Limitation to the category specified on the URL ("cPath=")
----- FRANÇAIS -----
Retour des champs description & image comme c'était le cas en v0.2.
Restriction à une catégorie spécifique en définissant « cPath= » dans l'URL.
----- ENGLISH -----
Bugfixe (again!) on the languages settings.
Full package.
----- FRANÇAIS -----
Encore des corrections de bugs concernant la gestion des langues.
Paquet complet.
----- ENGLISH -----
Bugfixe on the languages settings. Now use "rss.php?language=en" as osCommerce
does.
This is the full package.
----- FRANÇAIS -----
Correction de bug concernant la gestion des langues. Utiliser maintenant un
lien comme « rss.php?language=fr » comme le fait déjà osCommerce.
Il s'agit du paquet complet.
----- ENGLISH -----
Modified for:
- Show products' name in the language selected (rss.php?language=english);
- Show only MAX_DISPLAY_SEARCH_RESULTS items;
- Order by items id (last added, first listed);
- Do not show description field;
- Replace "&" by "&";
- Removed $sqlcount SQL query (what was the use?);
- Add some RSS items;
- Add a stylesheet link to the W3C's one;
Used at Nippon-Export :
http://www.nippon-export.com/
----- FRANÇAIS -----
Modifié pour :
- Affiche le nom des produits dans la langue choisie (rss.php?language=french) ;
- N'affiche que MAX_DISPLAY_SEARCH_RESULTS produits ;
- Range par numéro id (les derniers saisis en premier) ;
- N'affiche pas la description des produits ;
- Remplement des « & » par des « & » ;
- Suppression de la requête $sqlcount qui ne sert vraissemblablement à rien ;
- Ajout de quelques balises RSS ;
- Ajout d'un lien vers le stylesheet du W3C ;
Utilisé sur Nippon-Export :
http://www.nippon-export.com/
Fixed the rss.php file so it works without SEO links. Also fixed description tags so they work...
For those of you who can't get the feeds created by rss.php to validate I have figured out how to fix the problem. If you get an error like this
[line 2, column 0: XML Parsing error: :3:0: xml declaration not at start of external entity]
then read the included text file to see how I fixed the problem.
This file allows you to have an RSS 0.92 valid feed of your products.
There are a few config options in the top of the file, but it's mostly plug and play, getting all of the requisite info from the application_top.php and configure.php files
Note: Contributions are used at own risk.