Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
title/plugins/xt_auto_cross_sell/installer/xt_auto_cross_sell.xml
<plugin_code>
   <code>
      <hook>store_main.php:bottom</hook>
      <title>load class</title>
      <phpcode><![CDATA[
         require _SRV_WEBROOT.'plugins/xt_auto_cross_sell/hooks/store_main_php_bottom.php';
      ]]></phpcode>
      <order>1</order>
      <active>1</active>
   </code>
   <code>
      <hook>product_info_tpl</hook>
      <phpcode><![CDATA[
         require _SRV_WEBROOT.'plugins/xt_auto_cross_sell/hooks/product_info_tpl.php';
      ]]></phpcode>
<order>1</order>
<active>1</active>
</code>     <code> <hook>cart_bottom</hook>
<phpcode><![CDATA[
require _SRV_WEBROOT.'plugins/xt_auto_cross_sell/hooks/cart_bottom.php';
]]></phpcode>
<order>1</order><order>1</order>
      <active>1</active>
   </code>

</plugin_code>

Vorteil:

Dieses vorgehen erleichtert das entwickeln von Plugins sehr, da der Inhalt der Hooks innerhalb von IDEs/Editoren editiert werden kann, ohne das das Plugin erneut installiert werden muss. ( Bedenken Sie, dass die Hookpunkte lediglich bei der Installation des Plugins aus der XML-Datei in die Datenbank übertragen werden, wenn Sie also die XML-Datei anpassen wäre eine erneute Installation des Plugins notwendig. )

...