I have been trying to figure this out for a while..
I've narrowed my searches down to uc_product.module with the following function:
function uc_product_add_to_cart_form($node) {
$form = array();
$form['#base'] = 'uc_product_add_to_cart_form';
$form['nid'] = array('#type' => 'value', '#value' => $node->nid);
if ($node->default_qty > 0 && variable_get('uc_product_add_to_cart_qty', false)) {
$form['qty'] = array('#type' => 'textfield',
'#title' => t('Quantity'),
'#default_value' => $node->default_qty,
'#size' => 5,
'#maxlength' => 6,
);
}
else {
$form['qty'] = array('#type' => 'hidden', '#value' => 1);
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => variable_get('uc_product_add_to_cart_text', t('Add to Cart')),
'#id' => 'edit-submit-'. $node->nid,
'#attributes' => array(
'class' => 'node-add-to-cart',
),
);
return $form;
}
I tried changing the $form['submit'] = array to the following:
$form['submit'] = array(
'#type' => 'image',
'#src' => '
<?php
print base_path() . path_to_theme()
?>
/images/bg_cart.gif',
'#value' => variable_get('uc_product_add_to_cart_text', t('Add to Cart')),
'#id' => 'edit-submit-'. $node->nid,
'#attributes' => array(
'class' => 'node-add-to-cart',
),
But with no success.
Then, I realized there are a lot of different areas where the "Add to Cart" button is displayed, and I think I am really opening up a huge can of worms over here.
Any advice on this?
Thanks!
BigMike

Work'n great!