Support » Theme: Virtue » Show SKU

  • Does anyone know how to make the SKU display with the woocommerce plugin?

    I’ve searched and couldn’t find an answer.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Anyone?

    belindablakley

    (@belindablakleygmailcom)

    I’m trying to figure this out too. Woocommerce helpdesk said that their newest version displays the SKU under the Add to Cart button, but that the Virtue theme overrides it. I haven’t figured it out yet though; I’ll post back if I do.

    Thanks Belinda! The folks at Kadence Themes are usually quick to respond, so let’s keep our fingers crossed.

    belindablakley

    (@belindablakleygmailcom)

    I figured it out! Go to this file:
    wp-content/themes/virtue/woocommerce/single-product/meta.php

    and find this code:
    <?php do_action( 'woocommerce_product_meta_start' ); ?>

    After that line, add this code:
    `<?php if ( wc_product_sku_enabled() && ( $product->get_sku() || $product->is_type( ‘variable’ ) ) ) : ?>

    <span class=”sku_wrapper”><?php _e( ‘SKU:’, ‘woocommerce’ ); ?> <span class=”sku” itemprop=”sku”><?php echo ( $sku = $product->get_sku() ) ? $sku : __( ‘n/a’, ‘woocommerce’ ); ?></span>.</span>

    <?php endif; ?>`

    You may want to do this in a child theme or save it in another file, because it will get deleted with an update. But, maybe they will update the file to have this code anyway…

    Theme Author Kadence Themes

    (@britner)

    Interesting, I’ll update the theme, sorry about that missed that update with woocommerce. I will plan on just taking that file out of the theme.

    Thanks,

    Kadence Themes

    Thanks, that worked!

    Kadence Themes, thanks for the future update.

    belindablakley

    (@belindablakleygmailcom)

    I’m glad I could help! Thanks, Kadence, for an excellent theme!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show SKU’ is closed to new replies.