function basic_cart_preprocess_field in Basic cart 7.3
Implements template_preprocess_field().
Stupid fix for having drupal take into consideration the value returned by basic_cart_field_formatter_view() for formatting the "Add to cart" button.
Without this fix, the button doesn't appear, since there is no value for it.
File
- ./
basic_cart.module, line 382
Code
function basic_cart_preprocess_field(&$variables, $hook) {
$field = $variables['element'];
if ($field['#field_name'] == 'add_to_cart') {
$variables['items'][] = $field[0];
}
}