Code to Create a Site
In this example, an instance of the GlobalConfig object is instantiated, then initialized. An application named "NewSite" is created and saved.
Create this example using the following Visual Basic code.
Create the GlobalConfig and initialize it.
Dim oGlobConfig Set oGlobConfig = CreateObject("Commerce.GlobalConfig") oGlobConfig.Initialize
Create a new application. The CreateSiteConfig method creates a site named "NewSite" and returns a SiteConfig object that contains the site configuration settings. After the site is created, save the configuration settings.
Dim oSiteConfig Set oSiteConfig = oGlobConfig.CreateSiteConfig("NewSite") oGlobConfig.SaveConfig