diff --git a/onlinestore-ecwid/metadata.json b/onlinestore-ecwid/metadata.json index 9a05ad5..7d22ff4 100644 --- a/onlinestore-ecwid/metadata.json +++ b/onlinestore-ecwid/metadata.json @@ -2,8 +2,8 @@ "author": "novafacile", "email": "", "website": "https://bludit-plugins.com", - "version": "1.0.0", - "releaseDate": "2022-01-18", + "version": "1.1.1", + "releaseDate": "2022-01-24", "license": "MIT", "compatible": "3.13.1", "notes": "" diff --git a/onlinestore-ecwid/plugin.php b/onlinestore-ecwid/plugin.php index 762152b..1f8fa60 100644 --- a/onlinestore-ecwid/plugin.php +++ b/onlinestore-ecwid/plugin.php @@ -8,9 +8,9 @@ * @author novafacile OÜ * @copyright 2022 by novafacile OÜ * @license MIT - * @version 1.1.0 + * @version 1.1.1 * @see https://bludit-plugins.com - * @release 2022-01-19 + * @release 2022-01-24 * This program is distributed in the hope that it will be useful - WITHOUT ANY WARRANTY. */ @@ -18,8 +18,8 @@ class pluginOnlineStoreEcwid extends Plugin { public function init() { $this->dbFields = [ - 'storeId' => '', - 'page' => '' + 'storeId' => '', + 'page' => '' ]; } @@ -41,7 +41,7 @@ public function form() { '; - // basics + // basics $html .= '
'; $html .= Bootstrap::formTitle(array('title' => $L->get('General'))); @@ -100,29 +100,29 @@ public function form() { $html .= '
-

'.$L->get('Free Online Store by Ecwid').'

-

- '.$L->get('To get a Store ID, you need an account at Ecwid.com. With this online store provider you can create an online store for free with all the necessary features with just a few clicks and manage your products.').'

- '.$L->get('Register For Free').' - '.$L->get('Manage Online Store').' -

-
-

- '.$L->get('For payment processing you also need e.g. a Paypal account or that of another payment provider that can be connected to an Ecwid online store. Instructions and help can be found in the Ecwid Help Center.').' -

-
- '; +

'.$L->get('Free Online Store by Ecwid').'

+

+ '.$L->get('To get a Store ID, you need an account at Ecwid.com. With this online store provider you can create an online store for free with all the necessary features with just a few clicks and manage your products.').'

+ '.$L->get('Register For Free').' + '.$L->get('Manage Online Store').' +

+
+

+ '.$L->get('For payment processing you also need e.g. a Paypal account or that of another payment provider that can be connected to an Ecwid online store. Instructions and help can be found in the Ecwid Help Center.').' +

+
+ '; $html .= '
-

'.$L->get('How to Get Store ID').'

-
    -
  1. '.$L->get('Login into your Ecwid account').'
  2. -
  3. '.$L->get('Scroll down to page bottom').'
  4. -
  5. '.$L->get('Copy Store ID').'
  6. -
-
'.$L->get('Example').'
-

-
'; +

'.$L->get('How to Get Store ID').'

+
    +
  1. '.$L->get('Login into your Ecwid account').'
  2. +
  3. '.$L->get('Scroll down to page bottom').'
  4. +
  5. '.$L->get('Copy Store ID').'
  6. +
+
'.$L->get('Example').'
+

+ '; return $html; @@ -140,20 +140,24 @@ public function adminSidebar() { } private function getStoreTag(){ - $tag = '
-
- -
'; - return $tag; + $tag = '
+
+ +
'; + return $tag; } /** * frontend methods **/ public function beforeSiteLoad() { - if($GLOBALS['WHERE_AM_I']=='page') { - $GLOBALS['page']->setField('content', $this->getStoreTag()); - } + if(!$this->webhook($this->webhookUrl())){ + return; + } + + if($GLOBALS['WHERE_AM_I']=='page') { + $GLOBALS['page']->setField('content', $this->getStoreTag()); + } } /**