Categories

Featured templates

Magento. How to display “SKU” attribute on product view and products listing pages

Ray Taylor April 6, 2015
Rating: 3.5/5. From 4 votes.
Please wait...

In this tutorial you will learn how to display the SKU value on Product and Category pages in Magento template(s).

Magento. How to display “SKU” attribute on product view and products listing pages

  1. In this example, we will add the SKU value right under the product name:

    magento_sku1

  2. Open view.phtml file located in app/design/frontend/default/themeXXX/template/catalog/product directory using your FTP client or FileManager in your Hosting Control panel.

  3. Search for product-name text.

  4. You will need to add the following code right after the closing h1 tag and before the closing div:

    <h3><?php echo $this->__('SKU:') . $this->htmlEscape($_product->getData('sku'));?></h3>
    

    magento_sku2

  5. Do the same for list.phtml file located in app/design/frontend/default/themeXXX/template/catalog/product directory.

  6. Do the same to alter items in grid view.

  7. Note that there are two places where you need to add the code. One for Grid view and anoother for List view.

  8. Save files and upload to the server replacing the original files. Reload your site to see the changes.

    magento_sku3

Thank you for reading this tutorial. Now you know how to add the SKU value in Magento store.

Feel free to check the detailed video tutorial below:

Magento. How to display “SKU” attribute on product view and products listing pages

Magento Responsive Templates
This entry was posted in Magento Tutorials and tagged attribute, Magento, page, product, SKU. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket