Author Topic: Display SKU in Category Layout  (Read 7204 times)

webzight

  • Jr. Member
  • **
  • Posts: 81
    • WEBZIGHT.COM
Display SKU in Category Layout
« on: June 28, 2012, 19:57:59 pm »
I'm trying to get the SKU to display in the Category layout without having to manually put said SKU in the Short Description box 8)

I tried using the same code from the product details layout but it will not display the SKU, it will show the SKU title text, but not the SKU number :o

Here is the code I am attempting to use:
 <?php //Product SKU
   if (!(($this->product->product_sku)==0)) { ?>
   
               <span class="product-fields-title" >
               <?php echo JText::_('COM_VIRTUEMART_PRODUCT_SKU') ?>
               </span>
               <?php echo $this->product->product_sku ?>
               </br>
            <?php } ?>

I can comment out the JTEXT code and it disappears, so I am led to believe the code is working partially :o

Addendum:  I am placing this code in the same loop in between the 'Short Description' and the 'Price' calls :o

What am I doing wrong ???
May the Cloud be with you :)

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28535
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 4.0.14 10805  J 3.10.11 PHP 8.0.27

webzight

  • Jr. Member
  • **
  • Posts: 81
    • WEBZIGHT.COM
Re: Display SKU in Category Layout
« Reply #2 on: June 29, 2012, 19:45:54 pm »
Thank You, Thank You, Mr Kelvyn :D
IT works 8)
May the Cloud be with you :)