Hi Team... me again ;)
Can anyone please advice on how I can turn off the short description?
THANKS
Just leave it empty I think?
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
Then you will need to change/erase your template for virtuemart. The code you're looking for is something like this
<?php // Product Short Description
if(!empty($product->product_s_desc)) { ?>
<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>
</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.
Quote from: P2 Peter 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
<?php // Product Short Description
if(!empty($product->product_s_desc)) { ?>
<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($product->product_s_desc, 40, '...') ?>
</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
indeed... a mistake from my part... Sorry
the following should be correct... /components/com_virtuemart/views/productdetails/tmpl/default.php (for the productdetail view)
// 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)
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
?>
<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 40, '...') ?>
</p>
<?php } ?>
and so on... it takes some time to find them all
THANKS for the GREAT help, it seems to have done the trick
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
Thanks, I'll look into that
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....
Quote from: veer 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....
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)