Viewing 6 replies - 1 through 6 (of 6 total)
  • The core WooCommerce plugin won’t do that but its a common requirement and there are several plugins that may do what you want.
    Search terms include:
    One page checkout
    Quick checkout
    One page shopping
    One step checkout
    One click checkout

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hi markwill,

    You can do this with WooCommerce core actually. These are the two settings you need to check: https://cld.wthms.co/1hOjc/302fSW0k. You can find it at WooCommerce > Settings > Products > Display.

    Then you can put those three books in a certain category, and when the customers clicks on one, it will add to cart and redirect to the cart page right away. To redirect them to the checkout page instead of the cart page, you can simply add in this snippet to you child theme’s functions.php file, or a to a code snippets plugin as mentioned here: https://www.skyverge.com/blog/add-custom-code-to-wordpress/

    add_filter ( 'add_to_cart_redirect', 'wc_ninja_redirect_to_checkout' );
    function wc_ninja_redirect_to_checkout() {
    	return WC()->cart->get_checkout_url();
    }

    Good one Caleb, thanks.

    Thread Starter markwill

    (@markwill)

    Thank you both. I am always eager to avoid “yet another plugin” where I can ?? so it’s good to know there is native support for this.

    I do have a couple of follow up questions.

    1. The main scenario where I want to use this is on a special landing page for, say, an eBook I am looking to sell. So, it’s not necessarily on the regular store pages. Is there a way to embed the “Buy now”-type button on an arbitrary page (as opposed to the regular store page for the eBook in the store pages created by WooCommerce)?

    2. Apart from the occasional eBook (where I want the “Buy now” behavior) I will generally NOT want this behavior, for the other products I have. The option referenced seems to be site wide. Have I understood that correctly? Is it possible to have Buy Now buttons for some very specific products but not for the majority of my products?

    Thanks.

    Mark

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    To output buttons in other places, https://docs.woothemes.com/document/woocommerce-shortcodes/ works, but the redirect code above would be sitewide.

    I guess you could in theory look at the cart contents during woocommerce_add_to_cart_redirect filter/your function, but this would be more advanced.

    Hi Markwill,

    if you prefer to limit the number of plugins, then may be Santu is a good option for you for selling your digital products (or normal products). It allows you to add buy now buttons to WordPress without a plug-in.

    Basically all it takes is to add a simple URL such as ibuy.bz/apples anywhere you want on your website or in your blog posts or even in comments. When a buyer clicks on the link, it immediately adds the item into your shopping cart.

    Have a look at the video at https://santu.com/en/blog/2013/09/18/add-shopping-cart-free-wordpress-com-blog/ which shows you how to add Santu to a WordPress blog.

    Since you run your own WordPress Blog, you can also copy and paste some Javascript into any page or template to add your own pop-up or embedded Shopping cart.

    You can find some examples here: https://santu.com/en/designers/#zero-programming-section or at the end of the video above (check out the image map example, where you can click on fruit in a fruit basket to see how far you can take this).

    Different integration options are described in the Integrate section of the Santu dashboard.

    By the way the links work anywhere, not just on WordPress. so you can also use it to sell your eBooks via Facebook, Twitter and email for example, which can help with your marketing.

    We have been developing Santu for many years for users just like you, so I hope it will suit your requirements.

    All the best,
    ??
    sgk

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘"Buy now" button’ is closed to new replies.