Failed to add Vendor Name before Add to cart Button

az atik

Member
Dec 24, 2018
61
5
8
Hello Experts,
i am struggling with a case.I can't find any solution to display vendor name before "add to cart" button in single product page.
i am using Flatsome Theme and Dokan plugin.Get me out from this issues . Thanks in advance to all
 

Attachments

  • uqre.JPG
    uqre.JPG
    82.8 KB · Views: 12

White Devil

Well-known member
Trusted Seller
Trusted Uploader
Jan 6, 2019
3,107
6,072
120
world
babiato.tech
Please navigate to plugins/woocommerce/templates/single-product/content-product.php and find this line

do_action( 'woocommerce_after_shop_loop_item_title' );
?>

</a>

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 } ?>
 

az atik

Member
Dec 24, 2018
61
5
8
Thank you for your response but i tried all the things and got failure.After that post here :(
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu