Skip Navigation

[Resolved] add toolset post feld to order item name in cart and email.

This thread is resolved. Here is a description of the problem and solution.

Problem:

I need to add toolset post feld(textfield-5bdd63fd) to order item name in cart and email. I need info like "Servotech Number: ST-EP-DR-86F-3000-N-10" to be placed under item name or somewhere like that.

Solution:

Q1) order item name in cart
There isn't such a built-in feature within Toolset plugin, you will need find the template for renderring the Woocommerce cart, for example, woocommerce plugin file woocommerce\templates\cart\cart.php, add the custom PHP codes in it, like this:

<?php echo get_post_meta( $product_id, 'wpcf-textfield-5bdd63fd', true );

Q2) email

If it is the "Customer processing order email", then the template file should be this one:
woocommerce\templates\emails\customer-processing-order.php

Relevant Documentation:

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#605862

Tell us what you are trying to do?
I need to add toolset post feld(textfield-5bdd63fd) to order item name in cart and email. I need info like "Servotech Number: ST-EP-DR-86F-3000-N-10" to be placed under item name or somewhere like that.

Is there any documentation that you are following?
https://toolset.com/forums/topic/adding-some-custom-fields-to-woocommerce-order-mail/
https://toolset.com/forums/topic/adding-data-form-custom-field-to-woocommerce-order-e-mail/
hidden link

Is there a similar example that we can see?

What is the link to your site? hidden link

#606151

Dear Natalia,

Q1) order item name in cart
There isn't such a built-in feature within Toolset plugin, you will need find the template for renderring the Woocommerce cart, for example, woocommerce plugin file woocommerce\templates\cart\cart.php, add the custom PHP codes in it, like this:

<?php echo get_post_meta( $product_id, 'wpcf-textfield-5bdd63fd', true ); ?>

Q2) email
Which email are we talking about?
If it is the "Customer processing order email", then the template file should be this one:
woocommerce\templates\emails\customer-processing-order.php

#606758

Thank you so much! That is what I need to know!

#606968

You are welcome