Active
Project:
Ubercart Dependent Attributes
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2010 at 11:11 UTC
Updated:
15 Jul 2010 at 11:11 UTC
uc_dependent_attributes assumes that the cart form id always contains a node ID. Although this is usually the case, ubercart supports adding the node id, and not adding the node id.
function theme_uc_product_add_to_cart($node, $teaser = 0, $page = 0) {
$output = '<div class="add-to-cart">';
if ($node->nid) {
$output .= drupal_get_form('uc_product_add_to_cart_form_'. $node->nid, $node);
}
else {
$output .= drupal_get_form('uc_product_add_to_cart_form', $node);
}
$output .= '</div>';
return $output;
}
Here's a patch to check for 'uc_product_add_to_cart_form' rather than 'uc_product_add_to_cart_form_'
| Comment | File | Size | Author |
|---|---|---|---|
| uc_dependent_attributes_cart_form_.patch | 702 bytes | mikejoconnor |