How to deploy Swift to another solution

This guide will be a walkthrough on how to deploy Swift on other solution such as a Rapido solution.

Throughout the guide we will use the terms Source and Target. The meaning of these terms are:

  • Source – The Swift solution you will be copying from
  • Target – The Rapido solution you want a Swift-site on

This walkthrough will be using the Dynamicweb Deployment Tool. Documentation for this tool can be found here.

It is important to follow the walkthrough thoroughly as the order of the deployment matters!

All steps are on the Source unless otherwise stated.
Any steps starting with “Deploy” is made from the deployment tool.

Make sure Source and Target is the same version of DW. In order to support Swift 1.10.0 you need to run on DW 9.13.6 or newer.  

You can locate the version number by logging in to the backend and looking either at the browser tap or at the bottom right corner on the home screen. 

Figure 2.2 Where to check the version number

If you need to upgrade your DW you can find information about it here

Should you encounter compatibility errors, even though the Source and Target are the same version, you can add a setting to your Global Settings on the Source site. 

/Globalsettings/Settings/Deployment/SkipCompatibilityCheck = true

<Deployment> <SkipCompatibilityCheck>true</SkipCompatibilityCheck> </Deployment>

Make sure to restart your application pool afterwards. 

Next up is creating the destination. This is done in the deployment tool. 

  1. Go to Settings/Developer/Deployment/Destinations 
  2. Click "Add" to add a new destination
  1. Give the destination a Name and a URL
  2. Write the credentianls for a user with administrator rights on the solution. If you dont' know the credentials for a user with administrator rights, you can make one on the Target site. 
  3. Test the connection to the Target site by clicking the button "Test connection"

When all this is done remember to hit Save and close

To Deploy Items types:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "Item types"
  3. In the top menu click "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. In the top menu click "Transfer Selected"

If this doesn't work properly, click "Export Selected" instead. You will then have to import it with the Deployment tool on the Target website. 

 

To Deploy Templates:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "Templates"
  3. In the top menu click "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. In the top menu click "Transfer Selected"
  6. If this doesn't work properly, click "Export Selected" instead. You will then have to import it with the Deployment tool on the Target website. 

 

To Deploy ItemThumbnails, FlagIcons, IconsMobileNavigation:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "ItemThumbnails", "FlagIcons", and "IconsMobileNavigation"
  3. In the top menu click "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. In the top menu click "Transfer Selected"

To Deploy TemplateItems:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "TemplateItems"
  3. In the top menu click "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. In the top menu click "Transfer Selected"

If this doesn't work properly, click "Export Selected" instead. You will then have to import it with the Deployment tool on the Target website Repository. 

To Deploy Repositories (SwiftProducts, Secondary Users, Files):

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "Repositories"
  3. In the top menu click "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. In the top menu click "Transfer Selected"

To build the indexes in the Target solution:

  1. Go to Settings/Repositories/SwiftProducts
  2. Click on the index called "Products"
  3. In the Builds section ({Figureref}) build the "Products"(1) 
  4. Then build "Products Secondary"(2)
Figure 8.1 Building Products(1) and Products Secondary(2)

To Deploy Database Schema for eComProducts:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/eCommerce
  2. In the Swift for Target > eCommerce section check "EcomProducts_Schema" 
  3. Click on "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right, check "Select All"
  5. Then click "Transfer Selected"

To Deploy Database Schema for eComGroups:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/eCommerce
  2. Go back to "DataGroup" and check "EcomGroups_Schema" 
  3. Click on "Compare Selected" to make sure the settings are correct
  4. When it has been confirmed that everything looks right check "Select all" and click "Transfer Selected"

To Deploy Content:

  1. Go to Settings/Developer/Deployment/Deploy/Swift for Target/Files
  2. In the Swift for Target > Files check "Content" 
  3. Click "Compare Selected" to make sure the settings are correct
  4. When you have confirmed that everything looks right check "Select All" 
  5. Click "Transfer Selected"

On the Target solution: Set up templates in the Website settings ({Figureref}).

  1. In Content, click on the three vertical dots next to the Website name at the top
  2. In the dropdown menu, click on "Websites"
  3. Right click your website and click "Edit"
  4. Scroll to the Master Layout section. Here you should link up the fields as shown on {Figureref}

 

Figure 12.1 The Master Layout section
  1. Scroll to the Design section
  2. Here you should link up the fields as shown on {Figureref}
Figure 12.2 The design layout section

If your product catalog is not showing any products ensure it is pointing on the right repository and you have build the index. 

On the Target solution: Ensure the query in the app of the product-page on the new website is pointing correctly to SwiftProdct/Product.query

  1. In Content, click on your product page in the content tree
  2. On the product page, click on the product catalog app and go to the app part of the settings
  3. In the Index section locate the Query field. Select the query on the products (Figure 13.1)
  4. Hit Save and close
  5. Do the same for all the product-subpages. On the Swift demo site there are four subpages. 
  6. Remember to save your changes
Figure 13.1 The app settings of the product catalog app

You will also need to set dummy products for the product detail pages (Figure 13.2).

  1. Click on a product-subpage (Product details page) in the content tree
  2. Click on the Product catalog app
  3. In the Item settings of the app, select a dummy product
  4. Hit Save and close
  5. Do the same for the other product-subpages
Figure 13.2 The subpages that need dummy products.

On the Target solution: check if any expressions in SwiftProduct products.query are empty. Delete those expressions that are empty.

  1.  Go to Settings/Repositories/SwiftProducts
  2. In the Query called "Products" locate the Expressions section 
  3. Check if any expressions are empty and delete those that are empty
  4. If you have made any changes remember to Save 

 

On the Swift site on the Target solution you should check if the page names are correct. Otherwise you could have titles as seen on Figure 15.1:

Figure 15.1 Pages with incorrect titles

If you see any pages with titles like the ones shown on the example above, you might want to correct them. This is done in the page settings of the page. 

  1. In the content tree, click on the page that needs a new title 
  2. Go to the page settings of the page 
  3. Write a proper title and hit Save and close 

On the Target solution, if you see a 404-error after navigation the site:

  1. Click on the three vertical dots next to the website name in the content tree
  2. Click on "Websites"
  3. Right click on your website and click "Edit"
  4. In the Details section, set a Primary domain and check the box "The selected domains can only reach this website"
  5. Hit Save and close