Quantcast
Channel: Optimizely Search & Navigation
Viewing all 6894 articles
Browse latest View live

Inconsistent results with FilterForVisitor()

$
0
0

Hello,

We have been using the same code for many months to search for products in our catalog. Recently though we started having issues where the same search query would produce different results. Sometimes the results are correct, but a lot of the time they are wrong as the results do not include products that should be there. This happens both through our production and dev indexes. I went through our code and setup some tests and found out that FilterForVisitor() was causing the issues. Once I took that out, the results became consistent, but we need this because, as I have read, it filters out unpublished products.

I am not sure what might have changed in our environments to cause FilterForVisitor() to stop working, but any guidance would be highly appreaciated.

Thanks


Prevent shipping promotion from excluding other shipping promotions. (Multiple shipping methods)

$
0
0

Hey,

What's the best way, if possible, to have multiple shipping promotions be applied to different shipping methods?

In my case, the customer wants ShippingMethod1 to be free if order value is greater than 5.000 and ShippingMethod2 be free if order value is greater than 10.000.
But it seems that the customer is ever only eligible for one of the promotions? If the order value is 15.000, only the second promotion is returned as a RewardDescription whereas i want both alternatives to be free if the total amount exceeds 10k. 

Are shipping level promotions always excluded in full and is there a way to circumvent this?

How to update Available languages on CatalogContent?

$
0
0

Hi guys,

trying to programatically to update the Available languages for Catalog Content in a Sched.Job.

I have added a new Market and also the language in CMS (Admin -> Manage Website languages)

The Market is es-PA = Panama.

My code
var cloneCatalogCatalogLanguages = cloneCatalog.Property.Get("CatalogLanguages");
(cloneCatalogCatalogLanguages .Value as ItemCollection<string>).Add("es-PA"); 
cloneCatalogCatalogLanguages .Property.Set("CatalogLanguages", dd );
repository.Save(cloneCatalogCatalogLanguages , SaveAction.Publish);

When i go to the Catalog ( cms/Commerce/Catalog)

the Panama language is not checked and the page is not published???
What am i doing wrong?

NullReferenceException in OrderFormPriceMatrix

$
0
0

Hi,

I have a Software catalog and a Training catalog in Commerce. If I try to apply a coupon code on an order that contains a Training catalog product, I get a NullReference error in the internal OrderFormPriceMatrix.CalculateAndCommit method. It's not easy to debug because it's all internal EPi code but I found out that the error occurs on this code line:

IEnumerable<PriceEntry> enumerable = item.DiscountRange();

The item variable is NULL because the ExtractEntities method in OrderFormMatrix class returns NULL. Any idea why this is happening?

And to make it even more mysterious: the problem does NOT occur if my order only contains Software catalog products. Coupon codes are working as expected in that case:-)

MY STACKTRACE:

at EPiServer.Commerce.Marketing.OrderFormPriceMatrix.CalculateAndCommit(AffectedEntries item, Func`3 apply)
at EPiServer.Commerce.Marketing.OrderRewardApplicator.ApplyDiscount(AffectedOrder item, Decimal discountAmount, PromotionProcessorContext processorContext)
at EPiServer.Commerce.Marketing.RewardApplicatorBase`1.<>c__DisplayClass1_0.<Apply>b__0(TAffectedObject item)
at EPiServer.Commerce.Marketing.RewardApplicatorBase`1.ForEach(Func`2 apply, IEnumerable`1 affectedItems)
at EPiServer.Commerce.Marketing.RewardApplicatorBase`1.Apply(RewardDescription reward, RedemptionDescription redemption, PromotionProcessorContext processorContext)
at EPiServer.Commerce.Marketing.RewardApplicatorBase`1.Apply(RewardDescription reward, Int32 remainingRedemptions, PromotionProcessorContext processorContext)
at EPiServer.Commerce.Marketing.PromotionEngine.ApplyReward(RewardDescription rewardDescription, PromotionFilterContext promotionFilteringResult, PromotionExclusionHandler exclusionHandler, PromotionData promotion, PromotionProcessorContext processorContext)
at EPiServer.Commerce.Marketing.PromotionEngine.Run(IOrderGroup orderGroup, PromotionEngineSettings settings)
at EPiServer.Commerce.Order.IOrderGroupExtensions.ApplyDiscounts(IOrderGroup orderGroup, IPromotionEngine promotionEngine, PromotionEngineSettings settings)
at EPiServer.Commerce.Order.IOrderGroupExtensions.ApplyDiscounts(IOrderGroup orderGroup)
at Mediachase.Commerce.Workflow.Activities.CalculateDiscountsActivity.Execute(ActivityExecutionContext executionContext)
at Mediachase.Commerce.WorkflowCompatibility.Activity.Execute()
at Mediachase.Commerce.Engine.ActivityFlowRunner.<>c__DisplayClass15_0`1.<Do>b__0()
at Mediachase.Commerce.Engine.ActivityFlowRunner.Execute()
at Mediachase.Commerce.Engine.ExecutionManager.ExecuteActivityFlow(String name, ActivityFlowContext context)

Reverse Proxy - Route traffic to external site links

$
0
0

Hi,

I'm looking for a solution to add a reverse proxy in place to route traffic to external links and use the domain URL as it's. 

This is feasible as mentioned in the following links https://ruslany.net/2014/05/using-azure-web-site-as-a-reverse-proxy/ and https://world.episerver.com/blogs/david-buo/dates/2017/11/support-for-applicationhost-transforms-in-dxc-service/
I've made the changes as said in these links, but it doesn't seems to be working. My changes are below

added applicationHost.xdt file in site folder as below
        <?xml version="1.0"?>
        <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
       <system.webServer>
       <proxy xdt:Transform="InsertIfMissing" enabled="true" preserveHostHeader="false" reverseRewriteHostInResponseHeaders="false" />
       </system.webServer>
       </configuration>

     2. added rewrite rule in config file 

        <rule name="Proxy" stopProcessing="true">
       <match url="^/xyz?(/)?$" />
       <action type="Rewrite" url="https://www.google.com" />
       </rule> 

the above still returns 404 error for http://domainname.com/xyz/, i tried adding route ignore as said in the first link but still no luck. i.e., routes.IgnoreRoute("xyz/"); in global.asax.cs file. 

I'm not sure if i'm missing anything. this is very urgent requirement to deliver asap. 

Any help is much appreciated.

Thanks,

Suresh

Possible RobotsTxt Add-on

$
0
0

Hi,

Please could you help me to resolve an issue in Possible RobotsTxtHandler. 

I've installed this add-on in Episerver DXC vesion. Accessing this add-on in CMS is throwing error - 403 forbidden error. "You don't have permission to view this directory or this page" 

The add-on works fine in my local development environment but this is an issue only in app service from Azure environments. 

Any help is much appreciated. 

Thanks,

Suresh

Filter Visitor Group under Personalize Menu- Content Editor.

$
0
0

Hi All, Need your thoughts on the scenario here. EPI populates a set of available visitor groups under the Personalize Menu in the Content Editor. what i'm looking to do is to filter the visitor group based on my input. Any help would be really appreciated.

on my input - the question can be rephased as i have to filter the visitorgroup based on the site.

I have added a comment how this can be achieved.

There is no contentType registered for: EPiServer.Commerce.Reporting.Order.CommerceReportingFolder

$
0
0

When starting CommerceManager locally, I am getting the following error:

There is no contentType registered for: EPiServer.Commerce.Reporting.Order.CommerceReportingFolder

version="12.15.1" targetFramework="net462"

Please help... What am I doing wrong?

Stack Trace: 

[NotSupportedException: There is no contentType registered for: EPiServer.Commerce.Reporting.Order.CommerceReportingFolder]
   EPiServer.Core.Internal.DefaultContentRepository.GetDefault(ContentReference parentLink, CultureInfo language) +215
   EPiServer.Core.Internal.DefaultContentRepository.GetDefault(ContentReference parentLink) +62
   EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule.CreateCommerceReportingFolder(InitializationEngine context) +152
   EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule.Initialize(InitializationEngine context) +47
   EPiServer.Framework.Initialization.Internal.<>c__DisplayClass2_0.<Initialize>b__0() +19
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +52
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +179
[InitializationException: Initialize action failed for Initialize on class EPiServer.Commerce.Reporting.Initialization.ReportingInitializationModule, EPiServer.Commerce.Reporting, Version=12.15.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +492
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +153
   EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
   EPiServer.Framework.Initialization.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e) +9
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +442
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +44
   ASP.global_asax..ctor() +57
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +122
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +239
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +85
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1173
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +130
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +21
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +59
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +148
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +188

Convert Blocks

$
0
0

Please could we have a 'Convert Blocks' feature, that does exactly the same as 'Convert Pages' but for Blocks.

Currently, if you refactor a block type in code and rename it to something else, the existing blocks are effectively lost and will need to be recreated using the new block type.

This could probably be done directly in the DB but as there is already a feature that does this for pages it makes sense to extend this functionality to blocks.

Upgrading Commerce: Migration failure on Serializable Cart. Upgrading from version 11.2.6 to version 13.3.1

$
0
0

The migration seems to be failing when trying to migrate the carts over to the new version.

3:31:05 PM: Completed migration step: Migrates existing serializable carts.

3:31:05 PM: Failed to migrate existing serializable carts: System.NullReferenceException: Object reference not set to an instance of an object. at EPiServer.Commerce.Serialization.Json.HashTableJsonConverter.ReadHashtableItem(JsonReader reader, Hashtable hashTable, JsonSerializer serializer) at EPiServer.Commerce.Serialization.Json.HashTableJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at EPiServer.Commerce.Order.Internal.DataAccess.SerializableCartDB.CreateCarts(DataTable cartData) at EPiServer.Commerce.Order.Internal.DataAccess.SerializableCartDB.FindCarts(CartFilter cartFilter) at EPiServer.Commerce.Internal.Migration.Steps.MigrateExistingSerializableCartsStep.Execute(IProgressMessenger progressMessenger)

3:31:05 PM: Start migrating serializable carts...

3:31:05 PM: Starting migration step: Migrates existing serializable carts.

Has anyone had an issue like this? Is there any way to get more details on this error?

"Miscellaneous" Data Content Types?

$
0
0

I'm trying to determine the best approach for storing "miscellaneous" data for a website. The use case is we'd like to store "Store Locations" which are not represented by pages, but they will all be shown on a page as a list. PageData or BlockData do not seem like good candidates because these records will not represent pages or blocks.

We do want content authors to be able to create/read/update/delete these store location records.

What is the best approach for creating this type of data structure, manage records via the CMS, and use the built in CMS APIs to read data?

Thanks!

TinyMCE code plugin: Is it possible to display the special characters as characters and not the entity number when viewing source code?

$
0
0

Hi,

When we upgraded to EPi11 from EPi10 the source code view using the "code" plugin started to display html entity number instead of the actual characters for special characters. Is it possible to have the source code view display the characters again and not the html entity number? 

/Tony

A lovely cryptic message when publishing content "Culture is not supported. Parameter name: name h is an invalid culture identifier"

$
0
0

h is a veeery strange culture identifier, so the error seems legit.

After some time debugging i came to realise that this is yet another issue caused by having a lot of languages (Our instance has 125 enabled epi languages)

Here is the stacktrace:

at System.Globalization.CultureInfo.GetCultureInfo(String name)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.ReadCatalogProperties(DataTable table, Dictionary`2 contentMap)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.CreateVersions(IList`1 contentLinks)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.ConstructContent(IList`1 contentLinks, Func`3 createContentFunc)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.LoadSpecificContentVersions(IList`1 contentVersions)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
at EPiServer.Core.ContentProvider.GetContentBatch(IList`1 batch, ILanguageSelector selector, List`1& contents, Dictionary`2& contentMap)
at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Find.Commerce.CatalogEventIndexer.IndexContentInAllLanguages(IContent content)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contents, Action`1 indexAction, IDictionary`2 cachedReindexContentOnEventForType, Func`1 isReindexingContentOnUpdates)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contentLinks, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogNodeUpdated(CatalogContentUpdateEventArgs catalogContentUpdateEventArgs, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogEventUpdated(Object sender, EventNotificationEventArgs e)
at EPiServer.Events.Clients.Event.Raise(Guid raiserId, Object param, EventRaiseOption raiseOption)

After some sql profiling i found this sproc was called: "ecfVersion_ListByWorkIds", which in turn calls this sproc: "ecfVersionCatalog_ListByWorkIds"

When i run it i see the languages for our catalog comes out as "ar-ae;ar-bh;ar-dz;ar-eg;ar-iq;ar-jo;ar-kw;ar-lb;ar-ly;ar-ma;ar-om;ar-qa;ar-sa;ar-tn;ar-ye;az;bg;bg-bg;bs;cs-cz;da-dk;de-at;de-de;el-gr;en;en-ag;en-ai;en-au;en-bb;en-bm;en-bs;en-bz;en-ca;en-dm;en-gb;en-gd;en-gy;en-hk;en-id;en-ie;en-il;en-jm;en-kn;en-ky;en-lc;en-ms;en-my;en-nz;en-ph;en-pr;en-sg;en-si;en-tt;en-us;en-vc;en-vg;en-vi;en-za;es-419;es-ar;es-bo;es-cl;es-co;es-cr;es-do;es-ec;es-es;es-gt;es-hn;es-mx;es-ni;es-pa;es-pe;es-py;es-sv;es-uy;es-ve;fi-fi;fr-be;fr-ca;fr-fr;fr-gp;fr-ht;fr-mq;hi-in;hr-hr;hu-hu;h"

That last one is lovely, right? :)

As it turns out "ecfVersionCatalog_ListByWorkIds" calls a custom function called "fn_JoinCatalogLanguages()" that has this lovely nugget in it: "DECLARE @RetVal nvarchar(512)"

that means that a maximum of 512 characters of combined comma-delimited language codes can be returned, if it goes over then you get to see the if you are lucky to have the alst language code being complete or incomplete.

Could someone at epi please increase the retval of this function for the (admittedly few) of us that have a lot of languages.

Cheers

The model item passed into the dictionary but requires different model.

$
0
0

I am running into this on alot of projects and still haven't found why or what to do to fix it.

Whenver i use a block controller for my block, and pass a view model of the block that contains lets say a content area on the block.  When i go to my view and do a property for on the cotnent area that is on the block, it tries to pass the view model @model MyBlockViewModel  in as the property instead of the contentarea on MyBlockViewModel.  Why would the propertyfor or displayfor try to render my actual "Model" instead of the property contentarea on the model  PropertyFor(x=>x.CurrentBlock.ContentArea).  I am baffled.

A lovely cryptic message when publishing content "Culture is not supported. Parameter name: name h is an invalid culture identifier"

$
0
0

h is a veeery strange culture identifier, so the error seems legit.

After some time debugging i came to realise that this is yet another issue caused by having a lot of languages (Our instance has 125 enabled epi languages)

Here is the stacktrace:

at System.Globalization.CultureInfo.GetCultureInfo(String name)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.ReadCatalogProperties(DataTable table, Dictionary`2 contentMap)
at EPiServer.Commerce.Catalog.Provider.Construction.CatalogBuilder.CreateVersions(IList`1 contentLinks)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.ConstructContent(IList`1 contentLinks, Func`3 createContentFunc)
at EPiServer.Commerce.Catalog.Provider.CatalogContentLoader.LoadSpecificContentVersions(IList`1 contentVersions)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
at EPiServer.Commerce.Catalog.Provider.CatalogContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
at EPiServer.Core.ContentProvider.GetContentBatch(IList`1 batch, ILanguageSelector selector, List`1& contents, Dictionary`2& contentMap)
at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.GetItems(IEnumerable`1 contentLinks, LoaderOptions loaderOptions)
at EPiServer.Find.Commerce.CatalogEventIndexer.IndexContentInAllLanguages(IContent content)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contents, Action`1 indexAction, IDictionary`2 cachedReindexContentOnEventForType, Func`1 isReindexingContentOnUpdates)
at EPiServer.Find.Commerce.CatalogContentEventListener.IndexContentsIfNeeded(IEnumerable`1 contentLinks, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogNodeUpdated(CatalogContentUpdateEventArgs catalogContentUpdateEventArgs, Action`1 indexAction)
at EPiServer.Find.Commerce.CatalogContentEventListener.CatalogEventUpdated(Object sender, EventNotificationEventArgs e)
at EPiServer.Events.Clients.Event.Raise(Guid raiserId, Object param, EventRaiseOption raiseOption)

After some sql profiling i found this sproc was called: "ecfVersion_ListByWorkIds", which in turn calls this sproc: "ecfVersionCatalog_ListByWorkIds"

When i run it i see the languages for our catalog comes out as "ar-ae;ar-bh;ar-dz;ar-eg;ar-iq;ar-jo;ar-kw;ar-lb;ar-ly;ar-ma;ar-om;ar-qa;ar-sa;ar-tn;ar-ye;az;bg;bg-bg;bs;cs-cz;da-dk;de-at;de-de;el-gr;en;en-ag;en-ai;en-au;en-bb;en-bm;en-bs;en-bz;en-ca;en-dm;en-gb;en-gd;en-gy;en-hk;en-id;en-ie;en-il;en-jm;en-kn;en-ky;en-lc;en-ms;en-my;en-nz;en-ph;en-pr;en-sg;en-si;en-tt;en-us;en-vc;en-vg;en-vi;en-za;es-419;es-ar;es-bo;es-cl;es-co;es-cr;es-do;es-ec;es-es;es-gt;es-hn;es-mx;es-ni;es-pa;es-pe;es-py;es-sv;es-uy;es-ve;fi-fi;fr-be;fr-ca;fr-fr;fr-gp;fr-ht;fr-mq;hi-in;hr-hr;hu-hu;h"

That last one is lovely, right? :)

As it turns out "ecfVersionCatalog_ListByWorkIds" calls a custom function called "fn_JoinCatalogLanguages()" that has this lovely nugget in it: "DECLARE @RetVal nvarchar(512)"

that means that a maximum of 512 characters of combined comma-delimited language codes can be returned, if it goes over then you get to see the if you are lucky to have the alst language code being complete or incomplete.

Could someone at epi please increase the retval of this function for the (admittedly few) of us that have a lot of languages.

Cheers


Evaluate prices for specific customer or visitor groups

$
0
0

I have a need to provide specific customer or visitor groups to the promotion engine when calling Evaluate or GetDiscountedPrices.

The use case is pretty straight forward: a client wants to display two different price on their variant page:

  1. The actual price the customer has to pay for the variant.
  2. The member price that the customer would get if they were a member (hidden if they already are a member).

It must be supported that the displayed member price is applied through promotions as well as a direct price on the variant.

Export Bilingual xliff File

$
0
0

I am trying to update our translated web pages as our English website has some updates. These updates are minor (i.e. adding a sentence or deleting some words), so obviously, it won't make sense to send out the whole page to the translator again. The goal is to sift out the content that has been changed in the CMS and send that to our translators. What I need for the sifting process is a bilingual xliff that contains "not yet updated English content" which corresponds to the "translated content" in the CMS. This way, I can compare the bilingual xliff to the updated English xliff and get the content that has changed. At the same time, leveraging the old translation we have done before.

The existing features in Ektron do not support my need, and I believe this is a very common issue every localization specialist will run into. 

The bilingual xliff will make the translated content more scalable and more convenient for people to manage their translated website. 

DBLocalization Provider in read-only database

$
0
0

Good morning.

Have any of you successfully used the dblocalization provider in a readonly database mode.  i cannot get this to work in a geo replicated db or in dxc enviroment.  Any help would be greatly appreciated.

Error logging with Log4Net is not working in production.

$
0
0

In production environment metods like 'logger.Error("Some error message")' creating a 'EPiServerErrors.log' , but the message text is not written to. We are getting only empty files only. What can be the cause for this issue?. In our local host everything working fine.We are using Episerver version 11.Our configuration:

<?xml version="1.0" encoding="utf-8"?>
<log4net>
<!-- Reduce amount of debug logging -->
<logger name="EPiServer.Core.OptimisticCache" additivity="false">
<level value="Error" />
</logger>
<logger name="EPiServer.Core.ContentProvider" additivity="false">
<level value="Error" />
</logger>
<logger name="EPiServer.Data.Dynamic.Providers.DbDataStoreProvider" additivity="false">
<level value="Error" />
</logger>
<logger name="EPiServer.Data.Providers.SqlDatabaseHandler" additivity="false">
<level value="Error" />
</logger>
<logger name="EPiServer.Data.Providers.ConnectionContext" additivity="false">
<level value="Error" />
</logger>

<root>
<!--Be careful, setting this value to All, Debug or Info will affect performance.-->
<level value="Error"/>
<appender-ref ref="errorFileLogAppender"/>
</root>
<appender name="errorFileLogAppender" type="log4net.Appender.RollingFileAppender">
<!-- Consider moving the log files to a location outside the web application -->
<file value="App_Data\EPiServerErrors.log"/>
<encoding value="utf-8"/>
<staticLogFileName value="true"/>
<datePattern value=".yyyyMMdd.'log'"/>
<rollingStyle value="Date"/>
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
<appendToFile value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %level %logger: %message%n"/>
</layout>
</appender>
</log4net>

I have encountered errors when using RestApi and Code first

$
0
0

Error CS0103 The name 'query' does not exist in the current context. 
Error CS0103 The name 'First' does not exist in the current context. 
Error CS0103 The name 'query.First' does not exist in the current context.
Error CS0161 'PurchaseOrderService.GetAllProductstatusdetails()': 
Error CS1519 Invalid token '(' in class, struct, or interface member declaration
Error CS1519 Invalid token '(' in class, struct, or interface member declaration
Error CS1519 Invalid token 'return' in class, struct, or interface member declaration
Error CS1513 } expected

This is my Purchaseorderservices.cs page.

using QFT_POMS_SVC.Domain.POMS;
using System.Collections.Generic;
using System.Linq;

namespace QFT_POMS_SVC.Services.POMS
{
public class PurchaseOrderService : IPurchaseOrderService
{
ProductStatusEntities entities = new ProductStatusEntities();
private DBMapper _dbContext;
private Result _result;
private object query;

public PurchaseOrderService()
{
_dbContext = new DBMapper();
_result = new Result();
}
public IList<Distributor> GetAllDistributorsOp()
{
var query = from d in _dbContext.DistributorRepository select d;
return query.ToList();
}
public IList<PurchaseOrder> GetAllPOByDistributorIdOp(int DistributorId)
{
var query = from po in _dbContext.PurchaseOrderRepository
where po.DistributorId == DistributorId
select po;

return query.ToList();
}

public PurchaseOrder GetPODetailsOp(int PurchaseOrderId)
{
var query = from po in _dbContext.PurchaseOrderRepository
where po.Id == PurchaseOrderId
select po;

return query.First();
}

private void UpdatePurchaseOrderItems(int purchaseorderid, List<PurchaseOrderItem> items)
{
foreach (var item in items)
{
var _item = _dbContext.PurchaseOrderItemsRepository.Where(po => po.Id == item.Id).First();
_item.QtyReceived = item.QtyReceived;
_item.Received = item.Received;
_item.UnitCostReceived = item.UnitCostReceived;
_item.Discontinued = item.Discontinued;
}
_dbContext.SaveChanges();
}

public Result UpdatePurchaseOrderOp(PurchaseOrder po)
{
var _purchaseOrder = GetPODetailsOp(po.Id);
_purchaseOrder.deleted = po.deleted;
_purchaseOrder.InvoiceDate = po.InvoiceDate;
_purchaseOrder.InvoiceDueDate = po.InvoiceDueDate;
_purchaseOrder.InvoiceNumber = po.InvoiceNumber;
//_purchaseOrder.items.Clear();

//_purchaseOrder.items = po.items;
_purchaseOrder.PORcvdAmount = po.PORcvdAmount;

UpdatePurchaseOrderItems(po.Id, po.items);


_dbContext.SaveChanges();
return _result;
}

public List<ProductStatusEntities> GetAllProductstatusdetails()
{
var query = from orditem in _dbContext.OrderItemRepository
from p in _dbContext.ProductRepository
from dpm in _dbContext.DistributorProductMappingRepository
from pwi in _dbContext.ProductWarehouseInventoryRepository
where
p.ProductTypeId == orditem.ProductId &&
dpm.ProductId == pwi.ProductId &&
dpm.ProductId == orditem.ProductId &&
orditem.Order.OrderStatusId == 20
group new { orditem, p, dpm.Distributor, dpm, pwi } by new
{
orditem.ProductId,
orditem.OrderId,
p.Name,
p.ProductTypeId,
Column1 = dpm.Distributor.Name,
dpm.StockStatus,
dpm.UnitPrice,
pwi.StockQuantity,
Column2 = p.StockQuantity
} into g
select new
{
g.Key.OrderId,
g.Key.ProductId,
productname = g.Key.Name,
g.Key.UnitPrice,
Distributorname = g.Key.Column1,
orderquantity = (int?)g.Sum(p => p.orditem.Quantity),
TotalQuantity = (int?)g.Sum(p => p.pwi.StockQuantity + p.dpm.StockStatus + p.p.StockQuantity); }

return query.First();
}

}

Viewing all 6894 articles
Browse latest View live