VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: crystalm28 on October 11, 2016, 16:45:51 PM

Title: SKU on Product Page
Post by: crystalm28 on October 11, 2016, 16:45:51 PM
Hello:

I would like to add the SKU to my product page.  I went to Products/Custom Fields, then selected "Property", but I don't see the "SKU" anywhere.  What am I doing wrong?

VM 3.0.16

Thank you in advance ;-).

I found this in a previous forum......
"You just need to add "Property" type custom field and select SKU property. This field was added in VM 3.0.10 http://virtuemart.net/news/latest-news/472-release-of-3-0-10"
Title: Re: SKU on Product Page
Post by: K&K media production on October 11, 2016, 17:15:07 PM
After you've added it to your custom fields you must go to your product edit, choose tab custom fields and add your new custom field to your product. Now you can choose SKU.
Title: Re: SKU on Product Page
Post by: crystalm28 on October 11, 2016, 18:10:32 PM
Thank you so much!!  That worked.  Is there a way to globally add it to all our products, instead of manually adding it to each product?
Title: Re: SKU on Product Page
Post by: PRO on October 11, 2016, 18:12:14 PM
in your product template

<?php echo $this->product->product_sku ?>

its not a custom field, its a standard field
Title: Re: SKU on Product Page
Post by: GJC Web Design on October 11, 2016, 18:28:37 PM
we were told off when we said that..   ;)

http://forum.virtuemart.net/index.php?topic=133267
Title: Re: SKU on Product Page
Post by: AH on October 11, 2016, 21:19:27 PM
yes we were  :), still prefer it though  :)
Title: Re: SKU on Product Page
Post by: PRO on October 12, 2016, 01:24:32 AM
Quote from: GJC Web Design on October 11, 2016, 18:28:37 PM
we were told off when we said that..   ;)

http://forum.virtuemart.net/index.php?topic=133267
Quote from: AH on October 11, 2016, 21:19:27 PM
yes we were  :), still prefer it though  :)

I just looked at that custom field. Honestly, did not know it was there.

Title: Re: SKU on Product Page
Post by: AH on October 12, 2016, 09:17:51 AM
I meant that I prefer to create the override as you suggested pro  8)
Title: Re: SKU on Product Page
Post by: crystalm28 on October 12, 2016, 16:04:09 PM
Thank you. Forgive me for asking, but how do I add a title to the coding (I am not good with PHP). When I add the coding, it shows the SKU, but there is no label indicating it's an SKU. 

Thank you!!!
Title: Re: SKU on Product Page
Post by: crystalm28 on October 12, 2016, 16:15:47 PM
Also, let's say that you have a shoe, with many sizes (in the custom field).  The SKU only updates if you make one change.  For example,

Drop down in Cart shows.....
Shoe Size 7
Shoe Size 8
Shoe Size 9

If you switch from 7 to 8 the SKU is updated.  However, if you switch again to the next size (from Size 8 to Size 9) the SKU does not update.

This is true if you use the custom field SKU OR add the PHP coding. 
Title: Re: SKU on Product Page
Post by: GJC Web Design on October 12, 2016, 19:01:42 PM
SKU: <?php echo $this->product->product_sku ?>

look for javascript errors etc
Title: Re: SKU on Product Page
Post by: crystalm28 on October 13, 2016, 03:46:35 AM
So simple...thank you so much!!!