News:

Support the VirtueMart project and become a member

Main Menu

Short Description too short in Product Overview

Started by Bronko, January 28, 2012, 00:01:17 AM

Previous topic - Next topic

Bronko

Hi all,

how can i extend the length of the short description in the Product Overview of an Category? (see attachment)
The short Description is fixed to about 40 characters.

thx...

[attachment cleanup by admin]

lipes

VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO

<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>
                  </p>
                  <?php } ?>


^^^ notice the 40 that can be changed.

views/category/tmpl/default.php

Bronko

Thx... that was very fast and it solved my Problem!!!


lipes

#4
any solution to put this code in Product Details default.php ? i try to copy this and another codes but they doesnt work ...

Right! It works!

<?php echo shopFunctionsF::limitStringByWord($this->product->product_s_desc10'...'?>
<?php ?>


tks :)
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

PRO


Quote from: lipes on April 03, 2012, 19:58:41 PM
any solution to put this code in Product Details default.php ?

i try to copy this and another codes but they doesnt work ...


lipes, I know I have explained $this(pun intended) to you before

http://forum.virtuemart.net/index.php?topic=100696.0

rippergr

#6
Can someone give me a little help with the same problem
In fact the problem is the oposite. My short description is very long and it doesnt seem to cut it in some characters( 40)
I changed the file to 20 characters but the result is the same.
You can see the problem here
http://www.shop.trelesprosfores.gr/index.php?option=com_virtuemart&view=category&virtuemart_category_id=436

I found solution to my problem here
http://forum.virtuemart.net/index.php?topic=99892.msg346688#msg346688
Visit my webpage www.comworld.gr

mikekiy

Hi All

Does anybody know a way to make the Short Description variable an override rather than a code hack?

Having to constantly edit components/com_virtuemart/views/category/tmpl/default.php on every site each time we upgrade is tiresome.

As it isn't controlled by CSS I can't figure a way to do it - can anybody help?

Many thanks

Mike

jenkinhill

Just use the edited template file as an override, the file should be templates/[yourjoomlatemplate]/html/com_virtuemart/category/default.php

See http://docs.virtuemart.net/tutorials/33-templating-layouts.html and http://www.ostraining.com/blog/joomla/overrides

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

mikekiy