marginalie
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formSuper!
Wird bei Dir auch die payment-method übertragen? Die kommt bei mir nicht an, da öffnet sich nur eine Auswahlliste.
Und die Order-Nr. generiert sich bei mir über ein Plugin. Als ich order_obj->id (oder so ähnlich) eingebaut hatte, wurde nur eine Phantasienummer (evtl. auch die id vom Beitrag) eingesetzt.
Wo kommt Deine Ordernr. her?
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formSo wie ich das sehe sind 1 bis 3 okay.
Hier nochmal der Code, so, wie ich ihn von TS bekommen und aktuell eingebaut habe (schon beim ersten Mal, weil html nicht funktionierte):
<?php 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="700" 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="http://www.trustedshops.de/cms/assets/templates/b2b/images/logo_eu_b2b.png" 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="'. $order_obj->payment_method .'">'; print '<input name="kdnr" type="hidden" value="-">'; print '<input name="ordernr" type="hidden" value="-">'; 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>'; } ?>Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formAch ja – bei mir werden nur EMail und Betrag übergeben, das reicht aber aus.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formHey Mike.
Also die gute Meldung: bei mir funktioniert es und TS akzeptiert es.Das Kästchen “Anmeldung zum…” erscheint (ich habe allerdings die Breite auf 700px gesetzt, kannst du ja ändern), weil es in der php-Funktion definiert ist und die widerum ist in der thankyou.php und wird damit durch den shortcode [woocommerce_thankyou] aufgerufen. Deswegen braucht es keinen weiteren html-code in der “Bestellung erhalten”-Seite.
Das fällt mir noch ein:
– Die function.php liegt unter …/wp-content/plugins/woocommerce/templates/checkout
Mach Dir bloß vorher eine Kopie vom Original bevor Du was überschreibst.– Ganz dumme Frage: hast Du daran gedacht an beiden Stellen die shop-id auszutauschen?
– Und hast Du add_action-usw. in die functions.php vom Theme eingefügt? Das hab ich über WordPress gemacht, die functions.php finde ich schneller auf dem Server über FTP
Mir wäre auch wohler wenn ich nachvollziehen könnte, warum das tagelang NICHT funktioniert hat…
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formIt was given to me by Trusted Shops after the first chaos.
And now this works for me:
Into the thankyou.php
………………..<?php 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="700" border="0" cellspacing="0" cellpadding="4"><tr><td width="90">'; print '<a href="https://www.trustedshops.com/shop/certificate.php?shop_id=YOUR-SHOP-ID">'; print '<img border="0" src="http://www.trustedshops.de/cms/assets/templates/b2b/images/logo_eu_b2b.png" 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="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="'. $order_obj->payment_method .'">'; print '<input name="kdnr" type="hidden" value="-">'; print '<input name="ordernr" type="hidden" value="-">'; 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>'; } ?>And this into the functions.php of the theme
add_action( 'woocommerce_thankyou', 'add_trusted_shops_code_to_thank_you' );I have no idea why it was so complicated and I hope it´s okay now for TS. I`ll tell you.
In the “Bestellung erhalten” page there´s nothing but [woocommerce_thankyou].
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method form@ 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!Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formIf 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…)
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formYou´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?
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formIt 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…
Forum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formHi 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…
HeikeForum: Plugins
In reply to: [WooCommerce] WooCommerce parameters for html POST method formHi 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
Forum: Plugins
In reply to: [plugin: woocommerce] woocommerce_information: button is shown over textIsn´t anybody out there knowing a solution – it looks so less professional… (and it is – because I don´t know how to solve it)
Forum: Plugins
In reply to: [WooCommerce] Sell products with different categories1. create product-categories
2. create a new product and link it to all categories it should be linked with
3. create a new page
4. click on the little woothems-button in the toolbar; you`ll see different possibilities for shortcuts -> click the one you need
5. change the id in the shortcut
5. save the page – and that´s itNow you got a page on which all products of this category are shown.
Sorry for my rough English.
Forum: Fixing WordPress
In reply to: woocommerce_information – button laying over textthe link to the jpg to show all three versions:
Forum: Plugins
In reply to: [WooCommerce] How to create a general Minimum Order Value?Thank you for your suggestion, even my feedback comes a bit too late. We changed our concept – and don´t have any purchase-regulations yet.