function uc_dropdown_attributes_ajax_callback in Dropdown Attributes 7
Same name and namespace in other branches
- 8 uc_dropdown_attributes.module \uc_dropdown_attributes_ajax_callback()
Ajax callback for attribute selection form elements.
1 string reference to 'uc_dropdown_attributes_ajax_callback'
- uc_dropdown_attributes_product_alter in ./
uc_dropdown_attributes.module - Alter products in preparation for drop down attributes.
File
- ./
uc_dropdown_attributes.module, line 210 - Show/hide attributes based on the values of other attributes.
Code
function uc_dropdown_attributes_ajax_callback($form, $form_state) {
if (count($form_state['triggering_element']['#parents']) == 4) {
// This is a product kit.
$key = $form_state['triggering_element']['#parents'][1];
return $form['products'][$key]['attributes'];
}
return $form['attributes'];
}