Home Forums WC Vendors Pro Support Vendor address to display on Checkout page using Local Pickup shipping

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #64031
    Saif
    Participant

    Hi support,

    I know how to setup Local Pickup shipping method. Just wondering, how to add Local Pick address for each vendor? There is no shipping address option in Vendor Dashboard setting. Could you please help me?

    My client wants a Local Pickup service for each vendor.

    Just want to clarify that when customer go to Checkout page where shipping method displays, I want over there also display Vendor local pickup address which should be Vendor shop address.

    And when customer submitted the order via PayPal then it also display on Order Summary page. I did Sandbox test and got this page after pay. See https://gourmairs.com/shoaib/checkout/order-received/540/?key=wc_order_5907f115b5bc1&order-received=540

    I want Vendor address under Local Pickup column. I know is it possible to write custom PHP code but just dont know what is the code? I know it is possible to edit order-details-customer.php or order-details-item.php or order-details.php files.

    Can you please help me and send me Vendor address code?

    Regards,
    Saif

    #64138
    Anna
    Member

    Hello,
    Well first you will want to fix this:

    Pro Dashboard Page: ✕ -Your pro dashboard page cannot be set to your free dashboard page. Click here to change

    And also update to WC Vendors Pro v1.4.3 so you have compatibility with the WooCommerce version that you are using.

    We do not have local shipping in Vendor Shipping, which is the module we use for vendor-specified rates that can then be allocated to the vendors.
    They can enter rates for specific zip codes and regions if they were to use the Vendors Shipping > Country Rate which you can set up in the admin as the default shipping method for the vendors.

    Vendors do have the fields to enter their store address and store shipping address in their Pro dashboard pages.

    #64175
    Saif
    Participant

    Dear Anna,

    Thanks for your reply. How to I fix “Pro Dashboard Page: ✕ -Your pro dashboard page cannot be set to your free dashboard page. Click here to change” issue and why I am getting this.

    In regards to Vendor address, I know Pro Dashboard have option to enter Store address. My question is how to display Store address at Checkout page and Order summary page. Both pages show the product name and Sold by Storename which is fine then why not show vendor store address just under Shipping Method. See attached screenshot. I added message in the backend Local Pickup from Chef store and you can see in the screenshot and it also displays Sold by Store name but there is no link to Storename.

    How can I display Vendor address just after Shipping method? Of if it is not possible then how can I like Storename to Store page. In store page customer can find the store address.

    Please help me. I know it can achieve ny editing order-details.php or other PHP files.

    REgards,
    Saif

    #64401
    Saif
    Participant

    Hi Anna,

    I am waiting for my previous message. I fixed “Pro Dashboard Page: ✕ -Your pro dashboard page cannot be set to your free dashboard page. Click here to change” issue.

    Can you please help me my main issue that I want to display Vendor store address on Checkout and order summary page as shown in previous attached screenshot. Please help me.

    Regards,
    Saif

    #64776
    Saif
    Participant

    Dear Author,

    Can you please reply? I need to resolve this issue.

    Regards,
    Saif

    #64833
    Anna
    Member

    @saifuts
    I am working on this; I will update when I have something for you.

    #64836
    Saif
    Participant

    Hi Anna,

    You are great. Thanks for your reply. My site is nearly finished. I am not using WC Vendors PRO as all my necessary things are fulfill by using WC Vendors FREE plugin. Have a look my site at https://gourmairs.com/shoaib/

    I also finished LIVE transaction. The only thing I am waiting for Local Pickup Seller store address to display on Checkout page and also on Order Summary page. The checkout page shows the store name so I am sure there is a way to display Store address as well. If you need my website FTP details please let me know.

    Regards,
    Saif

    #65773
    Saif
    Participant

    Hi Anna,

    Hope you are well. Do you have any updates?

    Regards,
    Saif

    #66985
    Saif
    Participant

    Dear Anna,

    Do you have any updates. My site is almost finished. Have a look at https://gourmairs.com/shoaib/

    I need to display Local Pickup address at Checkout page and order page. You said you are working on that. Can you please help me?

    Regards,
    Saif

    #67891
    Saif
    Participant

    Dear Author,

    Can you please advise me? I launched my site. Have a look at https://gourmairs.com/ but client is not happy. As it doesnot show Vendor address on Checkout page. Can you please help me? It shows Vendor name on Checkout page so why not display Vendor address. Please help.

    Regards,
    Saif

    #68036
    Anna
    Member

    @saifuts
    Hello Saif,
    Ok- I beleive I finally have this one worked out!
    🙂
    This is for the address– this will show on the ORDER CONFIRMATION after checkout, and also for the customer if they go to: My Account > Orders
    Theme/child theme functions.php:
    https://gist.github.com/fervous/c9a09eb789da4bf9b080a3fda98319ed

    And also this will show the vendor’s email, if you are interested:
    https://gist.github.com/fervous/83739bcbf7e503114d0c1e8daeeb7775

    #68047
    Saif
    Participant

    Hi Anna,

    You are great. Thanks for your help. Just wondering, I added code under wp-content/themes/foodpicky/functions.php folder and it doesnot work.

    Can you please tell me where I have to add exactly this code? I think it should be under wp-content/plugins/woocommerce/templates/. I am not sure.

    If you go to https://www.wcvendors.com/help/topic/show-vendor-address-on-cart-for-local-pickup-option/ article , Patrick mentioned. I also followed this but it didnot work. Please help me.

    Regards,
    Saif

    #68053
    Anna
    Member

    @saifuts
    You placed it in the correct location: wp-content/themes/foodpicky/functions.php
    Though I would STRONGLY suggest you use a child theme.

    Place a new test order, then tell me what you see on the Order confirmation page.

    #68056
    Saif
    Participant

    Hi Anna,

    I attached function.php file in ZIP format. Can you please check and let me know I placed in the correct location.

    Thanks for the advise for child theme. I have already took backup.

    Waiting for quick reply.

    Regards,
    Saif

    #68106
    Anna
    Member

    @saifuts
    There is no attachment.
    This would just need to go at the end of your theme or child theme’s functions.php file. Somewhere on the page after the opening <?php but before the closing ?> if there is one. Usually if you just place the code at the end of the functions.php (before any closing ?> ) then it should work.

    I have tested this code on my dev site and it is working.

    You will have to place a NEW test order to see the address info on the order confirmation page and my-account/orders view order page.

    #68145
    Saif
    Participant

    Dear Anna,

    You are so cool. Tell me what can I do for you? I am so impressed for your work. Thank you very much for your help. In my last email, I was trying to attach functions.php file but I guess your system denied. So I attached screenshot fro my test order summary page. Have a look.

    It is working absolutely fine. I am getting email with Vendor address as well.

    Once again, good on you. Now I can launched the site and hand over to client.

    Regards,
    Saif

    #68157
    Anna
    Member

    @saifuts
    Hello Saif,
    Great! I am glad we were able to get this implemented for you and that it is working well. 🙂
    If you are happy with our plugin & support, we always appreciate a review on our wordpress.org page: https://wordpress.org/plugins/wc-vendors/

    😀

    #77022
    Saif
    Participant

    Dear Anna,

    Hope you are well. It has been long time to talk. Finally we are going to LIVE and I did final testing. The address is showing fine on Order Summary page bu tin email it is showing in one line along with Vendor name. Is it possible if you update your code form Email so Vendor name, Vendor address and Vendor email address shows in seperate line.

    See attached screenshot.

    I will look forward your soonest reply.

    Regards,
    Saif

    #77061
    Anna
    Member

    Hello!
    Glad you’re going live soon.
    Try this in your child theme functions.php:
    https://gist.github.com/fervous/d44c627f4a1685ba8dec01ceb8cd1fbf

    #77080
    Saif
    Participant

    Hi Anna,

    Thanks for your quick response. There is a bug I found and spent hours and hours to figure out. For some reason, after placed order Vendor address is showing wrong in Order Summary page and Email. See attached Screenshot 2. I checked Vendor profile and it is showing different address. See screenshot 1. Then I searched entire database and found the old address entry. See attached screenshot 3.

    Just for your information, currently I am using WC Vendors FREE version. Initially when I started building my website I was using WC Vendors Pro version so I activated again and then went to user profile and found old address. See attached screenshot 4.

    I think your code is for WC Vendors Pro, can you please update your code so it will show correct Vendor store address. Also can you fix the extra line spacing. See attached Screenshot 2, it is showing extra line space under Vendor details.

    I will look forward to hear from you soon.

    Regards,
    Saif

    #77169
    Saif
    Participant

    Hi Anna,

    Hope you are well. Sorry to bother you. Just following up. I noticed that I logged this task in WC Vendors PRO support.

    Actually initially I was using WC Vendors Pro plugin but then my theme author said I dont need as his them only support free version. See my theme https://themeforest.net/item/food-delivery-restaurant-directory-wordpress-theme-foodpicky/17966079. It has builtin WC Vendors Free.

    Do you want me move this thread to FREE support or you can do it. Anyways I need the code to work on free version. Can you please tell me when you update the code.

    Regards,
    Saif

    #77274
    Saif
    Participant

    Hi Anna,

    Hope you are well. Can you please tell me ETA for this issue as my client is asking? We need to go LIVE soon. Please let me know.

    Regards,
    Saif

    #77302
    Anna
    Member

    Hello,
    In WC Vendors free, those fields are not present to collect all of that data form the vendor.
    The WooCommerce customer shipping/billing info would need to be used.
    So for address and email you would need to instead gather the WooCommerce info (get_user_meta) if the vendor has filled out that information on their my-account page.

    #77303
    Saif
    Participant

    Hi Anna,

    Thanks for your quick response. Can you please kindly update the code for me? I can update Vendor documentation so then when Vendor sign they can fill the Shipping and Billing address. So if shipping address and billing address are different which address it will display in Email and Order summary page.

    Please help me.

    Regards,
    Saif

    #77329
    Saif
    Participant

    Hi Anna,

    I am very sorry to bother you again. I have a presentation to client on this Saturday. Is this possible if you update the code. Please I want to finish this project as it took so long.

    I appreciate your help.

    Regards,
    Saif

    #77365
    Saif
    Participant

    Hi Anna,

    Hope you are well. I think you are busy as I have not heard anything from you. So I updated James and Anne profile and added their billing and shipping address but unfortunately no address is displaying on Order summary page and email.

    See attached screenshot. Can you please kindly help as I am about to go LIVE.

    I will look forward to hear from you soon.

    Regards,
    Saif

    #77371
    Anna
    Member

    Hello,
    The code would have to be changed to use the woocommerce billing or shipping address. The way that code is written, it is out putting the WC Vendors Pro user_meta gathered with the Pro forms (address, email, etc.).
    I have tried to do this using the WooCommerce billing user_meta a few times and have not been successful. I know it can be done; but I am missing something in my code and I am not sure yet *what* I am not getting right. It likely has to do with the separation of the vendors role vs. customer role user_meta.

    I wrote the above code you were using in Pro just to help out; this is not actually a feature we include nor support in WC Vendors.
    I will try again to get the code written, but I have to take care of the other support tickets that deal with the features that are included in our plugin(s).

    #77374
    Saif
    Participant

    Hi Anna,

    Thanks for your reply. Can you please check below code? looks like I have fixed myself. So not sure that is correct code or not. I filled Vendor billing and shipping data under user profile and it seems like working fine. Please check below code and see my Order summary screenshot.

    add_action( 'woocommerce_add_order_item_meta', 'bwd_add_vendor_to_order_item_meta', 10, 2);
    function bwd_add_vendor_to_order_item_meta( $item_id, $cart_item) {		
    		$vendor_id = $cart_item[ 'data' ]->post->post_author;
    		// build up address 
    		$address1 			= get_user_meta( $vendor_id , 'billing_address_1', true );
    		$address2 			= get_user_meta( $vendor_id , 'billing_address_2', true );
    		$city	 			= get_user_meta( $vendor_id , 'billing_city', true ); 
    		$store_postcode		        = get_user_meta( $vendor_id , 'billing_postcode', true ); 
                    $state		                = get_user_meta( $vendor_id , 'billing_state', true ); 
    		$address 			= ( $address1 != '') ? $address1 .', ' . $city .', ' . $state.', '. $store_postcode :''; 
    	
    	wc_add_order_item_meta( $item_id, apply_filters('wcvendors_sold_by_in_email', __('Address', 'wcvendors')), $address);
    }
    add_action( 'woocommerce_add_order_item_meta', 'email_add_vendor_to_order_item_meta', 10, 3);
    function email_add_vendor_to_order_item_meta( $item_id, $cart_item) {		
                   $vendor_id            = $cart_item[ 'data' ]->post->post_author;
                   $email_vendor 	= get_userdata( $vendor_id )->user_email;
           wc_add_order_item_meta( $item_id, apply_filters('wcvendors_sold_by_in_email', __('Email', 'wcvendors')), $email_vendor);
    }

    Regards,
    Saif

    #77400
    Anna
    Member

    Hello,
    Looks like it is working great! 🙂

Viewing 29 posts - 1 through 29 (of 29 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.