After updating to 7.04 when I try to build the web site locally (in VS 2008) I get the following 2 errors:
'CommerceBuilder.Products.Product' does not contain a definition for 'ProductTemplateId' - Line 393 in BatchUpdate.aspx.cs
'CommerceBuilder.Products.Product' does not contain a definition for 'ProductTemplateId' and no extension method 'ProductTemplateId' accepting a first argument of type 'CommerceBuilder.Products.Product' could be found (are you missing a using directive or an assembly reference?) - Line 406 in BatchUpdate.aspx.cs
I can't build the site any longer because of these errors .
Can anyone help me resolve them?
AbleCommerce 7.04 - can't compile after update
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: AbleCommerce 7.04 - can't compile after update
You must have some customized code with templates or something you didn't overwrite with the upgrade. Able changed the code for templates in 7.0.4 so that the product can have more than one template.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: AbleCommerce 7.04 - can't compile after update
Thanks for responding so quickly Judy!
I do not have any custom code. I have not even started customizing the shopping card
.
All I did was following:
1. Started evaluation with AbleCommerce 7.03 (everything compiled fine there)
2. We bought the sw and when the new release (7.04) came out I just ran the update following the instructions
3. Since step 2 was done the code does not compile any longer
In my previous post, I mentioned that both errors are in the file Admin\Products\Batching\BatchUpdate.aspx.cs.
If we look the code in there (lines 392-394) it says:
...
case "ProductTemplateId":
product.ProductTemplateId = AlwaysConvert.ToInt(csvReader);
break;
...
The first error is on line 393 (the part in bold - above)
Lines 395-407 from the same file:
case "ProductTemplate":
// CREATE A NEW OBJECT OR LOAD EXISTING
ProductTemplate productTemplate = null;
ProductTemplateCollection productTemplateCollection = ProductTemplateDataSource.LoadForCriteria("NAME = '" + StringHelper.SafeSqlString(csvReader) + "'");
if (productTemplateCollection.Count == 0)
{
messages.Add("Unable to resolve product template \"" + csvReader + "\" for product \"" + product.Name + "\".");
break;
}
else
productTemplate = productTemplateCollection[0];
product.ProductTemplateId = productTemplate.ProductTemplateId;
break;
The second error is on line 406 (see bold part above).
I do not have any custom code. I have not even started customizing the shopping card

All I did was following:
1. Started evaluation with AbleCommerce 7.03 (everything compiled fine there)
2. We bought the sw and when the new release (7.04) came out I just ran the update following the instructions
3. Since step 2 was done the code does not compile any longer
In my previous post, I mentioned that both errors are in the file Admin\Products\Batching\BatchUpdate.aspx.cs.
If we look the code in there (lines 392-394) it says:
...
case "ProductTemplateId":
product.ProductTemplateId = AlwaysConvert.ToInt(csvReader);
break;
...
The first error is on line 393 (the part in bold - above)
Lines 395-407 from the same file:
case "ProductTemplate":
// CREATE A NEW OBJECT OR LOAD EXISTING
ProductTemplate productTemplate = null;
ProductTemplateCollection productTemplateCollection = ProductTemplateDataSource.LoadForCriteria("NAME = '" + StringHelper.SafeSqlString(csvReader) + "'");
if (productTemplateCollection.Count == 0)
{
messages.Add("Unable to resolve product template \"" + csvReader + "\" for product \"" + product.Name + "\".");
break;
}
else
productTemplate = productTemplateCollection[0];
product.ProductTemplateId = productTemplate.ProductTemplateId;
break;
The second error is on line 406 (see bold part above).
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: AbleCommerce 7.04 - can't compile after update
My 7.0.4 build doesn't have the BatchUpdate files. It only has the BatchEdit files. 7.0.3 had those files. So you need to delete them. If you are hesitant about doing something that permanent, exclude them from the project.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: AbleCommerce 7.04 - can't compile after update
Judy, excluding the file BatchUpdate.aspx solved the previous compile errors!
However, new appeared after few steps
The new errors are in the file Admin\Taxes\Providers\AvaTax\Default.aspx.cs:
The type or namespace name 'AvaTax' does not exist in the namespace 'CommerceBuilder.Taxes.Providers' (are you missing an assembly reference?) - Line 11
and
The type or namespace name 'AvaTaxProvider' could not be found (are you missing a using directive or an assembly reference?) - Line 19
Is this again a file that needs to be excluded or?
However, new appeared after few steps

The new errors are in the file Admin\Taxes\Providers\AvaTax\Default.aspx.cs:
The type or namespace name 'AvaTax' does not exist in the namespace 'CommerceBuilder.Taxes.Providers' (are you missing an assembly reference?) - Line 11
and
The type or namespace name 'AvaTaxProvider' could not be found (are you missing a using directive or an assembly reference?) - Line 19
Is this again a file that needs to be excluded or?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: AbleCommerce 7.04 - can't compile after update
Yes, that is an Able bug that showed up after release of 7.0.4.
Here is a link to the patch and other patches.
http://help.ablecommerce.com/upgrades/a ... _7.0.4.htm
Here is a link to the patch and other patches.
http://help.ablecommerce.com/upgrades/a ... _7.0.4.htm
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: AbleCommerce 7.04 - can't compile after update
Fantastic!
Finally everything compiles smoothly
Thanks a lot Judy for leading me patiently towards the solution !!!
Finally everything compiles smoothly

Thanks a lot Judy for leading me patiently towards the solution !!!