From ba8d32b96ea3af2794ec54be4e56241647461b5e Mon Sep 17 00:00:00 2001 From: Vladimir Malik Date: Thu, 27 May 2021 11:47:01 +0300 Subject: [PATCH 1/4] use schema location instead relative path --- etc/adminhtml/events.xml | 2 +- etc/frontend/events.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/adminhtml/events.xml b/etc/adminhtml/events.xml index 2fc902c2..861e4426 100644 --- a/etc/adminhtml/events.xml +++ b/etc/adminhtml/events.xml @@ -1,4 +1,4 @@ - + diff --git a/etc/frontend/events.xml b/etc/frontend/events.xml index 71d2e38f..2f235b69 100644 --- a/etc/frontend/events.xml +++ b/etc/frontend/events.xml @@ -1,4 +1,4 @@ - + From 6ad42ef3be35646d0987048fdc87918467f6d677 Mon Sep 17 00:00:00 2001 From: Vladimir Malik Date: Thu, 27 May 2021 11:48:13 +0300 Subject: [PATCH 2/4] Added translations for comments. Made translatable default option. --- Model/Config/Source/ListOptions.php | 2 +- etc/adminhtml/system.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Model/Config/Source/ListOptions.php b/Model/Config/Source/ListOptions.php index 6d57ae63..248ad3c2 100644 --- a/Model/Config/Source/ListOptions.php +++ b/Model/Config/Source/ListOptions.php @@ -53,7 +53,7 @@ public function toOptionArray() }, $result['lists']); $default_value = [ - self::LABEL => 'Select a list...', + self::LABEL => __('Select a list...'), self::VALUE => 0 ]; array_unshift($options, $default_value); diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index f539a6ad..51554a52 100755 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -26,7 +26,7 @@ validate-url - + Magento\Config\Model\Config\Source\Yesno Log file is located under the standard log directory for your Magento app install. By default this will be {magento-root-directory}/var/log/klaviyo.log @@ -46,7 +46,7 @@ Klaviyo\Reclaim\Model\Config\Source\ListOptions Klaviyo\Reclaim\Block\System\Config\Form\Field\Newsletter - + Klaviyo\Reclaim\Model\Config\Source\Radiobtn NOTE: There is a separate Magento opt-in setting for this list that can also send opt-in emails @@ -60,7 +60,7 @@ Klaviyo_Reclaim::klaviyo_reclaim - + Magento\Config\Model\Config\Source\Yesno Adds a checkbox to the checkout page for email opt in @@ -91,7 +91,7 @@ - + Magento\Config\Model\Config\Source\Yesno Set up SMS in Klaviyo]]> @@ -158,7 +158,7 @@ Magento\Config\Model\Config\Backend\Encrypted - + Magento\Config\Model\Config\Source\Yesno This will remove deleted products from the Klaviyo catalog. From af3fd240ba0d6382e6280b2abc2fe60badb19b50 Mon Sep 17 00:00:00 2001 From: Vladimir Malik Date: Thu, 27 May 2021 11:49:55 +0300 Subject: [PATCH 3/4] Use $block instead $this. Shortcut instead echo. Added module name - for proper overriding template in theme. --- view/frontend/layout/catalog_product_view.xml | 2 +- view/frontend/layout/default.xml | 2 +- view/frontend/templates/analytics/initialize.phtml | 6 +++--- view/frontend/templates/checkout/cart.phtml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/view/frontend/layout/catalog_product_view.xml b/view/frontend/layout/catalog_product_view.xml index 52ba5b05..cba079a3 100644 --- a/view/frontend/layout/catalog_product_view.xml +++ b/view/frontend/layout/catalog_product_view.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml index 3a24151e..1417e870 100644 --- a/view/frontend/layout/default.xml +++ b/view/frontend/layout/default.xml @@ -1,7 +1,7 @@ - + diff --git a/view/frontend/templates/analytics/initialize.phtml b/view/frontend/templates/analytics/initialize.phtml index 634f183f..a6b76d95 100644 --- a/view/frontend/templates/analytics/initialize.phtml +++ b/view/frontend/templates/analytics/initialize.phtml @@ -1,7 +1,7 @@ -getPublicApiKey(); ?> -isKlaviyoEnabled() && $klaviyoKey ): ?> +getPublicApiKey(); ?> +isKlaviyoEnabled() && $klaviyoKey ): ?> + src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=">