Jump to content


Replying to Remove The Buy Now Button In Favour Of The Add To Cart


Post Options

  or Cancel


Topic Summary

Elise Alley

Posted 02 June 2014 - 09:29 AM

Happy to have helped, Valerie.  Let us know if you have any additional questions.

Thanks,

Elise

strongeagle

Posted 02 June 2014 - 07:35 AM

Thanks very much...works a treat!

Valerie

Elise Alley

Posted 27 May 2014 - 08:44 AM

Hi strongeagle,

You'll add it to your functions.php file at the bottom before the closing ?> (if there is one).

Let us know if you have any other questions.

Thanks,

Elise

Posted 25 May 2014 - 03:51 AM

Thanks!  Um...where do I put the filter?

Elise Alley

Posted 20 May 2014 - 05:18 PM

Hi strongeagle,

There isn't a setting in Exchange to disable the Buy Now button.  There is a filter you can use, however.  Here are the details from the codex:


Quote

We added a filter to disable the Buy Now Button. The filter is it_exchange_disable_buy_now. It returns false by default. You may add the following single line of code to your functions.php file to disable it everywhere:

add_filter( 'it_exchange_disable_buy_now', '__return_true' );

To remove per product, you'll have to create a custom callback function and add your filter with 2 parameters. The second parameter will be the product object:

function yourcallback( $is_disabled, $product ) { ... } add_filter( 'it_exchange_disable_buy_now', 'yourcallback', 10, 2 );

Let us know if you have any additional questions.

Thanks,

Elise

strongeagle

Posted 20 May 2014 - 01:53 PM

I haven't managed to find the answer to my question in reading the forums, so apologies if I'm being a bit dense.

I want to disable the Buy Now button and have only the Add to Cart Option available, and can't see how to do this.  I do not have recurring items for sale.

How do I do this?  Thanks!

Review the complete topic (launches new window)