shopware

How to add an Action to Account Controller in Shopware

蓝咒 提交于 2021-02-19 07:38:46
问题 How to add a custom action to an existing Controller in Shopware? Examples (url structure): /account/bonus /account/custom /account/... Usually it's easier and cleaner to create a new controller for that purpose, but in some cases it's necessary. 回答1: There is a cleaner way than replacing the whole Controller. It is also not recommended to replace a whole controller due to the lack of update compatibility. In the worst case something like that could kill the whole website. A while ago I

How to extend Shopware 6 controller action

痴心易碎 提交于 2021-01-27 16:54:53
问题 I am building a plugin for Shopware 6 and cannot seem to find any documentation as to how to extend an existing controller action. I found this How to add an Action to Account Controller in Shopware but it seems to refer to Shopware 5 and I am not sure I can use it that way in Shopware 6. The controller action I want to extend is \Shopware\Storefront\Controller\AddressController::saveAddress - in my case I want to add custom address validation that would use a service in my plugin where a

Shopware 6 | Cloning CmsElement and get null as data

我是研究僧i 提交于 2020-12-06 07:04:33
问题 I try to clone the content element image-slider or image-gallery (the error will come at both) to extend them. First I register a new CmsElement like the original only changes the name from image-slider to image-slider-example import './component'; import './config'; import './preview'; Shopware.Service('cmsService').registerCmsElement({ name: 'image-slider-example', label: 'sw-cms.elements.imageSlider.label', component: 'sw-cms-el-image-slider', configComponent: 'sw-cms-el-config-image

Shopware installation error: Identifier DB not initialized yet

一个人想着一个人 提交于 2020-05-29 10:29:26
问题 After installation wizard is finished I get this error. Slim Application Error The application could not run because of the following error: Details Type: RuntimeException Message: Identifier DB not initialized yet File: /.../recovery/install/src/ContainerProvider.php Line: 162 Is there is some configuration file where I can set DB params? I had insert all params via installation wizard. 回答1: In file recovery/install/src/ContainerProvider.php Add 2 strings: In use-section use Shopware

How to prevent sending of emails using event Enlight_Components_Mail_Send?

流过昼夜 提交于 2020-01-16 08:47:14
问题 Is there a way to tell shopware not to send email inside of function called by event "Enlight_Components_Mail_Send"? 回答1: Do you want to deprecate all emails in shopware or certain? If you want to deprecate all emails in shopware you need to add into SHOPWARE_ROOT/config.php <?php return array ( 'db' => array ( 'host' => 'YOU_HOST', 'port' => 'YOU_PORT', 'username' => 'YOU_USER', 'password' => 'YOU_PASS', 'dbname' => 'YOU_DATABASE', ), 'mail' => array( 'type' => 'file', ) ); In this case mail

Shopware 5.2.20. Cannot extend template via plugin

不问归期 提交于 2020-01-15 11:08:10
问题 I'm trying to extend template frontend/home/index.tpl via own plugin. Here my root file: <?php namespace TdevExtend; use Shopware\Components\Plugin; class TdevExtend extends Plugin { public static function getSubscribedEvents(){ return [ 'Enlight_Controller_Dispatcher_ControllerPath_Frontend_MyPlugin' => 'onDetailPostDispatch' ]; } public function onDetailPostDispatch(\Enlight_Event_EventArgs $args) { $this->container->get('template')->addTemplateDir( $this->getPath() . '/Resources/views/' );

Shopware 6 Command './psh.phar administration:build.' is not working

﹥>﹥吖頭↗ 提交于 2019-12-24 23:37:25
问题 I am using Shopware 6. I am creating the module which dispaly component ( Grid ) in back-end. When building the administration via the command ./psh.phar administration:build it said that no such file directory so can anyone help me to move forward ? Thanks in advance. 回答1: Do you use the development-template from github? https://github.com/shopware/development When using the installer, you won't be able to build the administration, you need to use the development template to create plugins,