Author Topic: [SOLVED] How to display product short description in Product Details page  (Read 8476 times)

rzrz

  • Jr. Member
  • **
  • Posts: 65
By default the Product Short Description is shown on Category Page.

How do I include it to be inside Product Detail Page?

I tried including this code to Product Detail Page but no luck

<?php echo ($product->product_s_desc) ?>

bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: How to display product short description in Product Details page
« Reply #1 on: August 18, 2012, 06:57:56 am »
Hello,

The right one is    <?php echo $this->product->product_s_desc ?>

and better to use

if (!empty($this->product->product_s_desc)) {
      <?php echo $this->product->product_s_desc;
   } ?>

$this refers to the current product. The code that you post is for category page.

More information regarding $this vs $product explained here: http://forum.virtuemart.net/index.php?topic=100696.0

Product page fields: http://forum.virtuemart.net/index.php?topic=92756.0

Category page fields: http://forum.virtuemart.net/index.php?topic=97744.0

Take a good look on that posts, they will help you a lot!

Regards,

Bytelord
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!

rzrz

  • Jr. Member
  • **
  • Posts: 65
Re: How to display product short description in Product Details page
« Reply #2 on: August 18, 2012, 07:26:03 am »
Hello,

The right one is    <?php echo $this->product->product_s_desc ?>

and better to use

if (!empty($this->product->product_s_desc)) {
      <?php echo $this->product->product_s_desc;
   } ?>

$this refers to the current product. The code that you post is for category page.

More information regarding $this vs $product explained here: http://forum.virtuemart.net/index.php?topic=100696.0

Product page fields: http://forum.virtuemart.net/index.php?topic=92756.0

Category page fields: http://forum.virtuemart.net/index.php?topic=97744.0

Take a good look on that posts, they will help you a lot!

Regards,

Bytelord

That is so helpful!! Thank you soooOOooo much!  ;D