How do I add icons to my Categories?
  • 23 Feb 2024
  • 1 Minute to read
  • Dark
    Light

How do I add icons to my Categories?

  • Dark
    Light

Article Summary

Your Web Categories filter contain three levels, where level 2 is specifically used for the product groups your customer should be able to filter on. You may add icons to level 2 categories in vertical menu, also level 2 and level 3 categories in horizontal menu.

  1. Create level 2 or/and level 3categories within the Web Categories Tab in Salesforce
  2. Collect icons (per category) that portray the products that are in these Web Categories
  3. Use logic names for the icons, to easily find them in the next steps
  4. Compress the icons into a zip file, named CategoryImages
Note

Image must be represented as simple image or svg sprite.

After you created the categories and the zip file with icons, you need to add them to Salesforce.

To add these icons, follow the next steps

  1. Go to: Setup → Static Resources → New
  2. Give the Static Resource the same name as the zip file CategoryImages and upload the file
  3. Change the Cache Control to Public and hit Save
  4. From the URL of View File in the Static Resource Detail, you can see the ID and the name of your zip file after /resource/, for example: 1703161974000/welisacommerce__CategoryImages?
  5. Go to the Web Categories Tab and select one of the level 2 or level 3 categories
  6. Copy the corresponding filename from your zip file, for example: imagename.png
  7. Fill in the Image Path with the ID and the name of your zip file, also the corresponding filename, as following: 1703161974000/welisacommerce__CategoryImages/imagename.png
  8. Login to the shop and check the icon on the filter category
Icon Not Shown

If the icons are not shown, search Platform Cache in Setup, choose Catalog, and then clear cache.

If you already done the steps above, but want to add new icons, then follow the next steps:

  1. Go to: Setup → Static Resources
  2. Open the CategoryImages resource and click on View file
  3. The zip file will be downloaded on your pc's download folder
  4. Add the new icons to the same zip file (make sure the old icons are not removed)
  5. Go back to the CategoryImages resource on Salesforce and click Edit
  6. Click Choose file, upload the zip file and hit Save
  7. Follow the previous section from step 4