Vendors Store

This topic contains 7 replies, has 2 voices, and was last updated by WCfM Forum WCfM Forum 13 hours, 6 minutes ago.

  • Author
    Posts
  • #67017
    Avatar
    r_guayaquil
    Participant

    Hi,

    How can i show the url of the vendors online store in his profile?

    Thanks

    Attachments:
    You must be logged in to view attached files.
  • #67072
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    How you have added this field for vendors?

    Well, use this code to display this –

    add_action( 'wcfmmp_store_before_phone', function( $store_id ) {
    	$site_url = 'http://gogle.com';
    	?>
    	<div class="store_info_parallal"><i class="wcfmfa fa-globe" aria-hidden="true"></i><span><a href="#"><?php echo $site_url; ?></a></span></div>
    	<?php
    });

    Fetch vendor’s site url using $store_id

    Thank You

  • #67112
    Avatar
    r_guayaquil
    Participant

    Hi,

    I added it in the registration form. Or where do i have to add it?

    Thanks!

  • #67121
    WCfM Forum
    WCfM Forum
    Keymaster

    OK, that’s fine.

    So, you have to fetch that using get_user_meta function.

    Can you check from database using which meta_key it store that field ?

    Thank You

  • #67224
    Avatar
    r_guayaquil
    Participant

    Hi,

    I dont know much about coding. Can you please guide me?

    Thanks!

  • #67464
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    Do you have added “website url” custom field under vendor’s registration form?

    Please show me screenshot for that.

    Thank You

  • #67489
    Avatar
    r_guayaquil
    Participant

    Hi,

    I attached the screenshot

    Attachments:
    You must be logged in to view attached files.
  • #67839
    WCfM Forum
    WCfM Forum
    Keymaster

    Thanks, use this revised code –

    add_action( 'wcfmmp_store_before_phone', function( $store_id ) {
    	$site_url = get_user_meta( $store_id, 'url-de-tienda-online', true );
    	?>
    	<div class="store_info_parallal"><i class="wcfmfa fa-globe" aria-hidden="true"></i><span><a href="#"><?php echo $site_url; ?></a></span></div>
    	<?php
    });

You must be logged in to reply to this topic.