hyperV
Forum Replies Created
-
Second issue with PayPal express:
I get only the shipping address back from Paypal. Can you please provide a fix, that the shipping address is also the invoice address?
Than would be the workflow in woo commerce perfect.Thanks Josef
Thanks Angelleye,
I changed it but nothing changed. I tried de_DE and de_DE/DE and got not the right result.
I investigated a bit and found out following on the developer site:For e.g. US you need to use the link:
https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gifFor Germany:
https://www.paypal.com/de_DE/DE/i/btn/btn_xpressCheckout.gifFor Austria:
https://www.paypal.com/de_DE/AT/i/btn/btn_xpressCheckout.gifFor Switzerland it seems PayPal provides only an english solution with following link:
https://www.paypal.com/en_US/CH/i/btn/btn_xpressCheckout.gifFollowing fix was helpful:
I have hardcoded following in paypal-for-woocommerce.php:LIne 434 and line 450: from
$button_img = "https://www.paypal.com/".$button_locale_code."/i/btn/btn_xpressCheckout.gif";
to
$button_img = "https://www.paypal.com/de_DE/DE/i/btn/btn_xpressCheckout.gif";That works. Would be great to have a fix for it in Version 1.7.
To Point 3 I have this information from a support technician at PayPal Germany I called yesterday having trouble with Pro functionality. He told me Pro V2.0 and V3.0 is not working with PayPal Germany of some security reasons. Tha is the reasons that they develop a new API called Plus. Have no further information on this. Want only make you aware on it for your plugin roadmap.
Cheers Josef
Guys, sometimes I see not the forest for the trees.
I found the right configuration for my first point.
Point 2. and 3. are still not fixed.
Forum: Plugins
In reply to: [Woocommerce Multiple Addresses] German Translation is buggyHi Alexander,
your plugin is really usefull. It will be very bad, if you not find the time to maintain your plugin. I still wait for an answer.
How can I show the german term of city on my site?City = Ort
Maybe when you fix this, you can also test the compatibility of woocommerce 2.2 and WordPress 4.
this would be great.Thanks a lot
Regards Josef
That’s good. I changed it. Now it is final.
Thanks a lot.
Hi Ewout,
thanks for your great support. The switch() function was the solution.
Here the code for the function.php:
/** * Display Metabox Shipment Tracking on order admin page **/ add_action( 'add_meta_boxes', 'BFM_add_meta_boxes' ); function BFM_add_meta_boxes(){ add_meta_box( 'woocommerce-order-my-custom', __( 'Paket verfolgen' ), 'order_my_custom', 'shop_order', 'side', 'default' ); } /** * Add fields to the metabox **/ function order_my_custom( $post ){ wp_nonce_field( 'save_BFM_shipping', 'BFM_shipping_nonce' ); woocommerce_wp_select( array( 'id' => '_BFM_shipping_service', 'label' => __('Paketdienst: ', 'woocommerce'), 'options' => array( 'DHL' => __('DHL', 'woocommerce'), 'Hermes' => __('Hermes', 'woocommerce') ) ) ); woocommerce_wp_text_input( array( 'id' => '_BFM_tracking', 'class' => '', 'label' => __('Verfolgungslink: ', 'woocommerce') ) ); } /** * Save Shipping Tracking information **/ add_action( 'save_post', 'save_BFM_shipping' ); function save_BFM_shipping( $post_id ) { // Check if nonce is set if ( ! isset( $_POST['BFM_shipping_nonce'] ) ) { return $post_id; } if ( ! wp_verify_nonce( $_POST['BFM_shipping_nonce'], 'save_BFM_shipping' ) ) { return $post_id; } // Check that the logged in user has permission to edit this post if ( ! current_user_can( 'edit_post' ) ) { return $post_id; } $shipping_service = sanitize_text_field( $_POST['_BFM_shipping_service'] ); $tracking_link = sanitize_text_field( $_POST['_BFM_tracking'] ); update_post_meta( $post_id, '_BFM_shipping_service', $shipping_service ); update_post_meta( $post_id, '_BFM_tracking', $tracking_link ); }and for the customer-order-complete.php in the child theme:
<p>Paketzusteller: <?php echo $BFM_shipping_service = get_post_meta( $order->id, '_BFM_shipping_service', true ); switch ($BFM_shipping_service) { case "dhl": echo "DHL"; break; case "hermes": echo "Hermes"; break; } ?></p> <p>Hier können Sie die Paketlieferung nach verfolgen: </p><p><?php echo get_post_meta( $order->id, '_BFM_tracking', true ); ?><br><br></p>Thanks a lot
Josef
Thanks Ewout, as I have read your post until the end I changed following:
<p>Paketzusteller: <?php echo $shipping_service = get_post_meta( $order->id, '_BFM_shipping_service', true ); ?></p> <p>Hier können Sie die Paketlieferung nach verfolgen: <?php echo $shipping_tracking = get_post_meta( $order->id, '_BFM_tracking', true ) ); ?><br><br></p>This works except $shipping_service here I get dhl instead DHL.
'options' => array( 'dhl' => __('DHL', 'woocommerce'), 'hermes' => __('Hermes', 'woocommerce') )'options' => array( 'dhl' => __('DHL', 'woocommerce'), 'hermes' => __('Hermes', 'woocommerce') )What is the reason?
Regards Josef
Sorry, I did not read your answer until the end.
Come back later.You absolutly right and I will do it.
But I need to fix this quick.What I did now is:
<?php echo __($shipping_service = get_post_meta( $order->id, '_BFM_shipping_service', true ) ); ?></p>This shows the name of the option but not the content. ( dhl instead DHL)
any suggestions?
Thanks Josef
Thats great. Works Thanks Ewout.
What now not works is my custom email in my child theme.I try to do this in customer-complete-order.php:
<p><?php printf( __( 'Paketzusteller: ', 'woocommerce' ), $shipping->BFM_shipping_service ); ?></p> <p><?php printf( __( 'Hier können Sie die Paketlieferung nach verfolgen: ', 'woocommerce'), $shipping->BFM_tracking_link ); ?><br><br></p>What is the reason, that this will not run?
What I like to reach is to show in the email the label “Packetzusteller: ” and than DHL or Hermes. Than “Hier können Sie die Paketlieferung nach verfolgen: ” and than the tracking link as link.
If you have a quick fix for this.This is really great.
Thanks in advanced
Regards Josef
Thanks Ewout,
I changed it but no luck. Any other idea?
See the changed code belowThanks Regards Josef
/** * Display Metabox Shipment Tracking on order admin page **/ add_action( 'add_meta_boxes', 'BFM_add_meta_boxes' ); function BFM_add_meta_boxes(){ add_meta_box( 'woocommerce-order-my-custom', __( 'Paket verfolgen' ), 'order_my_custom', 'shop_order', 'side', 'default' ); } function order_my_custom( $post ){ $shipping = get_post_meta( $post->ID, '_BFM_shipping_tracking', true ); wp_nonce_field( 'save_BFM_shipping', 'BFM_shipping_nonce' ); woocommerce_wp_select( array( 'id' => 'BFM_shipping_service', 'label' => __('Paketdienst: ', 'woocommerce'), 'options' => array( 'OPTION1' => __('DHL', 'woocommerce'), 'OPTION2' => __('Hermes', 'woocommerce') ) ) ); woocommerce_wp_text_input( array( 'id' => 'BFM_tracking_link', 'class' => '','label' => __('Verfolgungslink: ', 'woocommerce') ) ); } /** * Save Shipping Tracking information **/ add_action( 'save_post', 'save_BFM_shipping' ); function save_BFM_shipping( $post_id ) { // Check if nonce is set if ( ! isset( $_POST['BFM_shipping_nonce'] ) ) { return $post_id; } if ( ! wp_verify_nonce( $_POST['BFM_shipping_nonce'], 'save_BFM_shipping' ) ) { return $post_id; } // Check that the logged in user has permission to edit this post if ( ! current_user_can( 'edit_post' ) ) { return $post_id; } $shipping = sanitize_text_field( $_POST['BFM_shipping_service'] ); update_post_meta( $post_id, '_BFM_shipping_tracking', $shipping ); }Forum: Plugins
In reply to: Woocommerce added Metabox in admin order page do not save the valuesThanks James . This is more a WP issue about how I can save content in a custom metabox.
Josef
Thanks download runs since I have changed the memory from 128 to 256.
Whats about the hook wit “Herstellergarantie”?
How can I send you a privat message for a adminlogin?
Thanks
Regards Josef
got this back from WP_DEBUG:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 122880 bytes) in /hp/cl/ad/uj/www/eshop/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/include/text_frame_reflower.cls.php on line 307
Any idea?
Regards Josef
Hi Ewout,
some weeks ago you send me this little nice code. It work great but with Woocommerce 2.2 and your newest update the “Herstellergarantie” is not hooking in the invoice.
Secondly I’m not able to download the invoice or pack slip.
When I integrate the invoice in the woocommerce mails, that works fine, but I get no access to the pack slip.Urgent help appreciated.
Regards Josef
<?php $product_id = $item['product_id']; $product = new WC_Product ( $product_id ); $attribute = 'Herstellergarantie'; $attributes = $product->get_attributes(); if (array_key_exists( sanitize_title( $attribute ), $attributes) ) { echo '<br/>Herstellergarantie:<br/>' . $product->get_attribute ( $attribute ); } ?>