Product Page and NVelocity Error

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
trozzi
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 104
Joined: Wed Oct 05, 2005 4:44 pm
Contact:

Product Page and NVelocity Error

Post by trozzi » Tue Sep 30, 2008 4:22 pm

We had a situationthere the Manufactuerid was null and this statement errored. Can you test for null valuse in the NVelocity code?


#if ($Product.ManufacturerId != 0)
<p><strong>Manufacturer:</strong> <a href="Search.aspx?m=$Product.ManufacturerId">$Product.Manufacturer.Name</a></p>
#end

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Product Page and NVelocity Error

Post by Shopping Cart Admin » Tue Sep 30, 2008 6:31 pm

Hello,

I don't have an answer on the null value question, however I'd like to find out how you wound up with a null value. Direct database update?
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Product Page and NVelocity Error

Post by AbleMods » Tue Sep 30, 2008 7:12 pm

Create a product.

Create a manufacturer.

Assign the manufacturer to the product.

Delete the manufacturer.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: Product Page and NVelocity Error

Post by Shopping Cart Admin » Tue Sep 30, 2008 7:24 pm

Hello Joe,

Must of been something added after the release you're using, I get the follow message.
This manufacturer has one or more associated products. Indicate what manufacturer these products should be changed to when Bell is deleted.
However selecting 'none' does leave the manufacture ID as null, which is the default for most all products in our sample data.

So given thousands of installs have been created with the manufactureID being Null why has this not come up before?

I'm guessing custom Nvelocity code at the scriptlet level. Except in emails we don't much processing of this nature using NVelocity.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Post Reply