Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Hide shipping address when local pick up in order email
- This topic has 24 replies, 2 voices, and was last updated 6 years, 5 months ago by
WCFM Forum.
- AuthorPosts
- December 22, 2018 at 12:47 am #40612
Jose
GuestIt’s very frustrating try to make changes to the template of an email: store-new-order.php in my child theme.
At the end, I’m changing this one:
<?php } ?>
<?php if ( $order->has_shipping_method( ‘local_pickup’ ) ) { ?>
<td valign=”top” width=”50%”>
</td><?php } else { ?>
<?php if( ( $shipping = $order->get_formatted_shipping_address() ) && $WCFM->wcfm_vendor_support->wcfm_vendor_has_capability( $vendor_id, ‘view_shipping_details’ ) ) { ?>
<td valign=”top” width=”50%”>
<h3><?php _e(‘Shipping Address’, ‘wc-multivendor-marketplace’); ?></h3>
<p><?php echo $shipping; ?></p>
</td>
<?php } ?>
<?php } ?>But don’t work. I’m really apreciate your help.
Resolved this one, I will try to change the other ones. - December 22, 2018 at 7:22 am #40634
WCFM Forum
MemberHi,
Where you have edit this template?
I mean, please know me your override path!
Be sure you have updated this here -> child theme/wcfm/emails/store-new-order.php
And is this code right? – if ( $order->has_shipping_method( ‘local_pickup’ ) ) {
Thank You
- December 22, 2018 at 3:09 pm #40653
Jose
GuestThanks for your replay !
My path: child theme/wcfm/emails/store-new-order.php
When you ask me about code right, I don’t know, sorry. It’s the reason to ask here !
But, I’m not sure if in every template are the good way to resolve this one.
Maybe will be better if we change:
child theme/woocommerce/emails/email-addresses.php
child theme/woocommerce/emails/plain/email-addresses.phpI saw this code (but ist’s too old ?) https://stackoverflow.com/questions/38936283/woocommerce-hide-shipping-address-on-local-pickup-in-the-email
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}?><table id=”addresses” cellspacing=”0″ cellpadding=”0″ style=”width: 100%; vertical-align: top;” border=”0″>
<tr>
<td class=”td” style=”text-align:left; font-family: ‘Helvetica Neue’, Helvetica, Roboto, Arial, sans-serif;” valign=”top” width=”50%”>
<h3><?php _e( ‘Billing address’, ‘woocommerce’ ); ?></h3><p class=”text”><?php echo $order->get_formatted_billing_address(); ?></p>
</td>
<?php // ======================> Here begins the customization$shipping_local_pickup = false;
if ( $items_totals = $order->get_order_item_totals() ) {
foreach ( $items_totals as $items_total ) {
if ( $items_total[‘value’] == ‘Local Pickup’ && !$shipping_local_pickup ) $shipping_local_pickup = true;
}
}
// Endif ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) && !$shipping_local_pickup ) : ?>
<td class=”td” style=”text-align:left; font-family: ‘Helvetica Neue’, Helvetica, Roboto, Arial, sans-serif;” valign=”top” width=”50%”>
<h3><?php _e( ‘Shipping address’, ‘woocommerce’ ); ?></h3><p class=”text”><?php echo $shipping; ?></p>
</td>
<?php endif; ?>
</tr>
</table> - December 23, 2018 at 9:25 am #40710
WCFM Forum
MemberHi,
Please check this – https://www.useloom.com/share/769aa7caa6734c968d4cba8c25485d1d
WooCommerce by default handle this as per order shipping method, then why you want to change anything?
Thank You
- December 23, 2018 at 9:28 am #40711
WCFM Forum
MemberWell, for store new order we will take care of this as well in next update.
You don’t have to change anything.
Thank You
- December 23, 2018 at 12:47 pm #40741
jose
GuestI was trying to have the same setting of you, but for me don’t work, allways when select local pickup then show me both billing and shipping address.
- December 23, 2018 at 12:56 pm #40742
WCFM Forum
MemberHi,
Kindly check one thing, whether your theme already have overrided template?
If yes, then it’s compatible with latest WooCommerce or not!
Thank You
- December 23, 2018 at 1:20 pm #40752
jose
GuestThis reply has been marked as private. - December 23, 2018 at 1:22 pm #40754
WCFM Forum
MemberHi,
Please check under your parent theme folder, may be it’s already coming with overridden template!
Between, which theme you are using?
Thank You
- December 23, 2018 at 1:30 pm #40756
jose
GuestSorry, don’t understand when you ask me about parent theme folder.
I use divi theme, and I have child theme of these.
- December 23, 2018 at 1:47 pm #40759
WCFM Forum
MemberHI,
Yeah right, you are using child theme so you have main theme as well.
Check under that theme folder “divi theme”
Thank You
- December 23, 2018 at 1:57 pm #40760
Jose
Guest - December 23, 2018 at 2:24 pm #40763
WCFM Forum
MemberOK, it has no WooCommerce template.
- December 23, 2018 at 2:29 pm #40764
Jose
GuestOk, I was trying to test in another domain with a clean install, and I don’t have the same problems.
So, do you think that I have problems with some plugin ?
- December 23, 2018 at 2:34 pm #40765
WCFM Forum
MemberI think so, if you have any plugin related to shipping then disable those and take a look.
Thank You
- December 23, 2018 at 4:27 pm #40795
Jose
GuestThis reply has been marked as private. - December 24, 2018 at 6:30 am #40889
WCFM Forum
MemberOK, I am checking this.
- December 24, 2018 at 7:54 am #40902
WCFM Forum
MemberHI,
Tell me one thing –
1. WooCommerce Shipping and Vendor Shipping is different
2. In vendor shipping separate package generated for each vendor
3. Now if for one vendor Local Pickup available and for another not, then what will happen?Thank You
- December 24, 2018 at 1:19 pm #40943
Jose
GuestThanks for your replay !!
1.- They are absolutely different.
WC Shipping behaves globally and is not the case to use.
But Vendor shipping has the ability to take all the variables according to the seller.2.- That’s right, when buying from different vendors, different packages must necessarily be made.
3.- In the case of local pickup, a note should be sent with the vendor store address, and in the case of the other seller who only has dispatch available, it is sent to the shipping address
I made a test with two vendors and 2 different products. And off course local pickup for one and the other one with dispatch.
Was great, because every vendor received a email with specifict products and what type of delivery (local pickup or dispatch)
The only one problem are that the product with local pickup come with shipping address, It’s very confusing, it can even cause the error to be sent by mail.So, that’s why my requirement to insist on help to solve this problem.
Regards,
- December 24, 2018 at 2:44 pm #40958
WCFM Forum
MemberHI,
I understand, we will take care of this at vendor level and their new order email at as well.
Thank You
- December 25, 2018 at 1:28 pm #41082
Jose
GuestThank you so much !!
I hope you can tell me when you find a solution.
Regards anb happy holidays. - December 25, 2018 at 4:16 pm #41096
WCFM Forum
MemberSure, next update will be end of this week.
Merry Christmas and have a great time 🙂
- December 26, 2018 at 1:40 pm #41218
WCFM Forum
MemberHi,
WCFM Marketplace 2.0.4 has just released, we have take care of this.
Kindly update yours and take a look.
Thank You
- December 26, 2018 at 4:37 pm #41234
Jose
GuestCongratulation !! Resolved with your last update.
But need to add another request, if you see in the orders list, when a customer choose local pickup, still showing shipping address, the same when you see order details.
Will be amazing if you hide this one too !!, But I know, it’s a problem if a customer buy two products of the same vendor with different shipping options (local and delivery)
Best regards,
- December 27, 2018 at 8:17 am #41326
WCFM Forum
MemberHI,
But need to add another request, if you see in the orders list, when a customer choose local pickup, still showing shipping address, the same when you see order details.
– Sure, this will also resolve with WCFM next updateWill be amazing if you hide this one too !!, But I know, it’s a problem if a customer buy two products of the same vendor with different shipping options (local and delivery)
– Right, but now shipping address will be visible for that orderThank You
- AuthorPosts
- The topic ‘Hide shipping address when local pick up in order email’ is closed to new replies.