From 7aa2dcc7e5132a6d3726cc27c492f60348bce215 Mon Sep 17 00:00:00 2001 From: poonam_b Date: Thu, 12 Dec 2019 19:01:52 +0530 Subject: [PATCH 1/2] Task #154509 chore: Adding sample data for all client --- .../admin/tjvendorsTemplate.json | 240 ++++++++++-------- 1 file changed, 135 insertions(+), 105 deletions(-) diff --git a/src/com_tjvendors/admin/tjvendorsTemplate.json b/src/com_tjvendors/admin/tjvendorsTemplate.json index 2c9afb6b..5f47ca44 100644 --- a/src/com_tjvendors/admin/tjvendorsTemplate.json +++ b/src/com_tjvendors/admin/tjvendorsTemplate.json @@ -19,27 +19,32 @@ "user_control": 1, "core": 1, "replacement_tags": [ - { - "name": "info.vendor_title", - "description": "Vendor title" - }, - { - "name": "{vendorer.name}", - "description": "Vendorer name" - }, - { - "name": "info.allVendors", - "description": "Link to all vender view. (Admin user only)" - }, - { - "name": "info.sitename", - "description": "Sitename" - }, - { - "name": "info.adminname", - "description": "Siteadmin" - } - ] + { + "name": "{info.vendor_title}", + "description": "Vendor title", + "sampledata": "Techjoomla" + }, + { + "name": "{vendorer.name}", + "description": "Vendorer name", + "sampledata": "Shikha" + }, + { + "name": "{info.allVendors}", + "description": "Link to all vender view. (Admin user only)", + "sampledata": "https://techjoomla.com/products" + }, + { + "name": "{info.sitename}", + "description": "Sitename", + "sampledata": "https://techjoomla.com" + }, + { + "name": "{info.adminname}", + "description": "Siteadmin", + "sampledata": "admin" + } + ] }, "template2": { "id": "", @@ -61,30 +66,36 @@ "user_control": 1, "core": 1, "replacement_tags": [ - { - "name": "info.vendor_title", - "description": "Vendor title" - }, - { - "name": "{vendorer.name}", - "description": "Vendorer name" - }, - { - "name": "info.allVendors", - "description": "Link to all vender view. (Admin user only)" - }, - { - "name": "info.myVendor", - "description": "Vendor - edit view" - }, - { - "name": "info.sitename", - "description": "Sitename" - }, - { - "name": "info.adminname", - "description": "Siteadmin" - } + { + "name": "{info.vendor_title}", + "description": "Vendor title", + "sampledata": "Techjoomla" + }, + { + "name": "{vendorer.name}", + "description": "Vendorer name", + "sampledata": "Jticketing" + }, + { + "name": "{info.allVendors}", + "description": "Link to all vender view. (Admin user only)", + "sampledata": "https://jticketingdemo.techjoomla.com/" + }, + { + "name": "{info.myVendor}", + "description": "Vendor - edit view", + "sampledata": "https://jticketingdemo.techjoomla.com/national-amateur-boxing-championship" + }, + { + "name": "{info.sitename}", + "description": "Sitename", + "sampledata": "https://jticketingdemo.techjoomla.com/" + }, + { + "name": "{info.adminname}", + "description": "Siteadmin", + "sampledata": "Smith" + } ] }, "template3": { @@ -149,30 +160,35 @@ "user_control": 1, "core": 1, "replacement_tags": [ - { - "name": "info.vendor_title", - "description": "Vendor title" - }, - { - "name": "{vendorer.name}", - "description": "Vendorer name" - }, - { - "name": "info.allVendors", - "description": "Link to all vender view. (Admin user only)" - }, - { - "name": "info.myVendor", - "description": "Vendor - edit view" - }, - { - "name": "info.sitename", - "description": "Sitename" - }, - { - "name": "info.adminname", - "description": "Siteadmin" - } + { + "name": "{info.vendor_title}", + "description": "Vendor title", + "sampledata": "Techjoomla" + }, + { + "name": "{vendorer.name}", + "description": "Vendorer name", + "sampledata": "Jticketing" + }, + { + "name": "{info.allVendors}", + "description": "Link to all vender view. (Admin user only)", + "sampledata": "https://jticketingdemo.techjoomla.com/" + }, + { + "name": "{info.myVendor}", + "description": "Vendor - edit view" + }, + { + "name": "{info.sitename}", + "description": "Sitename", + "sampledata": "https://jticketingdemo.techjoomla.com/" + }, + { + "name": "{info.adminname}", + "description": "Siteadmin", + "sampledata": "Kate" + } ] }, "template5": { @@ -195,22 +211,31 @@ "user_control": 1, "core": 1, "replacement_tags": [ - { - "name": "info.vendor_title", - "description": "Vendor title" - }, - { - "name": "{vendorUser.name}", - "description": "Vendorer name" - }, - { - "name": "info.sitename", - "description": "Sitename" - }, - { - "name": "info.adminname", - "description": "Siteadmin" - } + { + "name": "{info.vendor_title}", + "description": "Vendor title", + "sampledata": "ShopKart" + }, + { + "name": "{vendor_user.name}", + "description": "Vendorer name", + "sampledata": "Mikel" + }, + { + "name": "{info.sitename}", + "description": "Sitename", + "sampledata": "https://www.yo-kart.com/multivendor-store-demo.html" + }, + { + "name": "{info.adminname}", + "description": "Siteadmin", + "sampledata": "Mikel" + }, + { + "name": "{vendor_data.vendor_title}", + "description": "Vendor Title", + "sampledata": "TJ-Vendor" + } ] }, "template6": { @@ -233,26 +258,31 @@ "user_control": 1, "core": 1, "replacement_tags": [ - { - "name": "info.vendor_title", - "description": "Vendor title" - }, - { - "name": "{vendorer.name}", - "description": "Vendorer name" - }, - { - "name": "info.vendorClient", - "description": "Vendor client" - }, - { - "name": "info.sitename", - "description": "Sitename" - }, - { - "name": "info.adminname", - "description": "Siteadmin" - } + { + "name": "{info.vendor_title}", + "description": "Vendor title", + "sampledata": "SAP" + }, + { + "name": "{vendorer.name}", + "description": "Vendorer name", + "sampledata": "shopkart" + }, + { + "name": "{info.vendorClient}", + "description": "Vendor client", + "sampledata": "IndiaMart" + }, + { + "name": "{info.sitename}", + "description": "Sitename", + "sampledata": "http://www.shopkartapp.com" + }, + { + "name": "{info.adminname}", + "description": "Siteadmin", + "sampledata": "john" + } ] } } From 09b9423b4fe16b8b856b97f948490f6fb1147b2f Mon Sep 17 00:00:00 2001 From: poonam_b Date: Mon, 23 Dec 2019 15:35:04 +0530 Subject: [PATCH 2/2] Task #154509 chore: Adding sample data for TJ-Notification template --- src/com_tjvendors/script.tjvendors.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com_tjvendors/script.tjvendors.php b/src/com_tjvendors/script.tjvendors.php index 37017d73..fd941dd3 100644 --- a/src/com_tjvendors/script.tjvendors.php +++ b/src/com_tjvendors/script.tjvendors.php @@ -438,6 +438,12 @@ public function _insertTjNotificationTemplates() { $notificationsModel->createTemplates($array); } + + // If replacement tags are changed update those + if (in_array($array['key'], $existingKeys) && isset($array['replacement_tags'])) + { + $notificationsModel->updateReplacementTags($array); + } } } }