Shop prices and cache enabler
-
The problem:
We developed a new international shop with eg the following plugins:
1.Cache enabler
2.Autoptimize
3.Price based on Country (Oscar gare)The products in our shop have different prices for each country. So Product A costs €100,- in country A and €110,- in Country B. This is settled by the plugin: Price based on Country.
On our ‘old’ shop, this was working without a problem, but we didn’t had the cache-enabler plugin installed. Now we have and we see problem with the prices in our shop for the different countries (8 different countries).
So I investigating the problem, but soon I saw this was an issue with caching. Here starts my first problem:
Problem 1:
Deactivating plugin Cache Enabler didn’t solve the pricing issue. I tested this via VPN to switch to different countries so I have an IP in that country to test if the price changed. It didn’t. The last price I saw was the price for all countries. So if I checked the country Germany, all product would have the German prices even if I changed the country to France or The Netherlands. All tested in an incognito browser.Problem 2:
When Cache enabler is deactivated and I also deactivated the plugin Autoptimize, some pages break on my site. No CSS and only a few header links were shown.I contacted the plugin developer of AO (Frank Goossen) and told me some sort of caching is still present on the site. It wasn’t because Cache enabler was deactivated. No the caching was active. I also contacted my host about this and confirming no caching was active.
I remove the line in wp-config ‘cache enabled = true’. That didn’t helped either. Also completely removing the plugin I had no joy.
By activating cache enabler again, solved problem 2, but problem 1 was still there.
Solution:
Because cache enabler have to be active I had a problem, because this caused the wrong prices in the shop. Then I noticed the exclude option in the cache enabler plugin.So I excluded the shop and product pages from caching via regex. This works fine for the main language on the site. The other languages have URLs like /en/ /de/ /fr/ etc and this regex wasn’t working to exclude all translated pages of ‘shop’ and ‘product’ from caching:
/^\/(product\/.*|produkt\/.*|produit\/.*|vare\/.*|termek\/.*|shop\/.*|en/\shop\/.*|boutique\/.*|butik\/.*|sklep\/.*|aruhaz\/.*)$/
The thing I could do was excluding all pages from all languages on my site by this regex:
/^\/(en\/.*|fr\/.*|de\/.*|da\/.*|fr\/.*|sv\/.*|pl\/.*|hu\/.*)$/
A long intro but this is what I ask:
1. Why is caching still active by deleting the Cache enabler plugin completely? Even the entry in wp-config.php is removed?
2. Why cache enabler is interfering with the different prices in my shop for the different countries?Btw…all test are done in incognito browsers.
Regards,
RolandThe page I need help with: [log in to see the link]
- The topic ‘Shop prices and cache enabler’ is closed to new replies.