We have a magento store and we have over 1000 products listed. We want to assign random related products, but they should be within the category. For example, if a product is listed under Men >> T-shirts category, related products should also be from T-shirt category only. Is there a way to do this using code instead of manually assigning related products?