Revert "Reworked the get_categories_hash method"

This reverts commit 83e593f3a975b785b85337ee9b31823ecf881b3c.
Task 4 - Group shopping cart items by category (reverted from commit 757fb1c795d859cca921ad86f6c06f706fb9cfcc)