Mitterer Lajos

[Solved 4r] Product short AND full description

5 posts in this topic

Hi,

I need options for product FULL description. (virtuemart)

I'm trying to solve this task, but i cant solve the problem:(

So, i'd like show product FULL and SHORT description too (at the same time), can u help me please?

Share this post


Link to post
Share on other sites

Hi Hittererr.

If you use Virtuemart.pls follow this to solve problem

1. Open file /mod_bt_productslider/classes/virtuemart.php find these lines

if ($this->_params->get('show_intro'))
$select[] = 'p.`product_s_desc` as introtext';

Change it to


if ($this->_params->get('show_intro'))
$select[] = 'p.`product_s_desc` as introtext';
$select[] = 'p.`product_desc`';

2. In layout files (in folder /tmpl/themes/{theme name}/{theme name}.php

you can use

$row->product_desc for full description

Example

<?php echo $row->product_desc?>

Share this post


Link to post
Share on other sites

Hi,

Thank you for the fast reply! :)

Its work, and almost perfect, but can i add strip tag yes to full description only? Cause I need strip tag: no, in short description, so this is the global config.

(and need character limit to full description too)

Thank you very mutch!

Share this post


Link to post
Share on other sites

Hi.

Please open virtuemart.php file

You can see this code


if($this->_params->get('show_intro'))
if ($limitDescriptionBy == 'word') {
$product->description = self::substrword($product->introtext, $maxDesciption, '...', $isStrips, $stringtags);
} else {
$product->description = self::substring($product->introtext, $maxDesciption, '...', $isStrips, $stringtags);
}

Change it to (or add new line under old line to use both of short and full description)


if($this->_params->get('show_intro'))
if ($limitDescriptionBy == 'word') {
$product->product_desc= self::substrword($product->product_desc, $maxDesciption, '...', $isStrips, $stringtags);
} else {
$product->product_desc= self::substring($product->product_desc, $maxDesciption, '...', $isStrips, $stringtags);
}

:D

Share this post


Link to post
Share on other sites