Viewing 11 replies - 31 through 41 (of 41 total)
  • Thread Starter simonph79

    (@simonph79)

    Hi,

    Apologies for the late reply I have been in meetings since this morning.

    I have added both snippets of code to functions.php and cleared the Super Cache completely and disabled the plugin but I still see add to quote.

    Also went through my browsers and cleared cahce for them too just in case.

    Plugin Author Neah Plugins

    (@gplsaver)

    Did you use the latest as in below

    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, 'product-category');
    
    	if ($Hide !=false)
    	{
    		$request_quote="";
    		$css='<style type="text/css">.woocommerce ul.products li.product .button {	display: none !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;
    }
    Thread Starter simonph79

    (@simonph79)

    Sure did.

    Just removed and re-added with same results.

    Sorry to be a pain I have definitely followed all advise/steps

    Plugin Author Neah Plugins

    (@gplsaver)

    Not a problem. Problem is I can’t even see the css injected above being ignored in your site. like the code never ran. Have you by any chance removed the filters? But here let’s try this . insert the followin in your style.css in your theme dir. let’s see if this removes the buttons

    .woocommerce ul.products li.product .button {
        margin-top: 1em;
        display: none !important;
    }
    Plugin Author Neah Plugins

    (@gplsaver)

    not a solution p;er se. i just want to see if this code runs

    Plugin Author Neah Plugins

    (@gplsaver)

    by the way do you have minfiy plugin running. caching javascript and css?

    Thread Starter simonph79

    (@simonph79)

    Thanks for your patience.

    No minify plugin installed have checked and verified.

    I am pretty sure I have not removed any filters just adding above CSS as suggested and will get back to you.

    Thread Starter simonph79

    (@simonph79)

    That code actually worked quite well.

    Its removed the buttons at category level which isn’t actually a bad thing.

    It then forces customers to click on a product to enter options. Looks a lot cleaner too.

    Thank you I think we will run with that! In hind site your original idea of removing all buttons at category page was the best option I think.

    What do you think of the look and feel now?

    I do have one more question to do with the quote summary the customer receives. Is it OK to ask that question here or would you prefer I start another thread?

    Plugin Author Neah Plugins

    (@gplsaver)

    Site looks great. Glad we worked it out!
    Probably best to start another thread. If you like the plugin please leave a review ?? Also i provide updates and news regarding features on twitter if you like to follow me

    https://twitter.com/GPL_Saver

    Plugin Author Neah Plugins

    (@gplsaver)

    off to some meetings . i will check your question later on ??

    Thread Starter simonph79

    (@simonph79)

    Perfect and thank you again, will definitely leave a review.

    Thanks again.

Viewing 11 replies - 31 through 41 (of 41 total)
  • The topic ‘Hide Add to Cart/Quote Button on product catergory page’ is closed to new replies.