• Resolved waxaddict

    (@waxaddict)


    Hi, guys, I use Litespeed cache and all is great, except when I try to use a currency converter. I’ve tried so many but all have issues.

    If I do finally get one using geolocate that doesn’t stick on a random currency for everyone (i.e caching the currency changes), Google Merchant Center and Pinterest bots that get feeds from my site fail because the price isn’t properly being fed, likely due to geolocate price conversions and checking when someone visits the site.

    I imagine my only option is not using Geolcate, but having a manual switch where users can change the currency if they want – however, I need it not to be cached – has anyone found a plugin or method where this is possible?

    Just a switch or button where users can choose currency, but not have it cached with Litespeed, so it doesn’t stick or change for everyone.

    Thanks!

Viewing 15 replies - 1 through 15 (of 32 total)
  • I need it not to be cached

    Why not? Cache plugin or LiteSpeed LScache supports such function. However, the prerequisite for this is that the respective currency plugin sets a cookie for the respective currency.

    Thread Starter waxaddict

    (@waxaddict)

    Why not? Cache plugin or LiteSpeed LScache supports such function. However, the prerequisite for this is that the respective currency plugin sets a cookie for the respective currency.

    If it can cache then work, then of course that would be good, I just assumed the issue is with it caching.

    Does anyone use/know of a plugin that does set that cookie and has no issues with Litespeed? I’ve tried loads but no luck – I haven’t tried some of the premium ones yet, but if there’s one that works fine with everything I don’t mind paying for it.

    As already said, LScache supports it, but setting a cookie for each selected currency is only a prerequisite, but not automatically the solution. So look for a suitable plugin and then get in touch again.

    Thread Starter waxaddict

    (@waxaddict)

    I just found that out, I paid for a premium plugin after the free trial seemed to work, turned off geo and just selected the use cookie option.

    This plugin

    https://codecanyon.net/item/woocommerce-multi-currency/20948446

    Checking the site on my phone now in incognito and different browsers, it shows a non-default currency and not all the currencies are displayed, it seems to have cached or saved an older setup somehow because checking on desktop is is different (correct), I guess cached at a different time, no idea, but there’s something not right.

    Any idea if additional code or setup is needed somewhere to exclude caching the plugin?

    It also has this option, any idea if this would be the better choice?

    Use SESSION: The plugin will use the session instead of cookies to save the selected currency.

    Lastly, I just found the list of compatible plugins, it lists basically every popular cache plugin but not Litespeed. Is Litespeed so different? There must be a workaround, it’s just trying to figure it out.

    I will.also they the plugin support to see if they can figure it out or let me know if it’s not compatible.

    • This reply was modified 1 year, 11 months ago by waxaddict.
    • This reply was modified 1 year, 11 months ago by waxaddict.
    • This reply was modified 1 year, 11 months ago by waxaddict.

    It is not about to exclude caching. It is about different caching depending on the selected currency or the cookie value. If this plugin sets different value depending on currency then you are the winner of the day! ?? Therefore check the cookie value if you change currency. Then I can provide you with the extra code in .htaccess.

    Btw. LScache also supports GeoIP, but you need to have GeoIP Database for this, but it is mostly not available on Shared Hosting.

    Use SESSION: The plugin will use the session instead of cookies to save the selected currency.

    We need a cookie, because if page is cached there is no PHP and no session.

    Thread Starter waxaddict

    (@waxaddict)

    I have semi-dedicated hosting, I tried geo IP with a different plugin and it worked, the issue I then had was my Google Product Feed rejected the products due to pricing errors, so the geolocating was messing up the bot crawling for the feed somehow.

    I could try again with this plugin, maybe it will be different, but if not, manual change is good enough.

    The plugin does indeed change the displayed value and currency when using the site (halfway there!), not sure about cookie value or how to check (on mobile now but will dive into it when at the PC), but it seems to be stuck on a ‘wrong’ currency depending on the browser and first visit time, maybe carried over from a previous visitor, I’m not sure.

    i.e Default currency is USD. Visiting incognito/first time should show USD, but it’s on EUR or something instead.

    IIRC I am using browser caching in Litespeed, would that make a difference?

    • This reply was modified 1 year, 11 months ago by waxaddict.
    • This reply was modified 1 year, 11 months ago by waxaddict.
    • This reply was modified 1 year, 11 months ago by waxaddict.
    • This reply was modified 1 year, 11 months ago by waxaddict.

    …but it seems to be stuck on a ‘wrong’ currency depending on the browser and first visit time, maybe carried over from a previous visitor, I’m not sure.

    Because you still don’t have the necessary code…. ?? If you check the cookie and its value you need a desktop computer. Just press the F12 key in browser and the dev console opens. There you can look for the cookie name and its value. I need the name and all cookie values, but be carefull with the selection of currencies. Don’t use currencies you don’t need.

    I am using browser caching in Litespeed, would that make a difference?

    Browser cache is browser cache and server cache is server cache. Browser cache is for static sources like CSS, images, Javascript and so on, but the cache plugin sets only the TTL for browser cache to tell the browser how long he shouldn’t request a static source if it is already cached. The server cache is the job of the server and not the plugin’s job. The cache plugin doesn’t cache anything. It only tells the Server or LScache how long a requested dynamic source should be cached.

    Thread Starter waxaddict

    (@waxaddict)

    Thanks, I’m not sure if this is all the relevant cookies, but the ones mentioning currency are :

    wmc_current_currency_old
    wmc_current_currency

    Also, at the desktop PC now, I am making changes to the currency plugin, styles etc – they show for me now, this browser, this session, however none of these changes appear when I go to the site in incognito or any other browser/device other than this one though. Am I being served a cached version of my site there?

    • This reply was modified 1 year, 11 months ago by waxaddict.

    If you give me the link to your site, I can look it up myself. But wmc_current_currency should be the right one.

    Thread Starter waxaddict

    (@waxaddict)

    Oh wait.. face palm moment, I think I got it. I just needed to manually purge the cache. That seems to have updated the styles etc to the current settings I was using at least.. I will test on a few devices now ands in the morning and see if it’s all working.

    If so, I may give the geo ip a try also.

    Will report back either way, appreciate the help.

    I don’t want to spoil your expectations, but without extra code your problem won’t be solved.

    Thread Starter waxaddict

    (@waxaddict)

    If you think it’s needed, I’ll add it sure, just let me know what to add and where.

    Don’t waste your time trying out the GeoIP feature of this plugin. It won’t work because LScache doesn’t know about it.

    just let me know what to add and where.

    I still need all cookie values.

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Currency converter working with Litespeed Cache, Google Feed etc’ is closed to new replies.