Viewing 15 replies - 1 through 15 (of 41 total)
  • Thread Starter simonph79

    (@simonph79)

    Sorry running WordPress 4.5.1 and the latest version of Woo-RFQ

    Plugin Author Neah Plugins

    (@gplsaver)

    Simon,
    Are these product categories on the page below or are they variable products?
    https://renshawstone.com.au/product-category/edges-and-finishes/

    Thread Starter simonph79

    (@simonph79)

    Plugin Author Neah Plugins

    (@gplsaver)

    What happens if you make the products variable products and on this page
    https://renshawstone.com.au/online-calculator/draining-grooves/ make “length_needed” a default of 1.

    Also i noticed that even when you clear the rfq cart the buttons are still showing in cart. I am not sure if this is a bug in the plugin by me. i can’t reproduce here.

    Plugin Author Neah Plugins

    (@gplsaver)

    They are variable in a sense since they are priced by length

    Thread Starter simonph79

    (@simonph79)

    Yes OK that makes sense.

    I am not seeing where I enter the length needed as a default of 1 however.

    My biggest challenge is that I am seeing add to quote and select options buttons. hence i want to hide the add to quote button on the product category pages but not on individual items.

    Plugin Author Neah Plugins

    (@gplsaver)

    I think if you make the products variable you will not the see add to quote button. see if we can solve that problem first and we will see about the default of 1.

    Thread Starter simonph79

    (@simonph79)

    I have now seen the in quote issue once I remove items, but it does allow me to re-add and does not duplicate.

    Plugin Author Neah Plugins

    (@gplsaver)

    I think you need the “select options” button since that is the only way they can get to the product to enter the variable length.

    Plugin Author Neah Plugins

    (@gplsaver)

    if you just don’t want to see any buttons on the archive page then do the following i will give you on the next post. stay tuned

    Thread Starter simonph79

    (@simonph79)

    Great thanks.

    We do need to keep the Select Options button for sure. But we can also click the product image which takes us to the options anyway.

    But if we can leave Select Option and hide add to quote that would be great.

    Plugin Author Neah Plugins

    (@gplsaver)

    This is what I got for you based on two pages you gave me. Hope it works

    add_filter('gpls_woo_rfq_in_rfq_text', 'gpls_woo_rfq_request_quote_text_mod',1000,1);
    add_filter('gpls_woo_rfq_request_quote_text', 'gpls_woo_rfq_request_quote_text_mod',1000,1);
    
    function gpls_woo_rfq_request_quote_text_mod($request_quote)
    {
    
    	$url = $_SERVER["REQUEST_URI"];
    
    	$Hide = strpos($url, 'shop');
    
    	if ($Hide!==false)
    	{
    		$request_quote="";
    	}
    
    	$css='<style type="text/css">.woocommerce ul.products li.product .button {	display: none;}.add_to_cart_button {display: block !important;} </style>';
    	echo $css;
    
    	return $request_quote;
    
    }
    
    function gpls_woo_rfq_Hide_Add_To_Quote() {
    
    	$css='<style type="text/css">.woocommerce ul.products li.product .button {	display: none;}.add_to_cart_button {display: block !important;} </style>';
    
    	echo $css;
    }
    Plugin Author Neah Plugins

    (@gplsaver)

    sorry change ‘shop’ above to ‘product-category’ or ‘edges-and-finishes’
    depending on what you are doing. probably ‘edges-and-finishes’

    Plugin Author Neah Plugins

    (@gplsaver)

    hope this works

    Plugin Author Neah Plugins

    (@gplsaver)

    here again with corrections

    add_filter('gpls_woo_rfq_in_rfq_text', 'gpls_woo_rfq_request_quote_text_mod',1000,1);
    add_filter('gpls_woo_rfq_request_quote_text', 'gpls_woo_rfq_request_quote_text_mod',1000,1);
    
    function gpls_woo_rfq_request_quote_text_mod($request_quote)
    {
    
    	$url = $_SERVER["REQUEST_URI"];
    
    	$Hide = strpos($url, 'edges-and-finishes');
    
    	if ($Hide!==false)
    	{
    		$request_quote="";
    	}
    
    	$css='<style type="text/css">.woocommerce ul.products li.product .button {	display: none;}.add_to_cart_button {display: block !important;} </style>';
    	add_action( 'wp_print_styles', 'gpls_woo_rfq_Hide_Add_To_Quote' );
    	echo $css;
    
    	return $request_quote;
    
    }
    
    function gpls_woo_rfq_Hide_Add_To_Quote() {
    
    	$css='<style type="text/css">.woocommerce ul.products li.product .button {	display: none;}.add_to_cart_button {display: block !important;} </style>';
    
    	echo $css;
    }
Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘Hide Add to Cart/Quote Button on product catergory page’ is closed to new replies.