I have an Oscommerce shop with over 60,000 products and over 30,000 categories that I have managed to import into CS-Cart using Navicat. The problem I have is that I am unable to show the full list of breadcrumbs because I have Oscommerce category id’s in my cs-cart_categories database table which should be formatted to include the sub-category id’s like this.
parent category/sub category/sub category/ i.e 102/506/712
This is what the cs-cart developers have told me wen they looked at my shop
It looks like the problem is caused by the fact that some values in your database tables are incorrect. In the “cscart_categories” table there is the “parent_id” field, in which the parent category for the current category is defined. For example, if the category with ID=34 is the subcategory of the category with Id=1, the “parent_id” field of the subcategory should be “1/34”. And this is not so in your database, that is why the parent categories are not displayed in the bread crumbs. So, you need to edit this field values.
I really need a way of exporting the categories from Oscommerce in this format
parent category/sub category/sub category/ i.e 102/506/712
Because the database is so large easy populate is pretty useless. Without going through every section and writing down all of the category id numbers needed to get to a product how can I do this quickly and easily. I’m not sure how I would write a custom php file in order to pull out this information.
Any help would be much appreciated.
Oscommerce shop = interspares.co.uk
CS-Cart shop = inter-spares.co.uk
How are you importing? csv file?
I’m not sure I understand correctly but are you saying that what you have in the category field is 102/506/712 and you need to change it to parent category/sub category/sub category/? If so and you are using a csv file, I would open the csv in Excel and highlight the category column then select edit->replace and enter:
Replace: parent category
and repeat for the others.
In Oscommerce every category is assigned a category id number. As far as I am aware there is nowhere in the Oscommerce database where it shows the category id numbers in a format such as this 1/5/15 which would be the parent category id followed by the subcategory id numbers in order to get to a particular product.
Because in my cs-cart database I just have the category id and because Oscommerce does not break up parent and subcategory id’s when a customer successfully navigates to a product they can only see the last category link they clicked on the breadcrumbs and not the full category path.
What I need is a way of exporting just the category parent id numbers from Oscommerce and then just the sub category id’s. When I have this information I could then hack about in Excel as I try to get the categories in the cs-cart format of parent id/subcat id i.e 1/5
Apologies for the compilicatedness of this but I can’t get around the fact that what I am trying to do is extremely important and complicated.
It must be because I am having a hard time following you.
Can you just post a sample of what Oscommerce is giving you and what you want to change it to? and again, what kind of file is it?
I was wondering how long the spammers would take to get here.
On the web site inter-spares.co.uk which is using cs-cart the category list and breadcrumbs should be dynamic but because I imported the categories incorrectly this does not work.
When hovering over category names there should be a flyout menu showing the sub-categories but this does not happen.
When navigating through the categories to find a product I do not get the full path back to the home page on the breadcrumbs because of the way I imported the categories.
Oscommerce has category and parent id’s which work in a different way than cs-cart which wants this format 1/5/10
i.e the top level category first then a / then the sub category then a / then another sub category for example.
My problem is how to export the data for the category id’s in this format nn/nn/nn so that the category navigation flyout menu and breadcrumbs will work correctly in cs-cart.
I suppose it really comes down to finding someone who understands the Oscommerce database structure better than me. I have asked for help on the Oscommerce forums but because the end goal is to export all of the Oscommerce shop data to cs-cart nobody wanted to help me out.
I think I’ll just have to go through all of the category and parent id’s in the Oscommerce database and try and make sense of them all and see how they all link together.
The CS that your are using for the URL that you provided isn’t the 2.0 beta version. If you want the “flyout” menu then you need to go into the appearance settings and select “emenu” for the category menu. I wouldn’t recommend this type of menu since you have numerous categories and subcategories. They will run off the bottom of the page.
[quote name=‘baballuci’]I was wondering how long the spammers would take to get here.[/quote]
Yeah, I don’t have permissions to delete posts in this sub-forum.
Thanks for the tip
The customer I’m doing this work for will want to experiment for sure but I take your view.
The categories problem I am having is down to the id_path table in the cscart_categories database.
I have the top level category id’s in the category_id fields and the correct parent_id’s in the parent_id fields but do not know how to build the id_path
I know that if a sub category within a top level category may look something like this nn/nn but I don’t know how to find the id numbers for sub categories where the product could be 4 or 5 categories deep such as nn/nn/nn/nn/nn
Without manually going through the shop and writing down all of the id numbers of which there are more than 30,000 I do not see how I can get the id_path set correctly.
Okay so I’ve been experimenting and this is what I have found.
By exporting the category id numbers and parent id numbers from the cscart_categories table I’ve been able to make the id_path and have successfully entered this information into the database. This however does not contain all of the category id’s so is incomplete and looks like nn/nn
The customer would like to have a flyout menu but if I choose any menu other than dynamic the web site will not load. I can now go back 1 category on the breadcrumbs from a product but not all the way back as I do not have the id numbers of the sub-categories in the id_path field as I do not know how to export these from Oscommerce.
It would be great if CS-Cart could build this information itself.
If I go into a top level category I find that the sub categories don’t stay under the top level category name on the categories navigation box but instead list in alphabetical order from the top of the categories list.
I feel I am beating my head against a brick wall at the moment and I am left wondering how other people that have upgraded from Oscommerce have solved this problem. Perhaps their shops were far smaller or did not have so many nested categories.
Either way I am now unsure if the upgrade to cs-cart is worth the amount of hassle.
if all you need to do is change the category numbers to the actual names and then combine them to form the category structure… ie…
3/10/156 (/ can be replaced by anything at all as its only a seperator)
cameras/digital/sony as an example…
this can be done simply in excel using a combination of the categorys csv file and the products csv file. You will then need to your the index match or vlookup commands to sort everything out… It might sound alot of work but it’s really not than bad.
[url]Excel Vlookup Index Match - Excel Tips - MrExcel Publishing