Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

RSS Feed contribution support thread


359 replies to this topic

#101 Bisente

  • Community Member
  • 2 posts
  • Real Name:Vicente Aguilar

Posted 31 July 2007, 06:56

View Postjnanney, on Jul 31 2007, 08:17 AM, said:

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.

#102 jnanney

  • Community Member
  • 17 posts
  • Real Name:Jim Nanney

Posted 31 July 2007, 07:19

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.

#103 smic717394

  • Community Member
  • 61 posts
  • Real Name:Robert
  • Gender:Male
  • Location:London, UK

Posted 02 August 2007, 10:09

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 . '" />';
  }
  ?>


#104 mrhandley

  • Community Member
  • 34 posts
  • Real Name:Mattias Handley

Posted 02 August 2007, 14:12

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 :)

#105 xavkick

  • Community Member
  • 66 posts
  • Real Name:xavier

Posted 06 August 2007, 09:44

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

#106 scottzhai1

  • Community Member
  • 2 posts
  • Real Name:scott zhai

Posted 04 September 2007, 07:09

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...

#107 scottzhai1

  • Community Member
  • 2 posts
  • Real Name:scott zhai

Posted 04 September 2007, 08:01

Solved by myself.

I delete & from description. And it's ok now.

#108 ntcables

  • Community Member
  • 9 posts
  • Real Name:Chris Clark
  • Gender:Male
  • Location:United kingdom

Posted 23 September 2007, 19:30

View Postruboo, on Mar 15 2007, 04:50 AM, said:

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

#109 p@rick

  • Community Member
  • 1 posts
  • Real Name:Patrick

Posted 24 October 2007, 12:00

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

#110 polowrx

  • Community Member
  • 49 posts
  • Real Name:Chris

Posted 29 October 2007, 01:16

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.

#111 Melinda Odom

  • Community Member
  • 1,212 posts
  • Real Name:Melinda Odom
  • Gender:Female
  • Location:United States

Posted 02 November 2007, 19:10

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, 02 November 2007, 19:11.


#112 eoghanarnoldbiz

  • Community Member
  • 49 posts
  • Real Name:Eoghan Arnold
  • Gender:Male
  • Location:Australia, VIC

Posted 25 November 2007, 02:27

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.. :(

#113 maxxxie

  • Community Member
  • 136 posts
  • Real Name:Max
  • Location:Brisvegas, Australia

Posted 05 January 2008, 00:21

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

#114 carpenoctem

  • Community Member
  • 315 posts
  • Real Name:Mark

Posted 13 January 2008, 01:50

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!!!
[img]http://www.ir-usa.com/cat/rss.jpg[/img]

#115 pars

  • Community Member
  • 9 posts
  • Real Name:Mohamad Reza Mirdamadi

Posted 20 January 2008, 23:08

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?

[img]http://linuxshop.ir/helpimages/comments50.png[/img]

#116 pars

  • Community Member
  • 9 posts
  • Real Name:Mohamad Reza Mirdamadi

Posted 22 January 2008, 15:01

hi... no one to help me please? ^^^

#117 homewetbar

  • Community Member
  • 699 posts
  • Real Name:Keith W.
  • Location:USA

Posted 25 January 2008, 20:04

View Postsmic717394, on Aug 2 2007, 04:09 AM, said:

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

#118 homewetbar

  • Community Member
  • 699 posts
  • Real Name:Keith W.
  • Location:USA

Posted 29 January 2008, 21:19

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

#119 spcs

  • Community Member
  • 19 posts
  • Real Name:spc

Posted 06 February 2008, 18:01

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, 06 February 2008, 18:12.


#120 homewetbar

  • Community Member
  • 699 posts
  • Real Name:Keith W.
  • Location:USA

Posted 06 February 2008, 20:43

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, 06 February 2008, 20:45.

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