1
votes

WooCommerce: How do I use an Add to Cart button on a normal page?

I want to use the Add to Cart button on a normal page. Currently, I'm also using a plugin called Direct Checkout that should redirect the customer from cart to checkout.

So anyways, this should basically place the item into the cart and move to checkout with 1 click.

The page is an informative page that I'd just like to have an "Add to Cart" button at the bottom of if a customer would just like to add the product to the cart from there, rather than the product page itself.

Thank you.

1

1 Answers

2
votes

http://yoursite.com/checkout/?add-to-cart={ID}

http://yoursite.com/cart/?add-to-cart={ID}

Replace {ID} with the Post ID of the specific Product:

result must be something like this:

http://yoursite.com/cart/?add-to-cart=<?php echo $post->ID; ?>

I hope it helps