Home Forums Theme Support Dokan Display seller below Product at shop page

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Nayem 3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #56493

    Lucas
    Member
    Post count: 6

    Hello,

    May you guys help us pointing the best way to do a customization?

    At the Shop Page, below a product, we need to display the seller who have that specific product on their shop.

    Any help will be appreciated.

    Kind Regards,

    Lucas.

    #56541

    Nayem
    Moderator
    Post count: 6480

    Hello Lucas,

    You can do this with some code easily. Just you have to call like this-

    Please navigate to plugins/woocommerce/templates/single-product/content-product.php and find this line

    do_action( ‘woocommerce_after_shop_loop_item_title' );
    ?>

    Paste following code after that line:

    <?php 
    		global $product;
    
    		$author     = get_user_by( 'id', $product->post->post_author );
        	$store_info = dokan_get_store_info( $author->ID );
    		if ( !empty( $store_info['store_name'] ) ) { ?>
                    <span class="details">
                    	<?php echo $store_info['price']; ?>
                        <?php printf( '<a href="%s">%s</a>', dokan_get_store_url( $author->ID ), $author->display_name ); ?>
                    </span>
     <?php } ?>

    Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Display seller below Product at shop page’ is closed to new replies.