In this lesson, you’ll learn how to connect your Sales page buy button to your course Checkout page.
This requires a special link because, in addition to bringing your customer to the Checkout page, the action of clicking the button should also add your course to the customer’s cart.
Use the following link, with the appropriate changes made to it specific to your site and WooCommerce plugin:
https://yourdomain.com/checkout/?add-to-cart=25
- Simply replace https://yourdomain.com with your own site URL.
- Then, replace the number at the end of the link (in this example, 25) with the Product ID for your course. Your WooCommerce Product ID can be found by going to Products >> All Products in your WooCommerce dashboard. When the list of products appears, hover over the product listing. The Product ID will appear beneath the product name.
Paste this special link on your Sales page wherever you need to link to your Checkout page (like your "Buy now!" buttons).
When I add a buy now button to my course overview page using the URL as suggested it adds 2 items to the cart.
Whats happening?
If you empty the cart and click to purchase again, does the same thing happen?
Hi,
First of all a great course – thanks very much.
I do however experience some problems connecting the button to the checkout.
On one of my sites, everything is working fine in preview mode – clicking on buy now and straight to the cart.
On the live page however, with me being logged out of WP, the same button sends me to the empty cart page.
Have you got any idea why this might occur?
Thanks very much in advance and have a great weekend,
Wiebke
Hi Wiebke,
Please contact our support team so they can have a at your site and help you out as quickly as possible.
I’m wondering if it is possible somehow to reset the cart items. The problem is that if a user clicks “Buy” few times, he lands on the checkout page with few items in the cart.
Is it possible to reset the cart to zero before adding new item and redirecting to Checkout?
I’d suggest doing a Google search for this as this is WooCommerce related.