Open gety9 opened 7 years ago
Hello @gety9 unfortunately I didn't see a better soluation for your problem. Maybe a lazy block and overwriting Lesti_Fpc_Helper_Block::_getLazyBlocksValidHash, but I wouldn't recommend that solution. In general is your solution fine, but I would recommend to clean up the code a bit. Putting logic into a block class instead of a template and so on.
We are using module that applies coupon using link. Here example of the link:
http://www.sitename.com/applycoupon/?code=OFFNA10&return_url=http://www.sitename.com
if customer coming to the website through this link it, redirects to homepage and has pop-up window saying coupon applied successfully and applies OFFNA10 coupon.
Currently we make this block on home page dynamic in Lesti_FPC, but this makes this block's code run on every home page load. I wonder if there is a better way to do?
Basically for visitors coming straight to our site we want to display regular cached home page, and for visitors coming through this coupon links, we want to regenerate the block or full home page. (basically home pages are identical in both cases except for in 2nd case it has pop-up hidden div which becomes visible with javascript)
Here is the code: xml
phtml
indexcontroller