diff --git a/modules/product/commerce_product.module b/modules/product/commerce_product.module index a1abaee..a668951 100644 --- a/modules/product/commerce_product.module +++ b/modules/product/commerce_product.module @@ -231,6 +231,12 @@ function commerce_product_field_extra_fields() { 'theme' => 'commerce_product_title', 'weight' => -5, ), + 'status' => array( + 'label' => t('Status'), + 'description' => t('Product status'), + 'theme' => 'commerce_product_status', + 'weight' => 5, + ), ), ); } @@ -919,4 +925,4 @@ function template_preprocess_commerce_product_sku(&$variables) { */ function template_preprocess_commerce_product_title(&$variables) { $variables['title'] = check_plain($variables['title']); -} \ No newline at end of file +} diff --git a/modules/product/includes/commerce_product.controller.inc b/modules/product/includes/commerce_product.controller.inc index 25b0411..acd132e 100644 --- a/modules/product/includes/commerce_product.controller.inc +++ b/modules/product/includes/commerce_product.controller.inc @@ -182,19 +182,14 @@ class CommerceProductEntityController extends DrupalCommerceEntityController { '#markup' => theme('commerce_product_sku', array('sku' => $product->sku, 'label' => t('SKU:'), 'product' => $product)), '#attached' => $attached, ); - - // Only display the title and status on the full page view. - if ($view_mode == 'full') { - $content['title'] = array( - '#markup' => theme('commerce_product_title', array('title' => $product->title, 'label' => t('Title:'), 'product' => $product)), - '#attached' => $attached, - ); - - $content['status'] = array( - '#markup' => theme('commerce_product_status', array('status' => $product->status ? t('Active') : t('Disabled'), 'label' => t('Status:'), 'product' => $product)), - '#attached' => $attached, - ); - } + $content['title'] = array( + '#markup' => theme('commerce_product_title', array('title' => $product->title, 'label' => t('Title:'), 'product' => $product)), + '#attached' => $attached, + ); + $content['status'] = array( + '#markup' => theme('commerce_product_status', array('status' => $product->status ? t('Active') : t('Disabled'), 'label' => t('Status:'), 'product' => $product)), + '#attached' => $attached, + ); return parent::buildContent($product, $view_mode, $langcode, $content); }