Title: WooCommerce parameters for html POST method form
Last modified: August 21, 2016

---

# WooCommerce parameters for html POST method form

 *  Resolved [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/)
 * H, I must add a form with _method=”post”_ to a WooCommerce “success”-site (the
   site that appears after a customer has completed his order).
 * The form I am using requires the following 5 WooCommerce parameters:
    1. customer
   email address {value email} 2. purchase price {value amount} 3. used payment 
   type {value paymentType} 4. customer number {value kdnr} 5. order number {value
   ordernr}
 * Here is the relevant part of the code I am refering to:
 *     ```
       <input name="email" type="hidden" value="{value email}">
       <input name="amount" type="hidden" value="{value amount}">
       <input name="paymentType" type="hidden" value="{value paymentType}">
       <input name="kdnr" type="hidden" value="{value kdnr}">
       <input name="ordernr" type="hidden" value="{value ordernr}">
       ```
   
 * The **{value …}** sections need to be replaced with the equivalent WooCommerce
   parameters. Does anybody know how I can get or find out the above mentioned WooCommerce
   parameters for a “POST method form”?
 * I appreciate any help. Thanks in advance!
 * Regards,
    Mike
 * [http://wordpress.org/plugins/woocommerce/](http://wordpress.org/plugins/woocommerce/)

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/page/2/?output_format=md)

 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956127)
 * I found the following WooCommerce parameter (in the _customer-processing-order.
   php_ file for customer/billing email which I have replaced with {value email}(
   in the above code) but no information was forwarded via the form:
 *     ```
       <?php echo $order->billing_email; ?>
       ```
   
 * I have also tried:
 *     ```
       <?php echo $order->billing_email ?>
       ```
   
 * and:
 *     ```
       <?php echo $billing_email ?>
       ```
   
 * Nothing worked! Any ideas?? It is very urgently needed. Thanks a lot!
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956211)
 * Hi Mike,
 * I need the same information. And I tried the same you did (billing_email) – nothing
   worked.
 * If I´ll get a solution from an other forum, I`ll tell you.
    Please – do the same
   here 🙂
 * Heike
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956213)
 * Hi Heike… that would be great!! Thanks.
 * Sure, I’ll let you know! 🙂
    Let’s hope someone has a solution because I need
   it urgently.
 * Mike
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956220)
 * Hi Mark,
 * I got this code but it doesn`t work. It´s what we just tried to do. I need it
   for the final Trusted Shops Certification – and it´s very urgent too… And I´m
   really desperate in between because they don´t have another answer. The whole
   problem came just after the last woocommerce update.
 *     ```
       <input name="email" type="hidden" value="<?php echo order->billing_email ?>">
       <input name="amount" type="hidden" value="<?php echo $order->order_total ?>">
       <input name="curr" type="hidden" value="EUR">
       <input name="paymentType" type="hidden" value="-">
       <input name="kdnr" type="hidden" value="-">
       <input name="ordernr" type="hidden" value="<?php echo $order->id ?>">
       ```
   
 * Still hoping…
    Heike
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956224)
 * This is EXACTLY what I need it for!!! 🙂
    The „Anmeldung zum Trusted Shops Käuferschutz”-
   form.
 * I have tried the same codes you have depicted. Did not work for me either.
 * I am using WordPress 3.5.2 and WooCommerce 2.0.4
 * You’ve wrote “the whole problem came just after the last woocommerce update”.
   So this means the code worked before the update?
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956231)
 * It worked once, but it wasn´t a really good solution because on the “bestellung
   erhalten”-page the whole text was shown again. So there could have been a mistake
   before – but they accepted it because their form was correctly shown.
 * It worked with the enclosed php-function.
    But it doesn´t work with it now (in
   two places you have to fill in your shop-id)! ……………………..
 *     ```
       function add_trusted_shops_code_to_thank_you( $order_id ){
       	//  Get order object
       	$order_obj = new WC_Order( $order_id );
   
       	//print'
       <pre>';print_r( $order_obj );print'</pre>
       ';
   
       	print '<table width=400 border="0" cellspacing="0" cellpadding="4"><tr><td width="90">';
       	print '<a>your-shop id " target="_blank">';
       	print '<img border="0" src="pfad/zur/siegelgrafik.gif" title="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!" ';
       	print 'alt="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!"></a>';
       	print '</td><td align="justify">';
       	print '<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">';
       	print '<input name="_charset_" type="hidden" value="UTF-8">';
       	print '<input name="shop_id" type="hidden" value="<strong>your-shop-id</strong> ">';
       	print '<input name="email" type="hidden" value="'. $order_obj->billing_email .'">';
       	print '<input name="amount" type="hidden" value="'. $order_obj->order_total .'">';
       	print '<input name="curr" type="hidden" value="EUR">';
       	print '<input name="paymentType" type="hidden" value="OTHER">';
       	print '<input name="kdnr" type="hidden" value="'. $order_obj->id .'">';
       	print '<input name="ordernr" type="hidden" value="'. $order_obj->id .'">';
       	print 'Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen
       alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.';
       	print '
   
       <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">';
       	print '</form></td></tr></table>';
       }
       add_action( 'woocommerce_thankyou', 'add_trusted_shops_code_to_thank_you' );
       ```
   
 * ……………………
 * I put it in the thankyou.php and then the add_action… in the functions.php of
   woocommerce.
 * Last information I got from Trusted Shops is, that I should engage someone to
   solve the problem…
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956235)
 * Ok… so just to be sure I understood you right. With the above code it once worked
   for you?
 * So you’ve put the above code, just the way you have depicted it…
 *     ```
       function add_trusted_shops_code_to_thank_you( $order_id ){
       // Get order object
       $order_obj = new WC_Order( $order_id );
   
       //print'
   
       ';print_r( $order_obj );print'
   
       ';
   
       print '<table width=400 border="0" cellspacing="0" cellpadding="4"><tr><td width="90">';
       print 'your-shop id " target="_blank">';
       print '<img border="0" src="pfad/zur/siegelgrafik.gif" title="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!" ';
       print 'alt="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!">';
       print '</td><td align="justify">';
       print '<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">';
       print '<input name="_charset_" type="hidden" value="UTF-8">';
       print '<input name="shop_id" type="hidden" value="your-shop-id ">';
       print '<input name="email" type="hidden" value="'. $order_obj->billing_email .'">';
       print '<input name="amount" type="hidden" value="'. $order_obj->order_total .'">';
       print '<input name="curr" type="hidden" value="EUR">';
       print '<input name="paymentType" type="hidden" value="OTHER">';
       print '<input name="kdnr" type="hidden" value="'. $order_obj->id .'">';
       print '<input name="ordernr" type="hidden" value="'. $order_obj->id .'">';
       print 'Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen
       alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.';
       print '
   
       <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">';
       print '</form></td></tr></table>';
       }
       ```
   
 * in the thankyou.php file?
 * and additionally you have added the following code…
 *     ```
       add_action( 'woocommerce_thankyou', 'add_trusted_shops_code_to_thank_you' );
       ```
   
 * to the functions.php file?
 * I am asking because the code looks different than the trusted shops code, so 
   I want to be sure that this is the code you have used… or maybe the formatting
   somehow got broken when posting it here in the support.
 * (and of course all this has to be done with the specific shop id)
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956239)
 * You´re generally right with all steps – and there are broken elements. So now
   it should be correct:
 *     ```
       function add_trusted_shops_code_to_thank_you( $order_id ){
       	//  Get order object
       	$order_obj = new WC_Order( $order_id );
   
       	//print'<pre>';print_r( $order_obj );print'</pre>';
   
       	print '<table width=400 border="0" cellspacing="0" cellpadding="4"><tr><td width="90">';
       	print '<a href="https://www.trustedshops.com/shop/certificate.php?shop_id=shop_id" target="_blank">';
       	print '<img border="0" src="pfad/zur/siegelgrafik.gif" title="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!" ';
       	print 'alt="Trusted Shops Gütesiegel - Bitte hier Gültigkeit prüfen!"></a>';
       	print '</td><td align="justify">';
       	print '<form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">';
       	print '<input name="_charset_" type="hidden" value="UTF-8">';
       	print '<input name="shop_id" type="hidden" value="shop_id ">';
       	print '<input name="email" type="hidden" value="'. $order_obj->billing_email .'">';
       	print '<input name="amount" type="hidden" value="'. $order_obj->order_total .'">';
       	print '<input name="curr" type="hidden" value="EUR">';
       	print '<input name="paymentType" type="hidden" value="OTHER">';
       	print '<input name="kdnr" type="hidden" value="'. $order_obj->id .'">';
       	print '<input name="ordernr" type="hidden" value="'. $order_obj->id .'">';
       	print 'Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen
       alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.';
       	print '<br /><br /><input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">';
       	print '</form></td></tr></table>';
       }
       add_action( 'woocommerce_thankyou', 'add_trusted_shops_code_to_thank_you' );
       ```
   
 * It´s the php-script from Trusted Shops. Does it work in your installation?
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956240)
 * If you have a good knowledge in php – please check the way I put it in. I´m sure
   there must be a better way – how do I have to include it on the “bestellung erhalten”(
   thank-you)-page? I think, it must be there too (more important than in the functions.
   php…)
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956242)
 * If I try it with your code and add it to thankyou.php and functions.php the “
   Anmeldung zum Trusted Shops Käuferschutz” doesn’t appear at all.
 * Until now I have done it like this: Adding the following code to my “Auftrag 
   eingegangen”-site (which should be found at [http://www.yourdomain.de/kasse/auftrag-eingegangen](http://www.yourdomain.de/kasse/auftrag-eingegangen))
 *     ```
       <table width=400 border="0" cellspacing="0" cellpadding="4">
       <tr>
       <td width="90">
       <form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
       <input type="image" border="0" src="{pfad/zum/siegel.png}" title="TrustedShops Gütesiegel - Bitte hier Gültigkeit prüfen!">
       <input name="shop_id" type="hidden" value="{value shop id}">
       </form>
       </td>
       <td align="justify">
       <form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
       <input name="_charset_" type="hidden" value="">
       <input name="shop_id" type="hidden" value="{value shop id}">
       <input name="email" type="hidden" value="{value email}">
       <input name="amount" type="hidden" value="{value amount}">
       <input name="curr" type="hidden" value="EUR">
       <input name="paymentType" type="hidden" value="{value paymentType}">
       <input name="kdnr" type="hidden" value="{value kdnr}">
       <input name="ordernr" type="hidden" value="{value ordernr}">
       Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.
       <br><br>
       <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">
       </form>
       </td>
       </tr>
       </table>
       ```
   
 * But I can not find the proper WooCommerce equivalent for…
    {value email} {value
   amount} {value paymentType} {value kdnr} {value ordernr}
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956243)
 * Everyone – you NEED to use the backticks or code buttons (not blockquotes) when
   posting code on these forums – please see:
 * [http://codex.wordpress.org/Forum_Welcome#Posting_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956244)
 * All codes are put in between backticks
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956245)
 * Yes, I just fixed 3 posts.
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956246)
 * I see… ok thanks.
 * And if you could also fix our main problem we have here, it would be awsome 🙂
 *  [marginalie](https://wordpress.org/support/users/marginalie/)
 * (@marginalie)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/#post-3956251)
 * @ WPyogi – yes, thanks, I just learned to use the backticks – do you also have
   an idea to solve our really important problem? Or do you know anybody who will
   be able to check the code?
 * @ Mike – the equivalents are the same like in the php-code. You have to put them
   into the html-code, look to my first post with code (it is, what they sent me
   from Trusted Shops) – but it doesn´t work…
    The link you posted doesn´t work.
   But I think your “auftrag eingegangen”-page is my “bestellung erhalten”-page.
   There you only can include the html-code, function.php and thankyou.php need 
   the php-script.
 * Hell – I think the solution is so easy.
    Don´t worry – we´ll find it!

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/page/2/?output_format=md)

The topic ‘WooCommerce parameters for html POST method form’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [parameters](https://wordpress.org/support/topic-tag/parameters/)
 * [post method](https://wordpress.org/support/topic-tag/post-method/)

 * 25 replies
 * 3 participants
 * Last reply from: [onasol](https://wordpress.org/support/users/onasol/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/woocommerce-parameters-for-html-post-method/page/2/#post-3956267)
 * Status: resolved