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

Support for the Webforms Editable="false" in MVC PropertyFor

$
0
0

It might be me that is not good at decompiling and googling but I can not seem to find how to use Editable="false" in PropertyFor.

The reason I want it is that we use CustomTag and CssClass and stuff like that and it does not seem to work with DisplayFor.

So, does anyone know if this is implemented or not in PropertyFor?


Make Episerver prioritize CMS pages over Commerce catalog-nodes

$
0
0

I'm currently working on a project that uses Episerver CMS and Commerce. We've run into a situation where we would like to show a regular CMS page on a url path that normally leads to a Commerce catalog node. At the moment, the commerce catalogs seems to have presedence over cms content.

Current behaviour: /new-york/pizza -> Would currently resolve a catalog node from EPI Commerce and render this according to our catalog controller.

However, we would like to create a Episerver CMS page with the same URL and show a regular standard page. Currently, when doing this the catalog content is rendered
and the CMS page is ignored.

Desired behaviour: /new-york/pizza -> CMS Page and commerce content exists at this path. But we want render the CMS page.

Is it possible at any place during the routing lifecycle to check if the url can resolve a CMS page and then do that instead of resolving the commerce content? Bascially ensure that if a CMS page exist at the url it has presedence over the commerce content.

Thanks in advance!

How to make a Reference field Searchable in the Contact List in Commerce Manager?

$
0
0

I have a case where the customer wants to be able to search the organization name and find contacts related to the organization. I.e. search for the text "TEST" in the column "Parent Organization". 

"Parent Organization" is a reference field to the organization so it is not searchable out-of-the-box like the other fields. Is it possible to make it searchable?

Support for the Webforms Editable="false" in MVC PropertyFor

$
0
0

It might be me that is not good at decompiling and googling but I can not seem to find how to use Editable="false" in PropertyFor.

The reason I want it is that we use CustomTag and CssClass and stuff like that and it does not seem to work with DisplayFor.

So, does anyone know if this is implemented or not in PropertyFor?

Mediachase VariantEntry

$
0
0

We use VariantEntry to gather variant data for a Sharepoint connector that gathers data and submits processed documents. I've been getting an error stating the VariantEntry datatype is obsolete, but I have not been able to find documentation on what replaces the entry datatype, so I'm not sure what to upgrade it to/replace it with. I'd rather figure this out sooner, rather than upgrade to a new version, and have it eliminated. Anyone familiar with this library, have any idea what I should modify this type to?

Exclude lineitems from order level promotion

$
0
0

Hi,

I've been looking around the docs aka DotPeek to try to understand if it's possible to exclude certain lineitems from an order level promotion.

The use case is that the customer would like to give let's say 10% discount on the order if you buy for at least 500 SEK. However, certain items have discounted prices in the price lists so they'd like to exclude them from the order total used for treshold evaluation and reward.

Is this at all possible, or do we need to use item level promo instead? It would get a little tricky though since we'd need to find a way for the exclusions mechanism to treat the promo as order level even though it isn't.

How to limit word count in XhtmlString property which displays in TinyMCE editor?

$
0
0

How to limit word count in XhtmlString property which displays in TinyMCE editor?

[Missing text '/headings/heading[@name='Information']/description' for 'English'

$
0
0

I am getting error [Missing text '/headings/heading[@name='Information']/description' for 'English'. I have code like below and when I try to enter data for Student, I get above error message, I can successfully save the data though.

[PropertyDefinitionTypePlugIn]
public class StudentProperty : PropertyListBase<TestimonialList>
{
}
public class Student
{
}

public class StudentBlock : BlockData
{
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<Student>))]
public virtual IList<Student> Students{ get; set; }
}


Property of list object in page is not hidden even when attributed as [Ignore].

$
0
0

Property of list object in page is not hidden even when attributed as [Ignore]. In the code below, Name is visible in editor as non-editable field.

 [PropertyDefinitionTypePlugIn]
public class StudentProperty : PropertyListBase<TestimonialList>
{

[Ignore]
public virtual XhtmlString Name { getset; }


}
public class Student
{
}

public class StudentBlock : BlockData
{
[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<Student>))]
public virtual IList<Student> Students{ get; set; }
}

Copy content from 1 cart to another?

$
0
0

I am trying to figure out what is the best way to copy content from cart A to a new cart B.
I have a requirement from the customer, that everytime a Dealer clicks Save.

The cart should be saved and a new cart, with new cart ID should be created but it should contain everything that the old cart contains.

So what is the best way to "clone" a cart in EPiCom 11?

 

Ignore descendants from pages with bool property "HideInSearch" = true

$
0
0

Hello,

I am new to Episerver Find, which I am implementing instead of SiteSeeker, for a customer.

The customer want to be able to choose some pages (with descendants) to not show in the search result. These pages could be of any page type or at any place in the hierarchy.
We are using a base page type that inherits from PageData, and all other page types inherit from that base page type. We will call this property "HideInSearch".

Is there a simple way to use this in a filter?

As I am new to Episerver Find I'm not totally sure how to do this.
I was thinking of to first do a search for all pages "HideInSearch" set to true, to get a list of id for these pages, then a filter like this:

.Filter(x => !x.MatchTypeHierarcy(typeof(BasePageType)) | !((BasePageType)x).Ancestors().In(idList))


But I'm not sure this is the best way?

Best Regards
Niklas

Legacy Cart to Serialized Cart Conversion - LineItem data is missing

$
0
0

Hello,

We are on Commerce 11.8.5 and trying to convert from legacy cart to Serialized Cart. After Updating the Code base from Cart Helper to ICart, ran the Legacy Cart Migration in CMS. Unfortuantely, the migration Job couldn't convert a lot of information and Most of the fields in JSON are null or Empty. LineItems in the JSON for all the carts are empty array and not sure if we missed any part in the migration process. 

Note: We extended our LineItem object with meta fields.

This is the part of the JSON:

"Forms": [
{
"OrderFormId": -2,
"AuthorizedPaymentTotal": 0,
"CapturedPaymentTotal": 0,
"HandlingTotal": 0,
"Name": "Default",
"Shipments": [
{
"ShipmentId": -2,
"ShippingMethodId": "a216eebe-e122-4344-a2b4-1978dcd52e91",
"ShippingMethodName": null,
"ShippingAddress": null,
"ShipmentTrackingNumber": "",
"OrderShipmentStatus": 1,
"PickListId": null,
"WarehouseCode": "",
"LineItems": [],

Please help me out.

Could not load type 'Mediachase.Commerce.Manager.Marketing.PromotionList'

$
0
0

Hi,

After upgrading to EpiServer Commerce v 13.3.1.0, I am seeing this error when I try to open the promotions in Commerce Manager:

Could not load type 'Mediachase.Commerce.Manager.Marketing.PromotionList'.

Source error:

Line 1:  <%@ Control Language="C#" AutoEventWireup="true" Inherits="Mediachase.Commerce.Manager.Marketing.PromotionList" Codebehind="PromotionList.ascx.cs" %>
Line 2:  <%@ Register Src="~/Apps/Core/Controls/EcfListViewControl.ascx" TagName="EcfListViewControl" TagPrefix="core" %>
Line 3:  <core:EcfListViewControl id="MyListView" runat="server" DataKey="PromotionId" AppId="Marketing" DataKeyField="PromotionId" ViewId="Promotion-List" ShowTopToolbar="true"></core:EcfListViewControl>

Source File: /Apps/Marketing/PromotionList.ascx

Any ideas how to fix this? Thanks in advance!

Bart

404 on Episerver Content Delivery Api

$
0
0
Hi

I'm trying to use the content delivery api.

I have installed the packages, and when I query mysite/api/episerver/v2.0/site i get an answer.

However when I query mysite/api/episerver/v2.0/content/65050 I get the error message listed below. I have given the group "contentapiread" read access to that particular page.

Is it anything else I need to do to get this working?

Content was not found EPiServer.Core.ContentNotFoundException: Content was not found ved EPiServer.ContentApi.Cms.Controllers.ContentApiController.ResultFromContent(IContent content, String expand) ved EPiServer.ContentApi.Cms.Controllers.ContentApiController.Get(String contentReference, List`1 languages, String expand)

Exception

EPiServer.Core.ContentNotFoundException: Content was not found
   ved EPiServer.ContentApi.Cms.Controllers.ContentApiController.ResultFromContent(IContent content, String expand)
   ved EPiServer.ContentApi.Cms.Controllers.ContentApiController.Get(String contentReference, List`1 languages, String expand)

Cannot externally link pages from one directory into another, episerver bug?

$
0
0

Using episerver 11. 

structure is as follows: 

-Root

     +directory 1

     +directory 2

Trying to link a sentence in a rich text blog in directory 1, to  an article in directory 2. have tried linking via page and external links, the page just 404's when clicked and the external link will not save. 

Is this because they are in seperate directories? For the life of me I cannot work out what the issue is, feels like a bug as it seems to defy logic. 

Cheers,

Andy 


Null currentPage in Index action of page

$
0
0

I am getting null currentPage in Index action of a page. I have added EPiServer route as well. My controller is inherited from 

PageController<MyPage> and index gets hit but with null currentPage.

Dynamically created metafield doesn't show on the Commerce UI

$
0
0

We have an import that creates metafields from the code. The relations and the values reach the DB. But the fields don't show on the Commerce UI or on the code retrieving the data for PDPs.

When the site is restarted the metafields are present on the UI too.

Do you know how to make the fields displayed without a site restart? (for production)

I already looked at the MetaField.ClearCache and MetaClass.ClearCache, but no luck. Is there a call that we can do when the fields are created to force them to be dislayed?

Thanks

How to change title property of page under SEO tab from code?

$
0
0

How to change title property of page under SEO tab from code?

DisplayName not saved and variant not published when creating variant for language branch

$
0
0

Hi!

This is my code:

var variant = _contentRepository.GetDefault<Variant>(productRef);
variant.Name = "Name";
variant.DisplayName = "Name sv";
var vaRef = _contentRepository.Save(variant, SaveAction.Publish, AccessLevel.NoAccess);
var noVariant = _contentRepository.CreateLanguageBranch<Variant>(vaRef, CultureInfo.GetCultureInfo("no"));
noVariant.Name = "Name";
noVariant.DisplayName = "Name no";
_contentRepository.Save(noVariant, SaveAction.Publish, AccessLevel.NoAccess);

What happens is that I get two variants, but the variant for the no language is not published and is missing DisplayName?
I can publish the variant from the GUI without problem.

Any idea why this is happening?

Thanks!

/Kristoffer

IsPrimary cannot be Null

$
0
0

I am doing a migration job. I have an xml with data and i am importing it to Catalog.
On some items i get following error:
Any idea to why?

2019-07-04T04:54:58,Warning,ktms03mstrqx112prep,ab7fea,636978128988831035,0,8452,203,KTM.Integrations.PIM.EPi.ScheduledJobs.PimXmlAzureImportJobMaster : Parsing of '$M-25105981000' failed skipping product import,80000149-0002-fe00-b63f-84710c7967bb   
2019-07-04T04:54:58,Error,ktms03mstrqx112prep,ab7fea,636978128988831035,0,8452,203,"KTM.Integrations.PIM.EPi.ScheduledJobs.PimXmlAzureImportJobMaster : Column 'IsPrimary' does not allow nulls.   
System.Data.NoNullAllowedException: Column 'IsPrimary' does not allow nulls.   
   at System.Data.DataColumn.CheckNullable(DataRow row)   
   at System.Data.DataTable.RaiseRowChanging(DataRowChangeEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)   
   at System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean suppressEnsurePropertyChanged, Int32 position, Boolean fireEvent, Exception& deferredException)   
   at System.Data.DataTable.InsertRow(DataRow row, Int64 proposedID, Int32 pos, Boolean fireEvent)   
   at KTM.Integrations.PIM.EPi.Data.Parsers.CommerceParserBase.CreateUpdateRelation(Int32 catalogId, Int32 nodeId, Int32 entryId, Int32 sortOrder)   
   at KTM.Integrations.PIM.EPi.Data.Parsers.StructureParser.ParseProduct(String code, String parent, CatalogType type, TextElementCollectionDescriptor texts)   
   at KTM.Integrations.PIM.EPi.Data.Parsers.StructureParser.Parse()   
   at KTM.Integrations.PIM.EPi.Data.Parsers.DataParser.TryRun(Action action, Action`1 errorAction)",80000149-0002-fe00-b63f-84710c7967bb


****** CODE *****

protected CatalogRelationDto.NodeEntryRelationRow CreateUpdateRelation(int catalogId, int nodeId, int entryId, int sortOrder)
{
var relationDto = GetRelationDto(catalogId, nodeId, entryId);

CatalogRelationDto.NodeEntryRelationRow relation = null;

foreach (var entryRelation in relationDto.NodeEntryRelation.ToList<CatalogRelationDto.NodeEntryRelationRow>())
{
if (entryRelation.CatalogEntryId.Equals(entryId) &&
entryRelation.CatalogNodeId.Equals(nodeId))
{
relation = entryRelation;
continue;
}

relationDto.NodeEntryRelation.RemoveNodeEntryRelationRow(entryRelation);
}

if (relation == null)
{
relation = relationDto.NodeEntryRelation.NewNodeEntryRelationRow();
relation.CatalogId = catalogId;
relation.CatalogNodeId = nodeId;
relation.CatalogEntryId = entryId;
}

relation.SortOrder = sortOrder;

if (relation.RowState.Equals(DataRowState.Detached))
{
relationDto.NodeEntryRelation.AddNodeEntryRelationRow(relation);
}
else
{
relation.AcceptChanges();
}

if (relationDto.HasChanges())
{
_catalogSystem.SaveCatalogRelationDto(relationDto);
}

return relation;
}



Viewing all 6894 articles
Browse latest View live