I noticed that my prices weren't showing up, even though I've got a price field.

I think the issue is with this line from hit.vm:

<p><b>#field('name')</b> $! number.currency($doc.getFieldValue('price'))</p>

The number.currency() function needs to get passed something that looks like a number, but $doc.getFieldValue() will return "[2.96]", because it could be a list of values.

The square brackets confuse number.currency, so you get no price.

I think this line needs to be:

<p><b>#field('name')</b> $! number.currency($doc.getFirstValue('price'))</p>

...since getFirstValue() returns a single value without brackets.

-- Ken

--------------------------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g




Reply via email to