commerce-product-sku.tpl.php in Commerce Core 7
Default theme implementation to present the SKU on a product page.
Available variables:
- $sku: The SKU to render.
- $label: If present, the string to use as the SKU label.
Helper variables:
- $product: The fully loaded product object the SKU represents.
1 theme call to commerce-product-sku.tpl.php
- CommerceProductEntityController::buildContent in modules/
product/ includes/ commerce_product.controller.inc - Builds a structured array representing the entity's content.
File
modules/product/theme/commerce-product-sku.tpl.phpView source
<?php
/**
* @file
* Default theme implementation to present the SKU on a product page.
*
* Available variables:
* - $sku: The SKU to render.
* - $label: If present, the string to use as the SKU label.
*
* Helper variables:
* - $product: The fully loaded product object the SKU represents.
*/
if ($sku) {
?>
<div class="commerce-product-sku">
<?php
if ($label) {
?>
<div class="commerce-product-sku-label">
<?php
print $label;
?>
</div>
<?php
}
?>
<?php
print $sku;
?>
</div>
<?php
}