• Resolved mats1

    (@mats1)


    Hi,

    We have installed the plugin Tax display by country from Aelia. From what I can see in this file aelia-currencyswitcher.cls.php you do support the plugin.
    Do I need to edit the htaccess file and add a rewrite rule and set a Cache-Vary?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    how does that tax display works ? how did it detect the country ?

    Best regards,

    Thread Starter mats1

    (@mats1)

    Hi,

    The Tax display by country detects country by geoip, at least I suppose so because it uses the Geolite database by Maxmind. The plugin is compatible with Aelia currency switcher which we also use. Both plugins use the same cookie “aelia_customer_country” to set the country and therefore I suppose that the plugin is supported on you side I could be wrong though.

    Best regards

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    no , it won’t work that way

    in order to vary on countries , you need to have something to tell the cache engine to vary it , outside of PHP code

    if you are server admin , then you can enable GeoIP module for the webserver, not the PHP one

    if not , you can only do it with certain CDN, like QUIC cloud or CloudFlare that sends a country code HTTP header for cache engine to vary on it

    Best regards,

    Thread Starter mats1

    (@mats1)

    Hi again,

    but what is the different with the Aelia currency switcher plugin which you support? It sets the currency based on GeoIP and you can vary on currency. The cookie is aelia_cs_selected_currency. Isn’t it the same principle for the Aelia Tax display by country which sets the cookie aelia_customer_country?

    Best regards

    • This reply was modified 3 years, 2 months ago by mats1.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    because the currency vary is based on cookie on that aelia class file as you mentioned in the first ticket

    it does NOT require to detect the visitor’s country

    for example I am in Euro country where VAT is 20% , and I cached a page, then page displays 20% TAX , then let’s say , you from EUR country with VAT 15% , but since the page is already cached with cookie = eur , it won’t send/hit PHP again

    Best regards,

    Thread Starter mats1

    (@mats1)

    Aha so you can’t cache a combination of cookies? like this:

    aelia_cs_selected_currency = Eur
    aelia_customer_country = FR

    aelia_cs_selected_currency = Eur
    aelia_customer_country = DK

    The aelia_customer_country is also in the class

    class Aelia_CurrencySwitcher {
    	private static $_cookies = array(
    		'aelia_cs_selected_currency',
    		'aelia_customer_country',
    		'aelia_customer_state',
    		'aelia_tax_exempt',
    	);
    • This reply was modified 3 years, 2 months ago by mats1.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    no , in LSCWP 3rd party support file , it only varies the currency cookie

    and that , back to the original trick I have mentioned , you need to have something that is NOT PHP (because once page is cached already , PHP won’t be invoked again) to tell the cache engine that it needs to fire the PHP again , in which , either a HTTP header comes from CDN , or GeoIP module on webserver (not the GeoIP in PHP)

    Best regards,

    Thread Starter mats1

    (@mats1)

    Ok, thanks a lot for your answer.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Support for Aelia Tax display by country’ is closed to new replies.