link back to vendor store url
-
Dear Sir / Madam,
I made 2 vendor stores as prototype for the final website. Here are the url´s:
https://unitosports.ga/clubshops/mzc11/
https://unitosports.ga/clubshops/scc/More individual vendor stores with different items will be created for each club..
When the visitor (buyers who are not logged in as administrator) adds an item to the basket for purchase there is no link for the visitor to go back to the vendor shop homepage (for example https://unitosports.ga/clubshops/mzc11/) They can only use the browser navigation arrows in the browser.If I make a home button in a top menu bar it will direct to https://unitosports.ga/ which will cause the visitor to be lost.
I need to add a menu home button or link that directs to the current vendor shop page (https://unitosports.ga/clubshops/mzc11/ , https://unitosports.ga/clubshops/scc/ or any future clubshop to be created.I tried to use the shortcode [wcfm_store_info id=”” data=”store_url “] but I could not get it to work for this application.
Can you suggest a way to create such a link to the current vendor store url? Thanks in advance for your help!
The page I need help with: [log in to see the link]
-
I tried to use the shortcode [wcfm_store_info id=”” data=”store_url “] but I could not get it to work for this application.
– Well, this shortcode return static store page url.
But for your case you have to generate this URL dynamically depending upon customer’s cart product.
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
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’]” );
}
“Why are you adding this at single product page when single product page by default shows sold by information – https://ibb.co/cQZQPLD
3) When clicked on it opens a new browser window. It needs to stay the same window.
– Add this snippet for this purpose-
add_filter( 'wcfm_shop_permalink_open_by', '__return_false' );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?
– That’s why I told you, “you have to generate this dynamically depending upon cart items.”
The topic ‘link back to vendor store url’ is closed to new replies.