Home Forums WoodMart support forum Page with no content after emptying cart

Page with no content after emptying cart

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #489284

    wildguitars
    Participant

    Hi guys,
    I hope everyone is doing well.
    I recently updated the WordPress version and WooCommerce plugin on our staging website, to test for bugs before performing the updates on our live site.

    Please download this screen recording: https://we.tl/t-30MiLGoliY

    As you can see, after emptying the cart on the staging site (dev2) there is no content. On the live site the empty cart message appears properly. The only difference between the staging site and live site is the WordPress and WooCommerce versions.

    1. Disabling all plugins except for Classic Editor, WooCommerce and Woodmart Core does not resolve the issue.
    2. Switching to Woodmart parent theme does not resolve the issue.
    3. Switching to another theme (Twenty Twenty-Three) resolves the issue.

    I’d appreciate your assistance with this.

    Thanks,
    Tom

    #489346

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for the video.

    So can I make some investigations on your staging site for checking the issue (e.g. disabling plugins or enabling the default theme)?

    Looking forward to collaborating with you!

    Kind Regards

    #489352

    wildguitars
    Participant

    Thank you for the prompt reply, Luke! Yes, you can do whatever you鈥檇 like to our test site 😁

    Best regards
    Tom

    #489503

    Luke Nielsen
    Keymaster

    Hello,

    Please add the below code into the functions.php file in your child theme for fixing that. In general, this issue will be fixed in the next update.

    if ( ! function_exists( 'woodmart_wc_empty_cart_message' ) ) {
    	/**
    	 * Show notice if cart is empty.
    	 *
    	 * @since 1.0.0
    	 */
    	function woodmart_wc_empty_cart_message() {
    		woodmart_enqueue_inline_style( 'woo-page-empty-page' );
    
    		?>
    		<p class="cart-empty wd-empty-page wc-empty-cart-message">
    			<?php echo wp_kses_post( apply_filters( 'wc_empty_cart_message', __( 'Your cart is currently empty.', 'woocommerce' ) ) ); ?>
    		</p>
    		<?php
    	}
    
    	add_action( 'woocommerce_cart_is_empty', 'woodmart_wc_empty_cart_message', 10 );
    }

    Kind Regards

    #489544

    wildguitars
    Participant

    Thanks so much for providing this solution, Luke!
    Do I need to remember to remove this code after the next update?

    Best regards,
    Tom

    #489554

    Luke Nielsen
    Keymaster

    Hello,

    Yep, in the next update, it will be fixed so could remove it from the child theme.

    Thanks for your time and have a great day.

    Kind Regards

    #489918

    makomedigital
    Participant

    thanks for the post. I just had the same problem and was wondering if it was due to a setting or plugin or just the theme itself.

    The code helped 馃檪

    #489919

    wildguitars
    Participant

    Did you experience any other issues after the update?

    #489920

    wildguitars
    Participant

    Luke, I just noticed that the sidebar in the categories is now missing all the filters except for price

    Live site:
    https://www.wildguitars.co.il/product-category/讙讬讟专讜转/讙讬讟专讜转-讞砖诪诇讬讜转/讙讬讟专讜转-讞砖诪诇讬讜转-6-诪讬转专讬诐/

    Test site:
    htps://dev2.wildguitars.co.il/product-category/讙讬讟专讜转/讙讬讟专讜转-讞砖诪诇讬讜转/讙讬讟专讜转-讞砖诪诇讬讜转-6-诪讬转专讬诐/

    #489921

    makomedigital
    Participant

    @tomyech
    i just had the issue with the empty cart

    #490030

    Luke Nielsen
    Keymaster

    Hello,

    Could you please fill in the widget related to the Shop sidebar?

    https://prnt.sc/NyE0la-UQCn9

    Let me know the result.

    Kind Regards

    #490855

    wildguitars
    Participant

    Hi Luke, I never erased/disabled these widgets…do you know what happened?
    I’m not sure where the page in your screenshot is located

    #490971

    Luke Nielsen
    Keymaster

    Hello,

    That page is situated in Appearance -> Widgets. So please define some elements there and recheck the issue.

    I鈥檇 be happy to assist if you have any other questions or concerns.

    Kind Regards

    #504200

    makomedigital
    Participant

    Luke is the problem with the empty cart solved or do we still need to use the above shown code (your reply from August 18, 2023 at 9:48 am)?

    #504360

    Luke Nielsen
    Keymaster

    Hello,

    Yep, the problem is solved in the last update so you can remove that code.

    If there鈥檚 anything else we can do, please get in touch.

    Kind Regards

Viewing 15 posts - 1 through 15 (of 15 total)