Skip to content

Commit

Permalink
added active flag to plugin config
Browse files Browse the repository at this point in the history
  • Loading branch information
dneustadt committed Feb 8, 2018
1 parent aa83974 commit 903b4e8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Resources/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../engine/Shopware/Components/Plugin/schema/config.xsd">
<elements>
<element scope="shop" type="boolean">
<name>wbmTagManagerActive</name>
<label lang="de">Aktiv</label>
<label lang="en">Active</label>
<value>1</value>
</element>
<element scope="shop" type="text">
<name>wbmTagManagerContainer</name>
<label lang="de">Container ID</label>
Expand Down
1 change: 1 addition & 0 deletions Subscriber/Frontend/FilterRender.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function onFilterRender(\Enlight_Event_EventArgs $args)
$prettyPrint = $this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerJsonPrettyPrint');

if (
$this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerActive') &&
!empty($containerId) &&
strtolower($this->container->get('front')->Request()->getModuleName()) != 'backend'
) {
Expand Down
5 changes: 4 additions & 1 deletion Subscriber/Frontend/PostDispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ public function __construct(Container $container)
*/
public function onPostDispatch(\Enlight_Controller_ActionEventArgs $args)
{
if (empty($this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerContainer'))) {
if (
!$this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerActive') ||
empty($this->container->get('config')->getByNamespace('WbmTagManager', 'wbmTagManagerContainer'))
) {
return;
}

Expand Down
7 changes: 6 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
<label lang="de">Tag Manager</label>
<label lang="en">Tag Manager</label>

<version>2.1.3</version>
<version>2.1.4</version>
<link>http://www.webmatch.de</link>
<author>Webmatch GmbH</author>
<compatibility minVersion="5.2.0" />

<changelog version="2.1.4">
<changes lang="de">Option zur Deaktivierung der Integration auf Subshop-Ebene</changes>
<changes lang="en">Option to deactive the integration by subshop</changes>
</changelog>

<changelog version="2.1.3">
<changes lang="de">Behebt einen Fehler in Verbindung mit Conexco Bootstrap Filtern bzw ganzseitigen Ajax Requests</changes>
<changes lang="en">Fixes a bug with the conexco bootstrap theme's ajax filter and full page ajax requests</changes>
Expand Down

0 comments on commit 903b4e8

Please sign in to comment.