Jump to content
Ralph2

RSS Feed contribution support thread

Recommended Posts

The latest version from Bisente looks like it might carry a SQL Injection bug in it.

...

Change line 88 to this and it should no longer be vulnerable to exploits by way of this sql injection.

 

$category = preg_replace('/[^0-9_]/', '', $_GET['cPath']);

 

I guess you're completely right, it's been a childish mistake on my part. Thanks for the heads up!

 

I'll upload a new version with your fix ASAP.

Share this post


Link to post
Share on other sites

I hope you take no disrespect as I mean no harm, I just was adding the contrib to my site, and looked to make sure of what was going where.

 

I'm very glad to see your response this quick. It makes me very pleased to use your contribution.

Share this post


Link to post
Share on other sites

Hi is the below code need it? It seems to be working without it? And what does this code do exactly?

 

Thank you.

 

<?php
 if (!isset($lng) || (isset($lng) && !is_object($lng))) {
   include(DIR_WS_CLASSES . 'language.php');
   $lng = new language;
 }  
 reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
 echo '<link rel="alternate" type="application/rss+xml" title="' . STORE_NAME . ' ' . BOX_INFORMATION_RSS . ' ' . $value['name'] . '" href="' . FILENAME_RSS . '?language=' . $key . '" />';
 }
 ?>

Share this post


Link to post
Share on other sites

I´m having some problems with swedish characters.

 

The contrib works great otherwise, and is a really nice feature.

 

The problem I got with the swedish characters is that if I use any of the swedish chars in "Alt" or "Title" IE7 rss reader claims that there is an error in the feed and refuses to load it. FF loads it without any errors.

 

Feedvalidator tells me:

This feed does not validate.

line 49, column 415: 'utf8' codec can't decode bytes in position 3973-3975: invalid data (maybe a high-bit character?) [help]

...  i varukorgen " width="26" height="24" style="margin: 0px;" border="0">< ...											 ^In addition, this feed has issues that may cause problems for some users. We recommend fixing these issues.


... ton_shopping_cart.gif" border="0" alt="L? i varukorgen" title=" L? i var ...

 

The words I used is "Lägg i varukorgen", basically translates "Add to Cart"

 

If I change it to any word that doesn´t contain swedish chars its working great.

 

Any ideas as how to fix this? I know that I can just avoid using the åäö chars but it is a disaster waiting to happen, since it is really hard to remember not to use any swedish chars in the button description :)

Share this post


Link to post
Share on other sites

I actually have problem with IE 7, when i open the rss page, 2 sec later i have an error page.

When i use with Mozilla evrething is working good. Do you have nay idee about this bug ?

 

Xavkick

Share this post


Link to post
Share on other sites

I got bellow message. Any ideas??

 

 

SOstore.com

 

http://www.sostore.com

 

The XML page cannot be displayed

Cannot view XML input using CSS style sheet. Please correct the error and then click the Refresh button, or try again later.

 

 

--------------------------------------------------------------------------------

 

Whitespace is not allowed at this location. Error processing resource 'http://www.sostore.com/rss.php?language=en'. Line 1...

Share this post


Link to post
Share on other sites
Just wondering, why this piece of code is needed?

-----------------------------------------------

Open all the php files within the catalog folder / root of your website (e.g. index.php, contact_us.php etc):

 

###Add before / above the </head> tag:

 

<?php

if (!isset($lng) || (isset($lng) && !is_object($lng))) {

include(DIR_WS_CLASSES . 'language.php');

$lng = new language;

}

 

reset($lng->catalog_languages);

while (list($key, $value) = each($lng->catalog_languages)) {

?>

<link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo tep_href_link(FILENAME_RSS, 'language=' . $key, 'NONSSL', false); ?>">

<?php

}

?>

--------------------------------------------------

I installed all without the above and all seems to work correctly, and without any bug, Do I need to install the above? what is it for?

 

 

If you have the meta tags conbribution install then you can add the code to the end of that file droping the php> tags and it works fine as the mega tags file put the code into every page

Share this post


Link to post
Share on other sites

Regarding problem with special characters -> i.e. swedish in ie7:

 

in rss.php:

 

1. comment or remove:

 

// Encoding to UTF-8

$store_name = utf8_encode ($store_name);

$rss_title = utf8_encode ($rss_title);

$weblink = utf8_encode ($weblink);

$description = utf8_encode ($description);

$email_address = utf8_encode ($email_address);

 

2. Change:

 

echo '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";

 

to:

 

echo '<?xml version="1.0" encoding="ISO-8859-1" ?>' . "\n";

 

3. comment or remove:

 

// Encoding to UTF-8

$name = utf8_encode ($name);

$desc = utf8_encode ($desc);

$link = utf8_encode ($link);

 

4. comment or remove:

 

// Encoding to UTF-8

$cat_name = utf8_encode ($cat_name);

 

5. comment or remove:

 

// Encoding to UTF-8

$buy_link = utf8_encode ($buy_link);

 

That's it - Now your special chars should display correcly + no errors

 

/Patrick

Share this post


Link to post
Share on other sites

Can someone tell me how to enable the prices to show in the rss feed? Everything works fine except prices are not showing at all.

Share this post


Link to post
Share on other sites

Hi,

 

I just installed the 3.0 version and in the admin when clicking the submit query button I get this:

 

Creating XML Site Maps

Creating site map index file dated: 2007-11-02T15:08:43-08:00

Unable to create site map index file!

 

What does this mean?

 

Nothing says it was sent to google either.

 

Thanks!

Edited by Melinda Odom

Share this post


Link to post
Share on other sites

Great addon

 

one issue

 

recently updated to latest ver:

 

only now i get an feed code error page in IE 7.0

 

more info tab gives me the follwoing info

Invalid xml declaration.

Line: 19 Character: 3

 

<?xml encoding="UTF-8" ?>

 

any clues people??

 

this was working great till i updated.. :(

Share this post


Link to post
Share on other sites

Is it possible to use this contribution to produce per-category feeds? Eg a feed for PC games, a feed for Playstation games etc?

 

Cheers,

Max

Share this post


Link to post
Share on other sites

Hello,

 

I am using version 1.22 and am not having any problems. I actually would just like to change how the results are displayed... and have not been able to figure it out. I have changed several things in the file, nothing really seems to matter. I am using iGoogle to display the feed... and basically the image below shows how it is displaying now... and how I would like it to display. The rss file is located at RSS Link for Imaging Resources site.

 

Thank you for any help that you can provide!!!

rss.jpg

Share this post


Link to post
Share on other sites

hi,

I installed it but I have some problems! it shows me some odd charectors! likely the encoding is wrong!

I checked everywhere in the file but it was set to utf-8, and this is also the encoding i use for my persian shop!

 

and the address link seems to be weird! is it ok?

 

comments50.png

Share this post


Link to post
Share on other sites
Hi is the below code need it? It seems to be working without it? And what does this code do exactly?

 

Thank you.

 

<?php
 if (!isset($lng) || (isset($lng) && !is_object($lng))) {
   include(DIR_WS_CLASSES . 'language.php');
   $lng = new language;
 }  
 reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
 echo '<link rel="alternate" type="application/rss+xml" title="' . STORE_NAME . ' ' . BOX_INFORMATION_RSS . ' ' . $value['name'] . '" href="' . FILENAME_RSS . '?language=' . $key . '" />';
 }
 ?>

 

Yes is this code needed or can it be removed? What does it do?


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Figured out what that code from my last post was for. It's to make the RSS button light up in the newer browsers IE7 and firefox, it allows them to detect your feed. So you really just need it on pages that you want customers to be able to find your feed mainly product_info.php and index.php in my opinion.

 

Also if you have only one version and it is named rss.php you do not need all of the above code only the following is needed since you have only one language.

<link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS ?>">


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Hey all,

 

I have applied the lastest update that you can find here http://www.oscommerce.com/community/contributions,1513 in order to have If-modified-since, but the guy is using a function that is not present into my oscommerce which is tep_date_gmt.

 

I was wondering if someone already has this function and could past it ! .

 

On the other side, i have a empty line before '<?xml version="1.0" encoding="UTF-8" ?>', I'm using the file that is into the latest full package modified with the latest update , if you have an idea on this .

 

thanks in advance for the help :)

Edited by spcs

Share this post


Link to post
Share on other sites

A couple of quick tips, maybe someone can update the contrib if they have the time...

 

TIP #1 If you want your products to automatically be added to the feed when you create a new product instead of having to remember to check the feed box in admin change in admin/categories.php

 Under the section:
 if ($action == 'new_product') {
CHANGE
				   'products_to_rss' => '',
TO
				   'products_to_rss' => '1',

 

TIP #2 As mentioned somewhere earlier in forum somewhere oscommerce is adding the osCsid to the product URLs, bad news! To remove:

 

  ADD 
$link = substr($link, 0, strlen($link)-strlen(strstr($link,'&osCsid')));
UNDER
 $link = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $id, 'NONSSL', false);

In your catalog/rss feed file .php (filename may vary per language)

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Hello,

 

I just started installing this contribution.

 

On running the SQL file in phpmyadim I get the following error :

#1062 - Duplicate entry '80' for key 1

 

so am stick at Step 1 of the installation.

 

Any suggestions ?

 

dca

Share this post


Link to post
Share on other sites

One issue: When I was submitting my feed to a couple directories, I realized that the description was "Your Store Name, change in catalog/includes/languages/ your language " How do I change this? I've poured over the catalog/includes/languages/english.php file and the rss.php file itself. I can't figure out where this infernal text is coming from, and it looks soooo bad.

Share this post


Link to post
Share on other sites
One issue: When I was submitting my feed to a couple directories, I realized that the description was "Your Store Name, change in catalog/includes/languages/ your language " How do I change this? I've poured over the catalog/includes/languages/english.php file and the rss.php file itself. I can't figure out where this infernal text is coming from, and it looks soooo bad.

 

 

Durrr... I just added a description define(DESCRIPTION,"About my store",TITLE) and that was perfect. I didn't realize it was that easy!

Share this post


Link to post
Share on other sites

Hello,

 

What is it supposed to look like when you click the rss icon or information box link? I just get a page with a table on it and html of all my products... is this correct? thanks!

 

Scott

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×