Brainstroming on a needed feature: connect products to user via code

I have a MODX Commerce site, and some products also have a digital PDF that people who purchased the product can view online.

For now they can do this by logging in and visting the order history page where I load the links to the PDF.Now the client plans to sell some of the products in physical stores also, people will most likely not have created an account yet.

They should be able to go home, get a code that we attached to the products in physical stores, and somehow add the product to their new account so they can view the PDF after logging in.

  • what is the best way to do this? user extended fields maybe?
  • have a form where you enter a code that will add the product somehow?

Maybe you could offer the PDF as a separate digital product and give the local customers a coupon code which allows them to “buy” the digital PDF for free?