Posts Tagged ‘Ubercart’
Customize the Ubercart Product Template
Create the template
cp node.tpl.php node-product.tpl.php
Using the $node object
This is the $node object after installed the Ubercart Marketplace module:
nid
type => product
uid
status
created
changed
comment
promote
moderate
skicky
tnid
translate
vid
revision_uid
title
body => html code
log
revision_timestamp
format
name => user name
picture
data
model => product model
list_price
cost
sell_price
weight
weight_units
length
width
height
length_units
pkg_qty
default_qty
unique_hash
ordering
shippable
field_image_cache => Array
fid
list
data
alt
title
uid
filename
filepath
filemime
filesize
status
timestamp
nid
last_comment_timestamp
last_comment_name
comment_count
taxonomy => Array
tid
vid
name
description
weight
abuse_status
build_mode
readmore
content => Array
image => Array
#weight
#access
#value => html code
#title
#description
#printed
display_price => ...
#content_extra_fields => Array
title => Array
label
description
weight
body_field => ...
menu => ...
taxonomy => ....
base => ...
body => ...
model => ...
#pre_render => Array
body => ...
list_price => ...
cost => ...
sell_price => ...
weight => ...
dimensions => ...
add_to_cart => ...
#title
#description
#children => html code
links => Array
... => Array
title
href
Display the seller’s photo
$variables['account'] = user_load($node->uid);
template_preprocess_user_picture($variables);
echo $variables['picture'];