Active
Project:
UC Upsell
Version:
6.x-1.21
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2010 at 17:22 UTC
Updated:
27 Jul 2011 at 12:35 UTC
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
Comment #1
FranCarstens commentedDoes anybody know how to do this?
Comment #2
FranCarstens commentedAnybody?
Comment #3
FranCarstens commentedOkay, 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.
Comment #4
BigMike commentedNice work, this is useful for me also. Thanks mintsauce!
Comment #5
jday commentedI 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'?