Show Vendor Location on Checkout

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 8 reply threads
  • Author
    Posts
    • #116056
      contatoapp
      Participant

      Is it possible to show the vendor’s location during checkout? That way clients can know where the product is coming from instead of going to the vendor’s page.

    • #117368
      contatoapp
      Participant

      Hi. Could someone help me? Thanks.

    • #118324
      WCFM Forum
      Keymaster

      Hi,

      Do you want to show this all the time or only for “Local Pickup” shipping?

      Thank You

    • #118511
      contatoapp
      Participant

      Hi. All the time if possible. Thank you.

    • #118664
      Suvopam Malakar
      Participant

      Do you want to show this all the time or only for “Local Pickup” shipping?

      Is it possible to enable it only for Local Pickup or all the time?

    • #119854
      contatoapp
      Participant

      Hi. Any updates on this? Thank you.

    • #121832
      Sushobhan
      Keymaster

      Hello,
      Use the following snippet , it will add the vendor address below the store name. See the image- https://imgur.com/ZRNjEsg

      add_filter( 'woocommerce_get_item_data', function( $cart_item_meta = array(), $cart_item ) {
          global $WCFM;
          $product_id = $cart_item['product_id'];
          if ( ! $product_id ) {
              $variation_id = sanitize_text_field( $cart_item['variation_id'] );
              if ( $variation_id ) {
                  $product_id = wp_get_post_parent_id( $variation_id );
              }
          }
          $vendor_id = wcfm_get_vendor_id_by_post( $product_id );
          if( $vendor_id ) {
              $vendor_address = $WCFM->wcfm_vendor_support->wcfm_get_vendor_address_by_vendor( absint($vendor_id) );
              if( !is_array( $cart_item_meta ) ) $cart_item_meta = (array) $cart_item_meta;
              $cart_item_meta = array_merge( $cart_item_meta, array( array( 'name' => 'Location', 'value' => $vendor_address ) ) );
          }
          return $cart_item_meta;
      }, 60, 2 );

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
      Let me know how it goes.
      Thanks!

    • #121947
      Auhouse.ru
      Participant

      cool

    • #122067
      Sushobhan
      Keymaster

      Let me know if there’s anything else we can help you with!

      Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.

Viewing 8 reply threads
  • You must be logged in to reply to this topic.