external product URL redirection

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WC Marketplace external product URL redirection

Viewing 3 reply threads
  • Author
    • #120591
      karl ohin


      Is it possible to direct the URL button of an external product if there is no web url filled in ?

      SO if the URL field was empty DO – open up the inquiry window ?

      then if the URL field had a value in it execute .

      Many Thanks

      You must be logged in to view attached files.
    • #120866


      Sorry, but we didn’t get your requirement. Can you explain little more.
      Here is WooCommerce External Product Documentation : https://woocommerce.com/videos/woocommerce-external-affiliate-product-overview/


    • #120994
      karl ohin

      Hi Guys

      thanks for the reply.

      Yes i understand the product function.

      So what i mean is .

      If i put in a URL in the product edit page, when a user clicks the button it opens up a new tab in browser to the URL specified – thats normal operation

      What i am looking for

      If i leave the URL blank currently the button still opens up a new tab with the “#” link – so the same page.

      I need the function of the button when URL is empty to open up the enquiry window .

      If URL = http – open window
      ELSE open enquiry window .

      The reason behind this that if i dont have the affilate and i want to generate LEADS i can measure them .

      Do you understand what i mean ?

      Many Thanks

    • #121053


      To add below code in your theme’s functions.php, you can use our inquiry module(https://wclovers.com/knowledgebase/wcfm-enquiry-module/) for those external product have no url filled in product edit.

      function woocommerce_external_add_to_cart() {
      		global $product;
      		if ( ! $product->add_to_cart_url() ) {
      			<a href="javascript:void(0)" id="external_url_enquiry">Ask the Price</a>
      				'product_url' => $product->add_to_cart_url(),
      				'button_text' => $product->single_add_to_cart_text(),


Viewing 3 reply threads
  • You must be logged in to reply to this topic.