News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to show more "short description" contents in the category view?

Started by DH, September 30, 2012, 21:48:43 PM

Previous topic - Next topic

DH

As question in the title, I realize that it's only 43 characristics limited in the category list of every item. Since I made it as list view, so I wish the visitors could see more details before they click into the product details.
Where could I expend the limit to be suppose 120 characteristics or something?

God bless you, my mentor!

[attachment cleanup by admin]
---------------------------------------
PHP v5.3.1          |  Apache v2.2.41
MySQL v5.1.41   |  XAMPP 1.7.3
phpMyAdmin v3.2.4
Windows 7 SP1 Professional
---------------------------------------

bytelord

Hello,

You should edit your category/default.php located under your custom template (i suppose you are using template overrides cause as you said you have create it as list).
So in the vm default category/tmpl/default.php template around line 253 you will find the following code:

<?php // Product Short Description
     
if(!empty($product->product_s_desc)) { ?>

<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc40'...'?>
</p>
<?php ?>


As you can see there is the usage of function limitStringByWord that limit the characters to 40, so you could change that "40" to "120".

In case you are not using template overrides the original template file is located under your_joomla_folder\components\com_virtuemart\views\category\tmpl\default.php
Copy that file under your_joomla_folder\templates\your_joomla_template\html\com_virtuemart\category\default.php and edit as you wish.

More information about template overrides you find here: http://forum.virtuemart.net/index.php?topic=98505.0 and here http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system


Hope it helps you out.


Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

DH

This works, and I done a few more jobs through your method! Thank you so much!~~~
---------------------------------------
PHP v5.3.1          |  Apache v2.2.41
MySQL v5.1.41   |  XAMPP 1.7.3
phpMyAdmin v3.2.4
Windows 7 SP1 Professional
---------------------------------------