VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mikekiy on January 01, 2015, 18:48:23 PM

Title: Product Short Description in VM 3
Post by: mikekiy on January 01, 2015, 18:48:23 PM
Hi All

This is describing a VM3.0.2 install on J3.3.6

The world of VM 3 has changed a few things.  The introduction of 'SubLayouts' means that some of our old overrides have moved home.  So far I've managed to find the new home of the 'Product Short Description' limiter.  This is now found in 'public_html/components/com_virtuemart/sublayouts/products.php' line 95.

To change the parameter on your site make an override in your site's template files.

example:  \public_html\templates\yourtemplatename\html\com_virtuemart\sublayouts

Copy the file 'components\com_virtuemart/sublayouts/products.php' into your override folder and then change the variable by editing line 95, which reads

echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>

to something that suits your needs - personally '240' is good for me so the revised line is

echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 240, ' ...') ?>

Hope that helps.

Mike
Title: Re: Product Short Description in VM 3
Post by: jenkinhill on January 01, 2015, 23:46:55 PM
Like in http://forum.virtuemart.net/index.php?topic=126502.msg433524#msg433524
Title: Re: Product Short Description in VM 3
Post by: AH on January 02, 2015, 15:23:24 PM
QuoteThe introduction of 'SubLayouts' means that some of our old overrides have moved home.  So far I've managed to find the new home of the 'Product Short Description' limiter.

This VM team supplied page gives a better explanation of the sublayouts.

http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html (http://docs.virtuemart.net/tutorials/templating-layouts/199-sublayouts.html)