uc_product_views_handler_add_to_cart_link

Versions
5
uc_product_views_handler_add_to_cart_link($fieldinfo, $fielddata, $value, $data)

Return a formatted add to cart form to display in the View.

Code

contributions/ubercart/uc_product/uc_product.module, line 1263

<?php
function uc_product_views_handler_add_to_cart_link($fieldinfo, $fielddata, $value, $data) {
  $types = module_invoke_all('node_info');
  $product = node_load($data->nid);
  $module = $types[$product->type]['module'];
  if (theme_get_function($module .'_add_to_cart')) {
    return theme($module .'_add_to_cart', $product);
  }
  else {
    return theme('uc_product_add_to_cart', $product);
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.