• Resolved Penny

    (@thejanemorris)


    The cart works fine when a product is in it but a fatal error when it is empty. The message says:

    PHP Parse error: syntax error, unexpected ‘endif’ (T_ENDIF), expecting end of file in /nas/content/live/somatictrauma/wp-content/themes/divi-child/woocommerce/cart/cart-empty.php on line 44

    I have looked at the file cart-empty.php in the child theme and can’t see any difference in it compared to the same Woocommerce file not in a child theme.

    On line 44 there is:
    <?php endif; ?>

    I’d really appreciate any help with this as I have researched for ages now trying to solve the issue.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    It looks like the error is coming from your theme. Can you temporarily switch your theme to Storefront and check if the cart page works properly?

    Thread Starter Penny

    (@thejanemorris)

    Hello,

    Thanks for your answer. Yes it does work correctly when another theme is used. The problem file is in the Divi child theme but it is the same as the original file cart-empty.php so I am confused as to what can be done.

    Any help appreciated!

    Hi @thejanemorris,

    Since the file is the same in the child theme as the WooCommerce core, you may want to just delete the child theme file and go with the one in the core. See if you have the same problem then.

    If you don’t, then you can copy the file to the child theme again and make any changes you need to it. If you don’t need to change anything then you can skip it altogether.

    Let us know if you have any questions.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘when cart icon is clicked and cart is empty getting fatal error’ is closed to new replies.