Categories

Featured templates

Magento. How to change the length of product names on the product listing pages and home page

Charlotte Bennett April 3, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

In this tutorial we will teach you how to change the length of product names in different parts of your Magento store, including the product listing and home pages.

Magento. How to change the length of product names on the product listing pages and home page

Sometimes, the name appears not complete, and you want to encrease the number of symbols in it, or vice versa, you want to shorten the name on specific pages.

Changing the number of symbols in products names on the home page

  1. Usually there are 2 blocks with products on the home page – New products and Special Products (some templates do not include Specials block).

  2. To change the number of symbols in the “New” products names, go to your server using the FTP or hosting cpanel and look for the new.phtml file in the app/design/frontend/default/themeXXX/template/catalog/product” directory:

    Magento_How_to_change_the_number_of_symbols_in product_name_on_the_product _listing_and_home_page_1

  3. Locate the class=”product-name” and edit the number of symbols in mb_substr($small_getName, 0, …,’UTF-8′).’…’;} function:

    Magento_How_to_change_the_number_of_symbols_in product_name_on_the_product _listing_and_home_page_2

  4. Check the update on the frontend of your site after saving the changes.

  5. The number of symbols in the names of Specials can be changed in the sale_carousel_list.phtml (or the sale_default_list.phtml, depending on the widget type used in the template) file in the app/design/frontend/default/themeXXX/template/catalog/product/widget/sale/” folder:

    Magento_How_to_change_the_number_of_symbols_in product_name_on_the_product _listing_and_home_page_3

  6. Edit the number in code starting from <h3 class=”product-name”> part and save the changes:

    Magento_How_to_change_the_number_of_symbols_in product_name_on_the_product _listing_and_home_page_4

Changing the number of symbols on product listing pages

  1. The number of symbols on product listing pages (category page) can be updated in the list.phtml file in the app/design/frontend/default/themeXXX/template/catalog/product” folder on your server. The code is similar to the one in the previous files:

    Magento_How_to_change_the_number_of_symbols_in product_name_on_the_product _listing_and_home_page_5

NOTE: Remember that the lines as well as the the code may differ a little depending on a template.

We hope the tutorial was useful for you. Feel free to check the detailed video tutorial below:

Magento. How to change the length of product names on the product listing pages and home page

Buy Magento Themes
This entry was posted in Magento Tutorials and tagged home, Magento, name, number, product, symbol. 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