Home » Documentation » Using Channels
This chapter assumes that you have a running installation of the default Scensum startup. Before you read this chapter it’s recommended that you read Installing Litium Scensum.
Channel
A channel in Scensum is a web site, i.e. a web application in the web server. The channel is defined by the web site URL and controls content, product range, language, currency, date/time formats etc:
- www.mysite.com – Main channel
- www.mysite.se – Localized channel
- mobile.misite.se – Platform targeted channel
- manufacturer.mysite.se – Campaign channel
- www.anothersite.com – Different business channel
A channel is configured by channel settings and by applying registries:
- Site structure registry – Defines navigation and content
- Product registry – Defines product range
- Price list registry – Defines the product prices
- Customer registry – Defines signed in customer scope
- Campaign registry – Defines campaign scope
- Theme – Defines the default site design
By sharing or using separate registries a channel can be set up to have different or share the same entities, e.g. a language channel might want to have all registries the same but with different language and currency settings while a campaign channel might have a custom product range and theme.
Scensum has support for multiple channels per installation. A channel is added by creating a channel, creating and applying the appropriate registries in the database and adding a web application in the web server with the corresponding application name.
Adding a new channel
To add a new channel you’ll have to add some data to the database, setup a new web application in the web server and add some configurations to the xml configuration files.
This example will add an adapted channel to the existing www.bildelsportalen.se site targeting mobile devices. It should have a separate URL, and a custom navigation structure and design, but the same currency and localization settings and share product, price list, customer and campaign registry.
Create the channel
Open the core.tChannel table in the database and the following values for the new channel:
| Column |
Value |
Description |
| Title |
mobil.bildelsportalen.se (se) |
An internal title displayed in back office |
| CountryId |
1 |
Reference to tCountry (1=Sweden) |
| ApplicationName |
localhost/mobil.bildelsportalen.se |
The URL to the channel. On a page request the Scensum http handler will use the URL a lookup in tChannel table to find the channel with matching application name. |
| AlternateLayoutRatio |
0 |
The ratio between A and B template mode in percentage. In this example we won’t use a B template so leave it at 0%. |
| LanguageId |
1 |
Reference to tLanguage (1=Swedish) |
| CurrencyId |
1 |
Reference to tCurrency (1=SEK) |
| CultureId |
4 |
Reference to tCulture (1=sv-SE) |
| CommonName |
mobil_bildelsportalen_se |
String identifier for the channel. Used to reference the channel without using the id. |
Create the site structure
As the mobile channel will have a separate theme and site structure we need to create a new site structure registry to link the site structure to the channel.
Open the sitestructure.tSiteStructureRegistry table in the database and the following values for the new registry:
| Column |
Value |
Description |
| Title |
StartContentNodeId |
An internal title displayed in back office |
| CommonName |
mobil_bildelsportalen_se |
String identifier for the registry. Used to reference the registry without using the id. |
| StartContentNodeId |
NULL |
The start content node in the site structure registry. Will be set from back office when creating the navigation structure. |
Assign the created registry to the new channel by adding their respective id’s to the sitestructure.tSiteStructureModule-Channel table.
| Column |
Value |
Description |
| ChannelId |
<the id of the created channel> |
|
| SiteStructureRegistryId |
<the id of the created registry> |
|
Apply shared registries
Open the following tables and apply the created channel id and existing registry id’s for bildelsportalen.se to share them over the channels.
- campaign.tCampaignModuleChannel – Apply the same campaign registry
- customer.tCustomerModuleChannel – Apply the same customer registry
- product.tProductModuleChannel – Apply the same product and pricelist registry *.
* For now, leave the ProductTemplateContentNodeId column as NULL
Create the theme
As the site will not have the same layout and design we’ll create a new Theme that will define the default templates for the different entities in the channel.
Open back office and navigate to Interface \ Themes and choose to create a new theme. By default the new theme is set to inherit all templates from the default theme. By specifying a template for an entity in the theme you can change the default template for that entity for the current theme.
Name the theme “mobile” and save the theme. If you have already created templates for the new channel you can apply them to the theme now, if not you can always come back later.
Navigate to the channel edit list and open the “mobil.bildelsportalen.se (sv)” channel. If not specified in the template.tTemplateModuleChannel table the channel will by default use the Default theme. Change this property by selecting the “mobile” theme and pressing save.
Delivery method
The channel needs to have delivery methods defined.
Open the order.tChannelDeliveryMethod table in the database and add the appropriate channel and delivery method ids.
Create the web application
To be able to view the channel in a browser you’ll need to create a web application in the web server with a URL matching the application name in core.tChannel.
Open the IIS and add an application called “mobile”. Use the default application pool and point the physical path to the same directory as the bildelsportalen.se channel, i.e. the …\Src\Litium.Scensum.Web directory. Press ok to create the application.
Right click the web application and add a reference to the images, CSS- and script files needed for the public site by adding a virtual directory to the …\files\media directory.
We also need to add a reference to the Scensum.Media.Web application that handles the product images. Right click the web application and add a new application. Name it mediaarchive and set the physical path to …\Src\Litium.Scensum.Media.Web directory. Press ok to create the application.
Before you can browse the public site you’ll need to set which page should be the channels start page. Right click the site structure registry and add a page. Name it “Start page”, set it online and save. Right click the site structure registry again and select the “Set start page” option. Click the folder icon to display a dialogue window where you can select the start page. Select the created page and press ok and then save.
Now you should be able to browse the public site by either entering the channel application name in the address field of a browser or by from back office select the channel in the top dropdown and clicking the “View” link.
Apply default product detail page
To be able to view a product detail page you’ll need to assign the page to be used when displaying a product or order for the channel.
Navigate to Site Structure and create a folder called “System pages” in the “mobil.bildelsportalen.se” site structure registry. Right click the folder and choose to add a page. Set the title to “Product detail page”, status online and choose the page type “product page”. This will create a content page that can handle a product id as input parameter. Save the page to go to the blocks view. Add a product detail block and save the page.
Navigate to the channel edit list and click the “mobile.bildelsportalen.se (sv)” channel. Click the folder icon for Product template content node and choose the product detail page. Press ok and save to persist your changes.
You should now be able to view a product detail page on the public site.
Apply default order checkout page
If you are using the default startup solution of Scensum the cart will try to redirect to a site structure node with the common name “checkout” when requesting to proceed to the checkout.
Create a folder in the “System pages” folder called “Order” and in that folder create a page. Name the page “Checkout” choose page type “content page” and set its common name to “checkout”. Set it online and press save to persist your changes.
Apply order history detail page
Each channel needs to define which content page will be used to render an order from the order history list. When setting the order detail page for a channel the order history list block will be able to navigate to the order history detail page and render an order by its order id.
Navigate to the Site structure and in the system pages folder create a new page. Name the page “Order history detail” and choose the “Order detail page” page type. Set it online and save the page.
Navigate to the channel edit list and click the “mobile.bildelsportalen.se (sv)” channel. Click the folder icon for Order detail page template and select the created “Order detail page”. Press save to persist your changes.
Search configuration
The default search engine Lucene uses index files stored on disk to do lookups. To create index files for a new channel you’ll have to add index descriptions to these.
Locate the ..\Src\Setting\SearchConfiguration.xml and add the following xml tag to the end of the indexes section (The LanguageId is equivalent to the channels common name.):
<index name="MobileProducts" languageId="Mobile" path="<your installation path>\Files\LuceneIndex\mobile_products">
<jobs>
<job timeOfDay="01:00:00" componentId="ProductIndexJob" />
</jobs>
</index>
<index name="MobileSearchStatistics" languageId="Mobile" path="<your installation path>\Files\LuceneIndex\mobile_searchstatistics">
<jobs>
<job timeOfDay="01:00:00" componentId="AutoCompleteIndexJob" />
</jobs>
</index>
Add the following xml tag to the end of the queries section:
<query name="Mobile_FuzzyProductQuery" languageId="Mobile" componentId="FuzzyQuery" maxResultCount="100">
<indexes>
<index name="MobileProducts" />
</indexes>
</query>
<query name="Mobile_DailySearchStatisticsPrefixQuery" languageId="Mobile" componentId="TitlePrefixQuery" maxResultCount="100">
<indexes>
<index name="MobileSearchStatistics" />
</indexes>
</query>
Locate the …\Src\Setting\ProductSearch.xml and add the following xml tag to the end of the root section:
<Group Name="Mobile">
<Setting Name="DefaultQueryName">Mobile_FuzzyProductQuery</Setting>
</Group>
Locate the …\Src\Setting\AutoComplete.xml and add the following xml tag to the end of the root section:
<Group Name="Mobile">
<Setting Name="DefaultQueryName">Mobile_DailySearchStatisticsPrefixQuery</Setting>
<Setting Name="DailySearchIndexItemMaxCount">10000</Setting>
</Group>
Locate the IndexBuilderTool (Litium.Scensum.IndexBuilder.exe) in the …\Tools\Litium.Scensum.IndexBuilder. Run the IndexBuilderTool to create the new index files.
Apply search result content page
To be able to see the search result on the public site you’ll need to create a page with a search result block.
Add a content page to the system pages folder. Name it “Search result”, set as page type “Content page” and set the URL to “search”. Press save to persist your changes and display the block edit page. Add a search result block to the page, set it online and save. Open the block and set the number of rows to 25. Save the block changes.