• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

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
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 } ?>
 
Thank you for your response but i tried all the things and got failure.After that post here :(
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock