Goal: Assign a random bitcoin wallet address to new customer accounts created in OpenCart 1.5+.
Script steps:
1. When customer clicks “create account”, open table “wallets” and select 1 random address out of all rows with “used” value of “0”.
2. Add selected address to new customer profile field “walletID” and save with the rest of their customer profile.
3. After new account is setup, update the address’ “used” field in “wallets” table from “0” to “1”.
**If there is a better/easier …
