Customize Admin Templates for Professional and Enterprise Editionen

By default, the templates in source/Application/views/admin/tpl cannot be customized/extended if they are also delivered in OXID eShop Professional and Enterprise Edition (see bug record 0006822: Admin templates can't be changed in source if they are overwritten in pe/ee - OXID eShop bugtrack). The reason for this is the mandatory loading priority of the admin templates. But what if an individual template for PE/EE is needed?

Using article_extend.tpl from EE as an example, I would like to show you a solution.

First, create a patch from vendor/oxid-esales/oxideshop-ee/Application/views/admin/tpl/article_extend.tpl that includes the desired changes and save it to your repository under patches/oxideshop_ee/article_extend_custom_block.patch .

The content of the patch could look like this:

Index: Application/views/admin/tpl/article_extend.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/Application/views/admin/tpl/article_extend.tpl b/Application/views/admin/tpl/article_extend.tpl
--- a/Application/views/admin/tpl/article_extend.tpl	(revision e0412f0c2cca7d44036fca5ca036ed99d9ccee65)
+++ b/Application/views/admin/tpl/article_extend.tpl	(revision e158f8c52b9dd378b3101445b24bb03e41b2181a)
@@ -109,6 +109,7 @@
                   [{oxinputhelp ident="HELP_ARTICLE_EXTEND_MASS"}]
                 </td>
               </tr>
+              [{block name="myCustomBlock"}][{/block}]
 
               <tr>
                 <td class="edittext">

Next make sure that this is rolled out using Composer (basis for this is Applying patches to OXID eShop projects with composer), i.e. we have to modify our composer.json like this:

composer adjustments

Run composer update now and you have a consistent patch for the EE template, which is applied under vendor/oxid-esales/oxideshop-ee/Application/views/admin/tpl/article_extend.tpl.

apply patch

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.