Categories

Featured templates

PrestaShop 1.6. How to change number of symbols in different sections

Andre Flores May 28, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

This tutorial shows how to change number of symbols in category short description, product short description and product name in category listing of PrestaShop 1.6.x.

  1. Find class of the element you need to update using the Inspect Element tool of FireBug addon:

    PrestaShop 1.6. How to change number of symbols in different sections-1

  2. Copy class or element ID and open the themes/themeXXX directory of the template package. Look for the class required using Search tool of your FTP extension. Next open and edit the required file on server:

  3. Connect to server via FTP or open cPanel File manager and navigate to themes/themeXXX directory of PrestaShop installation..

  4. To change category short description length, open the category.tpl file, find the following code:

    <div id="category_description_short">{$description_short}</div>

    Change it to:

    <div id="category_description_short">{$description_short|truncate:25:'...'}</div>

    Next, replace 25 with number of symbols you would like to display.

  5. To change product name length on category listing page, open the product-list.tpl file located in the themes/themeXXX directory of PrestaShop installation, find the following line:

    		<span class="list-name">{$product.name|truncate:100:'...'|escape:'html':'UTF-8'}</span>
    		<span class="grid-name">{$product.name|truncate:25:'...'|escape:'html':'UTF-8'}</span>

    Replace number of symbols in truncate with yours. Please note that you will need to change number of symbols for both: grid and list styles.

  6. To change product short description length on category listing page, open the product-list.tpl file located in the themes/themeXXX directory of PrestaShop installation, find the following line:

    		<span class="list-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</span>
    		<span class="grid-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:40:'...'}</span>
  7. Save changes in files and refresh the front-end with Ctrl/Cmd+F5 hotkeys to see changes.

Feel free to check the detailed video tutorial below:

PrestaShop 1.6. How to change number of symbols in different sections

Premium Prestashop Themes
This entry was posted in PrestaShop Tutorials and tagged number, Prestashop, 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