Skip to main content
added 3 characters in body; edited title
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

show SKU in ProductviewProduct view only from simple products

I think its easy but i dontdon't found a way. In the product view.phtml I,I want to show the SKU. But only for simple Products. Is there any Way like this:

<div class="product-sku">
<h3>
<?php echo $_helper->productAttribute($_product,$_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>
</h3>
</div>

This way dontdon't work.

show SKU in Productview only from simple products

I think its easy but i dont found a way. In the product view.phtml I want to show the SKU. But only for simple Products. Is there any Way like this:

<div class="product-sku">
<h3>
<?php echo $_helper->productAttribute($_product,$_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>
</h3>
</div>

This way dont work.

show SKU in Product view only from simple products

I think its easy but i don't found a way. In the product view.phtml ,I want to show the SKU. But only for simple Products. Is there any Way like this:

<div class="product-sku">
<h3>
<?php echo $_helper->productAttribute($_product,$_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>
</h3>
</div>

This way don't work.

deleted 244 characters in body
Source Link
Marcel
  • 165
  • 2
  • 14

I think its easy but i dont found a way. In the product view.phtml I want to show the SKU. But only for simple Products. Is there any Way like this:

productAttribute($_product, $_product->getName(), 'name') ?>

productAttribute($_product, $_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>

<div class="product-sku">
<h3>
<?php echo $_helper->productAttribute($_product,$_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>
</h3>
</div>

This way dont work.

I think its easy but i dont found a way. In the product view.phtml I want to show the SKU. But only for simple Products. Is there any Way like this:

productAttribute($_product, $_product->getName(), 'name') ?>

productAttribute($_product, $_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>

This way dont work.

I think its easy but i dont found a way. In the product view.phtml I want to show the SKU. But only for simple Products. Is there any Way like this:

<div class="product-sku">
<h3>
<?php echo $_helper->productAttribute($_product,$_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>
</h3>
</div>

This way dont work.

Source Link
Marcel
  • 165
  • 2
  • 14

show SKU in Productview only from simple products

I think its easy but i dont found a way. In the product view.phtml I want to show the SKU. But only for simple Products. Is there any Way like this:

productAttribute($_product, $_product->getName(), 'name') ?>

productAttribute($_product, $_product->getSku()->addAttributeToFilter('type_id', 'simple'), 'sku') ?>

This way dont work.