Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

rss.php fixes to get a valid feed


ztrek

Recommended Posts

  • 4 months later...

At the end of my rss.php output page, i get the following error after a few products have been outputted...

 

Reference to undefined entity 'reg'. Error processing resource 'http://www.console-heaven.net/store/rss.php'. Line 112, Po...

 

Any ideas why this is?

 

Thanks,

Steve

Link to comment
Share on other sites

Nope,

 

Still getting this error:

 

Warning: main(../../../catalog/includes/application_top.php): failed to open stream: No such file or directory in /home/smooth/public_html/catalog/rss.php on line 81

Warning: main(../../../catalog/includes/application_top.php): failed to open stream: No such file or directory in /home/smooth/public_html/catalog/rss.php on line 81

Fatal error: main(): Failed opening required '../../../catalog/includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/smooth/public_html/catalog/rss.php on line 81

 

When clicking the feed, also, where is the icon supposed to show up?

 

Geof.

Link to comment
Share on other sites

Since I can't delete my last post, and figured out my own stupid mistake, I know get the page popping up.

 

This is the error I get though now:

 

25mm 12-pole Stator (insulated)

 

http://www.smoothair.ca/catalog/product_in...147&language=en

 

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.smoothair.ca/catalog/rss.php'. Line 172,...

 

huge power potential, delivering excellent torque & incredible power output

-------------------------------------------...

 

Anyone have any idea??

 

Geof.

Link to comment
Share on other sites

  • 2 months later...
is there a comma in the description? or any quotes?

paste all of that products description

 

thanks

 

 

I got it sorted out by using an older version, and it's doing exactly what I want it to do. :)

 

Thanks!

 

Geof. :thumbsup:

Link to comment
Share on other sites

i get the following error:

 

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.

 

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

 

An invalid character was found inside an entity reference. Error processing resource

Link to comment
Share on other sites

  • 2 weeks later...

ztrek,

 

I figured it out. The titles can not contain and ampersand.

 

Hummmmm... is this a code issue with the contribution or did you do this on purpose because the search engines do not like them?

 

Would be nice to know if I'm damaging other areas with their use.

 

Thanks any! As you can see, it's working better now (as I remove the "&'s") :

AllThingsTrendy.com

Anthony David

AllThingsTrendy.com

Link to comment
Share on other sites

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

Hello,

I have installed this contribution but I'm getting the following message on my rss.php file:

 

http://bargaincollection.com Bargain Collection - Braun, Oral-B and Nokia On-Line store [email protected] en Fri, 16 Sep 2005 17:23:18 -0700 http://blogs.law.harvard.edu/tech/rss 
Fatal error: Call to undefined function: iconv() in /home/bargain/public_html/shop/rss.php on line 198

I have searched in the forum but couldn't find an answer.

I was wondering if anyone had the same problem or anyone knows how to fix this.

Thanks

Regards,

Link to comment
Share on other sites

  • 1 month later...
Nope,

 

Still getting this error:

 

Warning: main(../../../catalog/includes/application_top.php): failed to open stream: No such file or directory in /home/smooth/public_html/catalog/rss.php on line 81

Warning: main(../../../catalog/includes/application_top.php): failed to open stream: No such file or directory in /home/smooth/public_html/catalog/rss.php on line 81

Fatal error: main(): Failed opening required '../../../catalog/includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/smooth/public_html/catalog/rss.php on line 81

 

When clicking the feed, also, where is the icon supposed to show up?

 

Geof.

 

 

Take out the ../catalog/

Link to comment
Share on other sites

Hello,

I have installed this contribution but I'm getting the following message on my rss.php file:

 

http://bargaincollection.com Bargain Collection - Braun, Oral-B and Nokia On-Line store [email protected] en Fri, 16 Sep 2005 17:23:18 -0700 http://blogs.law.harvard.edu/tech/rss 
Fatal error: Call to undefined function: iconv() in /home/bargain/public_html/shop/rss.php on line 198

I have searched in the forum but couldn't find an answer.

I was wondering if anyone had the same problem or anyone knows how to fix this.

Thanks

I get the same error

any solutions?

 

thanks

Link to comment
Share on other sites

i found out from my host and they said thyr don't support iconv on cpanel as it isn't stable, that why i get the error, it may be the same for you

 

thanks

 

dose anyone have a way around this or dose it mean I cant use this contribution? if i cant use it can you suggest any others?

Link to comment
Share on other sites

  • 3 weeks later...

I found this on php.net

 

 Here is a code to convert ISO 8859-1 to UTF-8 and vice versa without using iconv.

<?php
//Logic from http://twiki.org/cgi-bin/view/Codev/InternationalisationUTF8
$str_iso8859_1 = 'foo in ISO 8859-1';
//ISO 8859-1 to UTF-8
$str_utf8 = preg_replace("/([\x80-\xFF])/e",
	   "chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)",
		 $str_iso8859_1);
//UTF-8 to ISO 8859-1
$str_iso8859_1 = preg_replace("/([\xC2\xC3])([\x80-\xBF])/e",
		   "chr(ord('\\1')<<6&0xC0|ord('\\2')&0x3F)",
			 $str_utf8);
?>

 

So open up rss.php and do a search and replace

 

find

 

iconv('ISO-8859-15', 'UTF-8',

 

and replace it with

 

preg_replace("/([\x80-\xFF])/e","chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)",

Link to comment
Share on other sites

  • 3 months later...

I finally got the RSS Feed contribution to work. Thought I would share just in case any other newbies need an assist.

<br>To get all my products to show in the feed I went to Admin/Configure/Maximum Values and set the "Search Results" to a number over my number of products. I have just under 300 products so I set it to 300.

<br>My feed did not look like an RSS feed at all, I had to remove a line from the rss.php. Here's the line:

<br>echo '<?xml-stylesheet href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"?>' . "\n";

 

I hope this helps!

:thumbsup:

Log Cabin Fever Gifts

Link to comment
Share on other sites

  • 1 month later...
I found this on php.net

 

 Here is a code to convert ISO 8859-1 to UTF-8 and vice versa without using iconv.

<?php
//Logic from http://twiki.org/cgi-bin/view/Codev/InternationalisationUTF8
$str_iso8859_1 = 'foo in ISO 8859-1';
//ISO 8859-1 to UTF-8
$str_utf8 = preg_replace("/([\x80-\xFF])/e",
	   "chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)",
		 $str_iso8859_1);
//UTF-8 to ISO 8859-1
$str_iso8859_1 = preg_replace("/([\xC2\xC3])([\x80-\xBF])/e",
		   "chr(ord('\\1')<<6&0xC0|ord('\\2')&0x3F)",
			 $str_utf8);
?>

 

So open up rss.php and do a search and replace

 

find

 

iconv('ISO-8859-15', 'UTF-8',

 

and replace it with

 

preg_replace("/([\x80-\xFF])/e","chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)",

 

 

This works perfectly for me but mention needs to be made to replace ALL

iconv('ISO-8859-15', 'UTF-8',

with

preg_replace("/([\x80-\xFF])/e","chr(0xC0|ord('\\1')>>6).chr(0x80|ord('\\1')&0x3F)",

in rss.php.

 

Regards, SHJ :D

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

anyone know how to add in the manufacturer name and category name to the line below the title - preferably in h1 tags also the price and images if anyone knows

 

thanks

Link to comment
Share on other sites

  • 1 month later...

I managed to install this contribution but I have a few problems. The contribution appear to be correct but if I try to read the information with a RRS reader everything is showing correctly except the pictures, the pictures are not showing. And second if I try to check the validation I get the following error:

 

line 20, column 2: Undefined item element: image (18 occurrences) [help]

<image> ^

 

. Please feel free to check the feeds and suggest something.

The feeds are:

http://www.cexy.co.uk/rssfeed.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...