Hallo, wie kann ich im Warenkorb die Artikelnummer anzeigen lassen?
Vielen Dank im Voraus!
Hey Luisgasser,
Thank you for using Enfold.
What do you mean by “item number”? Could you please provide a screenshot? If there are products with more than one item, the number of items should display below the product title and beside the product price. Example:
Example Product
2 × £9.99
Best regards,
Ismael
Hi Ismael,
i mean this the product number – please see screenshot
Hi!
I’m sorry but I don’t understand the language. Is that the SKU field? If it is, please add this snippet in the functions.php file:
add_filter( 'woocommerce_cart_item_name', 'woocommerce_cart_item_name_sku_in_cart', 20, 3);
function woocommerce_cart_item_name_sku_in_cart( $title, $cart_item, $cart_item_key ) {
$sku = $cart_item['data']->get_sku();
return $sku ? $title . sprintf(" (SKU: %s)", $sku) : $title;
}
You might need to remove all items in the cart, refresh the page then add them again.
Cheers!
Ismael