- This topic has 9 replies, 2 voices, and was last updated 4 months, 2 weeks ago by
David.
-
AuthorPosts
-
October 15, 2020 at 4:44 am #1490116
Alberto
Hi.
I am needing to add a column with the SKU field to the Woocommerce order email.
Currently the SKU is displayed next to the product name (in the same product column), but I need the SKU to be in a separate column.
I read somewhere on the web that you have to edit certain files of the theme, but I don’t know exactly which files they are or how to do it.
I have looked for a plugin that does it automatically, but I have not found anything …
Thank you in advance.
October 15, 2020 at 5:24 am #1490169David
StaffCustomer SupportHi there,
Email templates are controlled by Woocommerce not the theme.
You would either need to custom code your own templates, or check the wordpress repository as there are a number of plugins that do that for you.For reference here is Woocommerces info:
https://woocommerce.com/posts/how-to-customize-emails-in-woocommerce/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 15, 2020 at 5:57 am #1490215Alberto
Hi David.
Thanks for your answer.
I found this link on the web. Could you tell me how true it is and if it is enough to just do that?
Thank you!
October 15, 2020 at 6:13 am #1490236David
StaffCustomer SupportThat is correct – but that is an old topic and is pointing to an old email template of Woocommerce.
Here is the most up to date version of that template:
https://github.com/woocommerce/woocommerce/blob/master/templates/emails/email-order-details.phpDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 15, 2020 at 6:45 am #1490287Alberto
Thanks David for your answer but I have a question:
The file that I need to modify is admin-new-order.php and this one that you indicate is email-order-details.php
I need the SKU to be displayed in a separate column but only in the email that the store administrator receives.
I will appreciate if you can guide me.
October 15, 2020 at 7:32 am #1490358David
StaffCustomer SupportThen it is this template you would need to edit:
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 15, 2020 at 7:34 am #1490361Alberto
Thanks a lot, David.
Forgive my ignorance, (I understand very little code) does this code include the separate SKU column?
Thank you very much.
October 15, 2020 at 7:41 am #1490368David
StaffCustomer SupportI found this article – it actually provides a PHP snippet to go in your functions.php to add the SKU next to the product title:
https://w3programmings.com/how-to-add-sku-to-woocommerce-order-emails/
If this still works then you won’t need to edit those templates
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 15, 2020 at 7:46 am #1490375Alberto
Thanks David, but it’s not what I’m looking for …
Notice that the SKU is inside the “Product” column and I need the SKU to be displayed in a separate column.
The email code you passed me last (https://github.com/woocommerce/woocommerce/blob/02cf0dfaed5923513de0c88add597d1560c2cfd2/templates/emails/admin-new-order.php), does it include the SKU as a separate column?
Thank you!
October 15, 2020 at 7:51 am #1490560David
StaffCustomer SupportUnfortunately to do that you would need to find a developer who speciailises in woocommerece email templates. Maybe someone on codeable.io
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.