About update 2.1.0

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 43 reply threads
  • Author
    Posts
    • #43921
      Jose
      Participant

      Hi,

      In the last update log said:

      Enhance – For Local pickup shipping store address added as pickup address

      Could you explain how this change is reflected? In which part can the customer see the vendor’s address?

      Thank you,

    • #43922
      WCFM Forum
      Member

      HI,

      Pickup address will be in store invoice with shipping details – https://ibb.co/4Rfphwt

      Thank You

    • #43924
      Jose
      Participant

      Hi,

      Thanks, and I see

      In my country the invoice simply sent by the store is not valid (the case shown by you.) We require an electronic invoice, endorsed by the internal tax service of my country.
      Would you appreciate if you can add it to notifications when the status is complete?

      Best regards,

      Attachments:
      You must be logged in to view attached files.
    • #44102
      WCFM Forum
      Member

      Hi,

      “wc-frontend-manager-ultimate\views\vendor_invoice\store-invoice.php” – this is the invoice template, you may edit and change to as per your requirement.

      But before edit you have to override this to – “child theme\wcfm\vendor_invoice\store-invoice.php”

      Thank You

    • #44105
      Jose
      Participant

      Thanks for your advice, but we can’t use a personal invoice, I need a certificate company that sell a system to send electronic invoice with a number that my Tax office supervises.

      https://www.edicomgroup.com/en_US/solutions/einvoicing/LATAM_einvoicing/chilean_einvoicing.html

      So in my implementation just need notification about damage in delivery, tracking and of course pickup address if choose that.

      Thanks and regards,

    • #44136
      WCFM Forum
      Member

      Hi,

      I am not not very familer withhow such invoice can be generated!

      You may check this “wc-frontend-manager-ultimate\views\vendor_invoice\store-invoice.php” template to get all such informations “delivery, tracking and of course pickup address”

      Thank You

    • #44140
      Jose
      Participant

      Hi,

      Don’t worry, I don’t have problem with that. You, me or others can’t modified the electronic invoice that my country have.

      So, Just want to add the store address when choose local pick up in the traditional notification email when status are completed.

      Regards,

    • #44141
      WCFM Forum
      Member

      Hi,

      We have already added “Pickup Address” in last update.

      Thank You

    • #44143
      Jose
      Participant

      Really ?, need to check again. Was the origin of this topic. You answer that only are in the store invoice, that is different to the notification email.

      Regards,

    • #44151
      WCFM Forum
      Member

      HI,

      Please show me screenshot, where you want to show this to your customers?

      Thank You

    • #44153
      Jose
      Participant
      This reply has been marked as private.
    • #44187
      WCFM Forum
      Member

      Hi,

      OK, but what if a customer purchase from different vendors?

      Thank You

    • #44252
      Jose
      Participant

      Hi,

      You are right ! I Don’t know if we talk about that time ago.

      But, if someone buys from different suppliers, can each supplier change the status of the order?
      So if it can be done, does it mean that you send an independent notification from the other vendor?
      So it would be possible to add the information of the address of the store?

      Regards,

    • #44310
      WCFM Forum
      Member

      Hi,

      But, if someone buys from different suppliers, can each supplier change the status of the order?
      – yes, but you may disable from capability. Also you may decide whether main order status change or not by vendor’s status update.
      There is a setting for this at WCFM Admin Setting -> Marketplace -> Order Sync

      So if it can be done, does it mean that you send an independent notification from the other vendor?
      – Yes off course

      So it would be possible to add the information of the address of the store?
      – Then it will best to add with order items.

      Thank You

    • #46586
      Jose
      Participant
      This reply has been marked as private.
    • #46671
      WCFM Forum
      Member

      Hi,

      In the second capture, I add a red arrow about tracking, but if are a local pickup, don’t need this one ?

      – Yeah right, we will take care of this.

      Thank You

    • #50192
      Jose
      Participant

      Hi, I would like to update this topic because we need to have the local pickup address in some email to the customer. And the best moment are when the order are complete.

      Thank you and regards,

    • #50214
      WCFM Forum
      Member

      Hi,

      For Local Pickup vendor address goes to customer with Store Invoice.

      Thank You

    • #50222
      Jose
      Participant

      Hi, maybe you don’t remember but in my country It has no legal validity the invoice that made woocommerce or other plugins. We need another type of invoice that we made with external companies that implement the generation of the invoice from the web and they are validated by the government.

      They come with a special bar code and with a numbered. Please see a example in attach.

      This is why I ask and you answered above about the place to put the local pickup address when the order are complete.
      https://wclovers.com/forums/topic/about-update-2-1-0/#post-44151

      Attachments:
      You must be logged in to view attached files.
    • #50236
      Jose
      Participant

      I have a Idea, I hope you can help me.

      What about to put data with this:

      add_action( ‘woocommerce_email_before_order_table’, ‘bbloomer_add_content_specific_email’, 20, 4 );

      function bbloomer_add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) {
      if ( $email->id == ‘customer_completed_order’ ) {
      echo ‘<h2 class=”email-upsell-title”>Your order are ready to pickup from here:</h2>’;
      }
      }

      I know that need to add more code. (local pickup address of the specific store)

      thank you

    • #50329
      WCFM Forum
      Member

      Hi,

      It’s not possible to fetch shipping package information within this hook.

      Thank You

    • #50367
      Jose
      Participant

      Hi,

      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.

    • #50375
      WCFM Forum
      Member

      HI,

      “local pickup” – this is part of Shipping Package.

      Thank You

    • #50377
      WCFM Forum
      Member

      Check this, pick location is part of shipping packages – https://ibb.co/XpMjRCp

    • #50401
      Jose
      Participant

      Ok, 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

    • #50785
      Jose
      Participant

      Hi,

      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

    • #50925
      WCFM Forum
      Member

      Hi,

      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 ‘

      Here we need a code to extract the store address

      ’;
      break;
      }
      }
      }

      //////////////////////////////////////////////////////////////////////////////////////////////////////////////

      Is this code working for you ? But you are able to fetch Store/Pickup address, right?

      $shipping_meta = $shipping_item->get_formatted_meta_data();

      Check in this “$shipping_meta”, Pickup address already there, hope you can print that.

      Thank You

    • #50956
      Jose
      Participant

      Hi,

      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

    • #50960
      Jose
      Participant

      I 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.
    • #51021
      WCFM Forum
      Member

      Hi,

      Use code like this –

      $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;
        }
      }
    • #51051
      Jose
      Participant

      Hi,

      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 !!

    • #51085
      WCFM Forum
      Member

      Hi,

      Where you had added your code?
      Functions.php is fine for the purpose.

      Add there, I have just changed internal logic –

      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;
        }
      }
      }

      Thank You

    • #51090
      Jose
      Participant

      Hi,

      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,

    • #51092
      WCFM Forum
      Member

      You are welcome 🙂

      Well, previously you had used a condition check, use this and check.

      // Only for processing and completed email notifications to customer
      if( ! ( ‘customer_processing_order’ == $email->id || ‘customer_completed_order’ == $email->id ) ) return;

      Thank You

    • #51093
      Jose
      Participant

      Hi,

      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 !!

    • #51094
      WCFM Forum
      Member

      Well, you may override this template and code there – https://ibb.co/XthprQv

      Then it will be part of only customer complete order email.

      Thank You

    • #51104
      Jose
      Participant

      Hi,

      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.

    • #51105
      Jose
      Participant

      Sorry, I can’t add the code inside the custom email.

      Can you please tell me what I need to add and how ?

      thank you

    • #51121
      Jose
      Participant

      Hi, 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,

    • #51148
      WCFM Forum
      Member

      Hi,

      Well, when you are adding directly in template then not require to use hooks. Pickup address visible like this – https://ibb.co/WxWDCQr

      Template code will be look like this –

      <?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
       */
      do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
      
      /*
       * @hooked WC_Emails::order_meta() Shows order meta data.
       */
      do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
      
      /*
       * @hooked WC_Emails::customer_details() Shows customer details
       * @hooked WC_Emails::email_address() Shows email address
       */
      do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
      
      ?>
      
      <p>
      <?php
      $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>
      
      <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 );
    • #51192
      Jose
      Participant
      This reply has been marked as private.
    • #51332
      WCFM Forum
      Member

      Hi,

      Change this part –

      <?php
      $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);
        $method_slug= $order_item_shipping->get_meta('method_slug', true);
        if( ( $method_slug == 'local_pickup' ) && $shipping_vendor_id > 0) {
          $pickup_address = $order_item_shipping->get_meta('pickup_address', true);
          echo "Pickup Address: " . $pickup_address;
        }
      }
      ?>

      Thank You

    • #51374
      Jose
      Participant

      Hi,

      Resolved the topic.

      That’s what I need it !! Working perfect and just to need thaks you so much !!

      Amazing support !!

      Best regards,

    • #51393
      WCFM Forum
      Member

      You are welcome 🙂

Viewing 43 reply threads
  • The topic ‘About update 2.1.0’ is closed to new replies.