Config Overview

Config Table

1 min · Me

config.php Tweaks

Disable Template Cache Add following code in your config.php to disable the Template Cache 'template' => [ 'forceCompile' => true, ], Configure SMTP in config.php 'mail' => [ 'type' => 'smtp', // Possible values: 'mail', 'smtp', 'file' 'host' => 'localhost', 'port' => 587, 'ssl' => 'tls', // Possible values: '', 'tls', 'ssl' 'auth' => 'login', // Possible values: 'plain', 'login', 'crammd5' 'username' => 'me@localhost', 'password' => 'mypassword' ], Redis When you use Redis for Session and Cache, you must use different databases for each....

1 min · Me

Event Cheat-Sheet

Shopware_Modules_Order_SendMail_FilterVariables Manipulate variables of sOrder mail Shopware_Modules_Admin_CheckUser_Successful After checked is the user loggedin Enlight_Controller_Action_MODULE_CONTROLLER_ACTION Overwrite or add new actions to a controller. In your subscriber you have to return true; at the end Enlight_Bootstrap_AfterInitResource_DINAME After a service has been loaded Enlight_Bootstrap_InitResource_DINAME Before a service has been loaded or register your own di Enlight_Components_Mail_Send Before a mail is sent Theme_Inheritance_Template_Directories_Collected An event to register global template directories Enlight_Controller_Front_DispatchLoopShutdown It’s the last event before the response is send...

1 min · Me

Extjs Tweaks

Open backend application with link With /backend?app=[NAME] can you open any Module (/backend/?app=Article), you can also pass supported variables like /backend/?app=[NAME]&params[NAME]=VALUE (/backend/?app=Article&params[articleId]=1) Create a real checkbox in config.xml <element type="boolean"> <name>test</name> <label lang="de">test</label> <label lang="en">test</label> <options> <xtype>checkbox</xtype> </options> </element> Use components from another backend application When you want to use components from an another application, you have to load first the App. Otherwise the Ext.Loader cannot find the right controller to load the files....

3 min · Me

Introduction

How can I Contribute to this Knowledgebase? This Gitbook is also accessible at Github https://github.com/shyim/shyim.me. Feel free to add or edit pages 😉

1 min · Me

Plugin System Features with Version

5.2.7 ****automatic controller registration 5.2.10 added my_plugin.plugin_dir parameter 5.2.11 config.xml with store values and translateable 5.2.13 Autoloading of plugin resources (css,js,less) Payment Installer Automatisches laden von .css/.js/.less Dateien 5.2.15 cronjob.xml 5.2.17 config type button

1 min · Me

Plugins

Add a Smarty Plugin folder with a Plugin It can be solved with a simple CompilerPass in your Plugin {% code title=“MyPlugin/Components/CompilerPass/AddTemplatePluginDirCompilerPass.php” %} <?php namespace MyPlugin\Components\CompilerPass; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class AddTemplatePluginDirCompilerPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { $template = $container->getDefinition('template'); $template->addMethodCall('addPluginsDir', [$container->getParameter('my_plugin.my_parameter_to_folder')]); } } {% endcode %} {% code title=“MyPlugin.php” %} <?php class MyPlugin extends Plugin { public function build(ContainerBuilder $container) { parent::build($container); $container->addCompilerPass(new AddTemplatePluginDirCompilerPass()); } } {% endcode %}...

2 min · Me

Problems and Solutions

Sending a BCC Mail does not work? Zend-Mailer does not Support BCC on SMTP transport.It drops the Bcc header before sending the mail. A solution could be to clone the mail and replace the receiver Plugin-Manager still shows Trial-Version Open Plugin-Manager and press the Button “Synchronize licenses”. When the button does not exist in your used Version: Login in your Shopware Account in Plugin Manager Clear all cookies of the Page Login in your Backend Licenses should be now synchronized in Background Smarty Plugins missing on Finish Page Can be only fixed with an Update to Shopware 5....

1 min · Me

Smarty

Assign the snippet value to a variable {s name="NameFromSnippet" assign="tplVariable"}Default Value{/s} {$tplVariable|replace:'Test':'Lol'} Read plugin config values {config name="myVar" namespace="MYPLUGINNAME"} Check existence of Template file {if "frontend/foo.tpl"|template_exists}

1 min · Me