Overview
In version 15.3, default configurations of GUI application use old XML definition of hosting products. If you want to switch to Shops which are defined in Atomia Billing, the following steps should be completed:
- Migrate data from XML file
- Configure Order Page
- Configure Billing and Hosting Control Panels
Feel free to contact our support team if you need help with any of the above steps. Visit support.atomia.com.
Migrate data from XML file
At the moment, products are defined in XML configuration file in every GUI application. We have created small command line tool to convert this data into SQL scripts which can be used for updating products in the database and creating default shops for resellers. Tool is called AtomiaShopMigrator and can be obtained from our support. When executed, it expects one argument, path toAtomia.Web.Plugin.HostingProducts.dll.config
file. It is recommended to use Billing Customer Panel’s hosting products file as input for this tool since it has the most data. Upon execution, you will find two SQL files in the same folder:
- FillItems.sql – should be used to update item properties with additional data which is stored in XML file
- CreateShops.sql – should be used to create default shops for all resellers based on items and their categories from XML file
Before running these scripts please check how transactions are handled in them and make sure to uncomment rollback or commit statement at the end of the file.
Don’t forget to review created shops in Admin Panel before you proceed to next steps. This will also allow you to tweak shops and items additionally.
Configure Order Page
Order Page’s web.config file specifies which product provider is used for getting products from Atomia Billing. In version 15.3 default provider is OrderApiXmlProductsProvider
which loads list of products fromAtomia.Web.Plugin.HostingProducts.dll.config
XML file. The other option isPublicApiShopProductsProvider
which targets Order Service and gets products from a default shop. In order to use this products provider, locate Unity section in Order Page’s web.config file and change IProductsProvider
mapping fromOrderApiXmlProductsProvider
to PublicApiShopProductsProvider
. After this, Unity section should look like this:
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity"> <alias alias="IProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.IProductsProvider, Atomia.Web.Plugin.ProductsProvider" /> <alias alias="PublicApiShopProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.PublicApiShopProductsProvider, Atomia.Web.Plugin.ProductsProvider" /> <alias alias="OrderApiXmlProductsProvider" type="Atomia.Web.Plugin.HostingProducts.Helpers.OrderApiXmlProductsProvider, Atomia.Web.Plugin.HostingProducts" /> <alias alias="AtomiaBillingPublicService" type="Atomia.Web.Plugin.OrderServiceReferences.AtomiaBillingPublicService.AtomiaBillingPublicService, Atomia.Web.Plugin.OrderServiceReferences" /> <alias alias="ICachingManager" type="Atomia.Web.Plugin.ProductsProvider.ICachingManager, Atomia.Web.Plugin.ProductsProvider" /> <alias alias="HttpApplicationStateCacheManager" type="Atomia.Web.Plugin.HostingProducts.Helpers.HttpApplicationStateCacheManager, Atomia.Web.Plugin.HostingProducts" /> <alias alias="EntLibCachingManager" type="Atomia.Web.Plugin.ProductsProvider.EntLibCachingManager, Atomia.Web.Plugin.ProductsProvider" /> <container> <register type="AtomiaBillingPublicService"> <property name="Url" value="http://orderapi.dev.atomia.com/AtomiaBillingPublicService.asmx" /> <property name="Timeout" value="600000" /> </register> <register type="EntLibCachingManager"> <constructor> <param name="cacheManagerName" value="ProductsCache" /> </constructor> </register> <register type="ICachingManager" mapTo="EntLibCachingManager" /> <register type="IProductsProvider" mapTo="PublicApiShopProductsProvider"> <constructor> <param name="publicService" /> <param name="cachingManager" /> </constructor> </register> </container> </unity>
Configure Billing and Hosting Control Panels
Similar to Order Page’s configuration, Billing and Hosting Control Panels use product provider for listing products. In these applications, default products provider, which uses XML config file, is BillingApiXmlProductsProvider
and it should be replaced withBillingApiShopProductsProvider
. After this, Unity section which is related to configuring product provider should look like this:
<unity> <typeAliases> <typeAlias alias="IProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.IProductsProvider, Atomia.Web.Plugin.ProductsProvider" /> <typeAlias alias="BillingApiShopProductsProvider" type="Atomia.Web.Plugin.ProductsProvider.BillingApiShopProductsProvider, Atomia.Web.Plugin.ProductsProvider" /> <typeAlias alias="BillingApiXmlProductsProvider" type="Atomia.Web.Plugin.HostingProducts.Helpers.BillingApiXmlProductsProvider, Atomia.Web.Plugin.HostingProducts" /> <typeAlias alias="ICachingManager" type="Atomia.Web.Plugin.ProductsProvider.ICachingManager, Atomia.Web.Plugin.ProductsProvider" /> <typeAlias alias="HttpApplicationStateCacheManager" type="Atomia.Web.Plugin.HostingProducts.Helpers.HttpApplicationStateCacheManager, Atomia.Web.Plugin.HostingProducts" /> <typeAlias alias="EntLibCachingManager" type="Atomia.Web.Plugin.ProductsProvider.EntLibCachingManager, Atomia.Web.Plugin.ProductsProvider" /> </typeAliases> <containers> <container> <register type="EntLibCachingManager"> <constructor> <param name="cacheManagerName" value="ProductsCache" /> </constructor> </register> <register type="ICachingManager" mapTo="EntLibCachingManager" /> <register type="IProductsProvider" mapTo="BillingApiXmlProductsProvider"> <constructor> <param name="useIdentityDelegation" value="true" /> <param name="cachingManager" /> </constructor> </register> </container> </containers> </unity>
Don’t forget to create transformation for these changes since config files are overwritten when applications are updated.