# Handling Icons replacing

**URL:** https://community.openboxes.com/t/handling-icons-replacing/495
**Category:** uncategorized
**Created:** [February 2, 2022, 3:04pm UTC](https://community.openboxes.com/t/handling-icons-replacing/495 "2022-02-02T15:04:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Douma](https://community.openboxes.com/user_avatar/community.openboxes.com/david_douma/32/326_2.png) [@David\_Douma](https://community.openboxes.com/u/David_Douma)
#### Post date: [February 2, 2022, 3:04pm UTC](https://community.openboxes.com/t/handling-icons-replacing/495/1 "2022-02-02T15:04:46Z")

</div>

Hello Hello,

I was looking into replacing the handling icons, but I can’t find anywhere the PNG files in the Openboxes image directory.

![Firefox_Screenshot_2022-02-02T15-02-53.188Z](https://community.openboxes.com/uploads/default/original/1X/f59826a4a998d4de8a36722a8cb587b828509b46.png)

---

<div class="post-metadata">

### Author: ![jmiranda](https://community.openboxes.com/user_avatar/community.openboxes.com/jmiranda/32/199_2.png) [@jmiranda](https://community.openboxes.com/u/jmiranda)
#### Post date: [February 2, 2022, 7:20pm UTC](https://community.openboxes.com/t/handling-icons-replacing/495/2 "2022-02-02T19:20:36Z")

</div>

These are scalable vector graphics (SVGs) controlled by CSS classes. More specifically we’re using the Font Awesome library. We’ve hardcoded the CSS classes in the code, but we could consider making this configuratble.

```auto
    def getHandlingIcons() {
        def g = getApplicationTagLib()
        def handlingIcons = []
        if (this.coldChain) handlingIcons.add([icon: "fa-snowflake", color: "#3bafda", label: "${g.message(code: 'product.coldChain.label')}"])
        if (this.controlledSubstance) handlingIcons.add([icon: "fa-exclamation-circle", color: "#db1919", label: "${g.message(code: 'product.controlledSubstance.label')}"])
        if (this.hazardousMaterial) handlingIcons.add([icon: "fa-exclamation-triangle", color: "#ffa500", label: "${g.message(code: 'product.hazardousMaterial.label')}"])
        if (this.reconditioned) handlingIcons.add([icon: "fa-prescription-bottle", color: "#a9a9a9", label: "${g.message(code: 'product.reconditioned.label')}"])
        return handlingIcons
    }

```

Here’s what I think you _could_ 1 do

1. find an SVG icon set with icons you like (rather than individual icons)
2. find a way to include the library in the deployed code (copy the library into the js directory in the exploded war)
3. find a way to reference that library in the GSP code (could be done through custom GSPs for each page where handling icons appear)
4. find a way to reference the library in the React pages (??)

Your other option would be adding some custom CSS somewhere to redefine the location of the image that the CSS class “fa-snowflake” points to.

A better solution would be to make the change to the source code (Product.groovy) to make this configurable. This doesn’t address the issue of how to include a custom font library.

1 As I describe below in the conclusion, I am in no way endorsing this as a solution … just trying to paint an image of what I think you’re trying to do.

**Conclusion**  
So unfortunately, I don’t have an elegant solution for you.

And while this might be achievable (and may not be all that complicated), I wanted to point out that I’m noticing that you seem to be making a lot of customizations within the code deployed to Tomcat and not to source files. I want to make it clear that this isn’t PHP; changing “deployed” artifacts is a bad idea for many reasons, but primarily because an upgrade to the latest version of OpenBoxes will overwrite any changes you’ve made to the deployed artifacts. In order to avoid that, you’ll need to do some version control on your deployed code, which might make maintaining this solution less fun in the long-run.

---

<div class="post-metadata">

### Author: ![David\_Douma](https://community.openboxes.com/user_avatar/community.openboxes.com/david_douma/32/326_2.png) [@David\_Douma](https://community.openboxes.com/u/David_Douma)
#### Post date: [February 2, 2022, 7:40pm UTC](https://community.openboxes.com/t/handling-icons-replacing/495/3 "2022-02-02T19:40:58Z")

</div>

Thanks for the fast update again!  
I already thought it was hardcoded. So for now no problem :).

I indeed made a few modification’s into the GSP files (small ones) and pointed that out in a Word document so on upgrade I could change the new files again. Anyway, 99,9% of the system seems to work perfect for my needs.

Is there anyway I can contribute at this point?

---

<div class="post-metadata">

### Author: ![jmiranda](https://community.openboxes.com/user_avatar/community.openboxes.com/jmiranda/32/199_2.png) [@jmiranda](https://community.openboxes.com/u/jmiranda)
#### Post date: [February 25, 2022, 4:35pm UTC](https://community.openboxes.com/t/handling-icons-replacing/495/4 "2022-02-25T16:35:12Z")

</div>

> Is there anyway I can contribute at this point?

Yes, of course.

Here’s our main contributing guide.

> <https://github.com/openboxes/openboxes/blob/develop/CONTRIBUTING.md>

And more specific instructions on how to create your first pull request for an open issue.

> **[Contributing - OpenBoxes](https://docs.openboxes.com/en/latest/developer-guide/contributing/)**
>
> OpenBoxes documentation
