Up to 50 percent off

Display seller below Product at shop page

This topic contains 1 reply and 2 voices, and was last updated by Nayem 9 years, 4 months ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
July 21, 2015 at 10:29 am 56493
Nayem 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.
July 21, 2015 at 10:16 pm 56541
Nayem Nayem

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 1 Posts - 1 through 1 (of 1 total)