So i upgraded to 9.0 successfully. Few weeks after i had to restore DB from backup of 8.2. I ran upgrade scripts again and i got this error @Invalid column name 'DocumentInheritsStylesheet'.@. How do i only upgrade database and not the code?
↧
Kentico upgrade from 8.2 to 9. Getting Invalid column name 'DocumentInheritsStylesheet'.
↧
CMS.Ecommerce.IAddressExtensions obsolete
I'm porting some code over from a Kentico 8.2 build to a Kentico 11 website. One of the snippets that I am migrating makes use of a CMS.Ecommerce.IAddressExtensions extension method public static string GetStateCode(this IAddress address).When I moved this over to my Kentico 11 build, Visual Studio finds that this extension method no longer exists: IAddress does not contain a definition for GetStateCode and no extension method could be found.. I poked around the Object Viewer for the CMS.Ecommerce DLL, and sure enough, no IAddressExtensions class is present. Is there a workaround to look up the state code for a given address in Kentico 11?
↧
↧
Azure - App Gateway issue -
We have moved our sites into Azure, we are running them on IIS servers, using an app gateway to host the inbound internet presence. The issue I have is when the health probe is checking the site its looking using the IP:Port and the site returns a License error since I am licensed by URL. The license error returns a 503 so the app gateway sees the site as down. What are my options to get the health probe to test correctly and return a 200 when checking using the IP:Port?Kentico V8 Site Install
↧
kentico successfull authentication event
the case is to update a user field after successful user login to kentico CMS, like updating last login date and time.The scenario is for one-time phone verification by sending the passcode to the user using custom MFAuthentication module. When a user successfully login to Kentico UserMFRequired field should be changed to false, I think it should be changed when an event occurred but which event?
↧
Kentico Site upgrade K9 to K10 error
How I can solve this?EventID: 27965177EventType: EEventTime: 1/28/2018 3:00:58 PMSource: BizFormEventCode: Saving failedUserID: 65UserName: publicIPAddress: 10.127.224.61EventDescription: Message: INSERT INTO OM_Activity ([ActivityActiveContactID], [ActivityOriginalContactID], [ActivityCreated], [ActivityType], [ActivityItemID], [ActivityItemDetailID], [ActivityValue], [ActivityURL], [ActivityTitle], [ActivitySiteID], [ActivityGUID], [ActivityIPAddress], [ActivityComment], [ActivityCampaign], [ActivityURLReferrer], [ActivityCulture], [ActivityNodeID])
VALUES (@ActivityActiveContactID, @ActivityOriginalContactID, @ActivityCreated, @ActivityType, @ActivityItemID, @ActivityItemDetailID, @ActivityValue, @ActivityURL, @ActivityTitle, @ActivitySiteID, @ActivityGUID, @ActivityIPAddress, @ActivityComment, @ActivityCampaign, @ActivityURLReferrer, @ActivityCulture, @ActivityNodeID);SELECT SCOPE_IDENTITY() AS [ID]Caused exception:
Invalid column name 'ActivityActiveContactID'.
Invalid column name 'ActivityOriginalContactID'.
Invalid column name 'ActivityGUID'.Exception type: System.Exception
Stack trace:
at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex)
at CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.AbstractDataConnection.CMS.DataEngine.IDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.RunQueryWithRetry(QueryParameters query, Int32 retryCount)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query)
at CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query, Int32@ totalRecords)
at CMS.DataEngine.DataQueryBase1.GetDataFromDBInternal()
at CMS.DataEngine.DataQueryBase1.GetDataFromDB()
at CMS.DataEngine.DataQueryBase1.GetData()
at CMS.DataEngine.SimpleDataClass.Insert(Boolean initId)
at CMS.DataEngine.AbstractInfoBase1.InsertDataInternal()
at CMS.DataEngine.AbstractInfoBase1.InsertData()
at CMS.DataEngine.AbstractInfoBase1.GeneralizedInfoWrapper.InsertData()
at CMS.DataEngine.AbstractInfoProvider3.SetInfo(TInfo info)
at CMS.Activities.ActivityInfoProvider.SetActivityInfoInternal(ActivityInfo activityObj)
at CMS.Activities.ActivityInfoProvider.SetActivityInfo(ActivityInfo activityObj)
at CMSModuleLoader.ITTLoaderModuleAttribute.AddContactActivityFormSubmitted(ContactInfo contact, String activityName, String formName, BizFormItem bizItem) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 1018
at CMSModuleLoader.ITTLoaderModuleAttribute.AddContactAndGroupAndFormSubmit(ObjectEventArgs e, Boolean LogSubmitEvent) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 498
at CMSModuleLoader.ITTLoaderModuleAttribute.ObjectInsertAfter(Object sender, ObjectEventArgs e) in d:\Sites\upgrade\ittcannon.com\CMS\App_Code\ITT\ITTLoaderModule.cs:line 693
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important)
at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler2.Finish()
at CMS.DataEngine.AbstractInfoBase1.InsertData()
at CMS.OnlineForms.BizFormItem.InsertData()
at CMS.DataEngine.AbstractInfoBase1.GeneralizedInfoWrapper.InsertData()
at CMS.DataEngine.AbstractInfoProvider3.SetInfo(TInfo info)
at CMS.OnlineForms.BizFormItemProvider.SetItemInternal(BizFormItem item)
at CMS.OnlineForms.BizFormItemProvider.SetItem(BizFormItem item)
at CMS.OnlineForms.BizFormItem.SetObject()
at CMS.DataEngine.BaseInfo.Insert()
at CMS.OnlineForms.Web.UI.BizForm.SaveDataInternal()Message: Invalid column name 'ActivityActiveContactID'.
Invalid column name 'ActivityOriginalContactID'.
Invalid column name 'ActivityGUID'.Exception type: System.Data.SqlClient.SqlException
Stack trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
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 CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)EventUrl: /product-rfq-bizform/?link=http%3a%2f%2fk10.ittcannon.com%2fProducts%2fNemesis-II-CBA-Connector%2f%3faliaspath%3d%252fProducts%252fNemesis-II-CBA-ConnectorEventMachineName: USANR1CMSDWB01EventUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
↧
↧
Doubleclick Floodlight Tags and Kentico site useing AngularJS and fireing on a button click that dose not load a new page
Big title...
Anyways I am attempting to implement some floodlight tags that will fire off of a button press on a Kentico webpage that has a currently working tag that fires on page load.Here is what I have attempted:
in the header we have the following function:@script type="text/javascript" id="DoubleClickFloodlightTag"@
//@![CDATA[
var callFLOOD = function(divid, id, type, cat) {
var axel = Math.random()+"";
var a = axel * 10000000000000000;
var flDiv=$('#' + divid)[0];
flDiv.innerHTML+='@iframe src="https://fls.doubleclick.net/activityi;src=' + id + ';type=' + type + ';cat=' + cat + ';dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"@@/iframe@';
}
//]]@
@/script@
Then in the Body we have the code to link the button calls to the function:@script type="text/javascript"@
window.onload = init;
function init(){
document.getElementById('SubmitStep1').onclick = function() {callFLOOD('SubmitStep1Holder','4248080','enrol453', 'enrol177')};
document.getElementById('SubmitStep2Max2').onclick = function() {callFLOOD('SubmitStep2Max2Holder','4248080','Conv', 'enrol687')};
document.getElementById('SubmitStep1Max1').onclick = function() {callFLOOD('SubmitStep1Max1Holder','4248080','Conv', 'enrol687')};}
@/script@
Now, that does fire off the first code and generates the iframe nicely in the button holder div, it even seems to send the request, but I am not getting the response I think I should expect, where the on load one responds with:@!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"@@html@@head@@title@@/title@@/head@@body style="background-color: transparent"@@script type="text/javascript"@
var _g2m=_g2m||[];
_g2m.push(['setApiKey', 'M2xrAIsOmF4y3Hwv5BOpUDoXS2LBZzcdO7VuLqRVhJrAgKZjXuUNTR09bVg8Fn2B7']);
!function(m,o,b,i){
b=m.getElementsByTagName(o)[0];i=m.createElement(o);i.type='text/java'+o;i.async=true;i.src='//dd4o8a710nwau.cloudfront.net/g2m/trk/v1.js';b.parentNode.insertBefore(i,b);}(document,'script');
@/script@@img src="https://mpp.mxptint.net/2/24210/?rnd=669910300" width="0" height="0" style="display:none"/@@/body@@/html@
the onclick one only gets:@!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"@@html@@head@@title@@/title@@/head@@body style="background-color: transparent"@@/body@@/html@
Now I did see one thread that may have be pointing me in the direction I am looking for, but unsure how to apply the directive to an on-click event.
DoubleClick floodlight tags and AngularJS
As always any assistance is greatly appreciated.
↧
WebPart cleanly render a list of n items
I am attempting to create a WebPart in Kentico 11 that supports handling an n-length list of items. I found that creating a WebPart with property fields is pretty straightforward in Kentico, but I am having trouble finding documentation on how to best set up a WebPart that can lookup @ output multiple model objects.I've tried the following approach, but it has some drawbacks that I'm not entirely comfortable with:Set up a Container page type to place instances of data objects inside. I restricted it to ensure that only my custom Page Type data object is available as a child of it. Place a Pages DataSource in the template zone and direct it to the Container page.Hook up a Repeater element to it and apply a transformation @ content before+after to the Repeater.While this works, it feels a little cludgey. Content editors have to be wise enough to know how to set up DataSources @ Repeaters, plus how to bind them together and apply transforms, and additionally remember to fill in the content before and content after fields with the appropriate wrapping HTML markup.This is not something that I expect a content editor should need to remember.Is there a cleaner way to put lists of items inside of a template zone without needing to drag @ configure a datasource and container page? I did not see any way to set up a Page Type field in such a way that it would essentially model a one-to-many relationship with another Page Type. Did I miss something there? If I could do that, then I could write a transformation to handle the wrapping HTML markup, and the looping of children. Haven't been able to find a way to make this work though.
↧
Repeater and unipager in a Custom Control (widget)
I am trying to create a widget which is attempting to display pages with pagination. I am using repeater and unipager for this purpose. Problem is that repeater is displaying pages but unipager is not being displayed Any pointers would help. Thanks Here is the code PageList = DocumentHelper.GetDocuments(@mypage.type@).Path(@/%@).Published().TopN(40).OrderBy(@DocumentCreatedWhen desc@).Published()@);
CMSRepeater1.TransformationName = @my.transformtion@;
uni1.PageControl = @CMSRepeater1@;
uni1.PageSize = 5;
uni1.PagerMode = CMS.Controls.UniPagerMode.Querystring;
uni1.GroupSize = 5;
uni1.QueryStringKey = @page@;
CMSRepeater1.DataSource = ArtilceList;
CMSRepeater1.DataBind();
CMSRepeater1.Visible = true;
↧
Update and Delete Custom Table
I have a user area where I need logged in users to edit data that is stored in a Kentico custom table. I could also use a straight SQL table. What is the best way to do this? I am struggling with basic CRUD FUNCTION to SQL and Kentico custom tables. Searching for documentation or examples, it seems like this would effect others also.
↧
↧
Requires App pools refresh
HiI had created a new kentico instance by moving copying code files from one server to new server and configured the site properly , everything is working fine but for every 2 or 3 days I'm getting an SQL error.Then i'm doing app pool refresh in IIS whenever that problem encounters, then the site working , so anybody please give me the permanent solution .These are the event logs i found.ThanksNaresh Ede
↧
How we can get forum' post tree structure using custom code?
Hi,I need to get all tree node for a specific forum' post.
I'm able to get all forum's post using below code in my custom APIInfoDataSet@ForumPostInfo@ posts = ForumPostInfoProvider.GetForumPosts(where, OrderBy);. Below two things I need to do to accomplish my taskhow to get URL of specific Forum's post or any way to build separately and that URL also increment the PostView property.
How to get tree structure of specific forum's post.Any help appreciated.Thanks
Shubham
↧
Kentico document query API always returns empty result
I have the following query:var newsItems = tree.SelectNodes()
.Types(pageTypesArray)
.Path(path)
.OrderBy(orderBy)
.CombineWithDefaultCulture(false)
.Page(page, count)
.OnCurrentSite()
.NestingLevel(-1)
.Culture(CurrentDocument.DocumentCulture)
.InCategories(categories)
.TopN(topN)
.Where("ListableDocumentImage is not null AND ListableDocumentImage != ''")
.Columns(columns);
Which translates like so:WITH AllData AS
(
SELECT TOP 6 * for brevity, ROW_NUMBER() OVER (ORDER BY [NewsOccurrenceDate] DESC) AS [CMS_RN]
FROM View_CMS_Tree_Joined AS V WITH (NOLOCK, NOEXPAND) INNER JOIN SOS_News AS C WITH (NOLOCK) ON [V].[DocumentForeignKeyValue] =
[C].[NewsID] AND V.ClassName = N'News' LEFT OUTER JOIN COM_SKU AS S WITH (NOLOCK) ON [V].[NodeSKUID] = [S].[SKUID]
WHERE [NodeSiteID] = @NodeSiteID AND (([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] @= @Now)
AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] @= @Now))
AND [NodeAliasPath] LIKE @NodeAliasPath AND [DocumentCulture] = @DocumentCulture
**AND 0 = 1)** @@@------------------- WHERE DID THIS COME FROM?????
)
SELECT *, (SELECT COUNT(*) FROM AllData) AS [CMS_TOT]
FROM AllData
WHERE CMS_RN BETWEEN 4 AND 6
ORDER BY CMS_RN
Has anyone ever come across anything like this before? I can't figure out why they're sticking in the AND 0=1 in my where clause.
↧
Boost Search Relevance of Title via API
I'm looking to figure out how to boost the relevance of a search term found in the title rather than the content of the search results. I've found info about how to do this with the OOB search results web part and I'm trying to figure out how to do it via the API.We're using a custom control and we pass in a SearchCondition to get the results. var searchCondition = new SearchCondition(extraConditions, SearchModeEnum.AllWords, SearchOptionsEnum.FullSearch);
I'm trying to add the score boost to the ExtraConditions parameter but that doesn't seem to change the relevancy. I get results but no change in the way they're displayed. string extraConditions = "(title:" + searchText + ")^3";
Our search parameters set the SearchSort to SCORE.Is this the right way to boost results where the term is in the title?If so, is the syntax correct?
↧
↧
Kentico AMP - Kentico.AcceleratedMobilePages
Does the Kentico.AcceleratedMobilePages add-on work with Kentico 11?I installed it on a version 11 site and it throws the error below.Server Error in '/' Application.
Could not load type 'CMS.DataEngine.AbstractInfoProvider`1' from assembly 'CMS.DataEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'CMS.DataEngine.AbstractInfoProvider`1' from assembly 'CMS.DataEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TypeLoadException: Could not load type 'CMS.DataEngine.AbstractInfoProvider`1' from assembly 'CMS.DataEngine, Version=11.0.0.0, Culture=neutral, PublicKeyToken=834b12a258f213f9'.]
Kentico.AcceleratedMobilePages.AmpFilterInfoProvider.GetAmpFilters() +0
Kentico.AcceleratedMobilePages.CheckStateHelper.GetFilterState() +246
Kentico.AcceleratedMobilePages.AmpFilter.OnFilterActivated(ResponseOutputFilter filter, String@ finalHtml) +69
CMS.OutputFilter.ResponseOutputFilter.FilterResponse(String finalHtml) +1266
CMS.OutputFilter.ResponseOutputFilter.Close() +19
System.Web.HttpWriter.FilterIntegrated(Boolean finalFiltering, IIS7WorkerRequest wr) +691
System.Web.HttpResponse.FilterOutput() +117
System.Web.CallFilterExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +61
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean@ completedSynchronously) +91
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0
↧
Kentico Document Query API - trying to match repeater results
I have a CMSRepeater with SelectOnlyPublished set to true. In order to implement lazy loading, I have a webservice that loads more items for the repeater. The document queries I have tried (one at a time) are as follows:var newsItems = tree.SelectNodes()
.Types(pageTypes)
.Path(path)
.Where(whereStatement)
.OrderBy(orderBy)
.CombineWithDefaultCulture(false)
.Page(page, count)
.Columns(columns);
var newsItems = DocumentHelper.GetDocuments()
.Types(pageTypes)
.Path(path)
.Where(whereStatement)
.OrderBy(orderBy)
.CombineWithDefaultCulture(false)
.Page(page, count)
.Published()
.Columns(columns);
After inspecting the Sql queries generated by the repeater and the API, it seems the API is generating a bit of extra published checking in the where statement (removing this results in identical db results which would be my aim).The extra where clause is:DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] @= @Now) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] @= @Now
So my question is, how can I include this clause in the repeater? I want only published docs and would have thought the SelectOnlyPublished=true; on the repeater would be enough. I guess I could hardcode it into my WhereCondition but that doesn't feel right to me.
↧
custom form control custom client side validation in Kentico
We've created a custom FormEngineUserControl to capture date input using 3 text inputs for day/month/year.On the server we override the bool IsValid() method which works fine and displays the error message if invalid.However we want to use client side validation also, we can use a CustomValidator control and assign a ClientValidationFunction to call a JS method however this is not then combined with the server validation function and we end up with two validation messages, one that removes when client validation passes, and one that only disappears when the form is re-submit, basically rendering the client validation useless.Is there no way to register a client validation method with a custom form control? that will then be combined with the server method and error label etc. ?
↧
custom form control custom client side validation in Kentico
We've created a custom FormEngineUserControl to capture date input using 3 text inputs for day/month/year.On the server we override the bool IsValid() method which works fine and displays the error message if invalid.However we want to use client side validation also, we can use a CustomValidator control and assign a ClientValidationFunction to call a JS method however this is not then combined with the server validation function and we end up with two validation messages, one that removes when client validation passes, and one that only disappears when the form is re-submit, basically rendering the client validation useless.Is there no way to register a client validation method with a custom form control? that will then be combined with the server method and error label etc?Also I posted this to stack overflow tagged against Kentico thinking it would be integrated here but it seems they are two different systems? If that's not the case then I apologise for the double post.
↧
↧
URL parameter value in macro
my page has an alias @/articles/{artcategory}@i know that expression {?artcategory?} allows me to insert @artcategory@ into htmlbut i want to assign @artcategory@ parameter value to a variable in Txt/XML transformation macrosomething like this{%
urlparam = artcategory.ToLower();
/*and here i would work with urlparam variable*/
%}
↧
Smart search returns null for external project
HiI'm working on an external web api project. The project is using smart search api, however the result is always null.SearchIndexInfo object is found but for example NumberOfIndexedItems is 0.The Kentico server is on different computer to my development machine. When I try the same code on a local installation of Kentico, the search works. From the documentation I understand that WebApplicationPhysicalPath has to be specified for smart search. Does that mean that an external project needs to be on the physical machine to be able to access the Kentico physical path?
Am I missing something?Bellow are the details in global.asaxvoid Application_Start(object sender, EventArgs e)
{
CMS.Base.SystemContext.WebApplicationPhysicalPath =@C:\\inetpub\\wwwroot\\Kentico10\\CMS@;
}
void Application_BeginRequest(object sender, EventArgs e)
{
CMS.DataEngine.CMSApplication.Init();
}
Thanks for any help with this issue.Peter
↧
Kentico 10 Discount coupon product relationship
Hi guys,
I am trying to find a list of all products associated with a coupon and can't seem to find any API for doing that. I've got the coupon.DiscountCouponIsExcluded flag.
So if that's false, it means that the option ticked is @Only The Following Products@.
And I want to basically list all the products that can be associated with that coupon. It seems like I can only grab the product-coupon (singular) relationship with SKUDIscountCouponInfo class.
But then my condition is , if there's no relationship BUT the @Only The Following Products@ list is empty , I still want to allow the coupon to be applied to any products. But can't check if that @Only The Following Products@ is empty or not....Please advise....
↧