Welcome! This is my personal blog about Web technologies, software development, open source and other related topics
The ideas and opinions expressed here are solely mine and don't represent those of others, either individuals or companies.The code snippets or references to software products or analogous are to be used without any warranty of any kind. If you enjoy the content, feel free to share it and re-use it as long as you provide a link to the original post.
The deployment of SXA has been removed from the Commerce installation, and instead installed as a Platform pre-requisite before installing Commerce packages.
1. Extract downloaded XP Single Developer package to a folder e.g.:- C:\SCInstallation\XP102 2. Extract XP0 Configuration files 10.2.0 rev. 006766zip in same folder
Install prerequisites before installing XP 10.2
Switch to the installable e.g.:- C:\SCInstallation\XP102 folder and execute following script
1. Create a SOLR folder e.g.:- C:\SOLR and switch to e.g.- C:\SCInstallation\XP102 folder. Open Solr-SingleDeveloper.json file.
2. Change the Install Root for SOLR in Solr-SingleDeveloper.json – DefaultValue
"SolrInstallRoot": {
"Type": "String",
"Description": "The file path to install Solr. This config will add the prefix and solr version e.g C:\Solr becomes C:\Solr\[SolrServicePrefix]Solr-8.4.0",
"DefaultValue": "C:\\SOLR"
},
Disable TLS 1.3 over TCP for xconnect. Rerun the installation script or disable this as soon as the xconnect bindings are setup by script during installation.
No registration for extension ‘AppPool’ of type ‘Task’
Solution
Check if the Asp.Net options in Windows features – Internet Information Services.
Sitecore Commerce installation package comes with Sitecore Business Tools SDK.
If you are planning to custommise Business Tools you might have to setup the development environment for Business Tools. You can find more information on how to setup the development environment here
For each version of Sitecore Commerce you need to install the specific version of Business Tools in you development environment.
See below the compatibility table for Business Tools with Sitecore commerce-
Sitecore uses placeholders to render components which allows to dynamically assemble the page layout. This allows the content editors to design specific pages.
When using MVC layout and BootStrap grid, SXA adds additional DIV when a placeholder is used.
For e.g. if you see the views/sxalayout/Bootstrap4Body.cshtml file. If has a placeholders header, main and footer.
Page is rendered with the header, main and footer tags having placeholders within.
These placeholders is wrapped with a div tag when rendered with class row.
Problem– Extra div tag with class row might not be required or if you don’t to have this as part of your markup. How to remove div tag?
Solution –
The configuration to exclude the placeholder wrappers is in Sitecore.XA.Foundation.Grid.config
Any custom or OOTB placeholders can be added to placeholderWrapper/exlcudedPlaceholders list
Best Practice – Never modify the OOTB config’s as this can be changed in the future releases and upgrades. Patch the config instead.
Patch file should look something like this-
Resulting to the entry added in excludePlaceholders list and the div been not rendered-
Asset optimizer helps improve the performance in production site by compressing/minifying the CSS and JS.
Minification of assets helps to cut the unnecessary portions of code and reduce the size of file to boost the performance by reducing amount of data over the internet.
Sitecore administrators can enable/disable optimizer globally of to a specific site.
Enable/Disable the Asset Optimizer globally
Enabling or disabling optimizer globally affects all the sites configured in the Sitecore instance.
To change the optimiser settings navigate to following location. This is accessible to Administrators-
If you can’t find this you may have to re-index master.
Select Scripts or Styles to change the settings
Modes of Optimizations
Concatenate And Minify Mode
When this option is selected. Sitecore will concatenate and minify the OOTB and Custom Scripts and Styles.
Example:- If you have a custom theme you can add the css files in your extension theme
This is in master database
Highlighted CSS is a extension to the base theme.
Web database when the page is first requested Sitecore will concat and minify all css in extension theme folder and create a optimised-min.css file
Styles loaded from the extension theme is concatenated and minified version with timestamp in query parameter (optimised-min.css)
Notice that the file name is optimised-min.css
Size of the optimized version is 367 KBConcatenate and minified. Loads without comments
ConcatenateMode
Change the mode of optimization to “Concatenate”.
Web database now has optimized file created in extension theme
Styles loaded from the extension theme is concatenated version with timestamp in query parameter (optimised.css)
Notice that the reference to file is changed to optimised.css
Size of the optimized version is 381 KBConcatenate but not minified. CSS loads with comments
DisabledMode
Change the mode to “Disabled” and should see all the files loaded separately. Disabled mode is good for debugging but should not be used for production as it will give a performance hit.
CSS files are loaded separately and not concatenated nor minified
Best Practice – Enable Asset Optimizer in production environments
The same can be applied to the Scripts.
You have set the optimizer to concatenate and minify globally to your Sitecore instance but still don’t see the site been optimized.