mats1
Forum Replies Created
-
Forum: Plugins
In reply to: [Animations for Blocks] Make the zoom effect more subtileMany thanks for a quick respond.
Yes! This works great. But if I would like to make the Fade options more subtle, how should I do then? When looking in the css that you referred to I see that the css for the Fade options looks a bit different.Forum: Plugins
In reply to: [WooCommerce] Too large intrinsic thumbnails on mobileHi I also had this problem, and maybe this could help
The thing is that it is not a bug. It actually works as it intend to do and that is to serve the best image according to the specific screen where the image is displayed.
I do hope that I explain this correct, if I’m not please correct me.
I guess you just like me wanted to improve the mobile speed and perhaps you run google page speed insight to find that it complain about image sizes on mobil. You dig deeper as you did and found that on mobile it actually downloads larger images than on desktop. Why is that? The WordPress functions to display the thumbnail uses srcset to serve the best possible image depending on screen size. So far so good. But when determine screen size it also look at the dpi, screen resolution. So if the screen is a Retina screen it doubles the width and instead it will pick a thumbnail double the size to be suitable for the retina screen. And with the newest iPhone that has even higher resolutions it will pick even larger images. But serving large images to mobile with high resolution screens will impact the page speed on mobiles and if you want to make a compromise you need a fix. In the code that you examine in the browser you see following: sizes=”(max-width: 280px) 100vw, 280px”. What it says is that if the screen max-width is 280px use an image with a width of 100% of the screen else use 280px. Now a retina screen is double the size so the comparison will be instead, if max width is 560px pick an image with a width of 100% of the screen and ofc it will pick an image that is larger than 280px. This is how you get larger images on mobile than on desktop. To really optimize this well to suite your site you need to learn about srcset and how it works. But just to help you with your problem to simply reduce images size on mobile you can put following code in your functions.php that will change the size attribute.
function my_post_thumbnail_sizes_attr( $attr, $attachment, $size ) {
$attr[‘sizes’] = ‘(max-width: 280px) 50vw, 280px’;
return $attr;
}
add_filter( ‘wp_get_attachment_image_attributes’, ’my_post_thumbnail_sizes_attr’, 10, 3 );What I have done is that I have change 100vw in the size attribute to 50 vw and that will half the size of the image since it will pick an image near the half the size of the width of the screen. Learning more about srcset and the size attribute you can refine this and customize it really well.
I hope this could help you./Mats
Forum: Plugins
In reply to: [LiteSpeed Cache] Support for Aelia Tax display by countryOk, thanks a lot for your answer.
Forum: Plugins
In reply to: [LiteSpeed Cache] Support for Aelia Tax display by countryAha so you can’t cache a combination of cookies? like this:
aelia_cs_selected_currency = Eur
aelia_customer_country = FRaelia_cs_selected_currency = Eur
aelia_customer_country = DKThe 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.
Forum: Plugins
In reply to: [LiteSpeed Cache] Support for Aelia Tax display by countryHi 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.
Forum: Plugins
In reply to: [LiteSpeed Cache] Support for Aelia Tax display by countryHi,
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
Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tHi,
The variable in your screenshot can not be seen in phpinfo.
We will go for another approach and use the plugin TAX display by country from Aelia. From what I understand you support Aelia plugins since version 2.6. The plugin sets a cookie $_COOKIE[‘aelia_customer_country’]. Should I add following line in the htaccess file: RewriteRule .* – [E=Cache-Vary:aelia_customer_country]?Best regards
Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tGoogled a little and it seems ok to call a php file from htaccess.
Could it look like this?<IfModule LiteSpeed>
RewriteEngine on
RewriteRule .* – [E=Cache-Control:vary=%{geoip_country_code.php}]
</IfModule>Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tHi again,
it turned that we can’t use the variables in the htaccess file but in php. I guess that makes it hard to cache geolocation because of that or could we do something with php?
Best regards
Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tHI,
fixed the phpinfo page but didn’t found those variables. Even did a test (got it from litespeed documentation) by adding this to the htaccess file:
<IfModule mod_geoip.c> RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SE$ RewriteRule ^(.*)$ - [F,L] </IfModule>
The test failed.
Contacted the server company again and they claim that the GEOIP module is enabled but they will look into this to see why the variables are not visible.
If they will fix this what would be the next step to do for me?Best regards
Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tHi,
I have checked with our hosting company and the GeoIP module is enabled on the shared planes. So how to do next?
A question about vary cookies. We also use Aeila Currency switcher and have added following line in htaccess file according to your advice:
RewriteRule .* – [E=Cache-Vary:aelia_cs_selected_currency]
Is it another principal here since we would have the same problem with php not running?Best regards
Forum: Plugins
In reply to: [LiteSpeed Cache] woocommerce showing price without tax when it shouldn’tHi,
Product prices in woocommerce is set with tax included. The tax rules in Woocommerce is set so that all EU countries should have tax. Other countries will have the tax redrawn from the price. To determine if a visitor is from a country outside EU Geolocation is used with Woocomemrce standard functionality. There is a setting in General options named “Default customer location”. That is now recently switched from “Geolocation” to “Geolocation (with cache support)”. We rather don’t use that option since it add redirections. We hope we can use cache-vary:geo-cookie instead.
Best regards
- This reply was modified 3 years, 4 months ago by mats1.
Forum: Plugins
In reply to: [WooCommerce Google Feed Manager] Feed generation fails occantionalyAh, ok
No error log file in woocommerce on with todays date
No error log file in the wp-content folder
One error log file in the wp-content/plugins/wp-product-feed-manager which I have sent you.Thanks!
Forum: Plugins
In reply to: [WooCommerce Google Feed Manager] Feed generation fails occantionalyHello Michel,
The feed generation has actually been quite stable the last 5 days but I was just checking it right now and it was about to processing the generation but it failed. Lucky me there was a fresh error log file. I have sent it to your email address.
Forum: Plugins
In reply to: [LiteSpeed Cache] Getting repeatedly Error_Aborted 404 on js filesHi!
Here are the report no: QYDVQKZL
Thanks