【发布时间】:2016-08-30 07:02:50
【问题描述】:
我正在尝试将 hotcakes 升级到 01.10.03 版本并收到以下错误。
Page Load Exception
United Sport Apparel
AssemblyVersion 7.3.2 PortalID 0 PortalName United Sport Apparel UserID -1
AssemblyVersion:7.3.2
PortalID:0
PortalName:United Sport Apparel
UserID:-1
UserName:
ActiveTabID:106
ActiveTabName:JB - Start From Scratch
RawURL:/design-your-jacket/build-your-jacket-from-scratch
AbsoluteURL:/Default.aspx
AbsoluteURLReferrer:http://staging.unitedsportapparel.com/design-your-jacket/build-your-jacket-from-scratch
UserAgent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:56ee52bf-e2bd-49dd-879f-854e5bc20189
InnerException:Method not found: 'Hotcakes.Commerce.HotcakesApplication Hotcakes.Commerce.Extensions.HccAppHelper.InitHccApp(Boolean)'.
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:DWSoftware.Modules.usa_jacket.View.AddProductToCart
StackTrace:
Message:
DotNetNuke.Services.Exceptions.PageLoadException: Method not found: 'Hotcakes.Commerce.HotcakesApplication Hotcakes.Commerce.Extensions.HccAppHelper.InitHccApp(Boolean)'. ---> System.MissingMethodException: Method not found: 'Hotcakes.Commerce.HotcakesApplication Hotcakes.Commerce.Extensions.HccAppHelper.InitHccApp(Boolean)'.
at DWSoftware.Modules.usa_jacket.View.AddProductToCart(Object sender, EventArgs e)
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---
Source:
我们调试了代码,发现初始化 hotcakes commerce web 服务的调用抛出了方法调用 HccAppHelper.InitHccApp 的错误,我们没有在那里定制任何东西,如果我们注释代码它没有抛出任何错误.该代码与他们在网站上描述的相似,请参阅下面的代码。
protected void AddProductToCart(object sender, EventArgs e)
{
try
{
char gender = 'M';
if (radFemale.Checked) gender = 'F';
// create a reference to the Hotcakes store
//var HccApp = HccAppHelper.InitHccApp();
// get an instance of the product to add
//var product = HccApp.CatalogServices.Products.FindBySku("United");
decimal insurance;
decimal finalPrice = CalculatePrice(out insurance, true);//calculate the price of the custom jacket
//product.IsUserSuppliedPrice = true;
//product.MetaDescription = hf_sku.Value;
string sizingValues =
"<ul><li><h4>Jacket Sizing:</h4></li>" +
SummaryListItem("Height", ddl_Height_Ft.SelectedItem.Text + "\" " + ddl_Height_In.SelectedItem.Text + "'", 0) +//SummaryListItem("Height", txt_Height_Ft.Text + "\" " + txt_Height_In.Text + "'", 0) +
//SummaryListItem("Weight", ddl_Weight.SelectedItem.Text + " lbs", 0) +//SummaryListItem("Weight", txt_Weight.Text + " lbs", 0) +
SummaryListItem("Gender", gender.ToString(), 0) +
SummaryListItem("Size", ddl_JacketSize.SelectedItem.Text, 0) +
"</ul>";
}
catch
{
}
}
【问题讨论】:
-
您问过模块创建者的帮助台吗?这是一个超出 DNN 核心范围的商业模块。我认为在 StackOverflow 上我们无能为力,因为我们无法访问代码。如果你很幸运,开发人员读到了这篇文章,他就是这里的成员stackoverflow.com/users/152726/will-strohl
-
@shobhana 你是说如果你注释掉那行调用 InitHccApp 的代码一切正常?
-
另外,您能否提供一些关于该代码在何时何地运行的上下文?
-
如果我们注释掉对 hcc 方法的所有调用,则该过程将完成并且不会引发任何错误。
-
当我们将产品添加到购物车时代码正在运行。
标签: e-commerce dotnetnuke upgrade