View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003464 | OXID eShop (all versions) | 4.08. Cache | public | 2011-12-28 15:27 | 2012-12-10 13:39 |
Reporter | b.hasis | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.5.6 revision 40808 | ||||
Fixed in Version | 4.5.7 revision 41909 | ||||
Summary | 0003464: oxblock smarty cache problem using oxtplblocks | ||||
Description | Hello, Using oxtplblocks for just one Shop its not possible, because smarty cache. i tried to load different block in diffent shops. My first thought was to add a entry in the table.oxtplblocks" with the shopid of the shop i want to load the block(s). What happend was that i see my block in all my subShops(Malls). So after a while i recognized that it happend because the smarty tpl cache are generated by shop "1", and because of that all other shop get that cache file with my new block. So i looked in the core files and found in oxutilsview->getTemplateBlocks() something i dont really understand. That function called by the first view of a page about 25 times. On the second View 2 Times, because of the smarty tpl cache, and because of that its not possible to load different blocks in different shops by mapping it in the db table.Did i understand that right, or i am wrong? And because of that the query filter for shopid in oxutilsview->getTemplateBlocks() are unnecessary. | ||||
Steps To Reproduce | 1.Add a new block to oxtplblocks with oxshopid 1. 2.Go to the frontend of shop 1 where the block are implemented. You see the block. 3.Go to the frontend of shop 2 where the block was in shop 1. You will see the Block too, that dont has to be there. -- -clear tmp/cache and do step 3 then 2. You will dont see the block(in both shops) you are added in Step 1. | ||||
Additional Information | I've got now 2 different solutions to load different blocks in different shops. 1: changing the smarty cache_dir and compile_dir in oxutilsview->_fillCommonSmartyProperties() by adding the shopid."/". So every Shop have to cache his self smarty files. 2. Just adding [{if $shopid == x}] [{else}][{$smarty.block.parent}] directly in my new block. Wich one is better? | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||