Problem with Dynamic price and cache
-
Hi
There is a problem that I got on my page between dynamic prices and cache.
I have Litespeed cache, and I assigned a tiered price to a category by a dynamic rule, when applied for the first time it grabs the correct price according to the quantity, but when going to the cart and increase or decrease the quantity, the price no longer responds to the dynamic rule, unless I clear the cache that comes with B2Bking.
The only solution I got was to use a code (snippets) that I found in the help article of b2bking (IMPORT OR SETUP DYNAMIC RULES PROGRAMATICALLY: Clearing the Rules Cache) with running this code the dynamic rules work fine as they should be, this is the Code :
b2bking()->clear_caches_transients(); require_once B2BKING_DIR . ‘/admin/class-b2bking-admin.php’; B2bking_Admin::b2bking_calculate_rule_numbers_database();
The question is:
is that solution correct? Or is there another way, for example to make changes in the Litespeed configuration and not to lose the benefits of the internal cache of the B2Bking prices?
The page I need help with: [log in to see the link]
- The topic ‘Problem with Dynamic price and cache’ is closed to new replies.