empty cart redirects to a nonexistent page /shop/
-
hello –
my empty cart seems to redirect to a nonexistent page: /shop/
i did try creating a “filter” as specified here, but then i was getting an error in my log file:Got error 'PHP message: PHP Fatal error: Cannot redeclare mark_continue_shopping_redirect_url() (previously declared in /home/DOMAIN/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(595)i seem to recall there was some magical place in one of the dozens of woocommerce forms that contained this, but i cannot remember where it was.
where might this information be stored?
-
Hi @edwardsmark,
Thank you for reaching out.
By default, WooCommerce redirects to /shop/ when the cart is empty because it uses the Shop page assigned under WooCommerce → Settings → Products → Shop page. You can check or change that setting there if the /shop/ page no longer exists and choose the right one.
well good news, i found the setting just fine, thank you.
the bad news is when i tried to set it to the actual products page, the css seems to be completely ignored and the page loads without any style.
funny thing is we actually do have an empty “Shop” page, which seems odd that WP would claim the page does not exist. and yes its published too.
also it appears no matter what is selected for the “Shop page” setting, it still redirects to /shop/this is a mystery….
Hi there!
Thank you for the update. To assist you better, could you please share the site URL and a screenshot of the settings you have under WooCommerce → Settings → Products → General?
Also, please go to WooCommerce → Settings → Advanced → Page setup and share a screenshot of the settings there as well. You can use the following tool to capture and share screenshots: https://snipboard.io
Additionally, please share your System Status Report, which you can find under WooCommerce → Status. You can paste it using https://pastebin.com/ or https://gist.github.com/ and share the link here.
Once we have this information, we’ll be able to assist you further.
Thank you for the update. To assist you better, could you please share the site URL and a screenshot of the settings you have under WooCommerce → Settings → Products → General?
https://comptonpeslonline.com/tmp/settings-products-general.png
Also, please go to WooCommerce → Settings → Advanced → Page setup and share a screenshot of the settings there as well.
https://comptonpeslonline.com/tmp/settings-advanced-pageSetup.png
Additionally, please share your System Status Report, which you can find under WooCommerce → Status.
https://comptonpeslonline.com/tmp/SystemStatusReport_ajcomptonpesl.com_2025-10-08T15-34-45.txt
–or–
https://gist.github.com/edwardsmarkf/9a88a7fe4fc3f791aa493577eee7c42ethe “continue shopping” button is not working either, strangely. it was working earlier.
-
This reply was modified 8 months ago by
edwardsmark.
Hi @edwardsmark,
the bad news is when i tried to set it to the actual products page, the css seems to be completely ignored and the page loads without any style.
funny thing is we actually do have an empty “Shop” page, which seems odd that WP would claim the page does not exist. and yes its published too.
also it appears no matter what is selected for the “Shop page” setting, it still redirects to /shop/From your explanation, I believe I have a good idea of what might be happening. Could you please confirm the type of checkout page you’re using? Are you using the block-based checkout, the shortcode version, or a custom checkout page built with a page builder?
THANK YOU for the quick reply!
if i understand your request correctly, i see one page named “checkout” with just one item:[woocommerce_checkout]in my defense, i was not the one who set any of this up. 😊
-
This reply was modified 8 months ago by
edwardsmark.
Hi @edwardsmark,
What we’re actually discussing here is the Shop page, not the checkout page — my apologies for the mix-up, I got a bit carried away there, haha.
What I meant to ask is whether you’re using a block theme or a classic theme.
Since you’ve confirmed that the woocommerce_checkout shortcode is present on your checkout page, that indicates you’re using the classic checkout. However, I’m still unclear about what you meant when you said…
the bad news is when i tried to set it to the actual products page, the css seems to be completely ignored and the page loads without any style.
By default, the Shop page should be empty and assigned through the settings I mentioned earlier. If you have two Shop pages, the one you’re referring to is likely a custom-built product page. Have you tried selecting the empty Shop page in the settings I shared previously?
thank you again for your quick response!
here is what i am seeing:
1 – starting out: https://comptonpeslonline.com/tmp/woocommerce/1-page-displays.png
2 – page is good: https://comptonpeslonline.com/tmp/woocommerce/2-good-page.png
3 – changed the value as youoriginally suggested:
https://comptonpeslonline.com/tmp/woocommerce/3-changed.png
4 – page now displays incorrectly:
https://comptonpeslonline.com/tmp/woocommerce/4-page-bad.pngnow i reset the value back to “shop”:
here is my empty cart: https://comptonpeslonline.com/tmp/woocommerce/5-cart-empty.png
here is what i see for our “shop” page: https://comptonpeslonline.com/tmp/woocommerce/5-missing-shop-page.png
but yet our shop page does exist: https://comptonpeslonline.com/tmp/woocommerce/6-shop-page-edit.png
hopefully this helps you understand our situation.Hi there!
Thank you for providing the detailed information. I tried to replicate the issue on your site, and I’m seeing a 404 page instead of the shop page. I suspect this might be caused by a plugin conflict or a theme setting.
For testing purposes, could you please create a staging site using the following plugin:
👉 https://wordpress.org/plugins/wp-staging/After that, deactivate all plugins except WooCommerce and activate the Storefront theme, then check if you still face the same issue.
For more details on how to run a conflict test, please refer to this guide:
👉 https://woo.com/document/how-to-test-for-conflicts/Let us know if that works for you.
hi –
the “Shop” page does now appear, however its not the same “shopping cart” page that we are using.
and oddly, the “continue shopping” button disappeared.
everything is reset now back to “normal”. however, i am getting the impression that overriding the “/shop/” page may not work for us.
Hi there,
Thank you for the update.
Could you please share how you are overriding the “Shop” page — for example, are you using a page builder, shortcode, or a custom template?
From what you’ve described, the issue seems to be related to the theme or one of the plugins used to create the custom shop page, since everything works fine with the default theme and when other plugins are deactivated.
To narrow this down, please try the following steps:
- Activate your regular theme and check if the issue reappears.
- If it does, I recommend contacting your theme’s support team, as they can guide you on how to properly set up or override a custom Shop page.
- If the issue doesn’t appear after activating your theme, start reactivating your plugins one by one while testing each time.
- This will help you identify which plugin or custom code is causing the issue.
Once you find what’s causing the problem, we can better point you toward the right next steps.
hi –
first off, thank you for your assistance thus far. unfortunately there appears to be some sort of conflict between the theme and the plugin at best guess.
so in order to resolve (for now anyway) i have made the following changes:
./wp-content/plugins/side-cart-woocommerce/assets/js/xoo-wsc-main.js
line 322:toggleCart(e){
if (typeof replaceHrefItem === 'function') {
let mySelector= 'a[class="xoo-wsc-ft-btn xoo-wsc-btn xoo-wsc-cart-close xoo-wsc-ft-btn-continue"]' ;
replaceHrefItem(mySelector) ;
}line 542:
toggleBasket(){
if (typeof replaceHrefItem === 'function') {
let mySelector = 'a[class="xoo-wsc-btn"';
replaceHrefItem(mySelector);
}And i have created a JS snippit:
function replaceHrefItem(mySelector) {
if (document.querySelector(mySelector)) {
document.querySelector(mySelector).href = '/ilp-research-division/' ;
}
}this is something of a temporary(semi-permanent) workaround until i can determine a better solution. and YES i understand i need to fix this after every plugin update. a simple bash-sed script will do this for me.any thoughts? (thoughts other than “we dont recommend tampering with source code” that is.
Hi @edwardsmark,
I appreciate the detailed update and it’s great to see that you’ve found a creative workaround to keep your cart flow functioning for now. It definitely shows your technical initiative, even if, as you mentioned, it’s a temporary measure.
Since you’ve narrowed this down to a likely conflict between your theme and the Side Cart for WooCommerce plugin, I recommend reaching out directly to the plugin developer for further assistance. They’ll be in the best position to review your findings and help you implement a more permanent fix that won’t be lost after updates.
Feel free to let us know how it goes, or if you run into any other problem.
better, just eliminate the buttons entirely, along with the shorcode text and picture (which is surprisingly not a shortcode option):
<!-- BEGIN css style tags for 'wooCommerce shopping cart' -->
<style id='woocommerce-custom-style' type='text/css'> /* 2025-10-09 */
a.ast-loop-product__link:link[href*="//DOMAIN.com/ilp-research-division/"] ,
a.woocommerce-LoopProduct-link:link[href*="//DOMAIN.com/ilp-research-division/"] ,
a.xoo-wsc-ft-btn-continue:link[href*="//DOMAIN.com/ilp-research-division/"] ,
a.xoo-wsc-btn:link[href*="//DOMAIN.com/ilp-research-division/"]
{
display: none !important;
}
span.ast-woo-product-category
{
font-weight: bold !important;
}
</style>
<!-- BEGIN css style tags for 'wooCommerce shopping cart' -->Hi Edward,
Thanks again for sharing your workaround and for all the detailed testing.
I’ll mark this thread as resolved for now, but if you need help with anything else, feel free to reach back out anytime.
If you found our support helpful and have a moment, we’d be grateful if you could leave a quick review: https://wordpress.org/support/plugin/woocommerce/reviews/. Your feedback helps others know what to expect and helps us keep improving.
Have a wonderful weekend!
-
This reply was modified 8 months ago by
The topic ‘empty cart redirects to a nonexistent page /shop/’ is closed to new replies.