Products adding to Cart but not carrying over to Checkout

Tom_Tom_ Member
Strange one, this started happening somewhat randomly or at least, I don't recall changing anything from what it did work. Interestingly all the information comes across to the sidecart correctly other than the image. I've echo'ed out what I'm passing as the image and the URL is fine, however, in the cart it reports the URL incorrectly. But when clicking go to checkout, it reports the cart empty. Like it isn't setting the session. I've tried this on multiple browsers and multiple computers.

Does anyone have an idea what is happening here? I'm using validation on the product form, however, it usually kicks out an error if there is something wrong there. The Cart count is correct across pages. It just forgets everything when you go to checkout. Also the image is not loading.
Tagged:
Comments
  • Tom_Tom_ Member
    It's worth noting this is the error I get:
    Your order could not be found. Please start again. If you already clicked the order confirmation button, please check your email for a receipt.
  • fc_joshfc_josh FoxyCart Team
    Hi Tom.
    Sorry to hear about the issues you're running into. Is it possible for you to send us a link and steps to duplicate? Feel free to DM it if you prefer.

    Thanks,
    Josh
  • fc_joshfc_josh FoxyCart Team
    Hi Tom.
    Thank you for the link. Your image url needs to be a full URI to an image, starting with http: or https:, or a relative path to the image from the store's domain (as configured in your store settings).

    When I proceeded to checkout, products remained in cart. Mind sending steps to duplicate issue?

    Thanks,
    Josh
  • brettbrett FoxyCart Team
    Hi @Tom_
    What browsers are you seeing the session error in? Thanks.
  • brettbrett FoxyCart Team
    @Tom_ Can you try changing your site domain (in the Foxy admin) from the .com to the .co.uk that you're using? More info is here:
    https://wiki.foxycart.com/v/2.0/javascript#sessions_cookies
    But if the browser's blocking 3rd party cookies, it needs a first-party cookie. But our javascript isn't setting that, because it's using the wrong domain. That's probably the issue, though I can't seem to replicate even with a browser that's blocking 3rd party cookies. (Might just be my test setup isn't correct at the moment.)
  • Tom_Tom_ Member
    edited November 26
    @brett Hi Brett, it's in Chrome. It's actually doing it on my mobile phone too. I honestly don't think it's a cache thing as its happening on multiple devices (PC/Mac/Mobile), on different ISP (Work/Home). I honestly can not favom why its working for @fc_josh. It's worth noting that is been working perfectly up until this point. I will try changing the domain to my dev domain.
  • Tom_Tom_ Member
    @brett is the 'sitedomain' the same as 'store url' in the admin, and if so do I give the sub directory? The link you gave only seems to mention defining it in JavaScript.
  • brettbrett FoxyCart Team
    @Tom_, sorry I wasn't more clear. In the admin, change the "store url" section to match up with the domain you're using (the .co.uk). The issue is that our javascript uses that to attempt to set the first-party cookie (because we do a little more than just "set the cookie at this domain", so we have that domain explicit). That looks like this:
    FC.settings = {"storedomain":"example.foxycart.tld","sitedomain":"www.example.tld","session_name":"fcsid"};
    If the sitedomain doesn't match the domain the javascript is running on, that can cause problems in certain situations (like if you're using a "dev" subdomain in addition to a mismatched top-level domain).

  • brettbrett FoxyCart Team
    Wow. So… this is a new one for us. You've somehow stumbled into a way to cause some really unexpected behavior in the cart. We'll whisper the details, but this appears to be a bug on our end that's doing something a bit weird to cart persistence. I think this may be the only time we've ever seen a disappearing cart/session that wasn't caused by cookies. First time for everything!
Sign In or Register to comment.