WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Show the SKU in the catalog page (7 posts)

  1. caeto
    Member
    Posted 1 year ago #

    I need urgent a way to show the SKU in the catalog page!!!
    The title is only thing that appear, how i can add a text or a SKU code
    please

    http://wordpress.org/extend/plugins/woocommerce/

  2. rhonz10
    Member
    Posted 1 year ago #

    add a SKU code at Product Data, General Tab..

  3. bheadrick
    Member
    Posted 1 year ago #

    use woocommerce template files (add a woocommerce folder and copy select files from the woocommerce/templates folder)

    for this, the file you need to edit is content-product.php
    Wherever you want to add it:

    echo '<div class="sku">' . $product->sku . '</div>';

  4. bheadrick
    Member
    Posted 1 year ago #

    or you could add this to your theme's functions.php

    add_action( 'woocommerce_after_shop_loop_item_title', 'shop_sku' );
    function shop_sku(){
    global $product;
    echo '<span itemprop="productID" class="sku">SKU: ' . $product->sku . '</span>';
    }

  5. caeto
    Member
    Posted 1 year ago #

    thanks bheadrick look this link
    http://www.kingcargo.com/beta/product-category/punch/

    I add this:

    echo '<div class="sku">' . $product->sku . '</div>';

    to the content-product.php

    but is not working

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum's parser.]

  6. caeto
    Member
    Posted 1 year ago #

    thanks bheadrick !! great man

  7. Chef Jeff
    Member
    Posted 1 year ago #

    how can I get the SKU to show up on my product pages?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.