• Resolved droonss

    (@droonss)


    Hello. Is it possible to somehow add the name of the store (a link to the seller) to the product card (in the category archive)?
    Or at least in the product preview?
    This is convenient, and implemented in some other plugins.
    //

Viewing 1 replies (of 1 total)
  • Plugin Author WebWizards

    (@webwizardsdev)

    Hi there,

    To add a link to each store on the archive page, you can add this PHP code snippet to your site:

    
    add_action( 'woocommerce_after_shop_loop_item_title','sold_by' );
    function sold_by(){
    
        global $post;
        $product_id = $post->ID;
        $vendor = marketking()->get_product_vendor($product_id);
    
        if (empty(get_query_var('vendorid'))){ // do not apply on vendor store pages
            echo 'Vendor: <a href="'.marketking()->get_store_link($vendor).'">'.marketking()->get_store_name_display($vendor).'</a><br>';
        }
    
    }

    Should display as https://prnt.sc/rjZ7k4pQRKTN

Viewing 1 replies (of 1 total)
  • The topic ‘Link to the store’ is closed to new replies.