Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,

    Thanks for taking the time to write a report on your issues here.

    This bug certainly is odd and is the first time I’ve come across this report. I appreciate you sharing the console.log from the page but it doesn’t look like any of the warnings or errors reported are related to the checkout block logic.

    The Block redirects to the native WooCommerce order received route so that would also explain the thank you page issues you are seeing as well. In this case, there is nothing the checkout block does on these routes because they are being loaded from WooCommerce core.

    As for some next steps for troubleshooting, if you have any customizations or extensions that modify the Order Received or Thank You pages, you could try deactivating them to see if that fixes it for you. It’s also possible something in your theme for those pages is causing the issue.

    Also, if you have access to the PHP errors log for your website, you can check it to see what errors are appearing in the log around the same time as your attempt to view the order received page.

    I hope the above helps you find what is causing this!

    All the best!

    Thread Starter MaksymPS

    (@maksymps)

    Hi Darren,
    Thank you for your reply!

    For some reason, it repeated in another project. So I had to create a redirect that contains checkout/order-received/ to custom /thank-you page. I used Astra Theme, Elementor Pro and Woo. Everything has the latest version.

    Another issue I had before is when I create a digital (virtual) product and if a user adds to cart a product, he redirected to Cart page and if in some reason he goes back and tried to add again the same product (which can’t be added 2nd time), plugin shows an error. Here are more details:

    1. The issue message:
    https://piccy.info/view3/13863670/714c1814ef78f2ac5290046ddb9111b4/orig/

    2. I had to add a custom message, more user friendly, you know:
    https://piccy.info/view3/13863672/210309c53665bf46209cdbf605aaf0f8/orig/
    so for visitors, it makes more sense what to do, so they do not leave the website.

    On the 2nd project where I found both issues, I used Hello Theme and the same plugins.

    The plugin is great by itself! But I wish you can do something with it to fix such issues ??

    Hi again!

    Thanks for the additional details. I’m a bit confused about where things are at. In your latest message it appears that you are saying the original reported issue is resolved. So to clarify, for the first (original) issue:

    > In some reason after purchasing it shows empty checkout page.

    Is this still happening, or are you saying it was resolved by redirecting to the thank you page which is what you seem to indicate here:

    > So I had to create a redirect that contains checkout/order-received/ to custom /thank-you page. I used Astra Theme, Elementor Pro and Woo. Everything has the latest version.

    Or are you saying that you attempted to create a redirect, but that also is not working?

    Does the regular (using the shortcode powered checkout flow) checkout/order-received route work for you? As I mentioned in my original reply, the checkout block doesn’t modify the original route at all (in fact it simply allows the shortcode to power that route). So it looks to me like there’s something happening (possibly on a customized WooCommerce core template for that route) that is causing the issues.

    For your second issue, it’s puzzling how a shopper could get to the state where they are able to add an additional item to the cart. I tried doing this on my test site and every place I could add a “single purchase” only item, I was prevented from adding that item to the cart when it’s already there. The only way I was to able to get into this condition was to change the setting for the product when the shopper already had two many products in their cart.

    With that said, once I forced that condition, this is what I see with the Storefront theme and the rendered error message for the checkout block:

    https://p299.p4.n0.cdn.getcloudapp.com/items/eDu1w5zD/Image%202020-06-19%20at%204.22.24%20PM.png

    I’m guessing you are using the gettext filter to modify the string of this message? If so, you can’t use any html in that string because with it being a translation, it is not something rendered directly to the content as that would be a potential security concern.

    Regarding your first issue, I definitely think this is something in your environment (custom code, another plugin) that is causing an error on the checkout/order-received route. As I mentioned in my previous reply, if you’re able to get access to your PHP error logs, that could help point you in the direction of the culprit.

    > But I wish you can do something with it to fix such issues

    I hear you there! Unfortunately, there’s nothing that can be done if we’re unable to replicate your reports. So to summarize:

    1. The issue with the order-received route appears to be something causing an error in your environment. The Blocks plugin just passes off things to the checkout shortcode to handle that route and thus is not likely the cause here. You’ll need to find out what errors are happening that prevent that route from loading (which could be in your PHP error logs).
    2. The issue with the error message for the checkout block appears to be custom text added via gettext that included html which will not be rendered for security reasons. The default message has no problems (that I can see).

    I hope that helps!

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    – Joey

    Thread Starter MaksymPS

    (@maksymps)

    Hello Daren and Joey,
    Let me answer on your questions.

    > In your latest message it appears that you are saying the original reported issue is resolved.

    I didn’t say that Daren. In my first message, I wrote that I have one issue (empty Checkout page when a product has been purchased and to solve this issue I created a redirection from /checkout/order-received/ page which is empty to custom). In another message, I wrote that I have the second issue (when a user is trying to add 2nd time a virual product to cart it shows an error).

    > Or are you saying that you attempted to create a redirect, but that also is not working?

    The redirection saved my situation because now user won’t see empty Checkout page without details. It doesn’t show anything.

    This is what I did:
    1. I customized the default Cart and Checkout page by using Elementor (it works well with default shortcodes like [woocommerce_cart] and [woocommerce_checkout]
    2. In Gutenberg editor I generated code of Woo Blocks for Cart and Checkout and added in HTML widget
    3. It works well on Cart and Checkout (before purchasing), but after it updates a page and nothing to display (just empty section).

    > For your second issue, it’s puzzling how a shopper could get to the state where they are able to add an additional item to the cart. I tried doing this on my test site and every place I could add a “single purchase” only item, I was prevented from adding that item to the cart when it’s already there.

    Probably this is because I used UA Elementor addon and their widget “dynamic Add to Cart” (https://ultimateelementor.com/widgets/woocommerce-add-to-cart/) because I created one layout of Product single page and it should have a button that after adding to the cart doesn’t refresh a page with Woo notification at the top but redirects to the Cart page.

    All plugins I used is: WooCommerce, Stripe, Elementor, Elementor Pro, Elementor UA addon. The latest version of WordPress and Astra theme (and on another project Hello theme). PHP version is 7.3

    > We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    I’m sorry, was busy to reply..

    Anyway, thank you for your replies, guys! I will try your plugin on my 3d project and will get back to you if I will have the same issue. Because these 2 projects have the same plugins and different hostings.

    Best regards,
    Maksym

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘After purchasing it shows empty Checkout page’ is closed to new replies.