RSS Feed contribution support thread
#281
Posted 07 July 2009, 14:45
Anyone succeed to remove first empy line
#
# <?xml version="1.0" encoding="windows-1251"?>
line 2, column 0: XML parsing error: <unknown>:2:0: xml declaration not at start of external entity
I have double check - no empty spaces in files, STS is set correct, after first row everything is OK
Thank You
#282
Posted 07 July 2009, 21:37
Just a quick question
why my date of the rss feed is in 1979. See below
http://beta.feedvalidator.org/check.cgi?ur...3Flanguage%3Dbg
How can I fix this?
Thanks.
#283
Posted 14 July 2009, 17:40
What may be happening?
see the link
http://www.cardsdigers.com/loja/bbrasil-te...os-c-22_62.html
#284
Posted 14 July 2009, 17:41
What may be happening?
see the link
http://www.cardsdigers.com/loja/bbrasil-te...os-c-22_62.html
#285
Posted 28 July 2009, 01:11
Here I have a question that I hope u can help me :
How to locate the RSS icon to the place where I want?
For example, If I want to place the RSS icon to the Header aera of the NEW PRODUCTS FOR MONTH box in the mainpage, How can I do that?
Thanks
Kind Regards
JUN
#286
Posted 02 August 2009, 23:25
Contribution found here: http://addons.oscommerce.com/info/1513
RSS Feed v2.2a - Add Manufacturer, Model #, Price + More to Feed
See it in action here: http://www.foryoursalon.com/rss.php?language=en Catalog RSS Feed
http://www.foryoursalon.com website
This is an update for RSS Feed v2.2 by faaliyet (23- Mar- 2009).
You must download and install RSS Feed v2.2 first.
This is not full package.
Only contains manual install Instructions and rss.php file.
v2.2a Changes:
--------------------------
-Added Manufacturer, Model # and Price to feed items (you can use all, or comment out the ones you don't want).
- Based on how Newegg.com feeds look.
- Price will display either regular price or special price (if it is on special).
- Currently all is hard-coded in rss.php file so no external "defines". You can change that if you want
but I felt unnecessary at this time .
- Also, Prices: Sorry, since my my store is only in dollars I have not included code for multi-currency stores. (hard-coded)
-Added Screenshot to see what it will look like.
-Added <copyright> </copyright> channel element (to of course display your copyright info).
-Added <width> </width><height></height> channel elements so as to make the store logo a clickable link to website
-Updated: Commented out <atom:link href....... rel="self"> tag because it was (again causing problems with the rss feed renderings in IE and Firefox [at least for me]).
Included in install file is an explaination and possible temporary fix. But, this is not really needed (do a Google search on "Missing atom:link with rel="self"
and see what I mean. http://beta.feedvalidator.org/ Feed Validator only suggests as "Recommendation" and removal doesn't invalidate feed anyway.
This tag was working for me a few months ago, but not anymore maybe related to php upgrade to PHP version 5.2.9 on my server - YMMV.
Issues Un-Resolved (since v2.2):
---------------------------------------
- atom:link href as listed above.
- still a problem with and ereg tags in the descriptions
- Top Category feeds not displaying when Top category has sub-categories (sub-categories show fine).
Example:
Category 1 ===> displays fine
Category 2 ===> DOESN'T DISPLAY
L Sub-Category 1 ===> displays fine
L Sub-Category 2 ===> displays fine
Category 3 ===> displays fine
NOTE: Not full package, replacement rss.php included to use if you haven't already modified the original.
ALSO: Finnished working on RSS feed for Specials and Featured Products (I'll upload soon)
Thanx to faaliyet for all his work on this contribution!
#287
Posted 04 August 2009, 01:24
1.MY store can be viewed by FIREFOX correctly and not by IE and google chrome when I click the rss feed icon.
2.Top Category feeds not displaying when Top category has sub-categories (sub-categories show fine).
Example:
Category 1 ===> displays fine
Category 2 ===> DOESN'T DISPLAY
L Sub-Category 1 ===> displays fine
L Sub-Category 2 ===> displays fine
Category 3 ===> displays fine
anybody can help?
thanks
#288
Posted 14 August 2009, 18:51
I have RSS installed now, think its a great contribution, not really familiar about the way it should be used, i intend to submit it to various places and not sure how many i should have in the feed.
I have over 10,000 products but should i have only 20/30 in the RSS with regular updates (which is very quite often) or all of my products ?
any help would be appreciated
Thank you
#289
Posted 18 August 2009, 18:43
DAVID3733, on Aug 14 2009, 02:51 PM, said:
I have RSS installed now, think its a great contribution, not really familiar about the way it should be used, i intend to submit it to various places and not sure how many i should have in the feed.
I have over 10,000 products but should i have only 20/30 in the RSS with regular updates (which is very quite often) or all of my products ?
any help would be appreciated
Thank you
10,000 products would be WAY too much! Just think how long it would take the feed to load, besides no one is going to go through a feed with 10,000 products in it. Think of an RSS feed as "The Latest News" about what's on your site. I our case the News relates to the latest products added. The way this RSS feed contribution is set up is to show the latest Products added, on Index page it will show the latest (XX amount) products added (All), then in each catagory and manufaturers page it will show the latest (XX amount) products added for each category or manufacturers page. All based on what amount you set in admin.
Starting with 20 or 30 is the right move, especially if you add new products often. Take a look around other popular ecommerce sites with feeds and see what number they display. Usually between 20- 50 items per feed is normal. I wouldn't go above 50.
The only exception would be for a Specials feed or Featured products feed (which I am working on) since you want to show all those items "on Special" or "featured" and no be limited to what you set in admin.
-Nolaman
Edited by NolaMan, 18 August 2009, 18:45.
#290
Posted 21 August 2009, 17:19
Does anyone have an idea on a cure?
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#291
Posted 22 August 2009, 08:47
lines 54 - 113
function replace_problem_characters($text) {
$formattags = array("&");
$replacevals = array("&");
$text = str_replace($formattags, $replacevals, $text);
//$in[] = '@&(amp|#038);@i'; $out[] = '&';
$in[] = '@&(#036);@i'; $out[] = '$';
$in[] = '@&(quot);@i'; $out[] = '"';
$in[] = '@&(#039);@i'; $out[] = '\'';
$in[] = '@&(nbsp|#160);@i'; $out[] = ' ';
$in[] = '@&(hellip|#8230);@i'; $out[] = '...';
$in[] = '@&(copy|#169);@i'; $out[] = '(c)';
$in[] = '@&(trade|#129);@i'; $out[] = '(tm)';
$in[] = '@&(lt|#60);@i'; $out[] = '<';
$in[] = '@&(gt|#62);@i'; $out[] = '>';
$in[] = '@&(laquo);@i'; $out[] = '´';
$in[] = '@&(raquo);@i'; $out[] = 'ª';
$in[] = '@&(deg);@i'; $out[] = '∞';
$in[] = '@&(mdash);@i'; $out[] = 'ó';
$in[] = '@&(reg);@i'; $out[] = 'Æ';
$in[] = '@&(ñ);@i'; $out[] = '-';
$text = preg_replace($in, $out, $text);
return $text;
}
function strip_html_tags($str) {
// $document should contain an HTML document.
// This will remove HTML tags, javascript sections
// and white space. It will also convert some
// common HTML entities to their text equivalent.
$search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript
"'<[/!]*?[^<>]*?>'si", // Strip out HTML tags
//"'([rn])[s]+'", // Strip out white space
"'&(quot|#34);'i", // Replace HTML entities
"'&(amp|#38);'i",
"'&(lt|#60);'i",
"'&(gt|#62);'i",
"'&(nbsp|#160);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'&#(d+);'e"); // evaluate as php
$replace = array ("",
"",
//"\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169),
"chr(\1)");
return preg_replace($search, $replace, $str);
}
lines 247 - 252
// Encoding to UTF-8 $store_name = utf8_encode (replace_problem_characters($store_name)); $rss_title = utf8_encode (replace_problem_characters($rss_title)); $weblink = utf8_encode ($weblink); $description = utf8_encode (replace_problem_characters($description)); $email_address = utf8_encode ($email_address);
lines 350 - 353
$name = utf8_encode(replace_problem_characters($name)); $desc = utf8_encode(replace_problem_characters($desc)); $link = utf8_encode($link);
lines 377
// Encoding to UTF-8 $cat_name = utf8_encode (replace_problem_characters(strip_html_tags($cat_name)));
lines 396 - 441
// http://www.w3.org/TR/REC-xml/#dt-chardata
// The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form
$name = str_replace('&','&',$name);
$desc = str_replace('&','&',$desc);
$link = str_replace('&','&',$link);
//$cat_name = str_replace('&','&',$cat_name);
$name = str_replace('<','<',$name);
$desc = str_replace('<','<',$desc);
$link = str_replace('<','<',$link);
$cat_name = str_replace('<','<',$cat_name);
$name = str_replace('>','>',$name);
$desc = str_replace('>','>',$desc);
$link = str_replace('>','>',$link);
$cat_name = str_replace('>','>',$cat_name);
which amounts to all the 'replace problem characters' script
Questions are:
Why is this script there?
Can it be removed? (yes it works without it)
If the script is really needed is there another solution?
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#292
Posted 22 August 2009, 10:18
Xpajun, on Aug 22 2009, 09:47 AM, said:
delete or comment all but the last line
return $text;,
return preg_replace($search, $replace, $str);becomes
return $str;
Ken
over 20 years of computer programming experience.
#293
Posted 23 August 2009, 20:50
The fix worked in as much as the languages showed up properly - well the Chinese and the Cyrillic show perfectly with it removed...
but all the western scripts show as blank pages
The offending code is:
function replace_problem_characters($text) {
$formattags = array("&");
// $replacevals = array("&");
$text = str_replace($formattags, $replacevals, $text);
// $in[] = '@&(amp|#038);@i'; $out[] = '&';
If I edit out $formattags and $text everything would work but the western won't (in fact any language file that has
define('CHARSET', 'iso-8859-1'); defined except english.php).I've tried reopening the 'language'.php in UTF-8 but that causes another problem (I think maybe because the script is not UTF-8 compatible?)
So I'm afraid I'm back to asking "any ideas please?"
Edited by Xpajun, 23 August 2009, 20:55.
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#294
Posted 23 August 2009, 22:00
What is actually happening is that the replace problem characters is removing the & and so is destroying special character codes
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#295
Posted 23 August 2009, 23:28
switch (language_code) {
case "this lang-code":
do what ever works for this language;
break;
case "this other lang-code":
do the other bit that works for that language;
break;
default:
...
}
FF may show page whereby IE may not. IE (v8) needs catching up.Ken
Edited by GemRock, 23 August 2009, 23:28.
over 20 years of computer programming experience.
#296
Posted 24 August 2009, 16:55
Thanks everyone for make this a great contribution.
Someone is having the same problem of me?
On my rss.php is showing but not the picture, it is broken.
http://www.flooringsupplystore.com/rss.php?language=en
Any ideas?
#297
Posted 24 August 2009, 18:17
Won't be starting til the end of the week though when I can access my local test site (cant afford to have the store broken
Might have to ask a few more questions though if you don't mind
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#298
Posted 24 August 2009, 19:05
You are having a browser problem, I don't see your images in FF on a mac yet I see them on Safari but I can't tell you the reason why you might be getting the problem and I don't
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3
#299
Posted 25 August 2009, 08:33
thanks
#300
Posted 25 August 2009, 09:14
Working with osCommerce 2.3.1
Add-Ons so far Installed:
Add date and order number to invoice and packing slip,
Products Cycle Slideshow,
Detailed Monthly Sales,
Holiday Settings,
Tracking Module for 2.3














