VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: raquelbf on March 20, 2012, 15:57:08 PM

Title: As further expand text, characters in short description?
Post by: raquelbf on March 20, 2012, 15:57:08 PM
As further expand text, characters in short description? I want to enter more text in short description
Title: Re: As further expand text, characters in short description?
Post by: terp on April 07, 2012, 03:03:57 AM
I went through all the backend params like a *bazillion times* looking for an option to type in the number of characters we want displayed for the 'Short Description' of a product, but couldn't find one...perhaps I missed it?!?
Title: Re: As further expand text, characters in short description?
Post by: terp on April 07, 2012, 03:20:54 AM
I found it. Devs, if you would be so kind, make this a backend param and stick it in the same area where we can set comment length, etc? :)

Open:

...\components\com_virtuemart\views\category\tmpl\default.php


Find (on or around line 250):


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



Change the length (60) to whatever you would like to show.

Title: Re: As further expand text, characters in short description?
Post by: Genius WebDesign on June 15, 2012, 02:38:42 AM
I use this code on the category browse view and product modules but I cannot use it on the product details page..

When I apply the code in the default.php of the product details page is has no effect..

Here is the code for when I try to limit the short product description:

   <?php // Product Short Description
   if (!empty($this->product->product_s_desc)) { ?>
   <div class="product-short-description">
      <?php /** @todo Test if content plugins modify the product description */
      echo shopFunctionsF::limitStringByWord($this->product->product_s_desc, 20, '...'), ('title="'.$this->product->product_s_desc.'" '); ?>
   </div>
   <?php } // Product Short Description END ?>

I hope someone can explain how to make the code work in the product details default.php

Brgds


Title: Re: As further expand text, characters in short description?
Post by: Master_gray on June 21, 2012, 11:21:19 AM
Hi there i found it.

Go to your ...\templates\Your template\html\com_virtuemart\category then open default.php and change the code on line 255 from 40 to what you want,it works for me
tell me if it works for you.

Best regards Master_gray