We need to add a product to the clients cart, and to redirect him to the register page instead of the login page (if he is not logged in), how to achieve it?
Basically, in our case, our client will enter the shop from the marketing funnel, and we know that he doesn't have an account yet, so we can redirect him to the checkout with the product in his cart, but because only registered users can purchase the product, the client is being redirected to the login page with small register button/link, we would prefer to redirect him to the registration form with the product in his cart.