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

Url to views for custom reports and admin plugins

$
0
0

Hello!

I am working on a hobby project that will add an admin plugin and a couple of cms reports. I plan to package it as a nuget package for others to use. Currently I am stuck on how to set the url for the view files (Razor) and where to place them in the project.

I have been looking at a couple projects on GitHub and I currently have this (simplified) file structure:

ProjectRoot
  Controllers
    MyPluginController.cs
  modules
    _protected
      MyProjectName
        Views
          MyPlugin
            Index.cshtml

My controller looks like this:

    [GuiPlugIn(
        Area = PlugInArea.AdminConfigMenu,
        UrlFromModuleFolder = "Views/MyPlugin/Index",
        DisplayName = "This is my plugin"
    )]
    public class MyPluginController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    }

To test my code I have set up the AlloyMvc site as a second project in the solution and set Alloy to depend on my project. My plugin is detected and shows up in the admin interface but the view is not found. (error message reports searched physical path as {pathToSolution}\{theAlloyMvcProjectName}\EPiServer\CMS\Admin\MyPlugin\Index)

The EPiServer documentation on custom reports specifies a url in a hardcoded way and adds a route in the global.asax file but that is not an option.

I hope for a solution that makes it easy to test while coding and that also will work when package as a nuget and installed by someone else. What do I need to configure and where?


Open site of particular language depending upon location

$
0
0


I have site with languages en-gb, en-za and master language en-us. However, I want en-gb as default language and en-gb should be opened when the site is opened from all countries other than Uk (en-gb) and South Africa (en-za); en-gb and en-za site should be opened only when they are browsed from the respective countries. Also, if the site is opened without entering language it should go to default language.

Commerce FindSearchProvider not using DXC App Settings

$
0
0

Hi Quan

An update on an issue I raised a few months ago

https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2019/3/dxc---commerce-config-files-/#202251

We are getting intermittent 401 error in Commerce Manager when doing Catalog search or Rebuild index, due to the FindSearchProvider reading the Find settings (expired dev index) from Mediachase.Search.config. This is inspite of the Find index settings defined in the DXC environment Application Settings.

I discovered that a restart of the CMS and Commerce Manager web apps resolves the issue however it regresses after any subsequent deployments.

We are using

EPiServer.Commerce 12.11.0

EPiServer.Commerce.FindSearchProvider 10.0.2

EPiServer.Find.Commerce 11.0.2

Do you have any insights as to why this is happening ?

Thanks

Going to Next article in News details page

$
0
0

Hi,

 In my website i've News sections, where in it contains News list page(list of all news artciles) and it navigates to details of each item on selecting particular news item.

Now in news details page i've feature of getting previous and Next news article.Currently redirection from news list to details view happens like 

<a href="@Url.ContentUrl(newsItem.ContentLink)">@newsItem.TitleLink</a> in news list page.Can any one help me in finding out efficient way to get Previous and next articles from particular news details page.

SavedAmount on PromotionInfromation is wrong?

$
0
0

I am having issues with getting the correct saved amount from PromotionInfromation. I have written some complicated code to get around it, but I would like to not have to use my workaround as it is fragile.

Here is my example:

I have an order with 2 percentage line item discounts and then 1 order level discount. When I run the engine and get the list of RewardDescriptions back I see the correct saved amounts for all three discounts, but when I get the list of PromotionInformation off the form the second line item discount appears to have the the first one included in the saved amount. In different cases the numbers get very complicated and dont reflect the same numbers from RewardDescriptions.

Here are the numbers from RewardDescriptions:

Line item discount 1 - 10.299% saved $19.26

Line item discount 2 - 8.2% saved $13.75

Order Level discount 3 - Saved $46.5

And now the numbers from PromotionInformations:

Line item discount 1 -  Saved $19.26

Line item discount 2 - Saved $33.01

Order Level discount 3 - Saved $46.5

I am running Epi Commerce 10.4

When tried to edit variant of one language in Commerce Manager, it asks to fill properties for all languages

$
0
0

I have an ecommerce site with multiple languages say A, B and C where A is the master language and is disabled now. When I add a variant in language B and try to enter In Stock quantity in Commerce Manager (Commerce Manager>Catalog Management>Warehouse inventory tab), it asks to fill all the required properties of variant for all languages, I have not added the variant for all languages though.

Updating to Episerver Commerce 13 (NodeContent Extensions)

$
0
0

Hi team,

I have updated my episerver commerce to 13.7.1 version and the NodeContentExtensions class is removed.

In my solution i have used GetCategories() method (from NodeContentExtensions). Can you please suggest me a alternative for this.

Thanks in Advance.

Finding products using properties on Products and Variants.

$
0
0

Hello!

I am wanting to search for products and variants in Episerver Find. I have inherited from ProductContent and VariationContent and created an index. I am able to pull back products using code like this:

var productSearch = SearchClient.Instance.Search<FoodserviceProduct>()
.FilterFacet("BrandFacet", x => x.Brand.Match("Acme"))

This returns results successfully. However, in addition to being able to search by properties on my ProductContent, I also need to be able to search on properties that are apart of the product variants (VariationContent).

Can someone please help me understand how to do that? In other words, if my Product looks like this:

*Product Name
*Brand

and that product has several variants underneath it with properties like this:

*Size
*Color

How do I construct my query so that I can search based on Brand and Color (for instance)?


Connection strings defined in Azure Portal are still not picked up

$
0
0

Hello

I did just now deploy an Alloy site to Azure (with version: ) and I still neeeded the appsetting to make it read from the portal instead of the config file.

With a release note for this bug (that I reported) it says that it could not be fixed without a breaking change, but that was in version 8 so there has been two breaking after that so I thought it had been fixed. (I also heard from another developer that it was the same in version 11).

https://world.episerver.com/documentation/Release-Notes/ReleaseNote/?releaseNoteId=122518

Is this still the case, that you need to use this appsettings, and will you fix so you won't use it?

I do not want to save passwords in the transformation file, instead use the config tab in Azure

Trigger scheduled job on all servers in DXC

$
0
0

I am working on a site where we have a scheduled job that generates a static 500 error page and saves it to the site root. In DXC, when we have multiple web servers, this job will only run on the specific server that the admin user has logged into, so it only generates the 500 error page on one of the servers. Our only options are to update all servers at the moment is to try to log in to each server by trial and error (opening a private window and checking the id in the ARRAffinity cookie) or to wait for the job to run on schedule.

does anyone know if there is a way to get a scheduled job to run on all servers in the dxc environment?

Thanks

Sam

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. 

Rebuild index Json error

$
0
0

Hi!

I have a clean Quicksilver local project installed. Just after migration step, when going to Commerce Manager I have the following error when rebuilding index:

2019-09-16 20:14:57,146 [17] ERROR Mediachase.Search.Extensions.BaseCatalogIndexBuilder: Failed to index catalog entry Womens Beauty Package(755) in Fashion. Exception: System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   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 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.<GetDocument>d__5.MoveNext() in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 89
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.OnCatalogEntryIndex(SearchDocument& document, CatalogEntryRow entry, String language) in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 64
   at Mediachase.Search.Extensions.BaseCatalogIndexBuilder.IndexCatalogEntryDto(IndexBuilder indexer, CatalogEntryRow entryRow, String defaultCurrency, String[] languages)
   at Mediachase.Search.Extensions.BaseCatalogIndexBuilder.<>c__DisplayClass16_3.<BuildIndex>b__0(CatalogEntryDto entryDto)
---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   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 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at EPiServer.Reference.Commerce.Shared.CatalogIndexer.RestIndexer.<GetDocument>d__5.MoveNext() in C:\Projects\2\quicksilverLOCAL2\Quicksilver-master\Sources\EPiServer.Reference.Commerce.Shared\CatalogIndexer\RestIndexer.cs:line 89<---

Steps taken to this point:

  1. Clone github Quicksilver repo
  2. Change databases names in web.config and in SetupDatabases.cmd.
  3. Build solution
  4. Run SetupDatabases.cmd.
  5. Change basePath in web.config (Site) to App_Data for the migration step to not bork up.
  6. Fire up the site, login with admin@example.com/store
  7. Wait for the migration to end. Migration successful
  8. Change basePath back to ../appdata (for search catalog path to be the same for manager and site).
  9. Open site go to mens to check if everything is ok. Looks good.
  10. Go to CommerceManager tab in CMS, go to Administration > Logs > SearchIndex
  11. Hit Rebuild index.
  12. Every product has this error. Products no longer visible on frontend /mens or /womens

Any suggestions?

Now what possibly could be wrong here?

I would want to put a breakpoint at that RestIndexer, but visual dosnt want to hit that breakpoint, with the symbols loaded.

Filter content by language

$
0
0

Hi Team,
I want to filter page by exiting languages . 

The below method always retrnng me null value. 

Is the any thing wrong with my query.

 public T GetPageData<T>() where T:PageData
        {
            return this.searchClient.Search<T>()
                .Filter(x => x.ExistingLanguages.Select(y => y.Name).MatchContained(z => z, "en"))
                .GetContentResult().Items.FirstOrDefault();
        }

I am using the latest verion of Find

 <package id="EPiServer.Find" version="13.0.5" targetFramework="net472" />
Regards
Phani

Delete all data in price table

$
0
0

Hello, how to delete all data from pricing programmatically ?
Thank you

Expired pages are still appearing in the search bar at the front end

$
0
0

Expired pages are still appearing in the search bar at the front end


Issue when using 'PropertyDictionaryMultiple' as a backing type for a block in Commerce

$
0
0

Hi,

I have created a Block which I am using on a Commerce Product Node and am running into issues when adding a property and setting the backing type to be 'PropertyDictionaryMultiple'.  The editor is not rendering correctly, I am just seeing a text input, rather than a collection of check boxes.

When I move the same property down to the Product, it is rendered as expected.

Example below

[BackingType(typeof(PropertyDictionaryMultiple))]
[Display(Name = "Connectors2", Order = 7)]
[CultureSpecific]
public virtual PropertyList<string> Connectors2 { get; set; }

I am using Commerce '13.6.0'.

Looking at other posts it seems that this was reported and fixed in commerce 12.

Thanks

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)

Episerver forms event handler client side or server side

Be able to filter out stopwords for all search not only MoreLike

$
0
0

I was struggeling with the search returning to much result when users wrote for example Episerver and SharePoint since 98% of the result was on the word "and".

After contact with support I learned that Episerver has choose to disable the elastic search feature stopwords (https://www.elastic.co/guide/en/elasticsearch/guide/current/stopwords.html) by default so all words are included in the index.

There exist a stopword function in the framework (http://world.episerver.com/documentation/Class-library/?documentId=find/8/7C04D56A) but that one can only be used for MoreLikeThis-query and I would like to be able to do that for all kinds of query, both unified one and typed one.

Expired pages are still appearing in the search bar at the front end

$
0
0

Expired pages are still appearing in the search bar at the front end

Viewing all 6894 articles
Browse latest View live