News:

Looking for documentation? Take a look on our wiki

Main Menu

Change length of short description

Started by aussiemike, September 18, 2012, 02:21:42 AM

Previous topic - Next topic

aussiemike

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

aussiemike

I found it.

/public_html/components/com_virtuemart/views/category/tmpl

Line 256

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

Change the 40 to whatever length you need the short description.


Gingerweb

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

jenkinhill

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.
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

GJC Web Design

when displayed it will be 

templates\xxxx\html\com_virtuemart\sublayouts\products.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

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_desc60' ...'?>

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

Gingerweb

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_desc60' ...'?>



YES that is exactly what i wanted to do - perfect very many thanks guys !!