As soap dish that hangs from the top of the glass divider of our shower stall.
The dish and the hooks are printed separately. If the hooks don't work for your situation, you may be able to design new hooks without changing the dish. Or vice-versa.
I printed this in PETG. PLA or ABS is would be stiffer, but PETG seems adequate for the task at hand. If your bar of soap is exceptionally heavy, a less flexible material might be warranted.
Insert the tabs of the hooks into the dish from the bottom. Slip the locking part over the hook and down the shaft of the hook to lock the tab to the shaft. (see photos.)
(The locking part is not absolutely necessary, but it does remove some flex of the bottom of the hook.)