Home › Forums › Revolution WP › “Your Cart Is Currently Empty” When Logged out
Tagged: cart empty
- This topic has 23 replies, 2 voices, and was last updated 3 months, 4 weeks ago by karl marks.
-
AuthorPosts
-
April 4, 2024 at 3:25 am #2780Yosuke SuzukiParticipant
I purchased the Shop Cart Woocommerce Pro theme, but when I add products to the cart while logged out and check the cart, it displays “There are no items in your cart.” even though I added items. The products I added are not showing up. What could be causing this issue?
April 4, 2024 at 4:02 am #2781Yosuke SuzukiParticipantThe number displayed next to the cart icon at the top right changes.
April 4, 2024 at 4:07 am #2782Yosuke SuzukiParticipantEven after disabling all plugins except WooCommerce, it didn’t work.
When I reverted to the default WordPress theme, it worked. Therefore, it seems certain that there is an issue with this theme.April 4, 2024 at 8:06 am #2784karl marksParticipantOk, we will check
April 5, 2024 at 3:07 am #2786Yosuke SuzukiParticipantI have implemented the minimum required functionality and am now publishing it, but when a user is not logged in and adds a product to the cart, the product is not added to the cart.
- This reply was modified 9 months, 2 weeks ago by Yosuke Suzuki.
April 5, 2024 at 9:02 am #2789karl marksParticipantHi,
In the event of any issues, kindly email [email protected]
April 5, 2024 at 10:54 pm #2791Yosuke SuzukiParticipantI sent an email earlier, but have you confirmed it? The problem is becoming serious, so I’m also working on an investigation, but please address this urgently.
April 5, 2024 at 11:11 pm #2792Yosuke SuzukiParticipantAfter investigating further, I have identified the following key issues:
Even when adding products to the cart while logged out, they are not reflected on the cart screen. However, the cart icon at the top right does update to show the correct count, indicating the data is being saved somewhere (whether in the database or session, I’m not sure).
Furthermore, when adding the same product to the cart while logged in, the product does appear in the cart screen, but a warning message is displayed saying “The stock for (product name) is insufficient. Please reduce the quantity in your shopping cart.” This is highly unusual, as the actual stock and order quantity are both 1 and are not being reduced in the admin panel.
If the user tries to proceed with the purchase despite the above warning, another error occurs: “There was a problem with the purchase process. Please try again. If the problem persists, please contact support.”
After this final error occurs, when the user tries to navigate to another page, they get logged out of their account. It seems the session information is being reset for some reason, which may be the root cause of the issue.
I have been investigating this problem on my end, but since this is your custom theme, I believe your team would be better equipped to thoroughly examine and resolve these critical issues. Given the severity of the problem and its impact on the customer experience, I would kindly request that you prioritize this investigation and provide a fix as soon as possible.Please let me know if you have any questions or require additional information from me.
Thank you for your prompt attention to this matter.- This reply was modified 9 months, 2 weeks ago by Yosuke Suzuki.
- This reply was modified 9 months, 2 weeks ago by Yosuke Suzuki.
April 5, 2024 at 11:23 pm #2795Yosuke SuzukiParticipantI apologize for the confusion. The issue where the user gets logged out may be a separate problem. Upon examining the HTML source, it appears that the “My Account” link is inadvertently set up as a logout process link, which is likely triggering the unintended logout behavior.
April 5, 2024 at 11:28 pm #2796Yosuke SuzukiParticipantI don’t understand. Why is the My Account link linked to the logout process?? Where can I change this link??lol
April 6, 2024 at 1:22 am #2797Yosuke SuzukiParticipantSince the functionality is normal in other themes, it appears there is something specific to this theme that is causing the problem. Even when reverting to the parent theme, the same issues are occurring, so it does not seem to be an issue with my own modifications.
Which files did you modify that might be related to these bugs?April 6, 2024 at 3:11 am #2798Yosuke SuzukiParticipantRegarding the issue with the “My Account” click leading to a logout, I noticed some suspicious code in the product-search.php file:
if (is_user_logged_in()) { ?>
” class=”my-account-text pr-5″>I tried changing this code to:
” class=”my-account-text pr-5″>
This change prevented the user from being logged out and instead redirected them to the appropriate account page. I’m curious to know why the original developer would have implemented such a thing. Haha.
April 6, 2024 at 3:17 am #2799Yosuke SuzukiParticipantThis forum doesn’t allow for writing code. It seems there was an issue with the code in the product-search.php file, where clicking the ‘My Account’ would log the user out. But this has been resolved.
The remaining issues are:
When logged out, products added to the cart do not show up on the cart page, and the cart appears empty.
Related to this, when a logged in user adds the same product to the cart, they receive a ‘not enough stock’ warning, even though there is stock available.
Let’s work on resolving these remaining issues.April 6, 2024 at 11:15 am #2803karl marksParticipantHi,
We have sent mail for the issues.
April 7, 2024 at 1:35 am #2804Yosuke SuzukiParticipantWhat I’m currently concerned about is that when comparing the console of the cart page in the logged-out state and the logged-in state,
in the console of the logged-out state there are errors such as “Failed to load resource: the server responded with a status of 404 (Not Found): https://suzuki-books.com/wc/store/v1/cart?_locale=user”,
“Uncaught ReferenceError: wp is not defined at ?page_id=7:543:1”,
“?page_id=7:567 Uncaught ReferenceError: _ is not defined at ?page_id=7:567:17”,
“?page_id=7:578 Uncaught ReferenceError: wp is not defined at ?page_id=7:578:2 at ?page_id=7:579:4”.I don’t really understand, but is it possible that there was a failure in passing some values, and that’s why the cart display is messed up?
Is it possible that the way values are being passed is in a format that is not compatible with the latest version of WooCommerce?
I installed the latest version of WooCommerce a few days ago, and it’s possible that this caused the issue. I will also investigate this possibility, but as a developer, I think you would better understand the meaning of these errors.
-
AuthorPosts
- You must be logged in to reply to this topic.