webmatch/wbm-query-manager

Database-Management plugin for Shopware

Installs: 44

Dependents: 0

Suggesters: 0

Security: 0

Stars: 11

Watchers: 12

Forks: 3

Open Issues: 2

Type:shopware-plugin

2.0.4 2019-01-08 09:36 UTC

This package is auto-updated.

Last update: 2024-11-10 01:34:16 UTC


README

Scrutinizer Travis CI

This plugin integrates a new module within the Shopware backend that allows for a simple management of SQL queries and their manual or automated execution.

WbmQueryManager

The plugin offers the following features:

  • Write, edit, delete, duplicate and run queries
  • Shows fetched rows within backend immediately
  • Download fetched rows as CSV format
  • Execute queries in regular intervals as cron-jobs
  • Cron-Jobs: Logging of fetched rows in CSV format
  • Cron-Jobs: Send emails with attached log-files
  • SQL syntax highlighting (Codemirror)
  • Syntax and table structure autocompletion (Codemirror)

Requirements

  • Shopware >= 5.2.0

Optional:

  • MySQL Improved Extension (MySQLi)
    • enables the fetching of more than one rowsets per query by multiple statements (multi_query)

Installation

Clone this repository into a folder WbmQueryManager within the custom/plugins directory of the Shopware installation.

Install the plugin through the Plugin-Manager within the Shopware backend. Activate the plugin and when prompted allow for the clearing of the listed caches. Reload the backend to complete the installation.

Install with composer

  • Change to your root Installation of shopware
  • Run command composer require webmatch/wbm-query-manager and install and activate plugin with Plugin Manager

Usage

The module will be accessible in backend through a new menu point under the Settings menu tab.

The plugin comes with a few example queries which can be safely deleted.

Configuration

The plugin offers a few basic configuration options:

  • Send CSV Exports to an E-Mail Address
    • (see Cron-Jobs below)
  • CSV Field Separator
    • (see Cron-Jobs below)
  • Active SQL Autocompletion
    • if the autocompletion of syntax isn't desired it can be disabled

Cron-Jobs

To use the cron-job features of this plugin please first make sure the plugin Cron is installed in Plugin Manager and the Cron-Job Query Manager is activated in the cron job settings.

Shopware Cron-Jobs can be executed via request of the URL (e.g. http://your-shop.tld/backend/cron) or by console command php bin/console sw:cron:run (recommended)

Your server has to be setup accordingly to either request the cron URL or run the console command in regular intervals. This interval naturally also determines the minimum interval that Shopware cron-jobs can be executed at.

Fetched rows of SELECT statements executed through cron-jobs will be logged as CSV files in the directory var/logs of the Shopware installation. By specifying an email address in the plugin configuration logged files will also be transmitted by email.

License

MIT

This plugin is also commercially available through Shopware's community store. While the code itself is released under MIT license, the commercial distribution includes support through Webmatch GmbH and continous auto-updates. You may use this plugin without purchase but please be aware that you may receive notifications through Shopware about missing the according license. We have no influence on those notifications.