Not sure how easy this will be to do, so I'm asking just in case it's something I can do.

I would like to add a textfield under the Title of the product as "subtitle". I'm already using this in my product nodes. Where can I edit to get this done? I looked in the "Renders upsell block" section of uc_upsell_block.inc, but that calls 'upsell item' and $node. I'm not familiar with the inner workings, so I might not be able to do this without too much hassle. Just thought I'd ask, in case there's an "easier" way than hook_alter stuff.

Francois

Comments

FranCarstens’s picture

Does anybody know how to do this?

FranCarstens’s picture

Anybody?

FranCarstens’s picture

Okay, this is a boohaha moment!!!

I was able to add a CCK-text-field like this:
Original Title Line (uc_upsell.module)
// Linked title
$output .= '

';
$output .= l($node->title, 'node/'. $node->nid, array('attributes' => array('class' => 'buy-related-item'), 'html' => TRUE));
$output .= '

';

I copied this line and pasted it underneath, change the "node->title" to the value of my CCK field, and tada!

// Linked subtitle
$output .= '

';
$output .= l($node->field_sub_title[0]['value'], 'node/'. $node->nid, array('attributes' => array('class' => 'buy-related-item'), 'html' => TRUE));
$output .= '

';

Not too shabby.

BigMike’s picture

Nice work, this is useful for me also. Thanks mintsauce!

jday’s picture

I need the user to go to the product page, how can I change the options from only: 'buy now' or 'add to cart', to 'go to product page'?