I'm using Content Template on several sites and running into a very weird thing on one of them. I'm getting a bunch of product data from outside of Drupal and presenting it on a Drupal page, and it's all working fine except in this one place. What's happening is that my price data isn't printing out correctly.
Body Variables on the errant site shows good prices coming in
$node->field_price_list[1]
$38.00
But when I do print $node->field_price_list[1]; in the template, what I get is .00
I've copied a content template that's showing prices just fine on one site and pasted it in on this other site, and it doesn't work. I could understand if there was some CSS involved, but this happens even with no CSS or style attributes at all.
Going nuts here trying to figure out what's different about this one site. Has anyone else out there ever run into something similar with Content Template?
still have a little hair left,
SB
Comments
duh, theme
Turns out the problem was in the theme. This particular site is using a rather funky, non-Drupalish theme that preg_replaces $content into a wrapper. Since the prices are preformatted and include a $, PHP was apparently interpolating the dollar amounts as variables--which, of course, evaluated to null--so that only the cents part was printing out. Definitely going to be moving this site over to a real theme!
SB