Search code examples
wordpresswoocommerceccavenuestorefront

My cart is not displaying


I have added one product through woo-commerce, But in front-end after clicking add to cart and then clicking on view cart it displays nothing but Post Navigation and a link to go back, How can I get this working.

I have installed ccavenue as my payment gateway, and using custom theme, and I followed all the procedure to get custom theme compatible with woo-commerce as provided in its documentation like duplicate page.php to woocommerce.php and adding hooks,

when I activates woocommerce storefront theme, Everything works perfect, But when I activates my custom theme, cart and checkout page doesnt display. only header, footer and "POST NAVIGATION" in body gets displayed.

following is checkout page screen when woocommerce storefront theme is active;

checkout form on checkout page while woocommerce storefront theme is active

following is checkout page screen when custom theme is active;

Post Navigation is written instead of checkout form on checkout page while custom theme is active

what I want is to display checkout page as in image1 of storefront theme in my custom theme and/or all functionality of storefront theme if possible.

Please get me out of this.


Solution

  • The problem can be caused by a number of issues, so you need to check/confirm/correct the following:

    1. Is there definitely a checkout page?
    2. Does the page have the [woocommerce_checkout] shortcode inserted into the content.
    3. Confirm if the page template for your page is definitely outputting the content. If using the default page template look for the page.php file and confirm if it contains the_content()
    4. The theme doesn't need to have a page template specifically for the checkout; you can simply create a page called 'checkout' and add the shortcode, so you might not even need a child theme.
    5. You need to read up on how to create child themes as your approach seems wrong. Child themes override the parent on a file by file basis. If you're copying everything from the parent theme then all you're doing is duplicating it.