Need help in Ecommerce Portal Redirection?

I created one host ecommerce portal with complete ecommerce solution including payment gateway. To be clear I created ecommerce portal look like bigcommerce.com. I have already done with 98% backhand coding and also added a unique recognition number for each user after registration about their product and choices.

But when customer registers, a folder with his unique ID code will be created in my domain where all images and styles will be auto saved but I am stuck when a customer buys a plan from me and he will change name servers, he be supposed to get his site to be displayed in his domain.

I don't know how these things works. Please someone suggest me how to go about it.