VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Hujub on November 30, 2012, 14:57:35 PM

Title: Show Product Descriptions on Featured page
Post by: Hujub on November 30, 2012, 14:57:35 PM
Joomla! 2.5.8
VM - 2.0.14

Hi There,

Im trying to get the featured products to show a short description, currently they just show name price and the option to View Product

The Featured products are shown on my home page Using VirtueMart ยป Front page

Website, www.hubjub.co.uk

I have seen this topic - https://forum.virtuemart.net/index.php?topic=82188.0 but that is only talking about VM1.7

Hope to hear soon!



Title: Re: Show Product Descriptions on Featured page
Post by: bytelord on November 30, 2012, 18:02:00 PM
Hello,

You have to create a template override for the file joomla_folder\components\com_virtuemart\views\virtuemart\tmpl\default_products.php
To create the override just copy that file inside your_joomla_folder\templates\your_joomla_template\html\com_virtuemart\virtuemart\default_products.php

Then around line 85 place the following code:

<?php
if ($type =="featured") {
      echo 
$product->product_s_desc;
?>



Also please read the following to learn more thing about overrides and how you could use the product fields under category view and product details view:

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

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

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
Title: Re: Show Product Descriptions on Featured page
Post by: Hujub on February 08, 2013, 14:50:27 PM
This works perfectly,

Many thanks for your on going help bytelord.