- Issue created by @tripodcreative
In a pre-existing commerce setup (Drupal 9, Commerce 2), I have a need to show a login/register pane only under certain conditions.
In case A: if the user isn't logged in, the use case wants anonymous users to check out as guest by default, absent a small link asking them to log in if they choose.
In case B: if a user clicks that login link, they are directed to a step in the form (checkout/[id]/login) that shows a specific custom checkout pane that prompts them to register, login, or continue checking out as guest. The user can't, for example, go to /user/login?destination=checkout/[id], as that specific checkout pane has important branding/auxiliary elements that are not present on the user login/register form. It has to be that custom pane.
This thus presents two options: either find a way to conditionally toggle the visibility of a checkout pane form (this login pane extends BaseLogin), or have a separate, nearly identical checkout flow that can be toggled based on a conditional that can be satisfied by clicking a link.
I've seen resources for how to do this in D7, but nothing for D9 under commerce 2.
Any insight would be helpful.
Active
2.33
Checkout