summaryrefslogtreecommitdiff
path: root/views/mailtemplates
diff options
context:
space:
mode:
authorflorian <noreply@maennchen1.de>2018-08-10 07:40:47 +0000
committerflorian <noreply@maennchen1.de>2018-08-10 07:40:47 +0000
commit6025e7638c2e7cb385a6feae0893c64a014a2d06 (patch)
treea8297f6ab1a53eac1e943d2ccf082d85f535d891 /views/mailtemplates
parent43bbaa69a22b8b8e9facca916da62010fea06eaa (diff)
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7094 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mailtemplates')
-rw-r--r--views/mailtemplates/html/adminmail.phtml2
-rw-r--r--views/mailtemplates/html/kundenmail.phtml2
-rw-r--r--views/mailtemplates/html/logo.phtml33
-rw-r--r--views/mailtemplates/html/status.phtml2
4 files changed, 39 insertions, 0 deletions
diff --git a/views/mailtemplates/html/adminmail.phtml b/views/mailtemplates/html/adminmail.phtml
index 4def92f..c7dbf5f 100644
--- a/views/mailtemplates/html/adminmail.phtml
+++ b/views/mailtemplates/html/adminmail.phtml
@@ -3,6 +3,8 @@
/* Wichtig, da die Module sonst kein HTML zurückgeben */
$this->htmlMail = true;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<p><?php echo __('Hallo Administrator,', 'wpsg'); ?></p>
diff --git a/views/mailtemplates/html/kundenmail.phtml b/views/mailtemplates/html/kundenmail.phtml
index 30fe9af..4288984 100644
--- a/views/mailtemplates/html/kundenmail.phtml
+++ b/views/mailtemplates/html/kundenmail.phtml
@@ -3,6 +3,8 @@
/* Wichtig, da die Module sonst kein HTML zurückgeben */
$this->htmlMail = true;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?></p>
diff --git a/views/mailtemplates/html/logo.phtml b/views/mailtemplates/html/logo.phtml
new file mode 100644
index 0000000..a080084
--- /dev/null
+++ b/views/mailtemplates/html/logo.phtml
@@ -0,0 +1,33 @@
+<style>
+ .email-logo { padding-bottom: 10px; }
+ .email-logo-watermark { position:absolute; top:10%; left:0; right:0; display:flex; justify-content:center; align-items:center; }
+</style>
+
+<?php
+ if($this->get_option('wpsg_email_logo_activated'))
+ {
+
+ $logoWatermark = $this->get_option('wpsg_email_logo_watermark') ? "email-logo-watermark" : "";
+
+ $logoTransparency = str_replace("#", "", get_option('wpsg_email_logo_transparency'));
+ if($logoTransparency !== "100") $logoTransparency = str_replace(array("0", "00"), "", $logoTransparency);
+ if($logoTransparency !== "100") $logoTransparency = "0." . $logoTransparency;
+
+ $logoAlignment = $this->get_option('wpsg_email_logo_alignment');
+ $logoPath = WPSG_PATH_CONTENT . 'uploads/wpsg/wpsg_mailconf/wpsg_email_logo.jpg';
+
+ if(file_exists($logoPath))
+ {
+ $logoType = pathinfo($logoPath);
+ $logoData = file_get_contents($logoPath);
+ $logoBase64 = 'data:image/' . $logoType . ';base64,' . base64_encode($logoData);
+ }
+
+ }
+?>
+
+<?php if(file_exists($logoPath) && $this->get_option('wpsg_email_logo_activated')) { ?>
+ <?php echo "<div class='email-logo $logoWatermark' style='text-align:$logoAlignment; opacity:$logoTransparency;'>" ?>
+ <?php echo "<img alt='Emaillogo' class='email-logo-$logoAlignment' src='$logoBase64'>"; ?>
+ <?php echo "</div>"; ?>
+<?php } ?>
diff --git a/views/mailtemplates/html/status.phtml b/views/mailtemplates/html/status.phtml
index 84567e6..f6c412c 100644
--- a/views/mailtemplates/html/status.phtml
+++ b/views/mailtemplates/html/status.phtml
@@ -7,6 +7,8 @@
/* Wichtig, da die Module sonst kein HTML zurückgeben */
$this->htmlMail = true;
+ include(WPSG_PATH_VIEW . 'mailtemplates/html/logo.phtml');
+
?>
<p><?php echo wpsg_translate(__('Hallo #1# #2#,', 'wpsg'), $this->view['kunde']['vname'], $this->view['kunde']['name']); ?></p>