VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: webzight on June 28, 2012, 19:57:59 PM

Title: Display SKU in Category Layout
Post by: webzight 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 ???
Title: Re: Display SKU in Category Layout
Post by: jenkinhill on June 29, 2012, 13:17:33 PM
http://forum.virtuemart.net/index.php?topic=97744.msg323816#msg323816
Title: Re: Display SKU in Category Layout
Post by: webzight on June 29, 2012, 19:45:54 PM
Thank You, Thank You, Mr Kelvyn :D
IT works 8)