ConfigurationSpecial Symbols in the Identifiers

Special Symbols in the Identifiers

Sana Commerce 8.1
Your provider

Special Symbols in the Identifiers

Read this chapter to learn how to use the special symbols (which are not allowed in the URLs) in the identifiers of products, categories and sales documents.

By default the replacement rules are configured for the '\' and '/' symbols. If you need to use any other special symbols in the product and categories identifiers do the following:

Open the 'WebApplication.cs' file in the 'Sana.Commerce.Sdk' assembly, locate the InitializeSpecialSymbolsEncoder method:

protected virtual void InitializeSpecialSymbolsEncoder()
{
            var encoder = ObjectManager.GetInstance<ISpecialSymbolsEncoder>();
            encoder.AddRule(@"/", @"--");
            encoder.AddRule(@"\", @"==");
}

and add the replacement rule (the first symbol will be replaced by the second one):

encoder.AddRule(@" ", @" ")
ConfigurationSpecial Symbols in the Identifiers