To add the vendor logo beside sold by vendor name and on vendor tab –
add_filter( 'mvx_sold_by_text', 'vendor_logo_before_sold_by', 10, 2 );
function vendor_logo_before_sold_by($sold_by, $id) {
$vendor = get_mvx_product_vendors($id);
if($vendor)
$image = '<a href="' . $vendor->permalink . '"><img src="' . $vendor->get_image() . '" style="width:30%!important;max-height:30px!important;object-fit:contain!important;"/></a>'.$sold_by;
return $image;
}
add_filter( 'mvx_before_seller_info_tab', 'vendor_logo_before_product_vendor' );
function vendor_logo_before_product_vendor($logo) {
global $product;
$vendor = get_mvx_product_vendors($product->get_id());
if($vendor)
$logo = '<a href="' . $vendor->permalink . '"><img src="' . $vendor->get_image() . '" style="width:30%!important;max-height:30px!important;object-fit:contain!important;"/></a>';
return $logo;
}
Leave a Reply
You must be logged in to post a comment.