Google Category Taxonomy to workable DB format using PHP
$30-250 USD
Completed
Posted over 12 years ago
$30-250 USD
Paid on delivery
Hi,
I need someone to reformat the following list of categories and subcategories form the following list:
[login to view URL]
to this specific format (see first five lines example below) using a PHP script and then export this to a CSV file or MySQL DB:
CatName CategoryID ParentID Level
Animals 1 0 1
Live Animals 2 1 2
Pet Supplies 3 1 2
Bird Supplies 4 3 3
Bird Cages & Stands 5 4 4
and so on...
The CategoryID is as you can see is just a auto increment from 1 to infinite, also, all the main categories have ParentID 0 and the subcategories have ParentID of immediate previous category and have also been stripped from the sequence (e.g. from Animals > Pet Supplies > Bird Supplies > Bird Cages & Stands to Bird Cages & Stands) and the Level (starts at value 1) will correspond to the position of the category from the sequence (Animals = 1, Animals > Live Animals = 2 and so on).
This is how it should not look for subcategories CatName since this will be assumed by the ParentID:
CatName CategoryID ParentID Level
Animals > Live Animals 2 1 2
Animals > Pet Supplies 3 1 2
Animals > Pet Supplies > Bird Supplies 4 3 3
Animals > Pet Supplies > Bird Supplies > Bird Cages & Stands 5 4 4
When processed, the data should be saved to a CSV file or to a MySQL DB in the format previously specified.
If you can do it and can send the PHP script as soon as possible, please bid.
The lowest bid and fasted delivery will win.
This project has a secondary purpose for category mapping of products, so if you do it well you will also get the upcoming project.