Dealing With Slashes “/” in Magento Category Names

Recently I had a client that had a traditional html site where he sold his antiques, complete with html/cgi order form. 🙂 A client of mine suggested that he upgrade to an actual ecommerce site and gave him our information. A large number of his categories had slashes in the name, Artists/Prints, for example. 

So I needed to find a way deal with Magento’s understanding that a / denotes a category/subcategory assignment rather than it just being part of the category name.

I spent a fair amount of time researching on google and I found a few articles that talked about it, but no clear way to deal with it (enclosing the category names with quotes didn’t work and neither did escaping the character as some posts suggested) until this morning when it hit me.

Ascii html Characters! Could I substitute / with / and would that still display a / on the storefront, but be accepted by the store input? so i did a test and indeed it worked perfectly! I had already created a Import/Export profile for categories, so just deleted the categories that had a / in the name, edited the category csv file subbing in / for any / and uploaded. Then i uploaded a test product to Artists/Prints and it worked! So on the storefront i had Artists/Prints showing as a category and my test product in it.

So here are the steps I took and hopefully this helps anyone that’s run into this problem that doesn’t want to change their category names to remove their /’s all together.

  1. Manage Categories > replace / with /
    1. I had over 70 categories to deal with so it was easier to make a import/export profile and edit using Find/Replace in excel/openoffice or you can download an extension to help you.
  2. Open your product spreadsheet, go to the Categories column, using Find/Replace to do the substitution.
  3. Import!

Hopefully this is helpful to you all!

Merry Christmas and Happy New Years to you all!

Leave a Reply