Welcome Jjspin! :wave:
I've never used soapnuts, but I think there are some here who do. Hopefully they will chime in soon.
When you use the term 'shampoo bar', do you mean a lye-based bar (i.e. soap) or a syndet based bar (i.e., synthetic detergent/surfactant)?
Although I do make a shampoo bar (lye-based), it does not contain coconut oil. And the funny part is that I don't even actually use it on my hair- because my hair does not do well with lye-based shampoos at all. I use it on the rest of me instead, which loves it.
RE: coconut oil....as it relates to being used by itself
vs in a lye-based soap formula: coconut oil that's used in its normal/natural/unsaponified state as a moisturizing treatment is much different than coconut oil used as part of a lye-based soap formula- whether a shampoo bar or a body bar. The lye changes the chemical makeup of the coconut oil and turns it from being a moisturizing agent into a highly cleansing soap that will suck your skin dry of its natural oils (unless you highly superfat it).
If your shampoo bar is a syndet-based bar, I have no advice to offer since I have never made one, but the link Carolyn pointed you to above is an excellent source for such info.
IrishLass