An unregistered user buys a product from a certain category (take into account the ID), adds it to the cart and goes to the order processing. If it is registered, it makes out an order. If not, redirecting it for registration and back for ordering.
After making an order, if user bought a product of a certain category, redirecting it to the custom page "Thank You", or immediately to the edit page of the account "edit-account" in the personal account.
In principle, for an unregistered user, it is possible to enable the automatic creation of an account when buying products. It is necessary to add the condition of buying products from a certain category. And need to make a redirect after placing an order.
I shall be very glad to your help!