Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

rss feed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 09-02-2010, 05:09 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default rss feed

here's a file to add to your root directory to generate an rss feed of your products.

Note: there's a not of customisation needed to set it up, you need to add all your details, your database / store details etc. Please READ the file as there are changes to make, it WILL NOT WORK if you just drop it in.

The file creates a new file on your server called feed.xml, you probably want to run the php file on a crobjob to get it updated regularly.

If anyone has any improvements, please post them here.

As usual, no warranties, please backup everything first. This works for me,

hope it helps,
Attached Files
File Type: txt feed.php.txt (3.6 KB, 182 views)
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote

The following 2 users thank amy2203 for this useful post:
am2003 (09-03-2010), anandat (09-04-2010)
  #2  
Old 09-02-2010, 09:58 PM
 
Nadeem Nadeem is offline
 

Advanced Member
  
Join Date: Sep 2006
Posts: 56
 

Default Re: rss feed

thank you so much
__________________
X-Cart 4.4.5 | Linux/Apache | PHP 5.2.17 | MySQL 5.0.77 | FireFox
Reply With Quote
  #3  
Old 09-04-2010, 07:11 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: rss feed

I am getting following error when I run the file feed.php

Warning: fopen(feed.xml) [function.fopen]: failed to open stream: Permission denied in /home/username/public_html/feed.php on line 99
can't open file
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #4  
Old 09-04-2010, 07:39 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: rss feed

try putting a blank feed.xml file in the folder first,

hth
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #5  
Old 09-07-2010, 07:54 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: rss feed

Thanks amy2203

I created blank feed.xml & CHMOD it to 777 & now it's generating the feed.
But when I add my feed to google reader the images are not shown & it's written "Original enclosure (book_24.jpg)"

Any idea why it's not showing images ?

following my path setting in your code

if ($row[filename] != NULL) {
$image = 'http://www.mysite.com/images/'.$row[filename];
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #6  
Old 09-07-2010, 07:56 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: rss feed

have you checked your path is valid?
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #7  
Old 09-08-2010, 06:23 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: rss feed

Quote:
Originally Posted by amy2203
have you checked your path is valid?
Yes path is valid because it's creating correct image url which is right for every thumbnail but it doesn't show images in google reader !!
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #8  
Old 02-06-2011, 05:48 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: rss feed

hi amy2003,
I found that it's not created the xml feed for new products which doesn't have thumbnails.
Your code will not work for the products without thumbnails ? or I am missing something ?

Your help will be greatly appreciated
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #9  
Old 02-06-2011, 06:02 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: rss feed

it only limits the feed to items which are on sale, it will still show items even if they don't have thumbnails,
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #10  
Old 02-06-2011, 06:16 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Default Re: rss feed

Quote:
Originally Posted by amy2203
it only limits the feed to items which are on sale, it will still show items even if they don't have thumbnails,
Thanks for your prompt reply.

I have double check it. It's not creating the feeds for new products if product doesn't have the thumbnails.

For test I created single product with thumbnail & it created the feed !!!

I don't know what could be the problem !
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:36 PM.

   

 
X-Cart forums © 2001-2020