Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ftanger

    (@ftanger)

    I forgot to add the code snippet, it is:

    add_action( ‘woocommerce_before_single_product’, ‘wc_print_storeinfo’, 10 );

    function wc_print_storeinfo() {
    global $product, $WCFM;
    $id = $product->get_id();
    $vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $id );
    echo do_shortcode( “[wcfm_store_info id='”.$vendor_id.”‘ data=’store_url’]” );
    }

    Thread Starter ftanger

    (@ftanger)

    Yes, I have added the following code to my functions.php to try and see if I could generate a link to the vendor shop homepage. You can see the result at https://unitosports.ga/clubshops/mzc11/ when clicking on any product.

    This function code seems to work but:
    1) It shows a link on a single product page only.
    2) The link label is the “shop name” for example: “S.V. MZC’11” but I need it to be named “Home” for the visitor to understand what it is for.
    3) When clicked on it opens a new browser window. It needs to stay the same window.
    4) I need this link to be visible on every page. Is it possible to add the output of this function to the standard menubar?

    Thanks in advance for your advice, ftanger

Viewing 2 replies - 1 through 2 (of 2 total)