From ba81eb056aaf1926f7d8f8e1a60568cfc30c5a50 Mon Sep 17 00:00:00 2001
From: Reinhold Kainhofer <reinhold@kainhofer.com>
Date: Sat, 8 Apr 2017 14:20:02 +0200
Subject: [PATCH] Fix plugin template

---
 plugins/template/YOUR_PLUGIN_NAME.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/template/YOUR_PLUGIN_NAME.php b/plugins/template/YOUR_PLUGIN_NAME.php
index 0ef26ba..1d8cd63 100644
--- a/plugins/template/YOUR_PLUGIN_NAME.php
+++ b/plugins/template/YOUR_PLUGIN_NAME.php
@@ -35,10 +35,10 @@ class plgVmShopperYOUR_PLUGIN_NAME extends VmShopperPlugin {
 	function onVmOrdernumberGetVariables(&$reps, $fmt, $nrtype, $details) {
         // As an example add a variable [type] that contains the number type:
         switch ($nrtype) {
-            case 0: $reps['type'] = "Order"; break;
-            case 1: $reps['type'] = "Invoice"; break;
-            case 2: $reps['type'] = "Customer"; break;
-            case 3: $reps['type'] = "OrderPassword"; break;
+            case 0: $reps['[type]'] = "Order"; break;
+            case 1: $reps['[type]'] = "Invoice"; break;
+            case 2: $reps['[type]'] = "Customer"; break;
+            case 3: $reps['[type]'] = "OrderPassword"; break;
         }
         // Another example: set the ip address:
         if (isset($details->ip_address)) $reps["[ipaddress]"] = $details->ip_address;
-- 
GitLab