Quantcast
Channel: Using Optimizely Platforms
Viewing all 8020 articles
Browse latest View live

Connect for Microsoft Dynamics CRM - Error Authenticating

$
0
0

Hi,

We have the latest version 4.2 of the following package installed on a project which sits within DXC EPiServer.MarketingAutomationIntegration.MSDynamics

However our client is unable to connect to their CRM instance using the admin tool

I am assured that the credentials inputted are correct.

Is there any other configuration our client should be aware of? Such as for example permissions neccessary for the CRM user they are using to connect.

The EPiServer user guide linked from this page is no longer online: https://world.episerver.com/documentation/developer-guides/marketing-automation-connectors/connect-for-ms-dynamics-crm/

Thanks in advance!

 


Content Delivery API: customize returned data for blocks in content areas

$
0
0

Hi,

The following article in the official documentation explains how to customize the API to change the data returned to clients: https://world.episerver.com/documentation/developer-guides/content-delivery-api/how-to-customize-data-returned-to-clients/

We have followed the instructions in the article, and are able to change the returned data for pages and blocks when they are the content being requested through the API, e.g. "/api/episerver/v2.0/content/<page or block identifier>". The same goes for using friendly URLs for pages, e.g. "/path/to/page".

However, we have not found a way to change the data returned for blocks that are contained in a content area (either in a page or in a block). Does anyone have any tips for how we can go about doing this?

- Thomas

Always provide best possible item price from combination of discounts

$
0
0

Hi

Say I have the following active discount types:

Line item discounts

  1. Buy Products for Discount on All Selections

    • Buy at least item: 1
    • From entries: Product A
    • At the follwing discount: 10 % off
  2. Buy Products for Discount on All Selections

    • Buy at least item: 1
    • From entries: Product B
    • At the follwing discount: 25 % off
  3. Buy Products for Discount on All Selections

    • Buy at least item: 1
    • From entries: Product C
    • At the follwing discount: 30 % off

With one of each products the cart now looks something like this:

ProductQuantityProduct placed pricePercentage off and saved amountProduct discount priceProduct Total
Product A176910 % - 76,9692,1692,1
Product B1139925 % - 349,751049,251049,25
Product C199930 % - 299,70699,30699,30

I also have another discount which gives 20 % off the entire order if the spent amount is more than 2000 including VAT:

Order discounts

  1. Spend for Discount on Order

    • Spend at least: 2000 (incl. VAT)
    • Get the follwing discount: 20 % off

Because I always want to provide the best (lowest) possible price I want the 10 % line item discount to be replaced with a 20 % off that item. The products which get 25 % and 30 % off should remain as their discounts are better than the 20 % provided by the order campaign.

I have tried a few different setups, but I am not able to fully acheive what I want:

  • If i leave the discounts as explained above and let the order discount have lower priority than the line item discounts, the order discount takes another 20 % off all the discounted products and any other products in the cart.
            Money orderDiscountTotal = _orderGroupCalculator.GetOrderDiscountTotal(cart);

 This is as expected as it returns the sum of all line items OrderDiscountValue, but it is not what I want.

  • If provide a line item discount of 20 % when spent amount is more than 2000 (incl. VAT) another 20 % is taken off all products. Even previously discounted ones. I have tried playing around with sorting order and exclusion rules, but no luck.
  • I have also tried finding the entries related to a given promotion, and checking the if the EntryDiscountValue is smaller than OrderDiscountValue.

If I do that, and set the EntryDiscountValue = OrderDiscountValue I sort of get what I want, but I'm unsure how this will affect any other cart totals retrievals down the line fx. when I create summary for order email etc.

Rough code from trying that out:

            foreach (ILineItem affectedLineItem in affectedLineItems)
            {
                var entryDiscountValue = affectedLineItem.GetEntryDiscountValue();
                var orderDiscountValue = affectedLineItem.GetOrderDiscountValue();
                if (entryDiscountValue < orderDiscountValue)
                {
                    decimal percentage = fulfilledOrderRewardDescriptions.FirstOrDefault().Percentage;
                    var result = affectedLineItem.PlacedPrice - (affectedLineItem.PlacedPrice - (affectedLineItem.PlacedPrice * percentage / 100));
                    cart.GetFirstForm().GetAllLineItems().FirstOrDefault(x => x.Code == affectedLineItem.Code).SetEntryDiscountValue(result);
                    _orderRepository.Save(cart);
                }
            }

Has anyone had to implement something similar to my use case? Or perhaps someone can point me towards are proper approach?

Stuck on login page in Quicksilver on Azure

$
0
0

Hi!
I am trying to deploy Quicksilver on azure. All was good until first run after deploy.

I am stuck on login page. Default credentials do not work.
The adress bar shows adress : xxx.azurewebsites.net/Login?ReturnUrl=%2Fepiserver%2FCommerce%2FMigrate

Does that mean I am stuck on migrate and some other error is messing the migrate process?

I have tried to set  <allow users="*"/> in web.config but that does nothing.

Triggering Alloy's ErrorHandlingContentRenderer

$
0
0

Hello,

I was reviewing Alloy's error handling features and was trying to trigger the "nice" error alert, the partial view TemplateError.cshtml, that should be rendered in the body amongst other blocks instead of a server error (YSOD) when an exception is encountered rendering a block. However, I could not actually get this view to show up when forcing a few exceptions here and there, and I need some help.

I first started with a "block killer" by throwing an exception in the Jumbotron model on a property's get method. I then tried to throw an exception in the ContactBlock controller while it's creating its new ViewModel. My poison of choice was NullReferenceException which I confirmed is listed in ErrorHandlingContentRenderer. I would have expected either of these "block level" exceptions to have been caught and the TemplateError alert shown.

Maybe I'm just too tired and I'm throwing these wrong somehow, lol?, or I don't really follow how this particular error handling feature is supposed to work. Could you please let me know if I'm just looking at it the wrong way, are you able to trigger the error and if so can you show me how?

Thanks for any help :)

Unit testing in Episerver

$
0
0

Hello everyone :)

I am totally a beginner to Episerver and starting our first project with Episerver at the moment. We would like to start writing unit tests for our project, but I am feeling a bit lost now with the setup and starting. I have been reading blogs and articles about unit testing in Episerver, but don't really know how to start. At the moment I have a solution in Visual studio and below that my project and then MSTest project. I have also added the Moq framework to my project. Should I have the unit tests as a project below my solution or inside my project directly?

My first question is what kind of initialization I would need for my unit tests? And what are the services I need to mock? In the first phase I will just create unit tests for validation of some models we have and also for some content reference areas (where you can only add spesific blocks) checking they accept only those.

And also what testing framework would u recommend the best for Episerver? I installed MSTest as I said, but was also considering Nunit ja xunit.

Thanks in advance :)

Regards,
Jenni

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

Catalog editing not showing data for selected product.

$
0
0

I have an issue with Commerce Catalog edit mode sometimes showing field values from the previously selected product. The breadcrumb is always correct, however the Display Name is that of the previously selected product.

A browser refresh seems to force loading data from the selected product.

My versions are the following
EPiServer.Commerce" version="11.8.3"
EPiServer.Commerce.UI" version="11.8.3"
EPiServer.Commerce.UI.ManagerIntegration" version="11.8.3"

Any idea what might be happening here?


Can someone explain why I can't search on the "Ancestors&&String" property?

$
0
0

So I have a simple method that uses a "dummy"-interface to get the "Ancestors" name so the underlaying FInd API can target the correct property, like this ->

    public interface ITracable
    {
        string[] Ancestors { get; set; }
        string CreatedBy { get; set; }    
    }

    mySearchClient.Search<IContent>().Filter(x => ((ITraceable)x).Ancestors.Match("100"))...

But it refuses to return results based on the search on that property. The document in Find looks like this (excerpt) ->

"CreatedBy$$string": "andre","Ancestors$$string": ["102486","102485","102481","55","1"
    ],

But with the same "Dummy interface" method I can target the "CreatedBy" property and I get search results. How can I correctly target the "Ancestors&&string" property?
Thanks for pointing out what I do wrong!

How to translate groupnames with spaces?

$
0
0

How do i translate my groupname here?

[Display(Name = "Body", GroupName = "Main Body", Order = 400)]
		public virtual XhtmlString Content{ get; set; }

I cant have spaces in my xml like this:

<groups><Main Body> Content</Main Body></groups>

Is there a solution to this?

$$epiforms is not defined when using Form in footer

$
0
0
@* ... *@ @Html.Raw(Html.RequiredClientResources("Header"))

I get this javascript error when adding a EPiServer Forms form to the footer. I guess it has to do with something not loading in the correct order but I can not figure it out.

My Layout.cshtml has the following simplified layout:


    @* ... *@ 
    @Html.Raw(Html.RequiredClientResources("Header")) 
    @Html.RenderEPiServerQuickNavigator();
    @Html.FullRefreshPropertiesMetaData();
    @Html.RenderPartial("Header", Model); 
    @RenderBody();
    @Html.RenderPartial("Footer", Model); 
    @Html.Raw(Html.RequiredClientResources("Footer"));


And the footer is containing a regular ContentArea with a Form in it.

Is it some obvious error here? Or how should the correct loading order be?

Where did the "to view mode" globe icon link go in the new UI?

$
0
0

We used this link all the time to view the current page outside of the CMS. Where did it go? If it was taken away, please add it back in the next update. This link was vital.

Custom dojo utility

$
0
0

Hi,

There was a problem creating a custom editor description using the dojo utility.

I want users to be able to press Enter in the text box to perform a search. But the problem is that the dialog box closes first

OnSubmit event Obtained when the view is edited on the page.

How can I prevent the dialog from closing?

tks!

Show internal links as friendly URL in link check job

$
0
0

The link check tool, is useless when the internal links are presented as as "~/link/a28ef1b8a7864ceda237705b1923d5ac.aspx" as this doesn’t give the editor a clue to what link that need to be fixed.

 The only reason it’s an internal link is that Epi, even if I add it as an external link, rewrites it to an internal link.

Bug in using WebAPI and Tracking

$
0
0

I'm using episerver find and unified search, when I use tracking on Web API to search I get the following error:

Object reference not set to an instance of an object.

at EPiServer.Find.TrackContext..ctor()
at EPiServer.Find.SearchExtensions.GetProjectedResult[TResult](ISearch`1 search, SearchContext context)
at EPiServer.Find.SearchExtensions.GetResult(ITypeSearch`1 search, HitSpecification hitSpecification, Boolean filterForPublicSearch)
at Bendigo.Core.Services.SiteSearchService.Search(SearchResultsPage searchResultsPage, String keywords, Nullable`1 categoryId, Int32 page, Int32 pageSize, Boolean track).

as a note: I've seen the "https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2018/3/unified-search---statistics-tracking-results-in-error/" and this is not my case.

This is related to use WebAPI and Tracking.

Hint: Look at HttpContext.Current.Session in TrackContext and remember HttpContext.Current.Session is null with WebAPI


Calculating discounted price

$
0
0

Hi

How can you calculate the discounted prices for a diferent customer group/price group?

private IEnumerable<DiscountedEntry> GetDiscountedPrices(ContentReference contentLink, IMarket CurrentMarket, IBaseContext context)
{
var promotionEngine = container
.With<PromotionEngineContentLoader>(container.With(context)
.GetInstance<CustomPromotionEngineContentLoader>())
.GetInstance<IPromotionEngine>();

return promotionEngine.GetDiscountPrices(
new[] { contentLink },
CurrentMarket,
CurrentMarket.DefaultCurrency,
referenceConverter,
lineItemCalculator);
}

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 change order of slices in powerslice filter dropdown?

$
0
0

I implemented powerslice and added some basic slices, but I cant seem to control in what order the slices appear in the dropdown. Implementing the "Order" property on each slice appears to have no affect. Is there another way to order them, and what is this property supposed to do?

DDS cache issue

$
0
0

Hi,

We sync certain user information during the login phase, and we do this based on the last sync date which is stored in the DDS. But upon checking the SQL Profiler, I can see a SQL call being called many times to look at the last sync date from the DDS. I was expecting this to be cached and hence only trigger the SQL once and then look into the cache for subsequent requets. We have a standard implementation for this in many of our projects and have never faced an issue before, but this issue is happening in the DXC environment, is there any setting or configuration that we can check to make sure the DDS cache is being populated.

Setting up OWIN with Episerver AspNetIdentity

Viewing all 8020 articles
Browse latest View live