Page 1 of 1
Product Page and NVelocity Error
Posted: Tue Sep 30, 2008 4:22 pm
by trozzi
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
Re: Product Page and NVelocity Error
Posted: Tue Sep 30, 2008 6:31 pm
by Shopping Cart Admin
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?
Re: Product Page and NVelocity Error
Posted: Tue Sep 30, 2008 7:12 pm
by AbleMods
Create a product.
Create a manufacturer.
Assign the manufacturer to the product.
Delete the manufacturer.
Re: Product Page and NVelocity Error
Posted: Tue Sep 30, 2008 7:24 pm
by Shopping Cart Admin
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.