enBlogshttp://world.episerver.com
60EPiServer WorldPlanned breaking changes 2017 (CMS Core)https://world.episerver.com/blogs/Per-Bjurstrom/Archive/2017/8/planned-breaking-changes-2017-cms-core/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>An update to let you know what breaking changes are planned for CMS Core, as we have done the last few years we plan for one breaking change release of CMS per year. With that said, please note that this is preliminary and subject to change. More details will be provided when we get closer to a release.</p>
<p>For many projects this will just require a re-build of the solution assuming you have stayed up to date with the continuous release process and continuously fixed the obsolete warnings that shows up.</p>
<h2>New NuGet packages for ASP.NET integration</h2>
<p>New NuGet packages&nbsp;<strong>EPiServer.CMS.AspNet and EPiServer.Framework.AspNet</strong>&nbsp;will be introduced which will contain all API's related to web development on the ASP.NET stack (both MVC and WebForms). Existing namespaces will be preserved to keep the upgrade as smooth as possible.</p>
<p>The goal is that the <strong>EPiServer.CMS.Core</strong> and <strong>EPiServer.Framework</strong> NuGet packages will be <a href="https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/">.NET Standard 2 compliant</a>&nbsp;and will not contain any API's related to ASP.NET development, and that they in the future can be used stand-alone (without a web.config).</p>
<p>You might have noticed that we <a href="/link/76974ad8d2a84c1b989ad0ac453ab663.aspx?releaseNoteId=CMS-6258&amp;epsremainingpath=ReleaseNote/">already started obsoleting methods</a> that have dependencies on ASP.NET in core API's to prepare for this split. So for example the CreatePropertyControl-method in PropertyData will be removed since it has a dependency on WebForms (System.Web.UI.Control), but you can prepare for this change by registering controls on startup instead.</p>
<h2>New NuGet package for StructureMap integration</h2>
<p>A new NuGet package<strong>&nbsp;EPiServer.ServiceLocation.StructureMap</strong>&nbsp;<span>will be introduced which will contain the integration with StructureMap, with support both for the existing signed StructureMap 3 and the new unsigned StructureMap 4 which we currently cannot support. The package only contain the integration and have NuGet dependencies on the official StructureMap packages. Episerver and module packages should not directly depend on this package but use our own&nbsp;<a href="/link/ebeb7390a6de4c16a2530221b226e292.aspx">abstractions for dealing with dependency injection</a>, this API have been available for a few versions now and is already being used by most Episerver products. </span></p>
<p><span>This change makes it easier to support multiple versions of StructureMap&nbsp;but we are also looking into the dependency injection system that is shipped with .NET Core. Moving the dependency to a NuGet package is the same approach we have for logging, where we have abstractions in the platform and an integration in a separate NuGet package.</span></p>
<p>You might have noticed that we <a href="/link/76974ad8d2a84c1b989ad0ac453ab663.aspx?releaseNoteId=CMS-6258&amp;epsremainingpath=ReleaseNote/">obsoleted the "Container" property in the initialization system</a> and move that logic into an extension method, that was a preparation for this change where the extension method will be provided by a separate NuGet package (since EPiServer.Framework&nbsp;will no longer have any direct depedencies on StructureMap).</p>
<h2>New NuGet packages for Dynamic Content and XForms</h2>
<p>The legacy features Dynamic Content and XForms will be removed from the platform and moved into separate NuGet packages as add-ons instead (e.g. <strong>EPiServer.DynamicContent</strong> and <strong>EPiServer.XForms</strong>) with their own versioning number and breaking changes, as the platform progresses these features will become more limited over time. We recommend migrating to Forms or Blocks wherever possible.</p>
<h2>PropertList&lt;T&gt; improvements</h2>
<p>The base class PropertyList&lt;T&gt;&nbsp;is an API that have been in beta for a long time and has no official documentation, we know some projects are using it despite the shortcomings. We plan to make a few breaking changes to make sure the API properly can support these property types, document what they support and not, and then remove the beta stamp from this class.</p>
<p>As an example we are changing how properties are imported/exported by moving logic previously locked into PropertyData such as ToRawProperty to external services that can have their own dependencies and are easier to customize per property type. There will be a separate blog post with more details.</p>
<h2>Performance improvements when loading content</h2>
<p>Performance improvements up to 50% when content is loaded from the database, the results vary depending on the size of content types and the data being loaded. Besides optimizations of the API the larger behavioural change is that the CreateWritableClone-method is now also used when loading data from the database.</p>
<h2>Bug fixes</h2>
<p>We have a list of bugs&nbsp;that we have not been able to fix since they are considered breaking according to semantic versioning.</p>
<h2>User interface changes</h2>
<p>A separate blog post about breaking changes in the UI will be published later.</p>
<h2>Getting access to pre-releases</h2>
<p>We will publish pre-release versions on our <a href="http://nuget.episerver.com/">NuGet site</a> as soon as we have something that can be tested.</p>
</body>
</html>https://world.episerver.com/blogs/Per-Bjurstrom/Archive/2017/8/planned-breaking-changes-2017-cms-core/Thu, 17 Aug 2017 12:45:00 GMTBlog postEpiserver Shared Content with *Partial* Override Controlhttp://egandalf.blogspot.com/2017/08/episerver-shared-content-with-partial.html
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/mLpVf88rnOo" width="480"></iframe><br /><br /><br /><br />I was asked to create a quick proof of concept for sharing content between sites in Episerver. While there are many ways to do this, I wanted to create one that allowed for only part of the content to be overridden while the rest was enforced from the parent. The View shows how the output to the page can be determined on whether there is content available.<br /><br />I don&#39;t claim it to be perfect nor production-ready. Just a bit of fun and a PoC.<br /><br /><a href="http://egandalf.blogspot.com/2017/08/episerver-shared-content-with-partial.html#more">Read more »</a>http://egandalf.blogspot.com/2017/08/episerver-shared-content-with-partial.htmlWed, 16 Aug 2017 14:17:00 GMTBlog postA custom coupon code providerhttp://jstemerdink.wordpress.com/?p=513
Imagine you have a huge mailing campaign with personalized coupon codes for each customer. You would have a hard time validating those coupon codes, as a promotion can hold only one coupon code. There is a way to do that though, with a custom coupon filter. First I created a base class to use for &#8230; <a href="https://jstemerdink.wordpress.com/2017/08/16/a-custom-coupon-code-provider/" class="more-link">Continue reading <span class="screen-reader-text">A custom coupon code provider</span></a><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=jstemerdink.wordpress.com&#038;blog=16784622&#038;post=513&#038;subd=jstemerdink&#038;ref=&#038;feed=1" width="1" height="1" />http://jstemerdink.wordpress.com/?p=513Wed, 16 Aug 2017 11:09:41 GMTBlog postA super simple geo-coordinates property for Episerverhttp://hacksbyerik.wordpress.com/?p=225
This blog post shows how to extend Episerver with a property where editors can enter an address that will be converted to longitude/latitude. It&#8217;s the longitude/latitude value that is saved. Suggestions for addresses/locations will be shown while typing. If you want to show a location on a map you need to know the coordinates for &#8230; <a href="https://hacksbyerik.wordpress.com/2017/08/15/a-super-simple-geo-coordinates-property-for-episerver/" class="more-link">Continue reading <span class="screen-reader-text">A super simple geo-coordinates property for&#160;Episerver</span></a><img alt="" border="0" src="https://pixel.wp.com/b.gif?host=hacksbyerik.wordpress.com&#038;blog=128034034&#038;post=225&#038;subd=hacksbyerik&#038;ref=&#038;feed=1" width="1" height="1" />http://hacksbyerik.wordpress.com/?p=225Tue, 15 Aug 2017 14:43:15 GMTBlog postHow To Pass Parameters Into An Episever SelectionFactory?http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-selection-factories/how-to-pass-parameters-into-an-episever-selectionfactory/
&lt;p&gt;On most projects there will be a requirement for users to select on, or, more options out of a dropdown list or a checkout. In EPiserver this is done via a selection factory, more information can be found &lt;a href="http://www.jondjones.co[...]http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-selection-factories/how-to-pass-parameters-into-an-episever-selectionfactory/Tue, 15 Aug 2017 00:00:00 GMTBlog postImproved Memory Efficiency in Commerce 11.1https://world.episerver.com/blogs/Magnus-Rahl/Dates/2017/8/improved-memory-efficiency-in-commerce-11-1/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><strong>TL;DR:</strong> Episerver Commerce 11.1 contains improved caching strategies for Catalog Content allowing site implementations to make better use of the available memory.</p>
<h3>Caching in the Catalog APIs</h3>
<p>Episerver Commerce uses a Content Provider to make catalog data available through the Content API, which is the recommended API to use in site implementations. The Catalog Content Provider uses the low-level catalog DTO and MetaObject APIs to construct the Content instances.</p>
<p>These low-level APIs are also public and have their own cache, which means several representations of the same base data will be cached when loading Content. However, a site implementation built using the Content APIs is unlikely to, at least frequently, use the low-level APIs to access the same catalog data.</p>
<h3>Improved Caching Strategies for&nbsp;Content, Relations and Associations</h3>
<p>Because of this, in Commerce 11.1 the caching strategies have been changed so that when the low-level APIs are used by the Catalog Content Provider, only the Content is inserted into the cache. Similarily, when using the IRelationRepository and IAssociationRepository APIs, only the high level Relation/Association objects are cached, not the underlying DTOs. If an implementaton uses the low-level APIs directly, the caching strategies are the same as before.</p>
<h3>Memory Used Better, Not Necessarily Less</h3>
<p>As you may have realized, this doesn't really decrease the memory usage at the time of loading Content from the database, as the DTO and MetaObject will still have to be allocated. The difference lies in how quickly that memory can be recovered and reused. Before this change, the DTO and MetaObject wouldn't go out of scope until they were trimmed from cache, and by the time they were trimmed they may have been promoted to the garbage collection generation 1 or 2 making it harder to recover the memory. With this change, they will go out of scope quickly and can easily be garbage collected, allowing the application to make better use of the available memory, for example holding more Content items in cache and reducing the cache churn.</p>
</body>
</html>https://world.episerver.com/blogs/Magnus-Rahl/Dates/2017/8/improved-memory-efficiency-in-commerce-11-1/Mon, 14 Aug 2017 19:11:38 GMTBlog postEpiserver Add-on: Application Measurement and Monitoring made Easyhttp://fellow.aagaardrasmussen.dk/?p=529
Fellow.Epi.Metrics: Application Measurement and Monitoring made Easy This Episerver add-on exposes key insights about platform performance and system health. It acts as a reporting platform useful as part of implementation, operation and incident management. By default, it allows you, as an Episerver developer, to easily register code to be measured along with integration endpoints to be monitored. Example performance outputs<br /><br /><a class="more-link" href="http://fellow.aagaardrasmussen.dk/2017/08/14/episerver-add-on-application-measurement-and-monitoring-made-easy/">Read More</a>http://fellow.aagaardrasmussen.dk/?p=529Mon, 14 Aug 2017 13:20:28 GMTBlog postCustomizing TinyMCE Styles Dropdown programaticallyhttps://bartoszsekula.com/post/2017/08/11/customizing-tinymce-styles-dropdown-programatically
<p>I have recently received a question from one of the developers on how to provide a different set of TinyMCE Styles in a multi site environment.&nbsp;</p>
<p>The expected result was to be able to change both the applied styles in the html editor and the dropdown that is used to choose a particular style.</p>
<p>There is a great post by&nbsp;Arve Systad about <a title="Setting editor stylesheets programmatically" href="https://www.epinova.no/en/blog/setting-editor-stylesheets-programmatically/">Setting editor stylesheets programmatically</a>&nbsp;that is a great starting point for our problem.</p>
<p>We would create an EditorDescriptor where we would place the logic that returns different stylesheets per site.</p>
<pre class="brush:csharp;auto-links:false;toolbar:false" contenteditable="false">using System;
using System.Collections.Generic;
using System.Linq;
using EPiServer.Cms.Shell.UI.ObjectEditing.EditorDescriptors;
using EPiServer.Core;
using EPiServer.Editor.TinyMCE;
using EPiServer.Shell.ObjectEditing;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;
using EPiServer.Web;
using EPiServer.Web.Hosting;
namespace AlloyTemplates.Business.EditorDescriptors
{
[EditorDescriptorRegistration(TargetType = typeof(XhtmlString), EditorDescriptorBehavior = EditorDescriptorBehavior.OverrideDefault)]
public class MyEditorDescriptor : XhtmlStringEditorDescriptor
{
public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable&lt;Attribute&gt; attributes)
{
base.ModifyMetadata(metadata, attributes);
var tinyMceSettings = metadata.EditorConfiguration.FirstOrDefault(x =&gt; x.Key == "settings");
var dictionary = tinyMceSettings.Value as Dictionary&lt;string, object&gt;;
if (dictionary == null) return;
var formatter = new TinyMCEStyleFormatter();
var staticCssEditorCss = SiteDefinition.Current.Name.Equals("Foo") ? "/Static/css/editor.css" : "/Static/css/editor2.css";
dictionary["content_css"] = staticCssEditorCss;
using (var stream = GenericHostingEnvironment.VirtualPathProvider.GetFile(staticCssEditorCss).Open())
{
var styleFormats = formatter.CreateStyleFormats(stream);
dictionary["style_formats"] = styleFormats;
}
}
}
}</pre>
<p>content_css property is responsible for styling the editor whereas style_formats is responsible for populating the styles dropdown.</p>
<p>Let's imagine we have two separate stylesheets:</p>
<ul>
<li>editor1 - which should be used in the "Foo" site</li>
</ul>
<pre class="brush:css;auto-links:false;toolbar:false" contenteditable="false">h2 {EditMenuName:Header 2;color:red;}
h3 {EditMenuName:Header 3;}
h2 {
color:red;
}</pre>
<ul>
<li>editor2 - which should be used in all other sites</li>
</ul>
<pre class="brush:css;auto-links:false;toolbar:false" contenteditable="false">h2 {EditMenuName:Alternative Header 2;color:blue;}
h3 {EditMenuName:Alternative Header 3;}
h4 {EditMenuName:Alternative Header 4;}
h2 {
color:blue;
}</pre>
<p>The end result would look as following:</p>
<p>&nbsp;<img src="https://bartoszsekula.com/image.axd?picture=/2017/08/tinymce_site1.png" alt="" /></p>
<p>And</p>
<p><img src="https://bartoszsekula.com/image.axd?picture=/2017/08/tinymce_site2.png" alt="" /></p>https://bartoszsekula.com/post/2017/08/11/customizing-tinymce-styles-dropdown-programaticallyFri, 11 Aug 2017 07:29:00 GMTBlog postUpgrading to #Episerver Commerce 11 – a developer’s memorandumhttp://devblog.gosso.se/?p=398
The upgrade went .... smooth! This is my notes.http://devblog.gosso.se/?p=398Thu, 10 Aug 2017 20:35:21 GMTBlog postUsing geolocation to improve market and language selectionhttps://brianweet.github.io/2017/08/10/redirects-geolocation.html
<p>Episerver has a <a href="/link/21e5ee4f950543a680a2786ba12c5943.aspx">well documented</a> way of determining which content language to use for displaying content to the user. One of the more powerful options is to enable the <code class="highlighter-rouge">pageUseBrowserLanguagePreferences</code> setting as it will allow Episerver to determine the preferred language by using the <a href="https://www.w3.org/International/questions/qa-lang-priorities">language preferences</a> from the browser. In general, these language preference headers are sent in the header of every request by the browser and should give the server an idea of which language the user would prefer to see content in.</p>
<p>In this blog I will take a look at how to use the users’ geolocation in order to make a better prediction about the language and market that is most useful for them. I will also discuss some options to improve on Episervers’ current browser language implementation.</p>
<h4 id="nuget-package">NuGet package</h4>
<p>If you want to something similar to what I’ve described in this post, please try out the NuGet packages referenced on the <a href="https://github.com/Geta/EPi.GeolocationTools">Geta GitHub repo</a>. <strong>Not available on the Episerver NuGet feed yet.</strong></p>
<h4 id="markets">Markets</h4>
<p>If you compare commerce projects to non-commerce projects, you could find that there are different rules for finding the correct language. Each market has its own available countries and languages. It could be that a language version is not available for that market. It could also be the other way around:</p>
<p class="centered-image">
<img src="/assets/geolocation/1.market-language-selector.gif" alt="Select market and language" />
</p>
<p>In the example above the language “English” is available for all markets. This means that, by knowing just the users’ preferred language, you are not able to determine the applicable market. Instead, we could try to retrieve the market based on the users’ location and pick the language that fits best.
In Epi Commerce you can configure countries and languages that apply to a market.</p>
<p class="centered-image">
<img src="/assets/geolocation/1.1.market-settings.png" alt="Market settings" />
</p>
<p>The idea is pretty simple, first find the market(s) for the users’ country, after that, retrieve the available browser languages and check if they are available on the market. This functionality is available in the NuGet package, like so:</p>
<div class="language-csharp highlighter-rouge"><pre class="highlight"><code><span class="k">public</span> <span class="k">class</span> <span class="nc">MarketExample</span> <span class="p">:</span> <span class="n">Controller</span>
<span class="p">{</span>
<span class="k">private</span> <span class="k">readonly</span> <span class="n">ICurrentMarket</span> <span class="n">_currentMarket</span><span class="p">;</span>
<span class="k">private</span> <span class="k">readonly</span> <span class="n">ICommerceGeolocationService</span> <span class="n">_commerceGeolocationService</span><span class="p">;</span>
<span class="k">public</span> <span class="nf">MarketExample</span><span class="p">(</span>
<span class="n">ICurrentMarket</span> <span class="n">currentMarket</span><span class="p">,</span>
<span class="n">ICommerceGeolocationService</span> <span class="n">commerceGeolocationService</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">_currentMarket</span> <span class="p">=</span> <span class="n">currentMarket</span><span class="p">;</span>
<span class="n">_commerceGeolocationService</span> <span class="p">=</span> <span class="n">commerceGeolocationService</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">public</span> <span class="k">void</span> <span class="nf">Index</span><span class="p">()</span>
<span class="p">{</span>
<span class="c1">// Get current market based on geolocation and browser preferences, can be null
</span> <span class="kt">var</span> <span class="p">(</span><span class="n">market</span><span class="p">,</span> <span class="n">language</span><span class="p">,</span> <span class="n">location</span><span class="p">)</span> <span class="p">=</span> <span class="n">_commerceGeolocationService</span><span class="p">.</span><span class="nf">GetMarket</span><span class="p">(</span><span class="n">Request</span><span class="p">);</span>
<span class="c1">// This one will be cached by storing the result in a cookie
</span> <span class="c1">// Will fall back to first enabled market or the default market
</span> <span class="kt">var</span> <span class="n">sameMarket</span> <span class="p">=</span> <span class="n">_currentMarket</span><span class="p">.</span><span class="nf">GetCurrentMarket</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<p>Or you could use the provided implementation of ICurrentMarket, CurrentMarketFromGeolocation, by configuring it in StructureMap:</p>
<div class="language-csharp highlighter-rouge"><pre class="highlight"><code> <span class="k">public</span> <span class="k">class</span> <span class="nc">StructureMapRegistry</span> <span class="p">:</span> <span class="n">Registry</span>
<span class="p">{</span>
<span class="k">public</span> <span class="nf">StructureMapRegistry</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">For</span><span class="p">&lt;</span><span class="n">ICurrentMarket</span><span class="p">&gt;().</span><span class="n">Use</span><span class="p">&lt;</span><span class="n">CurrentMarketFromGeolocation</span><span class="p">&gt;()}</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<p>The CurrentMarketFromGeolocation uses the ICommerceGeolocationService to retrieve the correct market, which is being cached by storing it in a cookie.</p>
<h4 id="language-branch">Language branch</h4>
<p>On a non-commerce site you could also make use of the users’ location in order to determine a language branch. If you find that enabling the <code class="highlighter-rouge">pageUseBrowserLanguagePreferences</code> setting doesn’t cut it, or you want to have a bit more control, you could use the <code class="highlighter-rouge">GeolocationService</code> found in the NuGet package <code class="highlighter-rouge">Geta.EPi.GeolocationTools</code>. It has a couple of methods which help you finding a languageBranch based on the users’ browser settings, their IP address or both. With this you could, for example, create a ActionFilterAttribute that automatically redirects a user based on their IP address and browser settings.</p>
<div class="language-csharp highlighter-rouge"><pre class="highlight"><code><span class="k">public</span> <span class="k">class</span> <span class="nc">RedirectExampleController</span> <span class="p">:</span> <span class="n">PageController</span><span class="p">&lt;</span><span class="n">StartPage</span><span class="p">&gt;</span>
<span class="p">{</span>
<span class="p">[</span><span class="n">RedirectBasedOnGeolocation</span><span class="p">]</span> <span class="c1">// This will check the users' location and redirect to the correct language branch
</span> <span class="k">public</span> <span class="n">ActionResult</span> <span class="nf">Index</span><span class="p">(</span><span class="n">StartPage</span> <span class="n">currentPage</span><span class="p">)</span>
<span class="p">{</span>
<span class="p">...</span>
<span class="k">public</span> <span class="k">class</span> <span class="nc">RedirectBasedOnGeolocationAttribute</span> <span class="p">:</span> <span class="n">ActionFilterAttribute</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">override</span> <span class="k">void</span> <span class="nf">OnActionExecuting</span><span class="p">(</span><span class="n">ActionExecutingContext</span> <span class="n">filterContext</span><span class="p">)</span>
<span class="p">{</span>
<span class="kt">var</span> <span class="n">geolocationService</span> <span class="p">=</span> <span class="n">ServiceLocator</span><span class="p">.</span><span class="n">Current</span><span class="p">.</span><span class="n">GetInstance</span><span class="p">&lt;</span><span class="n">IGeolocationService</span><span class="p">&gt;();</span>
<span class="kt">var</span> <span class="n">languageBranch</span> <span class="p">=</span> <span class="n">geolocationService</span><span class="p">.</span><span class="nf">GetLanguage</span><span class="p">(</span><span class="n">filterContext</span><span class="p">.</span><span class="n">RequestContext</span><span class="p">.</span><span class="n">HttpContext</span><span class="p">.</span><span class="n">Request</span><span class="p">);</span>
<span class="n">filterContext</span><span class="p">.</span><span class="n">Result</span> <span class="p">=</span> <span class="k">new</span> <span class="nf">RedirectResult</span><span class="p">(</span><span class="err">$</span><span class="s">"/{languageBranch.LanguageID}"</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<p>Example use of IGeolocationService</p>
<div class="language-csharp highlighter-rouge"><pre class="highlight"><code><span class="k">public</span> <span class="k">class</span> <span class="nc">LanguageBranchExample</span> <span class="p">:</span> <span class="n">Controller</span>
<span class="p">{</span>
<span class="k">private</span> <span class="k">readonly</span> <span class="n">IGeolocationService</span> <span class="n">_geolocationService</span><span class="p">;</span>
<span class="k">public</span> <span class="nf">LanguageBranchExample</span><span class="p">(</span><span class="n">IGeolocationService</span> <span class="n">geolocationService</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">_geolocationService</span> <span class="p">=</span> <span class="n">geolocationService</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">public</span> <span class="k">void</span> <span class="nf">Index</span><span class="p">()</span>
<span class="p">{</span>
<span class="c1">// Gets the language based on the users' location and their browser preferences, depending on what is available.
</span> <span class="c1">// 1. Language branch for both the users' country and their browser preferences
</span> <span class="c1">// 2. Language branch for users' browser preferences
</span> <span class="c1">// 3. Fallback language
</span> <span class="kt">var</span> <span class="n">languageBranch</span> <span class="p">=</span> <span class="n">_geolocationService</span><span class="p">.</span><span class="nf">GetLanguage</span><span class="p">(</span><span class="n">Request</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>
<h4 id="future-improvements">Future improvements</h4>
<p>As I was born and raised in the Netherlands, my native language is Dutch and not English. However, for most tech related devices/sites/content I prefer to use English. Both my phone and laptop are set to use English for example. Anyone who remembers those nicely translated .NET framework error messages?</p>
<p class="centered-image">
<img src="/assets/geolocation/2.translated-exception.png" alt="This is what translated exceptions look like" />
</p>
<p>
<strong>This is what Dutch error messages look like, even to me</strong>
</p>
<p>One of the future improvements for this NuGet package is to add a block which prompts the user to switch to a different language version or market. So instead of forcing a market/language we might want to ask the user for input first.</p>
<p>Another future improvement is to change the logic for matching prefered browser languages. The first version of this library will match browser languages by full locale, so for example: a user with <code class="highlighter-rouge">en-US</code> will not match with a language branch <code class="highlighter-rouge">en</code>. It is quite probable that a user would prefer <code class="highlighter-rouge">en</code> over <code class="highlighter-rouge">fr</code> if they have <code class="highlighter-rouge">en-US</code> set up as preferred browser language, and maybe even vice versa (on a sidenote, Episerver also only checks on full locale for the <code class="highlighter-rouge">pageUseBrowserLanguagePreferences</code> setting).</p>
<p class="centered-image">
<img src="https://m.popkey.co/20f09e/qrVG5.gif" alt="Nothing to see here" />
</p>
<blockquote>
<h4 id="tldr">tl;dr?</h4>
<ul>
<li>New NuGet packages to determine market and language based on geolocation and browser language preferences (not available yet)</li>
</ul>
</blockquote>
https://brianweet.github.io/2017/08/10/redirects-geolocation.htmlThu, 10 Aug 2017 12:00:00 GMTBlog postVI Meetup with Jeroen and Igorhttp://mariajemaria.net/vi-meetup-jeroen-and-igor
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I am super happy to welcome Jeroen Stemerdink and Igor Djerman to the sixth meetup of EpiDev Serbia!</p>
</div></div></div><div class="sharethis-buttons"><div class="sharethis-wrapper">
</div></div>
http://mariajemaria.net/vi-meetup-jeroen-and-igorWed, 09 Aug 2017 09:35:04 GMTBlog postEpiserver Takes Gartner Leaders Quadrant for Third Year Runninghttps://blog.wsol.com/episerver-takes-gartner-leaders-quadrant-for-third-year-running
For a third year in a row, Episerver has been recognized as a leader in WCM (web content management) by Gartner researchers as part of their Magic Quadrant.https://blog.wsol.com/episerver-takes-gartner-leaders-quadrant-for-third-year-runningTue, 08 Aug 2017 18:45:29 GMTBlog postPermanently drop prices of all productshttp://vimvq1987.com/?p=1085
<p>This is an unusual post &#8211; as I usually don&#8217;t post sample code &#8211; that should be the job of the documentation. However, I jumped upon this question http://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/8/global-price-increase/, and found it to be an interesting case to demo. It&#8217;s worth noting that as a customer, I&#8217;d like price drops, not the way around, so in &#8230; <a href="http://vimvq1987.com/2017/08/permanently-drop-prices-products/" class="more-link">Continue reading<span class="screen-reader-text"> "Permanently drop prices of all products"</span></a></p>
<p>The post <a rel="nofollow" href="http://vimvq1987.com/2017/08/permanently-drop-prices-products/">Permanently drop prices of all products</a> appeared first on <a rel="nofollow" href="http://vimvq1987.com">Quan Mai&#039;s blog</a>.</p>
http://vimvq1987.com/?p=1085Tue, 08 Aug 2017 07:45:08 GMTBlog postwhat is IPromotionService for?http://kkhan-episerver.blogspot.com/2017/08/what-is-ipromotionservice-for.html
We may be using IPromotionService already but the reference for&nbsp;IPromotionService is missing from the world.episerver.com documentation. This post is for reference only that how this can be used.<br />IPromotionService offers 3 methods as follows.<br /><br /><br /><ul><li>IList<ipricevalue> GetDiscountPriceList(IEnumerable<catalogkey> catalogKeys, MarketId marketId, Currency currency);</catalogkey></ipricevalue></li><li>IPriceValue GetDiscountPrice(CatalogKey catalogKey, MarketId marketId, Currency currency);</li><li>IPriceValue GetDiscountPrice(IPriceValue price, EntryContentBase entry, Currency currency, IMarket market);</li></ul><br /><br />Example usage:<br />private Money? GetDiscountPrice(IPriceValue defaultPrice, IMarket market, Currency currency)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (defaultPrice == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return null;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return _promotionService.GetDiscountPrice(defaultPrice.CatalogKey, market.MarketId, currency).UnitPrice;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; private Money? GetDiscountPrice(string variantCode, IMarket market, Currency currency)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return _promotionService.GetDiscountPrice(new CatalogKey(variantCode), market.MarketId, currency).UnitPrice;}<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br /><br /><br />http://kkhan-episerver.blogspot.com/2017/08/what-is-ipromotionservice-for.htmlMon, 07 Aug 2017 15:55:00 GMTBlog postTrouble loading Episerver Find UIhttps://world.episerver.com/blogs/Mari-Jorgensen/Dates/2017/8/trouble-loading-episerver-find-ui/
<p>If your Episerver Find UI fails to load with a “Error reading configurations” message, here is how you can fix it:</p> <p><a title="https://getadigital.com/blog/trouble-loading-find-ui/" href="https://getadigital.com/blog/trouble-loading-find-ui/">https://getadigital.com/blog/trouble-loading-find-ui/</a></p>https://world.episerver.com/blogs/Mari-Jorgensen/Dates/2017/8/trouble-loading-episerver-find-ui/Sun, 06 Aug 2017 17:07:59 GMTBlog postWatch out for orphan rows in Episerver Commerce databasehttp://vimvq1987.com/?p=1051
<p>One of the most important aspect of data storage is integrity, meaning that the accuracy and consistency is maintained throughout the life cycle. However, there are cases when the integrity can be compromised in certain tables. It is difficult (if not impossible) to enforce a constraint between those columns technically, because of the schema design. &#8230; <a href="http://vimvq1987.com/2017/08/watch-orphan-rows-episerver-commerce-database/" class="more-link">Continue reading<span class="screen-reader-text"> "Watch out for orphan rows in Episerver Commerce database"</span></a></p>
<p>The post <a rel="nofollow" href="http://vimvq1987.com/2017/08/watch-orphan-rows-episerver-commerce-database/">Watch out for orphan rows in Episerver Commerce database</a> appeared first on <a rel="nofollow" href="http://vimvq1987.com">Quan Mai&#039;s blog</a>.</p>
http://vimvq1987.com/?p=1051Sun, 06 Aug 2017 07:35:17 GMTBlog postAdding dynamic HTML to property templates in EPiServerhttps://stefanolsen.com/posts/adding-dynamic-html-to-property-templates-in-episerver/
When developing websites, sometimes adding extra attributes to certain HTML tags is needed. This is about how to do that dynamically on EPiServer properties, extending the Display Templates.https://stefanolsen.com/posts/adding-dynamic-html-to-property-templates-in-episerver/Sat, 05 Aug 2017 14:00:00 GMTBlog postSynchronize Episerver according to your ClaimsIdentity during Authenticationhttp://fellow.aagaardrasmussen.dk/?p=514
Well-known built-in Identity classes, such as GenericPrincipal and WindowsPrincipal, has been supported for ages in Episerver CMS. .NET&#8217;s support around claims were introduced in .NET4.5, to support claims based authentication into the framework, in the form of ClaimsIdentity and ClaimsPrincipal. Episerver of course quickly adopted this way of dealing with external identities and has over time supported both Windows Identity<br /><br /><a class="more-link" href="http://fellow.aagaardrasmussen.dk/2017/08/04/synchronize-episerver-according-to-your-claimsidentity-during-authentication/">Read More</a>http://fellow.aagaardrasmussen.dk/?p=514Fri, 04 Aug 2017 15:39:27 GMTBlog postEpiserver Commerce commandTimeout configurationhttp://vimvq1987.com/?p=1079
<p>We at Episerver takes performance seriously &#8211; as one of the feature that constantly monitored and fine-tuned. This is especially true for database accesses, as they are usually the bottlenecks of the system (accessing databases are I/O operations and in most of the cases it&#8217;s much more expensive than reading/writing to memory, or even some &#8230; <a href="http://vimvq1987.com/2017/08/episerver-commerce-commandtimeout-configuration/" class="more-link">Continue reading<span class="screen-reader-text"> "Episerver Commerce commandTimeout configuration"</span></a></p>
<p>The post <a rel="nofollow" href="http://vimvq1987.com/2017/08/episerver-commerce-commandtimeout-configuration/">Episerver Commerce commandTimeout configuration</a> appeared first on <a rel="nofollow" href="http://vimvq1987.com">Quan Mai&#039;s blog</a>.</p>
http://vimvq1987.com/?p=1079Fri, 04 Aug 2017 08:33:08 GMTBlog postCommerce 11 first lookhttps://world.episerver.com/blogs/K-Khan-/Dates/2017/8/commerce-11-first-look/
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ul>
<li>Performance improvements for websites with a large number of promotions/campaigns while loading order totals and redemption numbers.</li>
<li>Price caching is not affected anymore by disabling CatalogCache configuration.</li>
<li>Simplified price selection if developers want to change the way prices with minimum amounts are returned without implementing the entire IPriceService interface.</li>
<li>Better loading of large of promotions/campaigns in the Marketing UI.</li>
<li>ProcessPayment Method of IPayment Plug In is returning PaymentProcessingResult with properties IsSuccessful, Message, and RedirectUrl.</li>
<li>ApplicationId has not required anymore in API.&nbsp;IApplicationContext will return only properties HasContentModelTypes(Indicates whether the current application has the IContent model types for catalog content available) and&nbsp;DisableVersionSync(Indicates whether the version sync is disabled.)</li>
<li>Merchandisers can sort items within a category in Catalog UI.<br /><img src="/link/8b50ecbe8b65470fb778ad77c5c2f81f.aspx" alt="Image sort.JPG" /><br />When in Sort Mode,<br />-Regular toolbar buttons will be disabled and cut/copy/paste option will disappear.<br />-You cannot sort the View products view by column headers.<br />-Sorting is for products only<br />-Once you enable Sort mode, it remains enabled in other categories until you disable it.</li>
<li>As we expect, all these fields are now based on Discounted Price rather Extened Price<br />IOrderGroupCalculator.GetSubTotal<br />DefaultOrderGroupCalculator.GetSubTotal<br />DefaultOrderGroupCalculator.CalculateSubTotal<br />IOrderFormCalculator.GetSubTotal<br />DefaultOrderFormCalculator.GetSubTotal<br />DefaultOrderFormCalculator.CalculateSubTotal<br />IShippingCalculator.GetShippingItemsTotal<br />DefaultShippingCalculator.GetShippingItemsTotal<br />DefaultShippingCalculator.CalculateShippingItemsTotal</li>
</ul>
<p>Related Topic:</p>
<ul>
<li><a href="/link/0a054ab57f0b4cd4bf3324f0ae6e0850.aspx">Commerce 11 release</a></li>
</ul>
</body>
</html>https://world.episerver.com/blogs/K-Khan-/Dates/2017/8/commerce-11-first-look/Thu, 03 Aug 2017 10:44:30 GMTBlog post