Reputation: 481
After ADD TO CART option i can see the items are getting updated to CART but when moving to cart page it is redirecting back to homepage.
The cart page shortcode is also provided.
Please help out!I'm new to woocommerce.
Upvotes: 8
Views: 37266
Reputation: 1
Adding these shortcodes worked for me: [woocommerce_cart] [woocommerce_checkout]. Seems the pages were not created during woocommerce installation. Create cart page: add the short code:[woocommerce_cart] Create checkout page and add the short corde: [woocommerce_checkout]
Upvotes: 0
Reputation: 21
This question is from years ago but since I had the same problem and finally could find the culprit by try and error, I post this answer in case someone has the same struggle. Go to woocomerce setting and then advance and set the checkout and cart pages If the woocommerce doesn't create checkout and cart pages when you install it, you need to create them by yourself using these pieces of codes:
[woocommerce_cart] [woocommerce_checkout]
You can find other codes from here: https://docs.woocommerce.com/document/pages-not-displaying/#
Upvotes: 2
Reputation: 121
So I fixed mine, here is how I did it, seems woocommerce does not create all the pages in the newest version, you are missing the 'cart page'.. create a page name it 'cart' then place this short code on the page.. [woocommerce_cart] save..Tada.. ;o)
Shop – No content required. Cart – Contains [woocommerce_cart] shortcode and shows the cart contents Checkout – Contains [woocommerce_checkout] shortcode and shows information such as shipping and payment options My Account – Contains [woocommerce_my_account] shortcode and shows each customer information related to their account, orders, etc.
Upvotes: 11
Reputation: 904
Be sure you have page.php setup in your theme to get the content. Something like:
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
Upvotes: 18
Reputation: 2192
Dear go to woo commerce setting page and click to checkout tab then select the cart page for add to cart.
you should also need to reset your permalinks first default and then post name.
Upvotes: 3