This topic has 10 replies, 3 voices, and was last updated 7 years, 10 months ago ago by 8theme
Hi I would like to add the product SKU’s to the Cart, Checkout, and to the completed Order emails.
I found an article on how to add the SKU’s to the Cart, but it doesn’t show the same directory scheme as what I have.
I am using Xstore Child theme and wondering where to add the code that the article suggests.
The article is: http://www.jdhodges.com/blog/show-sku-in-cart-checkout-woocommerce/
Can you please tell me where to adjust the code to achieve this?
Thank you!!!!
WordPress 4.7
WooCommerce 2.6.11
Xstore 3.3
XStore Child Theme 1.0
hosted @ 1and1.com
Hello,
Unfortunately, our theme doesn’t have it by default and it needs additional code customization that is out of theme support scope.
Regards
I would think that every E-Commerce store would need to have a SKU displayed, as that is how most stores operate, by sku’s.
Can you give my some direction, as what I am trying to add to the cart.php in the child directory is not displaying the sku.
Thanks
I would think adding a SKU in the cart/emails would be a very minor change (one that is needed on an e-commerce/business website.
I agree with the need for an sku in the cart and checkout function. It is actually a vital piece of information!!!!! When using automated software for efficient processing of large numbers of online generated orders, you upload information from your ecommerce website (I use T-HUB – see http://www.atandra.com to do this) and/or Amazon, Ebay etc, a vital piece of information is the sku to match up with your Quickbooks (or other accounting software) information so in my case T-HUB can export the sku to Quickbooks to load invoicing etc, then the sku matches up to print a shipping label generated based on that sku product weight and dimmensions. Woo Commerce does integrate with most all automated software packages, but again, needs the sku. Please make this a feature on your very next release.
Hello,
Yes, it is a very good suggestion. But if it is so important maybe it should be integrated to WooCommerce rather then into themes? All shopping functionality comes with this plugin and our theme provide only a stylization for them. To add this function to our theme we have to override some WooCommerce templates and functions that is not best practice for WordPress themes.
Thank you for understanding.
Kind Regards
Uh Oh, I was wrong. WooCommerce DOES display the SKU in the email that goes to the site admin.
It places the SKU in parentheses (). Example:
Product QTY Price
60″ Shower Door SD200B (#25130995) 1 $50.00
But it does NOT display the SKU in the email that the customer receives after placing the order.
So I just need to figure out how to add the SKU to the cart.php
Any advice would be appreciated.
Thanks
Hi,
Try to add this code snippet to the functions.php file in the child theme
add_filter( 'woocommerce_in_cart_product_title', 'add_sku_in_cart', 20, 3);
function add_sku_in_cart( $title, $values, $cart_item_key ) {
$sku = $values['data']->get_sku();
return $sku ? $title . sprintf(" (SKU: %s)", $sku) : $title;
}
Regards
I tried to use the code snippet to the functions.php file in the Child Theme that you provided to add the sku to the car and it does not work. Anything else you can add?
Hello,
Sorry, but we don’t have other solution for this. This question is related to additional code customization and it is out of our free theme support scope. If you want us to implement this functionality for you we can do this as a paid service.
Regards
You must be logged in to reply to this topic.Log in/Sign up