View Issue Details

IDProjectCategoryView StatusLast Update
0003464OXID eShop (all versions)4.08. Cachepublic2012-12-10 13:39
Reporterb.hasis Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.6 revision 40808 
Fixed in Version4.5.7 revision 41909 
Summary0003464: oxblock smarty cache problem using oxtplblocks
DescriptionHello,

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 Reproduce1.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 InformationI'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?
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Activities

mindaugas.rimgaila

2012-01-24 12:35

reporter   ~0005641

Changed smarty settings, to compile TPL files for every shop.