Support » Plugin: Easy Digital Downloads - Simple Ecommerce for Selling Digital Files » Force a hard refresh on my website after PHP template changes

  • Resolved Sho-Down

    (@sho-down)


    So I updated to the latest EDD version and you guys added new code to some of the PHP template pages. I updated the plugin, copied over the new code and re-uploaded the files via FTP but the Add To Cart buttons would keep spinning when clicked and never add the product to your cart and the checkout page was blank, I had to do a hard refresh of my website before everything started working properly.

    I also received an e-mail from a customer asking why he couldn’t add anything to his cart so I told him to do a hard refresh and he said it works now.

    Is there a way to force a complete refresh on PHP files from the server side? Might not be something you guys can help me with but it’s a pretty big issue if people can’t buy things.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author mordauk

    (@mordauk)

    Hi @sho-down,

    Sorry about the trouble. This is most likely due to a change we had to make with the template files. You can read about the chance, and what you need to do to fix it, here: https://easydigitaldownloads.com/development/2018/07/09/important-update-to-ajax-requests-in-easy-digital-downloads-2-9-4/

    Could you please read that and update your template files accordingly and let me know if that resolves it?

    I did make the changes to the template files widget-cart-item.php and checkout_cart.php and then re-uploaded those files into my EDD folder /themes/hueman-child/edd_templates/ but it seems those PHP template pages are cached (I’m not using a plugin for caching, I do it server side) so I had to hard refresh my website before the Add To Cart buttons would work again. A visitor also had to do the same so I’m worried everyone that comes to my site won’t be able to buy anything because they won’t think to do a hard refresh.

    I’m asking if you know of a way to force a refresh of my website so visitors to my website get a cleared out version? I can’t really use version numbers for PHP files so it won’t work like CSS.

    Plugin Author mordauk

    (@mordauk)

    Those files won’t be cached, at least not in any remotely standard caching configurationn.

    Do the buttons work for you when logged in?

    After updating the plugin and re-uploading the edited template files they didn’t work logged in or logged out until I did a hard refresh of my website. I’d click the Add To Cart button and the spinner would just spin. After an F5 they worked fine.

    I’ll keep an eye on it and see if I get any other e-mails from visitors or lack of sales over the next day or two. Obviously it’s a cache issue.

    Plugin Author mordauk

    (@mordauk)

    What cache system do you use? Most cache systems included an option for you to purge the page / file cache. That should take care of it.

    I use an .htaccess file, no plugin. I don’t think this is going to be a wide spread issue, it worked fine on my phone without a hard refresh and only that one guy e-mailed me about it. I’ll just keep an eye on it.

    I just didn’t know if there was a way server side I could clear out the cache but they’re PHP files so I don’t know. I restarted my dedicated server, maybe that fixed it?

    Plugin Author mordauk

    (@mordauk)

    Removing the caching from your htaccess file would force a refresh but otherwise, no, there isn’t way.

    Ok thanks. I think it cleared itself out. I’ve had quite a few sales since the update so I think we’re good, thanks Pippin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Force a hard refresh on my website after PHP template changes’ is closed to new replies.