Hi,
If you want to do that, the simplest is to directly add your code in the function getPath of the file administrator/components/com_hikashop/classes/file.php
You would have to look in $_REQUEST and $_FILES in order to see what is going on in order to customize the upload folder on the fly. It won't be simple as there are many cases to take into account.
You can't do it with just onBeforeFileCreate. First, onBeforeFileCreate doesn't allow you to do that, and second, even if it did, you not only need to adapt the path on the fly for the upload, but also everywhere where the files are loaded / displayed. The $path function is called everywhere HikaShop needs to add / remove / get files.
Also, note that if you modify directly administrator/components/com_hikashop/classes/file.php you'll loose your changes each time you update HikaShop. So you'll have to reapply them after the update. Ideally, you want to create an override of that file as explained here:
www.hikashop.com/support/documentation/6...ntation.html#classes