| Project: | Ubercart Contributions |
| Component: | Code |
| Category: | |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Project:
Ubercart This seems to be because the submit button elements are not getting unique ID attributes. A quick fix for me was to do this:
CHANGE
<?php
function uc_catalog_buy_it_now_form($node){
$form = array();
$form['#base'] = 'uc_catalog_buy_it_now_form';
$form['nid'] = array('#type' => 'hidden', '#value' => $node->nid);
$form['submit'] = array('#type' => 'submit', '#value' => variable_get('uc_teaser_add_to_cart_text', t('Add to cart')), );
return $form;
}
?>TO
<?php
function uc_catalog_buy_it_now_form($node){
$form = array();
$form['#base'] = 'uc_catalog_buy_it_now_form';
$form['nid'] = array('#type' => 'hidden', '#id' => 'edit-nid-'. $node->nid, '#value' => $node->nid);
$form['submit'] = array('#type' => 'submit', '#id' => 'edit-submit-'. $node->nid, '#value' => variable_get('uc_teaser_add_to_cart_text', t('Add to cart')), );
return $form;
}
?>You probably would want to do something a little better with trees or something, I just didn't really want to get into modifying the submit function.
Scott

