Refactored getting productategoryId