Home Forums Basel support forum Show SKU on Shop Pages

Show SKU on Shop Pages

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #58734

    phenix
    Participant

    I would like to show the product sku on the shop pages, perhaps between the product’s description/name and price. Do you have a code for this?

    #58760

    Hello,

    Unfortunately, we do not have such code or quick solution you will have to search for such a code or try to find a plugin.

    Best Regards

    #58864

    phenix
    Participant

    Might be a nice option for future versions. For anyone interested, here’s my solution:

    function rupom_custom_price_sku( $price ) {
    global $woocommerce , $product;
    $sku = $product->get_sku();
    if (is_shop() || is_product_category() || is_product_tag()){
    return $price . ‘<br /><span class=”price-sku” style=”color:black”> Item# ‘ . $sku . ‘</span>’;
    }

    else {
    return $price;
    }
    }
    add_filter( ‘woocommerce_get_price_html’, ‘rupom_custom_price_sku’ );

    #58895

    Artem Temos
    Keymaster

    Thank you for posting your solution here. Hope it will be useful for other visitors.

    Kind Regards

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Show SKU on Shop Pages’ is closed to new replies.