Wishlist Error after upgrade to 7.0.3

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Wishlist Error after upgrade to 7.0.3

Post by BBHartley » Mon Aug 17, 2009 8:48 am

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!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Wishlist Error after upgrade to 7.0.3

Post by mazhar » Mon Aug 17, 2009 8:55 am

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.

BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Re: Wishlist Error after upgrade to 7.0.3

Post by BBHartley » Mon Aug 17, 2009 5:10 pm

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Wishlist Error after upgrade to 7.0.3

Post by mazhar » Tue Aug 18, 2009 7:29 am

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.

BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Re: Wishlist Error after upgrade to 7.0.3

Post by BBHartley » Tue Aug 18, 2009 8:58 am

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();
}
}
}

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Wishlist Error after upgrade to 7.0.3

Post by Logan Rhodehamel » Tue Aug 18, 2009 9:24 am

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.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Re: Wishlist Error after upgrade to 7.0.3

Post by BBHartley » Tue Aug 18, 2009 9:55 am

I'll download 7.0.3 again. That is from the download I have.

Thanks

BBHartley
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 40
Joined: Tue Nov 18, 2008 11:49 am

Re: Wishlist Error after upgrade to 7.0.3

Post by BBHartley » Tue Aug 18, 2009 10:10 am

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.

Post Reply