XML import into joomla

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
tjyoung
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Sun Jan 01, 2006 6:24 pm

XML import into joomla

Post by tjyoung » Wed Nov 19, 2008 1:49 pm

Hi,
This is a tough one so I'm hoping someone can at least point me in the right direction to accomplish/learn how to do the following:

We have an auto dealer website and I would like to import our used car inventory into joomla. The file provided by autotrader.ca is an xml file (the images are url's to the pics on their server, or can be downloaded as well).

Where do I look to get started down the road to figuring out how to accomplish this?

Thanks in advance.

tj

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: XML import into joomla

Post by GameDaddy » Tue Nov 25, 2008 2:24 pm

You could start at the Joomla! Tutorial for using a Database when developing your own MVC.

http://docs.joomla.org/Developing_a_Mod ... e_Database

Joomla Database and class functions
http://joomlatp.com/joomla-database/joo ... tions.html

A little outdated however:
http://www.packtpub.com/article/joomla-and-database

tjyoung
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Sun Jan 01, 2006 6:24 pm

Re: XML import into joomla

Post by tjyoung » Wed Nov 26, 2008 12:59 pm

Thanks I'll take a peek.

mmarch
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Jul 08, 2007 2:49 pm

Re: XML import into joomla

Post by mmarch » Sat Nov 29, 2008 1:04 pm

Is it mean that there is no solution for XML import into joomla?? And if i need this posibilities i must develop new one?

??? :eek: ??? :'( ??? :eek: ???

GameDaddy
Joomla! Guru
Joomla! Guru
Posts: 725
Joined: Sun Aug 24, 2008 4:35 pm

Re: XML import into joomla

Post by GameDaddy » Sat Nov 29, 2008 6:55 pm

Yes, you have to make your own.

First you have to decide what XML you want to import to Joomla!

Then you decide whether to add that directly to the template being served up, or whether to store that in the Joomla! database as new tables, or whether to create a new database with new tables...

Keeping extra XML in the Joomla! database will slow down your page serves, especially if your database is large, Adding another database will take processing cycles from the server, also slowing down your page serves.

Generally if there is less than ten people at a time fetching pages from your website this is not an issue, however, if you plan on deploying to a server and serving hundreds or thousands of pages an hour, than your database size, and the number of databases in use become more important.

User avatar
waitz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Sat Jan 05, 2008 11:21 pm
Location: Netherlands / Norway

Re: XML import into joomla

Post by waitz » Wed Jan 28, 2009 7:50 pm

Did you find a solution to this, or does anyone know how to approach it?

I need to find a way to import an xml file with information to my J! database, and that the import creates new articles in Joomla with the information.

Grateful for any input!
Kristian Rajan | Joomla! 1.5.26 | PHP 5.3.9 | MySQL 5.1.56

User avatar
waitz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Sat Jan 05, 2008 11:21 pm
Location: Netherlands / Norway

Re: XML import into joomla

Post by waitz » Fri Jan 30, 2009 8:13 am

No, I haven't, and I am open to find a professional solution. I will post if I find a way. But first I need to find someone who have the knowledge to create a solution first.
Kristian Rajan | Joomla! 1.5.26 | PHP 5.3.9 | MySQL 5.1.56

qwan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Mon Nov 12, 2007 5:43 am

Re: XML import into joomla

Post by qwan » Fri Jan 30, 2009 1:33 pm

Now what do you mean by car inventory and what is the xml.
Are you looking to have the xml outputted to a content/article/module or do you mean you have the entire car inventory in xml format and you want it to be accessed by joomla. So you would want to convert it to a database format?

If it was the latter then you have to work on converting xml to mysql rather than worrying about joomla(to make it simpler).
xml to tables to be precise. Is that what you are looking for.
Then you just need to get a basic idea of the mysql schema of joomla and after converting xml to tables use a mysql editor and do the neccesary changes to it to match joomla schema and import it into the joomla database.
There are many xml to mysql convertors out there.
I think some mysql editors also allow you to import xml files into it and automatically covert it to tables which you can assign tables and ids to different fields.
I feel this is the right way to go about it.
Looking for an "import extension" for joomla will have to take this entire process and club it up as an extension. you can use php to try and covert the xml
here are some links that will help
http://www.sitepoint.com/article/coming ... r-near/16/
http://www.sitepoint.com/articlelist/210/
http://www.kitebird.com/articles/mysql-xml.html
Best of luck

User avatar
waitz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Sat Jan 05, 2008 11:21 pm
Location: Netherlands / Norway

Re: XML import into joomla

Post by waitz » Fri Jan 30, 2009 2:47 pm

WOW, this I am eager to look into. I need to import an xml files with information about 50-60 workshops. And I guess it's the same as if it were cars - I want to import them to the mysql database, as if I had manually entered 50-60 articles or events into Joomla.

Make sence?
Kristian Rajan | Joomla! 1.5.26 | PHP 5.3.9 | MySQL 5.1.56

qwan
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Mon Nov 12, 2007 5:43 am

Re: XML import into joomla

Post by qwan » Fri Jan 30, 2009 7:31 pm

waitz wrote:WOW, this I am eager to look into. I need to import an xml files with information about 50-60 workshops. And I guess it's the same as if it were cars - I want to import them to the mysql database, as if I had manually entered 50-60 articles or events into Joomla.

Make sence?
Ah yes it makes sense. Then I have posted the right directions for you.
If you want to keep it simple and/or if you dont have the knowledge of PHP and xml then use and xml to mysql convertor, or use navicat mysql editor or any other mysql editor that can also import xml.
basically you put the data from xml into tables in mysql. Then see that you put in the proper ids so that it matches the joomla schema and just import it(ofcourse backup backup backup before you do anything).
The links which I gave you will help you build a joomla extension or atleast a php xml to mysql importer.

I hope you chose the latter cause it would be great to have an extension to do this in the extensions directory
Thanks

prateekshaweb
Joomla! Explorer
Joomla! Explorer
Posts: 331
Joined: Mon Aug 04, 2008 8:00 am
Location: India
Contact:

Re: XML import into joomla

Post by prateekshaweb » Sat Jan 31, 2009 5:25 am

hi...

1. i agree with qwan, you will need a xml to mysql convertor for this.. joomla will not help u..

but let me remind you, that store inventory changes periodically sometimes every day...hence you will need an automated program for doing this.

2. you can import the xml into new tables and develop a custom component for car dealership. for browsing, viewing details of each car and buying (if required)

3. there is a shopping cart called virtuemart... you can import your tables into virtuemart tables and can use virtuemart for browsing, buying etc.

they have inventory module
Sumeet Shroff
PSD to Joomla, Joomla Custom Template Design and Virtuemart Shopping Cart
http://www.prateeksha.com http://www.joomlawebsitedesigners.com

vassili_z
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Jan 22, 2010 3:29 pm

Re: XML import into joomla

Post by vassili_z » Fri Jan 22, 2010 3:39 pm

I am going to have a bit different approach since I have similar problem. It is good enough for medium size xml with 10-200 categories ( including subcategories ).

1. Put you XML file somewhere and make sure Joomla can read it ( e.g. http:/localhost/xml/prices.xml )
2. Configure your Samba to upload xml file every week/day/hour
3. Create categories manually for your price list ( e.g. Components/Motherboards/Intel/Socket 1366 ) so every category gets its own ID ( IDs are assigned automatically )
4. Write XSL parser to read XML and insert it to your articles in categories.

That's pretty much it. I have everything configured and currently in the process of writing XSL. So it is semi-automated ( since categories are created manually ), but ones configured it updates the information automatically from XML.

User avatar
ausnetit
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Tue Jul 14, 2009 12:34 pm
Location: Melbourne
Contact:

Re: XML import into joomla

Post by ausnetit » Mon Mar 22, 2010 11:17 pm

HI,

It's very nice so can you share this XSL parser ?

Thanks
AusnetIT
WEB : http://www.ausnetit.com.au
http://www.ausnetwebhosting.com

Web Design|Web Hosting |Domain Name registration

profinvent
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Thu Feb 19, 2009 8:40 am

Re: XML import into joomla

Post by profinvent » Thu Sep 02, 2010 7:29 am

We are currently looking for a very similar solution. We need to import quite significant amount of data about the events on a regular basis. The data we receive is in XML structure - some sort of web service. So the key requirements are:
- regularly verify the data we receive corresponds with the XML template we use during the import procedure
- as the administrators will attach some additional attributes to imported data in Joomla (such as additional texts, images, links, hits info etc.) we need to make sure we do not remove the relationship while overwriting the existing(already imported) data

paddyirishman
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed Jul 23, 2008 5:28 pm

Re: XML import into joomla

Post by paddyirishman » Sun Jan 23, 2011 11:18 am

Its been quite a while since the last posts on this topic!

Has anyone come up with a solution?
vassili_z wrote:I have everything configured and currently in the process of writing XSL. So it is semi-automated ( since categories are created manually ), but ones configured it updates the information automatically from XML.
Vassili, could you give extra details or even some code??

Its amazing how this problem is still a problem!!!

paddyirishman
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Wed Jul 23, 2008 5:28 pm

Re: XML import into joomla

Post by paddyirishman » Sun Jan 23, 2011 1:11 pm

I have just come accross this Joomla extension:

http://joomlashopbuilder.com/index.php? ... Itemid=156

This is designed for use to display shop catalogues which are available in XML (i.e. car dealer listings) but im sure it can be used for any such data feed.
You can create an article template, which ShopBuilder will paste required data onto it & save.

It unfortunately will cost you $55 (USD) for CJ version or DataFeed version, or $95 for both. It will let you:
CMS Shopbuilder for the Joomla 1.5.x series is an extension that imports CSV and XML data feeds, and has the additional capability of the Commission Junction (CJ) API built in to one easy to use component. You can import product data directly into your Joomla articles or into our custom designed display catalog. The extension is 100% Joomla 1.5.x native, legacy mode is not required.
I am seriously considering purchasing this feature (its the only one i've heard of!) might contact them first to be sure it does what it says. if i do ill post on here again!

kyrell
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon May 19, 2008 12:34 am

Re: XML import into joomla

Post by kyrell » Thu Jun 23, 2011 11:09 am

Hi paddyirishman,

Wanted to know if you purchased the shopbuilder plugin, and if it worked for you? I am currently looking and comparing the vm shopbuilder with datafeed and csvimproved component for virtue mart.

x126
Joomla! Explorer
Joomla! Explorer
Posts: 405
Joined: Sun May 07, 2006 8:24 pm

Re: XML import into joomla

Post by x126 » Fri Jul 29, 2011 10:25 pm

Any progress on this from anyone?

jturvey
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue May 17, 2011 1:44 pm

Re: XML import into joomla

Post by jturvey » Mon Aug 22, 2011 1:02 pm

Hi,

As per previous poster, did you purchase the Shopbuilder extension PaddyIrishman? How did it work? Has anyone found other solutions that won't cost as much??

Thanks!

romkabouter
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Dec 24, 2007 4:43 pm

Re: XML import into joomla

Post by romkabouter » Thu Oct 06, 2011 9:14 pm

I created something similar for a customer.
What my component basically does:

- I have a table called "data", which has an id (int), data(text), lastupdate (date) and modicifactiondate(date) field
In this table the id can be a catergoryId or something like that.
The data is the actual xml being read from the remote server and the lastupdate field.. well... the date of which the data was last update.
The modification date is used for detailpages (in my case there were a list of boats and the details of a boats was also xml)

When entering a list page, the component checks the lastupdate field.
If the (configurable) cache time is expired -> get new xml and save it to the database.
If not, get the xml from the database.
Parse the xml into an array

Now you got data you can work with (sorting etc).

When entering a detail page, the component checks also the cache expired and lastupdate fields, same as the list.
But in the detail xml there is a tag with the modification date, when this is newer then de saved modificationdate, het the xml from the remote site and save that.
Then parse into array.

When the modificationdate of a boat is newer, then thumbnails are removed and regenertated via phptumb.

This way a remotelookup only takes place when the cache is expired (set to approx 3 hours, tweak around for performance or the need for livedata)
Also images are loaded from local site and not from remote, this way your site will be much faster.

Site: http://www.prinsvanoranje.nl/actueel-aanbod.html
(sorry, only dutch)


Locked

Return to “Joomla! 1.5 Coding”