Hello
Could anyone direct me to where I change the short description length in category view? I have searched the forum without success. I have approx. 45 characters including spaces at the moment.
Regards
Mike
I found it.
/public_html/components/com_virtuemart/views/category/tmpl
Line 256
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>
Change the 40 to whatever length you need the short description.
Can anyone tell me where this file is in VM 4 please?
I want to increase the length of the short description in category view
thanks
The limit is set in the database. The product_s_desc field in ###_virtuemart_products_en_gb is set as varchar(2000)
So the default capacity is 2000 characters. if you change the field to varchar(8000) then you would have 8000 characters, but this would revert to varchar(2000) on an update.
when displayed it will be
templates\xxxx\html\com_virtuemart\sublayouts\products.php
Ahh! I missed that you want this in category view. There the default length is set to 60 which obviously can be changed or your override.
<p class="product_s_desc">
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>
Quote from: jenkinhill on February 15, 2023, 16:25:56 PM
Ahh! I missed that you want this in category view. There the default length is set to 60 which obviously can be changed or your override.
<p class="product_s_desc">
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>
YES that is exactly what i wanted to do - perfect very many thanks guys !!