3 replies [Last post]
kmhanser's picture
Offline
Joined: 08/30/2011
Juice: 19
Was this information Helpful?

I've been trying to figure this out for hours, and every time i think I have it... I don't Smiling

I have a drupal 7.x site, running Ubercart 7.x-3.x-dev, and I have added a field called "Manufacturer" to the "product" content type. The problem is, I can't figure out how to get this field to show up when I'm viewing a product.

I added the field thru the drupal admin interface like you would for any normal content-type, and in the "manage display" settings, it is set to display. However, no manufacturer field is listed when I view a product.

I've been looking thru the ubercart code (uc_product mostly), and I thought maybe I needed to modify the hook_view declaration and add my field there, but that didn't work. Then I mucked around in uc_product.views.inc but I'm not any closer to making this work.

At this point I'm thinking that there has to be something incredibly simple that I've missed, since this doesn't seem like it should be that hard of a task. For any other content types, I just create the fields as I need them and voila! they show up... but not with the Ubercart "product" content type..

Can someone please point me in the right direction so I can get this field added to the product display page?

thanx!

-k

end user's picture
Offline
Joined: 01/11/2008
Juice: 1728
<?php print

<?php print render($content['field_manufacturer']); ?> If your field is called field_manufacturer

kmhanser's picture
Offline
Joined: 08/30/2011
Juice: 19
Re: <?php print

Awesome, thanks! Where do I put that... in the template?

thx

kmhanser's picture
Offline
Joined: 08/30/2011
Juice: 19
Re: Re: <?php print

Ok, I think I figured it out (at least some of the way). Apparently there's "something" wrong in my theme that's causing my field(s) to not display. Changed the them to bartik and it shows up. Gotta figure out what's wrong w/the theme now.

thx!

-k