Forum Replies Created
- AuthorPosts
- JoseParticipant
Hi,
Your answer was very clear and I thank you for that.
The only problem I see is the information that is displayed for the seller in the mail and in the orders when a customer (the day of black friday) uses the OFF coupon. (CASE 2)
Apparently he is not showing the reduced commission. Instead the administrator shows it correctly (admin view)
Regards,
Attachments:
You must be logged in to view attached files.JoseParticipantThis reply has been marked as private.JoseParticipantHi,
I’m not sure but I don’t see changes with yours last updates.
Or we need to wait at memebership updates ?
Regards,
JoseParticipantHi,
I have the last one, WCFM 5.4.3
I know, It’s not easy to found the issue.
Thank you
JoseParticipantThis reply has been marked as private.JoseParticipantUpdate !
Hi, it’s working, I just needed to configure the plugin (Practically leave it blank) and the configuration inside wcfm correctly.
If I set store logo image with more pixels, I will have a better quality ?
And the other one is to hide in order list and detail when a shipping are local pickup. (Don’t need it)
Regards,
JoseParticipantThis reply has been marked as private.JoseParticipantHi,
I forgot to ask you about that, do you found something ?
Because still the same error.
Regards,
JoseParticipantHi,
But exist a option to disable only part about orders ?, because If I disable the notes, we can’t send notes from vendor or admin to customer.
Thank you
JoseParticipantHi,
Resolved the topic.
That’s what I need it !! Working perfect and just to need thaks you so much !!
Amazing support !!
Best regards,
JoseParticipantStore manager mobile app ? This month ?
I want this one !!
Will be great !! Congratulations
JoseParticipantThis reply has been marked as private.JoseParticipantHi, maybe will be more fast if I share my custom email for completed order:
<?php /** * Customer completed order email * * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates/Emails * @version 3.5.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /* * @hooked WC_Emails::email_header() Output the email header */ do_action( 'woocommerce_email_header', $email_heading, $email ); ?> <?php /* translators: %s: Customer first name */ ?> <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p> <?php /* translators: %s: Site title */ ?> <p><?php printf( esc_html__( 'Your %s order has been marked complete on our side.', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p> <?php /* * @hooked WC_Emails::order_details() Shows the order details table. * @hooked WC_Structured_Data::generate_order_data() Generates structured data. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. * @since 2.5.0 */ /* Show simple order detail */ if ( ! defined( 'ABSPATH' ) ) { exit; } $text_align = is_rtl() ? 'right' : 'left'; do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?> <h2> <?php if ( $sent_to_admin ) { $before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">'; $after = '</a>'; } else { $before = ''; $after = ''; } /* translators: %s: Order ID. */ echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) ); ?> </h2> <div style="margin-bottom: 40px;"> <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Segoe UI', Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;" border="0"> <thead> <tr> </tr> </thead> <tbody> <?php echo wc_get_email_order_items( $order, array( // WPCS: XSS ok. 'show_sku' => $sent_to_admin, 'show_image' => true, 'image_size' => array( 64, 64 ), 'plain_text' => $plain_text, 'sent_to_admin' => $sent_to_admin, ) ); ?> </tbody> <tfoot> <?php $totals = $order->get_order_item_totals(); if ( $totals ) { $i = 0; foreach ( $totals as $total ) { $i++; ?> <tr> </tr> <?php } } if ( $order->get_customer_note() ) { ?> <tr> <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'woocommerce' ); ?></th> <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( wptexturize( $order->get_customer_note() ) ); ?></td> </tr> <?php } ?> </tfoot> </table> </div> /* Here I'm trying to put your code */ <p> <?php add_action( 'woocommerce_email_order_details', 'my_completed_order_email_instructions', 10, 4 ); function my_completed_order_email_instructions( $order, $sent_to_admin, $plain_text, $email ) { $shipping_items = $order->get_items('shipping'); foreach ($shipping_items as $shipping_item_id => $shipping_item) { $order_item_shipping = new WC_Order_Item_Shipping($shipping_item_id); $shipping_vendor_id = $order_item_shipping->get_meta('vendor_id', true); if($shipping_vendor_id > 0) { $pickup_address = $order_item_shipping->get_meta('pickup_address', true); echo "Pickup Address: " . $pickup_address; } } } ?> <p> /* End of your code * <p> <?php esc_html_e( 'Thanks for shopping with us.', 'woocommerce' ); ?> <p> <?php /* * @hooked WC_Emails::email_footer() Output the email footer */ do_action( 'woocommerce_email_footer', $email );
I test but don’t show anything about pickup address.
Regards,
JoseParticipantSorry, I can’t add the code inside the custom email.
Can you please tell me what I need to add and how ?
thank you
JoseParticipantHi,
Thanks but was resolved with that:
if( !‘customer_completed_order’ == $email->id ) return;
Now I’m leaving the newbie of php. 😉
Thanks a lot for your time, but was very important for us.
I think that with the next updates (translations !! you know) and this one I have more time to design and work with my proyect.
See you next topics (I have others issues)
Best regards,
Update: It’s not resolved, yes, I need to edit a custom email.
JoseParticipantHi,
Yes, you are right !! But, How can edit the condition check to allow only for customer completed order ?
Sorry, I can with css but with php, I’m newbie.
Thanks !!
JoseParticipantHi,
I need to say thanks so much again !!
Work !! but it’s too hard to print only in a completed order email to customer ?, because was printed in all the emails to vendor, admin and customer.
Just we need to show in the completed order email to customer. This is the reason when I ask you if are need it to put in function or in the custom email.
Best regards,
JoseParticipantHi,
I really appreciate your answer, but I don’t know where tu put this code: Inside the “customer completed order email” or inside of Function.php ?
Thank you !!
JoseParticipantI forget to ask…
I was thinking about the store address that you show in your store page demo.
It’s more complex to extract and show in my custom completed order email to customer, when customer have local pickup shipping ?
Thanks and regards,
Attachments:
You must be logged in to view attached files.JoseParticipantHi,
Thank you for your answer !!
I have error here: $method_array = explode(‘:’, $shipping_rate_id );
Parse error: syntax error, unexpected ‘:’, expecting ‘,’ or ‘)’
Note: My own code was a example. I need only for customer_completed_order (I have trouble with the “if”, that don’t need it)
Thank you
JoseParticipantHi,
I’m really need to share the store address when customer choose local pickup.
Maybe it’s more easy and don’t affect to others users if I use theme child to modify template for completed order email ?can you help me please with that ?
Thank you and Regards
JoseParticipantOk, now I understand what you said.
My hook was only a example, I’m sure that you know a better option to try to put this info.
Maybe It’s better this one, but need more code, because only show a message, not extract the info from store address:
add_action( ‘woocommerce_email_order_details’, ‘my_completed_order_email_instructions’, 10, 4 );
function my_completed_order_email_instructions( $order, $sent_to_admin, $plain_text, $email ) {
// Only for processing and completed email notifications to customer
if( ! ( ‘customer_processing_order’ == $email->id || ‘customer_completed_order’ == $email->id ) ) return;foreach( $order->get_items(‘shipping’) as $shipping_item ){
$shipping_rate_id = $shipping_item->get_method_id();
$method_array = explode(‘:’, $shipping_rate_id );
$shipping_method_id = reset($method_array);
// Display a custom text for local pickup shipping method only
if( ‘local_pickup’ == $shipping_method_id ){
echo ‘<p>Here we need a code to extract the store address</p>’;
break;
}
}
}Thank you
JoseParticipantok, thank you
JoseParticipantHi,
But I’m not talking about the shipping package. I talk about entering the information of the store address for local pickup the customer.
Like a bank transfer that the email have all info about bank, number, etc.
Thank you.
- AuthorPosts