Cache + IconicWP Attribute Swatches
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from tosa on May 2, 2022, 15:09Hi
I'm having an issue with the combination of WOOCS + IconicWP Attribute Swatches + Caching.
My issue is that prices inside the swatches (the Fee) do not get converted once a page has been cached.
I can see on initial page load (uncached) it will convert fine back and forth.
But after this, if I close and reopen in a new incognito window, the cached version does not change currency as expected.
- I've enabled cached mode on WOOCS
- I've tried both with transient and session mode on WOOCS
I've tried to find out what happens, and what I can see is that on an uncached page we will get the correct markup (<bdi> etc)
However once it's cached, this markup has been stripped out leaving only the price text without markup code.I have replicated the issue on GridPane Redis Page Cache (server cache) as well as Swift Performance Lite (WP plugin cache)
Any idea what might cause this and how I can fix it?
Hi
I'm having an issue with the combination of WOOCS + IconicWP Attribute Swatches + Caching.
My issue is that prices inside the swatches (the Fee) do not get converted once a page has been cached.
I can see on initial page load (uncached) it will convert fine back and forth.
But after this, if I close and reopen in a new incognito window, the cached version does not change currency as expected.
- I've enabled cached mode on WOOCS
- I've tried both with transient and session mode on WOOCS
I've tried to find out what happens, and what I can see is that on an uncached page we will get the correct markup (<bdi> etc)
However once it's cached, this markup has been stripped out leaving only the price text without markup code.
I have replicated the issue on GridPane Redis Page Cache (server cache) as well as Swift Performance Lite (WP plugin cache)
Any idea what might cause this and how I can fix it?
Quote from Pablo Borysenco on May 3, 2022, 10:36Hello
My plugin redraws cached prices in ajax mode. But unfortunately it doesn't work with third party prices
Hello
My plugin redraws cached prices in ajax mode. But unfortunately it doesn't work with third party prices
Quote from tosa on May 3, 2022, 12:51The plugin in question (IconicWP Attribute Swatches) works with your plugin - only not when cache is used.
Is there some special function they need to wrap around the price display to make it work? Some specific markup?
The plugin in question (IconicWP Attribute Swatches) works with your plugin - only not when cache is used.
Is there some special function they need to wrap around the price display to make it work? Some specific markup?
Quote from tosa on May 3, 2022, 22:57To take a more simple example:
Let's say I just want to output somewhere on a page, a number, which is a price of something (anything).
<?php
global $WOOCS;
echo woocommerce_price($WOOCS->woocs_exchange_value(floatval(13.99)));
?>
How can I make sure this value is cacheable and will still convert with WOOCS?
To take a more simple example:
Let's say I just want to output somewhere on a page, a number, which is a price of something (anything).
<?php
global $WOOCS;
echo woocommerce_price($WOOCS->woocs_exchange_value(floatval(13.99)));
?>
How can I make sure this value is cacheable and will still convert with WOOCS?
Quote from Pablo Borysenco on May 4, 2022, 10:09Hello
Everything is a little more difficult!
there is data on the front (price formatting), there is also data that is used to calculate the new price
Let's say I just want to output somewhere on a page, a number, which is a price of something (anything). - Please use this shortcode - https://currency-switcher.com/shortcode/woocs_show_custom_price - and it will work with cache
Hello
Everything is a little more difficult!
there is data on the front (price formatting), there is also data that is used to calculate the new price
Let's say I just want to output somewhere on a page, a number, which is a price of something (anything). - Please use this shortcode - https://currency-switcher.com/shortcode/woocs_show_custom_price - and it will work with cache
Quote from tosa on May 4, 2022, 10:21Thank you! So I can just call do_shortcode() with that shortcode and my value and it should work? I'll try that.
Thank you! So I can just call do_shortcode() with that shortcode and my value and it should work? I'll try that.
Quote from Pablo Borysenco on May 4, 2022, 11:08and it should work? - yes
Welcome;)
and it should work? - yes
Welcome;)
Quote from tosa on May 4, 2022, 12:36Thank you.
The shortcode works.Is it acceptable to call the function directly instead of using do_shortcode? Since I'm calling this from inside a different filter call.
Example: $WOOCS->woocs_show_custom_price(['value' => floatval(13.99)]) ?
Or do you recommend the do_shortcode method instead?
Thank you.
The shortcode works.
Is it acceptable to call the function directly instead of using do_shortcode? Since I'm calling this from inside a different filter call.
Example: $WOOCS->woocs_show_custom_price(['value' => floatval(13.99)]) ?
Or do you recommend the do_shortcode method instead?
Quote from Pablo Borysenco on May 5, 2022, 10:04Hello
yes I recommend using shortcode:
- price will work with cache
- your code will work correctly regardless of updating and changing the code of our plugin
Hello
yes I recommend using shortcode:
- price will work with cache
- your code will work correctly regardless of updating and changing the code of our plugin