ayoksus Posted July 25, 2013 Share Posted July 25, 2013 Hi there, I am busy to create an e-commerce site where I need to import products from product feeds (in XML/CSV). I import the data to mysql and display those on my website. However, I am stuck where I need to match their categories with my site's categories. For example, I have category laptops which is under computer, but the data has no category laptops, instead they put most laptops under category notebooks. Or sometimes the feeds give you a laptop bags under category laptop. How could I possibly grab the right products under categories in the productfeed and put those into the right categories in my site? What could be the best logic to accomplish this? I have tried making keywords, however, I can't get it really neat. Could someone give me an advice here? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/280507-matching-categories-of-imported-products/ Share on other sites More sharing options...
Psycho Posted July 25, 2013 Share Posted July 25, 2013 There is no right answer here. No solution will be perfect because no matter what you do now you have no control over how those feeds may change over time. I think you should go into this with the expectation of getting a "good enough" solution. Getting 90% of the products into the right category will probably take little effort. Getting the remaining 10% would be a lot of work. Start by analyzing the input data to determine what attributes you can use to make a determination about the category. And, as you've pointed out this is probably different for each source of the data. I don't know how many different sources you are using. If you are using a relatively small number of sources I would look at each source individually and maybe create different logic for each one. But, if there are hundreds, then it probably isn't worth the effort. Bottom line is I can't really suggest how to go about this without doing the analysis. But, let;s take the one example you provided where they put laptops under the category notebook. Do, an analysis of the incoming data to see if all "notebooks" are in fact laptops. If so, you can create a rule that anything indicated as a "notebook" will go into the "laptop" category. As for laptop bags being in the laptop category, you can analyze those to see if there is something in common that you can use. For example, do they all have "bag" in the name or some other piece of data that distinguishes them from laptops? If all else fails, you could use the price (although I wouldn't want to resort to it) since laptops bags "should"generally cost a lot less than an actual laptop. Quote Link to comment https://forums.phpfreaks.com/topic/280507-matching-categories-of-imported-products/#findComment-1442145 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.