The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Cart images - how does caching work and why do my images disappear?

foxybafoxyba Member
in Help edited December 2010
The images on the checkout page keep stumping me. Despite reading docs and forum threads, I still can't figure it out. Maybe someone here can help.

When I first set up my cart I hacked the CSS to display my custom images for header images and checkout buttons. Everything worked fine. Later, I wanted to update these images, so I updated the files on my server, but the changes didn't show up. So I went to Templates - Image Cache and clicked "Click here to clear all cached images" - that made all my images disappear completely. Big problem. So I scrambled to try everything I could think of to get my checkout button (and the others) to come back. Basically what I ended up having to do is hack the checkout template on the Templates - Checkout page to hard-code in my images in the CSS like this: "". But now customers are reporting a message on the checkout page of "Do you want to display the non-secure items on this page?" and if they say "no" then the checkout button (and others) don't show up and they can't complete their purchase. (Another big problem.)

So obviously I'm doing something wrong but hopefully someone can point me to the correct procedure and explain a little bit more how / why this cart image caching works.

  • brettbrett FoxyCart Team
    Can you share or whisper your store info? We're still rewriting pieces of our documentation so if we can see your problem we can probably rewrite the docs to address it.
  • fc_adamfc_adam FoxyCart Team
    [response to whisper]
    @foxyba, to get rid of that message for you users, I'd suggest taking away that hardcoding of the urls in the template. Perhaps leave the checkout as a text link for now so people can still checkout, but if you could put in the images for the header items as cache that so that FoxyCart caches it, we can see if we can work out why its not caching for you properly.
  • brettbrett FoxyCart Team
    Or you could set up a quick test store that we could use to diagnose so you wouldn't have to do it to your live store.
  • Setting up a test store... you read my mind. Let me go try that and keep you guys posted on the results.
  • Same problem in the test store... basically in the checkout template when Foxycart rewrites my CSS image paths from


    The images disappear.

    (And, yes, I've cleared the Foxycart image cache and reloaded the checkout template.)

    Any ideas?
  • Ah - I think I have it figured out: hotlinking code in .htaccess file was preventing images from caching.

    The docs mention it here:[]=checkout&s[]=template

    If you're running scripts to prevent hotlinking, that may interfere with the template caching. If images aren't showing up properly, turn off your hotlinking protection while you cache your templates.

    Heres' what I did: commented out the relevant lines in my .htaccess file, cleared my Foxycart image cache, refreshed the checkout template and refreshed my test page and the images show up now. I will add back the hotlinking lines to my .htaccess when I'm done caching my images.

    Thanks brett and fc_adam.
  • brettbrett FoxyCart Team
    Ah, nice job on reading the docs ;) I should have done that.

    This issue comes up so infrequently that it's not on the top of our minds, but I'm glad we did document it last time it came up.
  • Hi, I am having this issue on, but I don't have any hot linking code set up??? Can someone take a look asap?
  • brettbrett FoxyCart Team
    This took a minute to figure out, and I don't think we've seen it before, but you have a -> redirect. If you change your images to it'll not only get your images working, but will also be much faster on your visitors because they won't be getting redirected on every request.

    Either that, or remove the redirect.

    _BEAUTIFUL_ FoxyCart implementation, by the way. Looks fantastic. My only bit of unsolicited feedback is that when I clicked the "buy" button from the homepage, it loaded the next page in a way that confused me, because I didn't immediately see that I needed to scroll.

    20111119-d89fsiakq1iagj432b5p6m8sfi.preview.jpgClick for large view - Uploaded with Skitch

    Really nice customization though.
  • Thanks so much for your help! That fixed it perfectly, I'll remember that for next time. And thanks for the feedback, I'll see if we can re-configure that initial buy button, but we're really proud of this one!
Sign In or Register to comment.