Page 1 of 1

Wishlist Error after upgrade to 7.0.3

Posted: Mon Aug 17, 2009 8:48 am
by BBHartley
I have not been able to resolve this error since we upgraded to 7.0.3

[[ConLib:MyWishlistPage]] e:\hshome\classichq\classichq.com\ConLib\MyWishlistPage.ascx.cs(107): error CS0117: 'CommerceBuilder.Users.WishlistItem' does not contain a definition for 'WishlistItemKitProducts'

I have gone back to the original 7.0.3 ConLib\MyWishlistPage.ascx.cs and MyWishlistPage.ascx pages - no change. I have tried the 7.0.2 pages. Works fine on our 7.0.2 store.

Any help would be appreciated.

Thanks!

Re: Wishlist Error after upgrade to 7.0.3

Posted: Mon Aug 17, 2009 8:55 am
by mazhar
Make sure that your upgrade was complete. It seems to me that either CommerceBuilder.dll doesn't get updated or the code. One of them is old. Go to Merchant side and then navigate to Help -> About AbleCommerce page and see the version of CommerceBuilder.

Re: Wishlist Error after upgrade to 7.0.3

Posted: Mon Aug 17, 2009 5:10 pm
by BBHartley
Here is the result. We are hosted by Able and were upgraded by Able...

PLATFORM: ASP.NET
VERSION: 7.0.3
BUILD: 12458
MSSQL v2000
AC SCHEMA v2000

AjaxControlToolkit: 1.0.20229.20821
CommerceBuilder: 7.3.12065.0
CommerceBuilder.AbleCommerceTax: 7.3.12396.0
CommerceBuilder.AcTestProvider: 1.0.0.0
CommerceBuilder.AustraliaPost: 7.1.0.0
CommerceBuilder.AuthorizeNet: 7.0.9764.0
CommerceBuilder.BankOfCanada: 7.3.0.0
CommerceBuilder.CanadaPost: 7.0.0.0
CommerceBuilder.Configuration: 7.3.12065.0
CommerceBuilder.CyberSource: 7.0.9310.0
CommerceBuilder.Data: 7.3.12065.0
CommerceBuilder.DataClient.Api: 7.0.3.1
CommerceBuilder.DataClient.Csv: 7.0.34.0
CommerceBuilder.DHLInternational: 7.2.11307.0
CommerceBuilder.ECB: 7.0.0.0
CommerceBuilder.FedEx: 7.0.9725.0
CommerceBuilder.GoogleCheckout: 7.0.10052.0
CommerceBuilder.InternetSecure: 7.0.9764.0
CommerceBuilder.LinkPoint: 7.0.9764.0
CommerceBuilder.Paradata: 7.0.9764.0
CommerceBuilder.PayFlowPro: 7.0.10061.0
CommerceBuilder.PayJunction: 7.2.11284.0
CommerceBuilder.PayPal: 7.3.12238.0
CommerceBuilder.Protx: 7.3.12327.0
CommerceBuilder.Services: 7.3.12065.0
CommerceBuilder.SkipJack: 7.0.9764.0
CommerceBuilder.UPS: 7.0.10041.0
CommerceBuilder.USPS: 7.0.9728.0
CommerceBuilder.Web: 7.3.12065.0
ComponentArt.Web.UI: 2008.2.1267.3
CyberSource.Base: 2.0.0.0
CyberSource.Clients: 5.0.2.0
CyberSource.Clients.XmlSerializers: 5.0.2.0
CyberSource.WSSecurity: 2.0.0.0
CybsWSSecurityIOP: 1.0.0.0
edtFTPnet: 1.2.4.0
FredCK.FCKeditorV2: 2.5.2912.21007
ICSharpCode.SharpZipLib: 0.85.5.452
LinkPointTransaction: 1.0.1797.29766
log4net: 1.2.10.0
Microsoft.Practices.EnterpriseLibrary.Common: 2.0.0.0
Microsoft.Practices.EnterpriseLibrary.Data: 2.0.0.0
Microsoft.Practices.ObjectBuilder: 1.0.51205.0
Microsoft.Web.Preview: 1.2.61025.0
NVelocity: 7.2.0.0
PaygatewayNET: 3.0.0.0
paypal_base: 4.2.1.0
PFProCOMLib: 1.0.0.0
PFProdotNET: 0.0.0.0
Validators: 1.0.0.0
WebChart: 1.1.1.6
wwHoverPanel: 1.85.0.0

Re: Wishlist Error after upgrade to 7.0.3

Posted: Tue Aug 18, 2009 7:29 am
by mazhar
It seems to me that your MyWishlistPage control is old, that's why its looking for something that is not available in latest dll. Make sure that you are not using MyWishlistPage by moving it under custom folder.

Re: Wishlist Error after upgrade to 7.0.3

Posted: Tue Aug 18, 2009 8:58 am
by BBHartley
The files had not been modified from the original. I have copied the original 7.0.3 ConLib\MyWishlistPage.ascx (Date: 2/10/2009 8K) and ConLib\MyWishlistPage.ascx.cs (Date: Date: 2/10/2009 6K) and continue to get the identical error. It worked just fine in 7.0.2. We don't even use kits, but I can't simply delete the section of offending code.


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CommerceBuilder.Common;
using CommerceBuilder.Products;
using CommerceBuilder.Users;
using CommerceBuilder.Utility;

public partial class ConLib_MyWishlistPage : System.Web.UI.UserControl
{
protected void ClearWishlistButton_Click(object sender, EventArgs e)
{
Token.Instance.User.PrimaryWishlist.Items.DeleteAll();
WishlistGrid.DataBind();
}

protected void UpdateButton_Click(object sender, EventArgs e)
{
// build hashtable of new quantities
Wishlist w = Token.Instance.User.PrimaryWishlist;
int rowIndex = 0;
foreach (GridViewRow saverow in WishlistGrid.Rows)
{
int wishlistItemId = (int)WishlistGrid.DataKeys[rowIndex].Value;
int itemIndex = w.Items.IndexOf(wishlistItemId);
if (itemIndex > -1)
{
WishlistItem item = w.Items[itemIndex];
TextBox desired = (TextBox)saverow.FindControl("Desired");
DropDownList priority = (DropDownList)saverow.FindControl("Priority");
TextBox comment = (TextBox)saverow.FindControl("Comment");
int des = AlwaysConvert.ToInt(desired.Text,item.Desired);
if(des > System.Int16.MaxValue) des = System.Int16.MaxValue;
item.Desired = (System.Int16)des;
item.Priority = AlwaysConvert.ToByte(priority.SelectedValue);
item.Comment = StringHelper.StripHtml(comment.Text.Trim());
item.Save();
rowIndex++;
}
}
WishlistGrid.DataBind();
}

protected void KeepShoppingButton_Click(object sender, EventArgs e)
{
Response.Redirect(NavigationHelper.GetLastShoppingUrl());
}

protected void EmailWishlistButton_Click(object sender, EventArgs e)
{
Response.Redirect("~/Members/SendMyWishList.aspx");
}

protected void WishlistGrid_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
{
if (!string.IsNullOrEmpty(e.CommandArgument.ToString()))
{
int rowIndex = AlwaysConvert.ToInt(e.CommandArgument);
int wishlistItemId = (int)WishlistGrid.DataKeys[rowIndex].Value;
switch (e.CommandName)
{
case "Basket":
Wishlist wishlist = Token.Instance.User.PrimaryWishlist;
int index = wishlist.Items.IndexOf(wishlistItemId);
if (index > -1)
{
wishlist.Items.MoveToBasket(index, Token.Instance.User.Basket);
Response.Redirect("~/Basket.aspx");
}
WishlistGrid.DataBind();
break;
}
}
}

protected void WishlistGrid_DataBound(object sender, System.EventArgs e)
{
if ((WishlistGrid.Rows.Count > 0))
{
ClearWishlistButton.Visible = true;
UpdateButton.Visible = true;
//ONLY SHOW THE SEND LINK IF SMTP SERVER IS UNAVAILABLE
EmailWishlistButton.Visible = (!String.IsNullOrEmpty(Token.Instance.Store.Settings.SmtpServer));
if (EmailWishlistButton.Visible && Token.Instance.User.IsAnonymous)
EmailWishlistButton.OnClientClick = "return confirm('Only registered users can email a wishlist. You will be asked to login or register if you continue.')";
}
else
{
ClearWishlistButton.Visible = false;
UpdateButton.Visible = false;
EmailWishlistButton.Visible = false;
}
}

public List<KitProduct> GetKitProducts(WishlistItem item)
{
// BUILD LIST OF KIT PRODUCTS
List<KitProduct> kitProductList = new List<KitProduct>();
foreach (WishlistItemKitProduct wikp in item.WishlistItemKitProducts)
{
kitProductList.Add(wikp.KitProduct);
}
return kitProductList;
}

protected void WishlistItemsDs_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["wishlistId"] = Token.Instance.User.PrimaryWishlist.WishlistId;
}

protected LSDecimal GetPrice(WishlistItem item)
{
//DETERMINE THE BASE PRICE OF THE ITEM
LSDecimal price;
if (item.Product.UseVariablePrice)
{
price = item.Price;
if (price < item.Product.MinimumPrice) price = item.Product.MinimumPrice;
if (price > item.Product.MaximumPrice) price = item.Product.MaximumPrice;
item.Price = price;
}
else
{
// ADD PRICE OF KIT PRODUCTS AS WELL
List<int> kpid = new List<int>();
foreach (WishlistItemKitProduct wikp in item.WishlistItemKitProducts)
{
kpid.Add(wikp.KitProductId);
}
ProductCalculator c = ProductCalculator.LoadForProduct(item.ProductId, 1, item.OptionList, kpid);
price = c.Price;
}
return TaxHelper.GetShopPrice(price, item.Product.TaxCodeId);
}

protected int GetWishListId()
{
return Token.Instance.User.PrimaryWishlist.WishlistId;
}

protected void Page_Load(object sender, EventArgs e)
{
//VALIDATE THE WISHLIST
List<string> warnMessages;
bool isValid = Token.Instance.User.PrimaryWishlist.Validate(out warnMessages);
//DISPLAY ANY WARNING MESSAGES
if (!isValid)
{
WarningMessageList.DataSource = warnMessages;
WarningMessageList.DataBind();
}
}
}

Re: Wishlist Error after upgrade to 7.0.3

Posted: Tue Aug 18, 2009 9:24 am
by Logan Rhodehamel
The files you posted seem to be from 7.0.2 (which had a release date was 2/10/2009) and the files I am showing from the build should be different (which would be dated around 6/1/2009). Do you have the original 7.0.3 upgrade package that you downloaded? I would first suggest to re-extract the original files and check them there.

Re: Wishlist Error after upgrade to 7.0.3

Posted: Tue Aug 18, 2009 9:55 am
by BBHartley
I'll download 7.0.3 again. That is from the download I have.

Thanks

Re: Wishlist Error after upgrade to 7.0.3

Posted: Tue Aug 18, 2009 10:10 am
by BBHartley
Thank you. Apparently the directory did not get labeled correctly. It clearly had 7.0.2 in it. I redownloaded the update and all is fixed.

I appreciate your help.