wordpress plugin - WooCommerce inquiry if no price available -


i'm helping friend setting woocommerce shop. since shop going bigger , products pretty variable , customizable not able provide/configure prizes beginning.

however products in shop , ad inquiry lead form in case no price available.

since never programmed woocommerce wondering right hook implement such functionality?

had exact same issue , couldn't find plugin or solution anywhere figured workaround myself:

you need edit file /wp-content/themes/your-theme-name/woocommerce/single-product/add-to-cart/simple.php (if it's not there copy woocommerce plugin /wp-content/plugins/woocommerce/templates/single-product/add-to-cart/simple.php)

and on line 14 says

    if ( ! $product->is_purchasable() ) return; 

you need comment out , write

    if ( ! $product->is_purchasable() ) {     // put code here      return;      }    

and in //put code here line can enter example shortcode form or more complicated solution put code button when clicked open popup form.

still working on ;)


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -