Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RSS contribution


urbancubed

Recommended Posts

hello,

 

i successfully installed the rss feed 0.1 contribution; however, i am not exactly sure how to use it.

 

for example, if i type: www.mydomain.com/rss.php

 

then everything works. However, it just selects about 20 products. I am not sure how it selected them.

 

How can I control what the rss picks up? i would basically like it to pick up anything in the "new products" category since every single product is there.

 

is it possible to have an rss feed containing every single product? if i submit this to a feed engine, then will it ping the rss.php file randomly? also, will this rss.php generate new random products or will it be the same [if i never add or delete anything in the product catalog]?

 

any guidance will be appreciated. thanks...

Link to comment
Share on other sites

  • Replies 75
  • Created
  • Last Reply

Top Posters In This Topic

In the rss.php look for:

 

// create SQL statement
$sql = "SELECT * FROM `products` ORDER BY 'products_id' where products_status = '1' DESC LIMIT " . MAX_DISPLAY_SEARCH_RESULTS;

 

 

It shows the last X products added in descending order, newest first, depending on what you have the Max Search Results set to in the admin.

 

 

You can modify this SELECT statement to vary your results.

while (!succeed) {try()};

 

GMT -6:00

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

The code that puts the RSS icon in the browser's address bar gives me some trouble.

It was working until yesterday until I added new products. Doesn't make sense?

If I remove the following code, everything works fine

 

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

 

if this code inside my index.php <header> tag, I got the following before my header.php is included (the page is rendered fine, just the warning at the top):

 

 

Warning: reset(): Passed variable is not an array or object in /usr/home/web/users/a0020903/html/index.php on line 45

 

Warning: Variable passed to each() is not an array or object in /usr/home/web/users/a0020903/html/index.php on line 46

 

Any similar problems?

 

Thanks

Edited by pixclinic
Link to comment
Share on other sites

I have installed RSS Feed v0.8.1 (full package) and this works fine in Firefox. However, it does not work with IE 7 (beta).

 

I get the message:

 

Internet Explorer cannot display this feed.

An unknown error has occurred. Please try again later

 

Any ideas about this?

 

Thanks

 

W

Link to comment
Share on other sites

Hello,

Does anyone know how to exclude bad characters from descriptions?

 

I need to remove this: ?•

 

In html format i see only this: • (i.e: Headphones • Sound card • Speaker(s))

 

How to remove that?

 

Thanks.

Edited by invasi0n
Link to comment
Share on other sites

Problem solved

 

I added after

  // "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);

this code:

  $name = str_replace('','-',$name);
 $desc = str_replace('','-',$desc);
 $link = str_replace('','-',$link);

Link to comment
Share on other sites

I have some problems with RSS Feed 0.8.3 (Full package).

 

I'm only using rss.php at the moment and I have choosed to show the 30 last added items. The issue is that when I check the feed it will show "30 new, 30 total" in Apple Safari, but when refreshing it changes to "30 new, 60 total" and shows the list twice. I am new to RSS, any ideas why this happens?

 

Also, I can't get the images to show..

Link to comment
Share on other sites

In the rss.php look for:

 

// create SQL statement
$sql = "SELECT * FROM `products` ORDER BY 'products_id' where products_status = '1' DESC LIMIT " . MAX_DISPLAY_SEARCH_RESULTS;

It shows the last X products added in descending order, newest first, depending on what you have the Max Search Results set to in the admin.

You can modify this SELECT statement to vary your results.

 

Not quite sure i understand this???

 

Got it all up and running but only showing the first 20 products. Can you possibly lay this out in simpleton terms to get all products listed?

 

Many Thanks

D4

Link to comment
Share on other sites

Not quite sure i understand this???

 

Got it all up and running but only showing the first 20 products. Can you possibly lay this out in simpleton terms to get all products listed?

 

Many Thanks

D4

Go to Admin > Configuration > Maximum Values > Search Results and change that number.

Link to comment
Share on other sites

anyone know how to add in the manufacturer name and category name to the line below the title - preferably in h1 tags

 

thanks

 

Hi people,

 

I am using this fantastic RSS.php

 

But I want to put the manufacturers name in the title along with the product name, IE I want it to say

 

<title>widget by manufacturer</title>

 

at the moment it just comes up

<title>widget</title>

 

I'm still a php and rss novice and need a gurus help. Because I have spent ages trying to figure it out myself.

 

please help

Link to comment
Share on other sites

Does the listing work for all of you? Since the date when the product was added is not included, my RSS in Apple Safari duplicates the feed every time I check it. It says, for example, "Today 16.05" at the right of the product name, but when viewing the feed later on it says "Today 17.00" together with the earlier "16.05" which results in duplicates of all products. Not sure how to explain this..

Link to comment
Share on other sites

Hi I have the same problem, and if I delete the piece of code the problem disappear.

Did you found what could be?

 

Bye

Alex

 

The code that puts the RSS icon in the browser's address bar gives me some trouble.

It was working until yesterday until I added new products. Doesn't make sense?

If I remove the following code, everything works fine

 

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

 

if this code inside my index.php <header> tag, I got the following before my header.php is included (the page is rendered fine, just the warning at the top):

Warning: reset(): Passed variable is not an array or object in /usr/home/web/users/a0020903/html/index.php on line 45

 

Warning: Variable passed to each() is not an array or object in /usr/home/web/users/a0020903/html/index.php on line 46

 

Any similar problems?

 

Thanks

Link to comment
Share on other sites

Hi I have the same problem, and if I delete the piece of code the problem disappear.

Did you found what could be?

 

Bye

Alex

 

yes, I hardcoded the thing like this:

 

<?php
echo '<link rel="alternate" type="application/rss+xml" title="The Frenchy Bee | Fine French Imports: Gourmet, Bath & Beauty, Kitchen & Home" href="' . FILENAME_RSS . '?language=en" />';
?>

 

and it works now

 

Hugh

 

www.thefrenchybee.com

Link to comment
Share on other sites

Hi and thanks for this contribution

 

can anyone tell me if the rss feed we get works ok not sure but it looks like there should be links to the products within the feed but no links work also i have test the feed for valadation and it fails any help would be appreciated

 

our feed url is http://www.pcgiant.com/catalog/rss.php

Link to comment
Share on other sites

Hi,

 

I just downloaded this tonight. My feed failed validation too :(

 

To answer your first question, your feed looks normal. That's how they look, nothing fancy.

 

I've been reading up on the error I got from the validator. Same as yours, re. the <image> tags.

 

Everything I know about RSS I learned tonight :blink: but basically, the documentation says that <image> is not a suitable "child" element of <item>

 

I took their word for it and made a change to the rss.php file

 

Near the bottom of the file, about line 168 I changed this

 

 if ($image != '') {
echo '  <image>' . "\n";
echo '	<url>' . $image_url . '</url>' . "\n";
echo '	<title>' . $name . '</title>' . "\n";
echo '	<link>' . $weblink . '</link>' . "\n";
echo '  </image>' . "\n";
 }

 

to this

 

/*  if ($image != '') {
echo '  <image>' . "\n";
echo '	<url>' . $image_url . '</url>' . "\n";
echo '	<title>' . $name . '</title>' . "\n";
echo '	<link>' . $weblink . '</link>' . "\n";
echo '  </image>' . "\n";
 }*/

 

to eliminate the problem.

 

Now I've been validated :lol:

 

Like I said, I don't know much about RSS but that fixed it for me.

 

Hi and thanks for this contribution

 

can anyone tell me if the rss feed we get works ok not sure but it looks like there should be links to the products within the feed but no links work also i have test the feed for valadation and it fails any help would be appreciated

 

our feed url is http://www.pcgiant.com/catalog/rss.php

Link to comment
Share on other sites

Hi people,

 

I am using this fantastic RSS.php

 

But I want to put the manufacturers name in the title along with the product name, for exsample I want it to say

 

<title>widget by manufacturer name</title>

 

at the moment it just comes up

<title>widget</title>

 

I'm still a php and rss novice and need a gurus help. Because I have spent ages trying to figure it out myself. blush.gif

 

 

Thanks heaps for your help thumbsup.gif

 

J

Link to comment
Share on other sites

Hi people,

 

I am using this fantastic RSS.php

 

But I want to put the manufacturers name in the title along with the product name, for exsample I want it to say

 

<title>widget by manufacturer name</title>

 

at the moment it just comes up

<title>widget</title>

 

I'm still a php and rss novice and need a gurus help. Because I have spent ages trying to figure it out myself. blush.gif

Thanks heaps for your help thumbsup.gif

 

J

 

I bypassed this problem by building all my products titles starting with the manufacturers name. Might sound too simple, but helps keyword weight fr=or search engines too :-)

Link to comment
Share on other sites

I bypassed this problem by building all my products titles starting with the manufacturers name. Might sound too simple, but helps keyword weight fr=or search engines too :-)

 

I cant do that due to the limited space in the design of my site, But thanks for the suggestion :)

 

But I really think that having the manufacturer included would be good for allot of people that use this rss generator.

 

does anyone know how to do it?

 

I guess we have to define the manufactures name variable somehow then echo it in the title tag. ?? god I wish I could program better. I am learning thanks to every one here!

 

anyway some help on this one would be well received by allot of people as well as me I'm sure. :)

 

 

Peace

J

Link to comment
Share on other sites

Ok to get the manufactures name in with the title, I am heading in this direction......

 

in the

 

// Mise au propre des données

 $name = $row2['products_name'];
 $desc = $row2['products_description'];

 

I insert

 $manuf = $row2['manufacturers_name'];

 

so it looks like this

// Mise au propre des données
 $manuf = $row2['manufacturers_name'];
 $name = $row2['products_name'];
 $desc = $row2['products_description'];

 

 

and then Add $manuf to all these;

// Conversion en UTF-8
   $manuf = utf8_encode ($manuf);
 $name = utf8_encode ($name);
 $desc = utf8_encode ($desc);
 $price = utf8_encode ($price);
 $link = utf8_encode ($link);

 // Tout le monde semble laisser les balises HTML
   #$manuf = strip_tags($manuf); 
 #$name = strip_tags($name);
 #$desc = strip_tags($desc);
 #$price = strip_tags($price);

 $image_url = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $image;

 // http://www.w3.org/TR/REC-xml/#dt-chardata
 // "The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form"

   $manuf = str_replace('&','&',$manufr);
 $name = str_replace('&','&',$name);
 $desc = str_replace('&','&',$desc);
 $link = str_replace('&','&',$link);

   $manuf = str_replace('<','<',$manuf);
 $name = str_replace('<','<',$name);
 $desc = str_replace('<','<',$desc);
 $link = str_replace('<','<',$link);

  $manuf = str_replace('>','>',$manuf);
 $name = str_replace('>','>',$name);
 $desc = str_replace('>','>',$desc);
 $link = str_replace('>','>',$link);

 

and then in

echo '  <title>' , $name , '</title>' . "\n";

 

I change it to

 echo '  <title>' , $name , by ,$manuf, '</title>' . "\n";

 

am I heading in the right direction???

 

Cheers

 

J

Edited by jaminunit
Link to comment
Share on other sites

Thanks for the RSS contribution. :thumbsup:

 

Everthing works great, except, I can't seem to get images to load.

 

When I attempt to validate the feed, I receive the following error: :blink:

 

Undefined item element: image

 

Can anyone assist?

 

Thanks in advance.

Link to comment
Share on other sites

Hi,

How is this contribution suppose to work? Does it suppose to display the items from the category the customer is in when clicking on the RSS logo, or its show the same products regardless in what category, subcategory or product you in? I installed it but its only show the maximum display search number of the latest products in descending order. Can you please help? Is this how its suppose to work or I?m doing something wrong? Can it be done to display the products in the category or subcategory you in when clicking the RSS logo? My feed is at www.cexy.co.uk/rss.php

Link to comment
Share on other sites

Hi,

How is this contribution suppose to work? Does it suppose to display the items from the category the customer is in when clicking on the RSS logo, or its show the same products regardless in what category, subcategory or product you in? I installed it but its only show the maximum display search number of the latest products in descending order. Can you please help? Is this how its suppose to work or I?m doing something wrong? Can it be done to display the products in the category or subcategory you in when clicking the RSS logo? My feed is at www.cexy.co.uk/rss.php

 

It displays a fixed number of all products, not sortable by categories, in descending order, your are correct.

Not dynamic as you may have expected. Mine is just on the home page, period: I didn't even bother to have it available from all pages. I just increased the number of products selected.

Link to comment
Share on other sites

Hi. Not sure what i'm doing wrong but the rss.php file isn't properly formatting the html code in my item description.

 

It works fine on my test site: http://www.google.com/reader/view/feed/htt...talog%2Frss.php -- http://www.italycharms.com/catalog/rss.php

 

But it doesn't work on my real site: http://www.google.com/reader/view/feed/htt...e.com%2Frss.php -- http://www.blueluxe.com.com/rss.php

 

Any help would be greatly appreciated.

 

Thanks!

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