You are here

function uc_product_get_description in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_product/uc_product.module \uc_product_get_description()
  2. 7.3 uc_product/uc_product.module \uc_product_get_description()

Returns HTML for the product description.

Modules adding information use hook_product_description() and modules wanting to alter the output before rendering can do so by implementing hook_product_description_alter(). By default, all descriptions supplied by modules via hook_product_description() are concatenated together.

NOTE: hook_product_description() supercedes the deprecated hook_cart_item_description().

Parameters

$product: Product object.

Return value

HTML rendered product description.

7 calls to uc_product_get_description()
hook_cart_display in docs/hooks.php
Controls the display of an item in the cart.
op_products_customer_table in uc_order/uc_order.order_pane.inc
Builds the order customer's view products table.
op_products_view_table in uc_order/uc_order.order_pane.inc
Builds the order view products table.
theme_cart_review_table in uc_cart/uc_cart_checkout_pane.inc
Formats the cart contents table on the checkout page.
theme_uc_checkout_pane_cart_review in uc_cart/uc_cart_checkout_pane.inc
Themes cart items on the checkout review order page.

... See full list

File

uc_product/uc_product.module, line 1841
The product module for Ubercart.

Code

function uc_product_get_description($product) {

  // Run through implementations of hook_product_description()
  $description = module_invoke_all('product_description', $product);

  // Now allow alterations via hook_product_description_alter()
  drupal_alter('product_description', $description, $product);
  return drupal_render($description);
}