Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all 9642 articles
Browse latest View live

Drag and Drop sorting in Catalog or any Sorting of Catalog Products in Commerce > Catalog UI

$
0
0

EPiServer Commerce Version: 9.15 (started from Quicksilver). 

Our Commerce Admins want to be able to change the ordering of the Products displayed within the Node page.

So far, I know we can sort variants within the Product > Variants tab > Edit Variants.

I was trying to figure out how to achieve sorting of Products at the moment.

The product does not seem to allow drag-and-drop. 

I searched for sorting function and found this user guide mentioning "Sorting catalog entries": http://webhelp.episerver.com/latest/commerce/catalog-management/catalog-entry-activities.htm.

However, I can't seem to find the "Sort" button while in the "List" mode under the selected Node.

Is this something supported on Commerce version 9? Do I need to enable something?

(or am I just blind at the moment?)


Database timeout on product/variant update

$
0
0

Hi!

This just showed up in our logs. Same code has been running for a long time now without problems.

System.Exception: Exception in ecfVersion_ListByWorkIds:  ---> System.Data.SqlClient.SqlException: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: The wait operation timed out
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Mediachase.Data.Provider.SqlDataProvider.<>c__DisplayClass17_2.<LoadDataSet>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at Mediachase.Data.Provider.SqlDataProvider.LoadDataSet(DataCommand command)
   --- End of inner exception stack trace ---
   at Mediachase.Data.Provider.SqlDataProvider.LoadDataSet(DataCommand command)
   at Mediachase.MetaDataPlus.Common.DBHelper.ExecuteDataSet(String connectionString, CommandType commandType, String commandText, DataParameter[] commandParameters)
   at EPiServer.Commerce.Catalog.DataAccess.CatalogContentVersionDB.LoadDraft(IList`1 contentLinks)
   at EPiServer.Commerce.Catalog.Provider.Construction.EntryBuilder.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.Commerce.Catalog.Provider.CatalogContentProvider.LoadContent(ContentReference contentLink, ILanguageSelector languageSelector)
   at EPiServer.Core.ContentProvider.<>c__DisplayClass116_0.<LoadContentFromCacheOrRepository>b__0()
   at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait[T](IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy)
   at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
   at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
   at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)

Any idea what could cause this problem? We are running Commerce 10.5

Thanks!

/Kristoffer

Episerver 10: Combining multiple promotion coupon in the cart throws error

$
0
0

We have two coupons,

  1. one 30% of a lineItem - lineitem coupon
  2. One is 100% off on shipping charge. - shipping coupon

We have total based shipping. So this is causing an issue.

When we apply both this coupon to the cart we get internal server error. Looking more details into error, it seems this is what is happening.

Total before discount $53.44 / This puts you in shipping cost bracket of $9.99 

So when you apply SHIP2 coupon the shipment discount = 9.99 

Your total shipping charge = 9.99 -9.99 = 0.00 

Applying coupon MPMPA30 gives you 30% off. So now your total is 53.44 - 16.03 = 37.41 

So you are now in shipping cost bracket of 5.99 

But the SHIP2 discount was already calculated as 9.99 

So shipment charge = 5.99-9.99 = $-4.00 (negative) This throws error

Is there any way you can decide the priority/sequence in which the coupons are applied, with epi 10 promotion module?

Episerver 10.8.0.0 - New product URL behaves goofy

Lucene Search is returning zero result

$
0
0

Hi,

We are facing some issue in below of our code, please help us asap.

As we are using below code in our application but its returning zero result.

 

Please help urgently asap.

 

CatalogEntrySearchCriteria criteria = new CatalogEntrySearchCriteria();

            criteria.SearchPhrase = "kitchen";

            SearchManager manager = new SearchManager(AppContext.Current.ApplicationName);

            SearchResults results = manager.Search(criteria);

Thanks

Om

GetChildren of a specific node content type

$
0
0

We have run into a little performance issue in CMS v.10.10.1 and Commerce v11.2.0.

For some reason we get periods with a very high miss rate for the cache, if it is caused by an import or just premature eviction because of some other reason we don't know yet.

During these periods we have noticed that our menu construction creates a lot of database traffic specifically our calls to IContentLoader.GetChildren<NodeContent>(contentReference), which doesn't just load all the node children from the database but also all the entry children(for some nodes this is over 3k)!

Looking into the DefaultContentLoader and sub-implementations it appears that it boils down to ContentProvider.TryGetChildren<T> calling CatalogContentProvider.LoadChildrenReferencesAndTypes without supplying the type, which since it doesn't know what type we are asking for loads both nodes and entries.

Does anyone know if this have been addressed in any future version?

Foolishly i had thought that supplying a content type T would result in a query for what content type id T has (cached of course) and that id would be used as a parameter for the database calls to avoid fetching all content regardless of type. Yes i know it only loads the content references and not the entire content, but still why doesn't it work like that?

PromotionEngine.Evaluate always gives FulfillmentStatus.NotFulfilled on promotions (Commerce 10.4.3)

$
0
0

The promotion system works just fine in the cart/checkout calculations (i.e. promotions/discounts are correctly applied to lineitems in a cart), but when I'm trying to evaluate a single product or variant for promotions on the product page, using 

_promotionEngine.Service.Evaluate(entry.ContentLink, _currentMarket.Service.GetCurrentMarket(), currency, RequestFulfillmentStatus.All);

then all the returned RewardDescriptions have their Status set to FulfillmentStatus.NotFulfilled. (I'm only using that method signature because the default one returned 0 results, which makes sense, considering that it thinks none of the rewards apply.)

Do I have to do something more than just calling Evaluate() to get this to work?

EDIT: GetDiscountPrices() also returns 0 results, again despite it working as expected in the cart.

Search in Catalog with Mediachase.Search

$
0
0

Hi Team,

Please help on below of my query.

I am trying to implement Mediachase.Search functioanlity for Catalog, using below code for that but I am getting 0 items in response.

Can someone please check my ocde and help me asap to implement this functioanlity.

SearchManager searchManager = new SearchManager(AppContext.Current.ApplicationName);
searchManager.BuildIndex(false);

CatalogEntrySearchCriteria criteria = new CatalogEntrySearchCriteria();
criteria.SearchPhrase = "Electrolux Catalog";
SearchManager manager = new SearchManager(AppContext.Current.ApplicationName);
var result = manager.Search(criteria);

Regards

Om


What calls ecf_ordergroup_delete

$
0
0

Hey,

I am hoping someone can tell me what is calling ecf_ordergroup_delete.  On one route I call this and it is taking 30 seconds to run, I would like to check as to why we are calling it and why it takes so long.  I am guessing it is somehting to do with clearning the basket.  Is there a way to work out which stored procedure is called from what Episerver API's?

Episerver Commerce Sql Version

$
0
0

Hi 

We are starting a new Episerver Commerce project and have installed the version  9.23.0. 

Seems like the default database which is provided for commercer (in App Data folder) with this is SQL 2016. 

The folllowing system requirements mention that lowere versions are also supported.

http://world.episerver.com/documentation/Items/System-Requirements/system-requirements---episerver/

Is there a 2014 or lower version 2008 R2 available which we can use.

Would installing a lower version of EPiserver commerce provide us with this.

Kind Regards

Sandeep

How to get Campaign by name?

$
0
0

Hi,

I'm trying to do this:

var campaignLink = ??????
var campaignPromos = promoEngine.GetPromotionItemsForCampaign(campaignLink);

My desired campaign is named "FlashCampaign"...

How can I get the campaignLink programmatically?

Best way to find ALL promotions?

$
0
0

Hi,

I know how to retrieve one promotion (using IContentLoader)... But, how can I easily get a collection of ALL promotions at runtime?

Thanks,

 - Ken

IPartialRouter and Catalog Content

$
0
0

Versions: EPiServer CMS 10.10 - EPiServer Commerce 11.1

I'm working on a commerce website that has both product pages, as well as a "support center" in which the same product should be displayed.

I have a normal Hierarchical router setup for commerce content

CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);

I also want to retain that same structure under the "Support Center" page, so I have:

routes.RegisterPartialRouter(new SupportCenterCatalogNodeRouter(() => supportCenterContentReference, commerceRootNode, enableOutgoingSeoUri: true));

This part works great, I am able to browse my products using both of these URLs:

  1. /support/<product-category>/<product-name>
  2. /<name-of-catalog>/<product-category>/<product-name>

Now for the hard part:

What this doesn't allow for is the ability to use two different MVC actions (or different controllers) to render that same catalog content differently. In an attempt to accomplish this, I've added the following lines inside of my "SupportCenterCatalogNodeRouter" which is just IPartialRouter<SupportCenterPage, CatalogContentBase>. (There's no custom code aside from the four lines attempting to set the action value of the routedata, it's a direct copy of the EPiServer-provided "HierarchicalCatalogPartialRouter". You can find it at the "EPiServer.Commerce.Routing" namespace.

Here's the method:

public virtual object RoutePartial(SupportCenterPage content, SegmentContext segmentContext)
{
      if (segmentContext == null) return null;
      if (!content.ContentLink.CompareToIgnoreWorkID(this.RouteStartingPoint))
           return null;
      SegmentPair nextValue = segmentContext.GetNextValue(segmentContext.RemainingPath);
      if (string.IsNullOrEmpty(nextValue.Next))
           return null;
            CultureInfo cultureInfo = string.IsNullOrEmpty(segmentContext.Language) ? ContentLanguage.PreferredCulture : CultureInfo.GetCultureInfo(segmentContext.Language);
            CatalogContentBase contentRecursive = this.GetCatalogContentRecursive(this.CommerceRoot, nextValue, segmentContext, cultureInfo);
     if (contentRecursive != null)
     {
           segmentContext.RoutedContentLink = contentRecursive.ContentLink;
           segmentContext.SetCustomRouteData("action", "Support");
           segmentContext.RouteData.Values.Add("action","Support");
           var httpContext = this._httpContextAccessor();
           httpContext.Request.RequestContext.SetCustomRouteData("action", "Support");
           httpContext.Request.RequestContext.RouteData.Values.Add("action", "Support");
   }
   return contentRecursive;
}

None of the above attempts at setting the action route parameter seem to work, the Index method is called when loading these pages. I can debug and confirm that inside the Action method, the RequestContext.RouteData has my custom "action" route value, but it's clearly not taken into consideration before routing to the Index method.

Disclaimer

I know that I can manually redirect to the "Support" method within these controllers if I see the RouteData["action"] is set to "Support", but I feel like there has to be a more official way. I must be missing something.

Any help is appreciated, I can provide additional/full code if necessary, but this should suffice.

Basket Process Issues (11.2.5)

$
0
0

Hi guys, I have been building a basket process based on a combination of Quicksilver, Commerce Traing Examples and the documentation. I have followed the examples for adding and updating a cart but when I call

cart.ValidateOrRemoveLineItems((item, issue) => validationMessages += CreateValidationMessages(item, issue), _lineItemValidator);
cart.UpdatePlacedPriceOrRemoveLineItems(contact, (item, issue) => validationMessages += CreateValidationMessages(item, issue), _placedPriceProcessor);
cart.UpdateInventoryOrRemoveLineItems((item, issue) => validationMessages += CreateValidationMessages(item, issue), _inventoryProcessor);


I get back PlacedPricedChanged in the error list. The price is set according to the documentation for the Default Market, has not changed at all from what's set and I have checked and this is doing exactly as the QuickSilver demo is and as I've seen on other posts.

The other issue is if I remove the price check which allow the basket to add the item correctly and everything to work the Inventory check isn't working. I've set the Inventory to 0 quantity but I'm still able to add items which I thought the UpdateInventoryOrRemoveLineItems was supposed to handle.

I'm confused, I'm doing as QuickSilver and the documents show but it's not expecting as I would imagine

Option to OrderContext.Current.FindPurchaseOrders? Timeout in ecf_Search_ShoppingCart

$
0
0

Hi!

Some more timeout problems. Yesterday we have problems with the ecfVersion and today on a completely different site it is the ecf_Search_ShoppingCart

This query:

declare @p8 int
set @p8=1
exec ecf_Search_ShoppingCart @SQLClause=N'',@MetaSQLClause=N'META.TrackingNumber LIKE ''T0053776''',@OrderBy=N'',@Namespace=N'Mediachase.Commerce.Orders',@Classes=N'ShoppingCart',@StartingRec=0,@NumRecords=1,@RecordCount=@p8 output
select @p8

Takes 12 minutes to complete!

We are using Commerce 11.2.2 so maybe there are another way in this version to search for an order with a special tracking number?

We are also using the search function to find a Klarna order number saved in meta data.

declare @p8 int
set @p8=1
exec ecf_Search_ShoppingCart @SQLClause=N'',@MetaSQLClause=N'META.KlarnaCheckoutOrder LIKE ''FZ8W13CATHEL7P4QBR2OK89RMX9''',@OrderBy=N'',@Namespace=N'Mediachase.Commerce.Orders',@Classes=N'ShoppingCart',@StartingRec=0,@NumRecords=1,@RecordCount=@p8 output
select @p8

Is there another way to search for orders with certain meta data or maybe there is a join problem as the case was in this post:
https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/10/database-timeout-on-productvariant-update/

Thanks!

/Kristoffer 


Option to OrderContext.Current.FindPurchaseOrders? Timeout in ecf_Search_ShoppingCart

$
0
0

Hi!

Some more timeout problems. Yesterday we have problems with the ecfVersion and today on a completely different site it is the ecf_Search_ShoppingCart

This query:

declare @p8 int
set @p8=1
exec ecf_Search_ShoppingCart @SQLClause=N'',@MetaSQLClause=N'META.TrackingNumber LIKE ''T0053776''',@OrderBy=N'',@Namespace=N'Mediachase.Commerce.Orders',@Classes=N'ShoppingCart',@StartingRec=0,@NumRecords=1,@RecordCount=@p8 output
select @p8

Takes 12 minutes to complete!

We are using Commerce 11.2.2 so maybe there are another way in this version to search for an order with a special tracking number?

We are also using the search function to find a Klarna order number saved in meta data.

declare @p8 int
set @p8=1
exec ecf_Search_ShoppingCart @SQLClause=N'',@MetaSQLClause=N'META.KlarnaCheckoutOrder LIKE ''FZ8W13CATHEL7P4QBR2OK89RMX9''',@OrderBy=N'',@Namespace=N'Mediachase.Commerce.Orders',@Classes=N'ShoppingCart',@StartingRec=0,@NumRecords=1,@RecordCount=@p8 output
select @p8

Is there another way to search for orders with certain meta data or maybe there is a join problem as the case was in this post:
https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2017/10/database-timeout-on-productvariant-update/

Thanks!

/Kristoffer 

CSV Import and Overwriting Seo Information

$
0
0

Hi.


I'm seeking some advice. I'm developing on an Commerce solution (neweste version) and there we're using the CSV import to import products into the catalog.

Now, however, the client wishes that we should autogenerate the Seo Information on import, and I'm struggling finding a proper entry point for solving this.

When doing the CSV Import - are there save events I can hook into?
Or will I need to create an update function that runs afterwards and that can be called manually which (bulk) updates the information?
And if so, should I run it as a direct SQL Script as I think fetching all products to save them again afterwards might be too cumbersome?

Thanks in advance for feedback.
Regards

Getting asset folder for NodeContent

$
0
0

We want to save a block in the asset folder for a NodeContent.

When we call contentAssetHelper.GetOrCreateAssetFolder we get null back. Reflecting the code it seems to be caused by the fact that NodeContent is not marked as IResourceable.

Strange thing is that this can be done in the Catalog UI. You can create a block and store it on a category. So it seems to be supported.

So how can this be achieved through the API?

Catalog batch update doesn't update the site

$
0
0

Hi

After saving all changes in catalog batch update procedure the data in the database are updated. I can see it also through the product menu. But the data on site are not updated.

If I make changes within the product menu and publish them afterwards, the site updates everything correctly.

So, is it possible that catalog batch update doesn't publish the changes to the site? How to handle this?

CommerceManager version is 10.2.3

Thanks

Default Membership Provider must be specified error when deleting Contact (Commerce 10.8)

$
0
0

We've been experiencing errors when deleting users since moving to ASP.NET Identity. We are able to delete the user using the UserManager just fine, but cannot delete the contacts. We get the following exception since implementing ASP.NET Identity in the same fashion as described here.

[ProviderException: Default Membership Provider must be specified.]
   System.Web.Security.Membership.InitializeDefaultProvider(Boolean initializeDefaultProvider, MembershipSection settings) +10174203
   System.Web.Security.Membership.Initialize() +455
   System.Web.Security.Membership.get_Provider() +9
   System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline) +41
   Mediachase.Commerce.Customers.CustomerContext.GetUserForContactId(PrimaryKeyId customerContactId) +164
   Mediachase.Commerce.Customers.Handlers.ContactRequestHandler.PreDelete(BusinessContext context) +211
   Mediachase.BusinessFoundation.Data.Business.EntityObjectDefaultRequestHandler.PreExecute(BusinessContext context) +612
   Mediachase.BusinessFoundation.Data.Business.BaseRequestHandler.Mediachase.BusinessFoundation.Data.Business.IRequestHandler.PreExecute(BusinessContext context) +51
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.Execute(Request request) +496
   Mediachase.BusinessFoundation.Data.Business.BusinessManager.Delete(EntityObject entityObject) +72
   EPiServer.Reference.Commerce.Site.Features.Login.Controllers.LoginController.DeleteUsers() in C:\dev\Quicksilver\Sources\EPiServer.Reference.Commerce.Site\Features\Login\Controllers\LoginController.cs:75

The code in question was added to Quicksilver LoginController Index to confirm that it wasn't a configuration issue in my project. The Guid for the contact of a new user I created from the admin area on Quicksilver. Nothing else has been modified from Quicksilver 10.8.

        private void DeleteUsers()
        {
            var myGuid = new Guid("128ED95A-6D32-4745-9930-F3BA8A7CC502");
            var contact = CustomerContext.Current.GetContactById(myGuid);
            if (contact != null)
            {
                BusinessManager.Delete(contact);
            }
        }

Is there a fix for this or anything I should be doing differently? I noticed another post with this error, but during authentication and not deletion. There is no follow up post either with a resolution.

Viewing all 9642 articles
Browse latest View live


Latest Images