Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RSS Feed contribution support thread


Ralph2

Recommended Posts

Find:

 

 

CODE

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');

 

 

Replace with:

 

 

CODE

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

'<a href="' . FILENAME_RSS . '?language=' . $lang_code . '">' . BOX_INFORMATION_RSS . '</a>');

 

I did this and still had the same error. I found the problem. There was a "}" on the next line below this insert. I deleted it and all seems to be working good. More then likely I did a cut and paste error but you may want to check just in case.

 

I know I say this a lot but thanks so much.

Link to comment
Share on other sites

  • Replies 372
  • Created
  • Last Reply

Top Posters In This Topic

Just go to your admin section -> Catalog -> Articles -> and edit or add an article. On the edit/add article page there should be a checkbox (Add this product to the RSS feed:) under the 'weight' textfield.

 

I don't have "Articles" in admin->Catalog-> I have "BOX_CATALOG_IMP_EXP" that when I click on it gives me an error. I will assume I messed up somewhere in the cut & pasting. Any chance you can lead me into the right direction of trouble shooting this?

 

Thanks

Link to comment
Share on other sites

I don't have "Articles" in admin->Catalog-> I have "BOX_CATALOG_IMP_EXP" that when I click on it gives me an error. I will assume I messed up somewhere in the cut & pasting. Any chance you can lead me into the right direction of trouble shooting this?

 

Thanks

Got it fixed. It was an old contribution I no longer use. I went back and re-read. I need to install to new update for admin before I get it to work right. I'll get back with you after I check it out. :)

Link to comment
Share on other sites

@ David:

 

One last question - for seo reasons, can that code be tweaked to NOT show the "?language=en" if it is english language?

 

Via a .htaccess rewrite: didn't work.

 

Via a SEO contribution (e.g. Ultimate SEO URLs): should be possible, but I don't have the time to figure out how.

 

With some php: works, though it doesn't come up with a .html URL (like Ultimate SEO URLs does for example). But it does get rid of the "?language=en" part and it's very easy to implement.

 

I don't have the time to work it out completely, but the following should get you started (and it looks like it's working fine):

 

Open catalog/includes/filenames.php and add the following code to it (for each language):

 

define('FILENAME_RSS_EN', 'rss-english.php');

 

Then rename / copy rss.php to rss-english.php (repeat this step for each language).

 

Open for example catalog/index.php, go to the link rel code and replace:

 

<?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 FILENAME_RSS, '?language=' . $key; ?>">
<?php
 }
?>

 

With:

 

<?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)) {
if ($key == 'en') {
  $rss_link = FILENAME_RSS_EN

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

 

Now the browser RSS icon should be linking to an URL which looks like: http://www.kjhsdflskdflsjkdf.com/rss-english.php.

 

The only thing you've to do is to get it working with multiple languages and the info box link. Good luck :)

 

 

@ Michael:

 

Good luck :)

Link to comment
Share on other sites

@ Michael:

 

Good luck

Got it installed in admin and all seems to be working great. I had to do some incorporating with the meta tags contribution. So far so good. Thanks again Ralph.

Link to comment
Share on other sites

Got it installed in admin and all seems to be working great. I had to do some incorporating with the meta tags contribution. So far so good. Thanks again Ralph.

 

 

You're welcome. I'm glad it works :thumbsup:

Link to comment
Share on other sites

hey guys

 

great contrib but i keep getting an rss error??? can anyboby help? my rss feed url is http://www.norfolklights.com/rss

here is the error i am getting :

 

line 6, column 23: XML parsing error: <unknown>:6:23: not well-formed (invalid token)

 

here is the line in question:

 

<title>Norfolk Lights & Hydroponics Centre LTD</title>

Link to comment
Share on other sites

here is the error i am getting :

 

line 6, column 23: XML parsing error: <unknown>:6:23: not well-formed (invalid token)

 

here is the line in question:

 

<title>Norfolk Lights & Hydroponics Centre LTD</title>

 

Hey I found why i was getting the first error, :-" it was my title was norfolk lights & ive changed it to and it now works but im getting another 2 errors :( here i go again lol

 

first is:

 

line 320, column 0: description should not contain onclick attribute

 

next is:

 

Problematical RFC 822 date-time value: Wed, 4 Apr 2007 15:16:56 +0100 (20 occurrences)

 

help please!!!

 

ty in advance

Link to comment
Share on other sites

Hey I found why i was getting the first error, :-" it was my title was norfolk lights & ive changed it to and it now works but im getting another 2 errors :( here i go again lol

 

first is:

 

line 320, column 0: description should not contain onclick attribute

 

next is:

 

Problematical RFC 822 date-time value: Wed, 4 Apr 2007 15:16:56 +0100 (20 occurrences)

 

help please!!!

 

ty in advance

 

Hey, I checked your feed output with a validator and it says the following:

 

This feed is valid, but may cause problems for some users. We recommend fixing these problems.

 

Don't worry, it works fine. I wouldn't bother to dive into the code for this. I've seen big websites with the same validator result.

 

About the '&' symbol, if you don't like using 'and' then try to use:

 

&

 

Maybe the validator takes it.

Link to comment
Share on other sites

You're welcome. I'm glad it works :thumbsup:

Question - When I go in to edit a product the check box is showing on the buttom. It's text is

 

"TEXT_PRODUCTS_RSS" with a checkbox at the end.

 

I unchecked all the products I DID NOT want to show up on the RSS feed and they are still showing up. I double checked to make sure they weren't still checked and they aren't. I'm doing the english version. Any idea's?

 

Michael

Link to comment
Share on other sites

Question - When I go in to edit a product the check box is showing on the buttom. It's text is

 

"TEXT_PRODUCTS_RSS" with a checkbox at the end.

 

I unchecked all the products I DID NOT want to show up on the RSS feed and they are still showing up. I double checked to make sure they weren't still checked and they aren't. I'm doing the english version. Any idea's?

 

Michael

 

Sure, just open catalog/admin/includes/languages/english/categories.php and find:

 

define('TEXT_PRODUCTS_WEIGHT', 'Products Weight:');

 

 

Add under it:

 

define('TEXT_PRODUCTS_RSS', 'Add this product to the RSS feed:');

 

Regarding the unchecked products, verify whether an unchecked / checked checkbox stays unchecked / checked after you've updated / saved the settings of a product. If the checkbox "remembers" its last setting, then your DB and the catalog\admin\categories.php file are working correctly.

 

In that case you might want to try to replace the following (in rss.php):

 

$sql = 'SELECT p.products_id, products_model, products_image, products_date_added FROM products p, products_to_categories pc WHERE p.products_id = pc.products_id AND pc.categories_id = \'' . $category . '\' AND products_status=1 ORDER BY RAND() DESC LIMIT ' . MAX_RSS_ARTICLES;
} else {
 $sql = 'SELECT products_id, products_model, products_image, products_date_added FROM products WHERE products_status=1 ORDER BY RAND() DESC LIMIT ' . MAX_RSS_ARTICLES;
}

 

With:

 

$sql = 'SELECT p.products_id, products_model, products_image, products_date_added FROM products p, products_to_categories pc WHERE p.products_id = pc.products_id AND pc.categories_id = \'' . $category . '\' AND products_status=1 AND products_to_rss=1 ORDER BY RAND() DESC LIMIT ' . MAX_RSS_ARTICLES;
} else {
 $sql = 'SELECT products_id, products_model, products_image, products_date_added FROM products WHERE products_status=1 AND products_to_rss=1 ORDER BY RAND() DESC LIMIT ' . MAX_RSS_ARTICLES;

 

Success!

Link to comment
Share on other sites

I get the following error when trying to run rss feed 1.0:

 

XML Parsing Error: no element found

Location: http://zbookz.com/catalog/rss.php?language=en

Line Number 13, Column 24:Couldn't execute query.

 

What does the above mean and how do I fix it? Is it really necessary to install the adminsetting.sql if you have no articles on your website?

 

Shelby

Link to comment
Share on other sites

Hi

 

I've added this but when I try to view the rss.php file I get "Internet Explorer cannot display this feed" and am told there's errors in the feed. When I check the feed at feedvalidator.org I'm told "line 3, column 0: XML parsing error: <unknown>:3:0: xml declaration not at start of external entity [help]" and there are two blank lines at the start of the rss feed - seems that's the problem. Any suggestions on how I get rid of the blank lines? The first line according to feedvalidator is "<?xml version="1.0" encoding="UTF-8" ?> "

 

Thanks

 

M

Link to comment
Share on other sites

Hi Guys,

 

I just noticed that this contrib breaks when used with CSS Buttons Everywhere

 

Both the buttons in the feed are affected:

 

<img src="http://fakeurl.com/shop/<div class="cssButton Add to Cart </div>" border="0">

 

Unfortunately I haven't got the skill to fix this myself, so I just though I'd let you know.

 

Cheers.

Link to comment
Share on other sites

  • 2 weeks later...

I havent been doing much in php over the last couple of months so I am a bit rusty. I installed this contrib to one of my sites and when I click on the link I've placed in the info box I get this error:

 

XML Parsing Error: xml declaration not at start of external entity

Location: https://www.mysite.com/catalog/rss.php?language=en

Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8" ?>

^

 

What exactly did I do wrong?

 

Thanks in advance for your help!

Link to comment
Share on other sites

Ok, figured it out, guess I asked too soon! I had some extra spaces after the ?> in my english.php

 

Now, I am seeing nothing at all when I click the link in explorer. I'll figure it out I'm sure...

 

Thanks!

Edited by theantiquestore
Link to comment
Share on other sites

Hi Ralph and everyone else,

 

I've just released a modification to the RSS Feed plugin that adds Ecommerce tags to the output.

 

By default it generates the same output as the original plugin, you have to pass the "?ecommerce=1" parameter to get the new behaviour. I've also reworked (optimized) the SQL on the plugin, now there's only one query to get all the needed data (please test).

 

The plugin can be downloaded from the usual place.

 

More info on my site. Sample (live) feed here.

 

Regards,

Link to comment
Share on other sites

  • 2 weeks later...

Hello

 

 

This feed can parse html tags? I'm asking you because i try to add oscommerce feed into another site (who accept html tags from rss, i have several other feeds enabled) but all i can see it's html code.

 

This is my feed: http://www.mallromania.ro/rss.php

This is how it's look into my other site: http://www.socio.ro/anunturi-calculatoare-...gb-t1069.0.html

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hi everybody,

 

I've just installed this contribution and have run into what I "think" is just a small error on my part. When I am in the Admin area, the words "BOX_HEADING" are in front of everything.

 

Here's a screenshot...

rss_shot.jpg

 

Could someone clue me in on where I might have made a mistake? I am guessing it's on the catalog/admin/categories.php?

 

Any guidance would be greatly appreciated:)

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Hi everybody,

 

I've just installed this contribution and have run into what I "think" is just a small error on my part. When I am in the Admin area, the words "BOX_HEADING" are in front of everything.

 

Here's a screenshot...

rss_shot.jpg

 

Could someone clue me in on where I might have made a mistake? I am guessing it's on the catalog/admin/categories.php?

 

Any guidance would be greatly appreciated:)

 

Would anyone here be kind enough to share why this might be happening? I would really like to use this contribution:)

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Would anyone here be kind enough to share why this might be happening? I would really like to use this contribution:)

 

All of the "BOX_HEADING_*" stuff is defined in the /admin/includes/languages/english.php file.

 

Make sure that is all still there, and you didn't wipe that file out.

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