Author Topic: Short Description  (Read 6176 times)

jmms

  • Beginner
  • *
  • Posts: 8
  • Trying to do something...just don't know what
Short Description
« on: December 06, 2012, 14:10:14 pm »
Hi Team... me again  ;)

Can anyone please advice on how I can turn off the short description?

THANKS

Peter Pillen

  • Jr. Member
  • **
  • Posts: 223
Re: Short Description
« Reply #1 on: December 06, 2012, 14:53:46 pm »
Just leave it empty I think?

jmms

  • Beginner
  • *
  • Posts: 8
  • Trying to do something...just don't know what
Re: Short Description
« Reply #2 on: December 06, 2012, 14:57:58 pm »
Problem is that i receive a daily data-feed and it basically fill in the blacks, so i need a way to turn it off and the right info (as supplied) will be added to the correct field

Peter Pillen

  • Jr. Member
  • **
  • Posts: 223
Re: Short Description
« Reply #3 on: December 06, 2012, 15:17:53 pm »
Then you will need to change/erase your template for virtuemart. The code you're looking for is something like this

Code: [Select]
<?php // Product Short Description
if(!empty($product->product_s_desc)) { ?>

<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc40'...'?>
</p>
                        <? } ?>

You will find this in /components/com_virtuemart/views/virtuemart/tmpl/default_products.php for the browse view (if you use the default virtuemart template... otherwise it could be located in your own template)

but it depends where you want to erase al these short descriptions. Because it is set in different template views, so you will need to find all the neccesary files and erase or change it.

jmms

  • Beginner
  • *
  • Posts: 8
  • Trying to do something...just don't know what
Re: Short Description
« Reply #4 on: December 06, 2012, 19:20:55 pm »
Then you will need to change/erase your template for virtuemart. The code you're looking for is something like this

Code: [Select]
<?php // Product Short Description
if(!empty($product->product_s_desc)) { ?>

<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc40'...'?>
</p>
                        <? } ?>

You will find this in /components/com_virtuemart/views/virtuemart/tmpl/default_products.php for the browse view (if you use the default virtuemart template... otherwise it could be located in your own template)

but it depends where you want to erase al these short descriptions. Because it is set in different template views, so you will need to find all the neccesary files and erase or change it.

I can't seem to find the code in /components/com_virtuemart/views/virtuemart/tmpl/default_products.php

Peter Pillen

  • Jr. Member
  • **
  • Posts: 223
Re: Short Description
« Reply #5 on: December 06, 2012, 21:19:13 pm »
indeed... a mistake from my part... Sorry

the following should be correct... /components/com_virtuemart/views/productdetails/tmpl/default.php (for the productdetail view)

Code: [Select]
    // 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 nl2br($this->product->product_s_desc);
    ?>

        </div>
<?php
    
// Product Short Description END

and /components/com_virtuemart/views/category/tmpl/default.php (for the category view)

Code: [Select]
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
?>

<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord ($product->product_s_desc40'...'?>
</p>
<?php ?>

and so on... it takes some time to find them all

jmms

  • Beginner
  • *
  • Posts: 8
  • Trying to do something...just don't know what
Re: Short Description
« Reply #6 on: December 06, 2012, 21:25:15 pm »
THANKS for the GREAT help, it seems to have done the trick




bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Short Description
« Reply #7 on: December 06, 2012, 22:24:50 pm »
Hello,

Please use template overrides for this changes, so each time you update virtuemart 2 to do not loose your changes

Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0

Template Overrides:
Creating Template overrides: https://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system

Also take a look on the fields usage:
Product Fields: http://forum.virtuemart.net/index.php?topic=92756.0
Category fields: http://forum.virtuemart.net/index.php?topic=97744.0
$this vs $product: http://forum.virtuemart.net/index.php?topic=100696.0

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jmms

  • Beginner
  • *
  • Posts: 8
  • Trying to do something...just don't know what
Re: Short Description
« Reply #8 on: December 06, 2012, 22:27:33 pm »
Thanks, I'll look into that

veer

  • Beginner
  • *
  • Posts: 1
  • A beginner
  • Skype Name: tanveer_veer
Re: Short Description
« Reply #9 on: March 13, 2015, 07:36:40 am »
Thanks for help
for me file path .......components\com_virtuemart\sublayouts\products.php
find code
<?php if(!empty($rowsHeight[$row]['product_s_desc'])){
               ?>
               <p class="product_s_desc">
                  <?php // Product Short Description
                  if (!empty($product->product_s_desc)) {
                     echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>
                  <?php } ?>
replace value 60 by zero....

loppan

  • Jr. Member
  • **
  • Posts: 155
    • CRASHDÏET Official Website
Re: Short Description
« Reply #10 on: December 27, 2015, 01:44:01 am »
Thanks for help
for me file path .......components\com_virtuemart\sublayouts\products.php
find code
<?php if(!empty($rowsHeight[$row]['product_s_desc'])){
               ?>
               <p class="product_s_desc">
                  <?php // Product Short Description
                  if (!empty($product->product_s_desc)) {
                     echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>
                  <?php } ?>
replace value 60 by zero....

This worked for me as well, on VM 3.0.12, thank you veer!

(A little hint : the sublayouts files can be overriden as well, in my case I edited /templates/mytemplate/html/com_virtuemart/sublayouts/products.php,
instead of /components/com_virtuemart/sublayouts/products.php)