I would like to redirect log-in page before showing any products or categories if a customer is not logged in.
In the administration setting of admin panel, there are some options for unregisterd membesr like hide add to cart button or hide check out button.
Actually, it is not what I am looking for.
What I want is that if a customer is not logged in and when he clicks a product or a category, it redirects to the log-in and registration page before showing a product or a category.
CS-Cart version : 2.1.1
Thanks a million in advance.
May be not exactly what you described but this might work as an option for you.
While in the category page or the product page, you can limit AVAILABILITY by checking the block for registered near User Group. The is near the bottom of the page.
If that block is checked, then they will not show up unless visitor is logged in.