Categories

Featured templates

PrestaShop 1.5.x. How to change amount of symbols in different sections

Rating: 5.0/5. From 1 vote.
Please wait...

This tutorial will show you how to change amount of symbols displayed in different template sections.

PrestaShop. How to change amount of symbols in different sections

1. We can see that sub category names are cut off on the screenshot below.

2. You need to locate appropriate code using Firebug developer plugin for FireFox or using browser developer tools.

2.1. Look for appropriate class or ID using firebug. In our case id="subcategories" should be modified.

2.2. Open Notepad++ software (or any code/text editor) and search class name in all template files. You may use any other alternative software that has the same function. Press CTRL+F in order to open search dialog and open Find in Files tab. There you need to specify class name and folder in which your template files are located. Please check the screenshot below. Press Find All button in order to perform search operation.

2.3. After that you will see file names in which class you were looking for was specified. Open this file. You will see class and code that looks like highlighted on the screenshot.

3.You need to modify number of symbols in the following code:

<span>{$subcategory.name|escape:'htmlall':'UTF-8'|truncate:15:'...'}</span>

4. We can see that 15 symbols will appear. Set desired value. For example change it to 45. Code will look like:

<span>{$subcategory.name|escape:'htmlall':'UTF-8'|truncate:45:'...'}</span>

5. Save changes, upload modified file and clear PrestaShop cache.

6. Refresh your site. We can see that full subcategory name appear. Please perform the same actions for other sections using the same method.

Feel free to check the detailed video tutorial below:

PrestaShop. How to change amount of symbols in different sections

Premium Prestashop Templates
This entry was posted in PrestaShop Tutorials and tagged archived_tutorial, change, limit, Prestashop, symbols, text, truncate. 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