Hi,
As Nicolas said,
That's how it works by default in HikaShop.
So, it's an
existing feature.
A site visitor = "guest" can shop around and add products to the cart, then go to checkout, where he can - depending on your HikaShop edition - either log in with an existing account, or register a new account, or check out as guest (means no account will be created), and in any case the products will stay in the cart, so he can continue the checkout.
It should work not only with login or registration in checkout, but also if the guest logs in via a Joomla login page or module, or registers a new account on a separate registration page. The cart content should always be retained.
Try it out. If it doesn't work in your case, a link to your site would certainly be helpful.