Hi all,
I would like the selected gift voucher theme image received by email by the customer to be on the background of the email so that the text will be on top of the image.
Would this be possible?
Anyone got an idea how to approach?
Thanks!
I would like the selected gift voucher theme image received by email by the customer to be on the background of the email so that the text will be on top of the image.
Would this be possible?
Anyone got an idea how to approach?
Thanks!
find this file, template > mail >voucher.tpl
you can set the background image using this code
change it to
this should set the background image for all vouchers
you can set the background image using this code
Code: Select all
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000;">
Code: Select all
<body background="URL"; style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; ">
“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.”
- Henry Ford
Hi there, and many thanks for your reply!
I notice my voucher.tpl is different because it was overwritten by a mod I have "Professional HTML Email Template and Design for Opencart Email".
My content of voucher.tpl:
<p style="font-size:12px"><?php echo $text_greeting; ?></p>
<p style="font-size:12px"><?php echo $text_from; ?></p>
<?php if ($message) { ?>
<p style="font-size:12px"><?php echo $text_message; ?></p>
<p style="font-size:12px"><?php echo $message; ?></p>
<?php } ?>
<p style="font-size:12px"><?php echo $text_redeem; ?></p>
<p style="font-size:12px"><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><?php echo $store_url; ?></a></p>
<p style="font-size:12px"><?php echo $text_footer; ?></p>
I notice my voucher.tpl is different because it was overwritten by a mod I have "Professional HTML Email Template and Design for Opencart Email".
My content of voucher.tpl:
<p style="font-size:12px"><?php echo $text_greeting; ?></p>
<p style="font-size:12px"><?php echo $text_from; ?></p>
<?php if ($message) { ?>
<p style="font-size:12px"><?php echo $text_message; ?></p>
<p style="font-size:12px"><?php echo $message; ?></p>
<?php } ?>
<p style="font-size:12px"><?php echo $text_redeem; ?></p>
<p style="font-size:12px"><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><?php echo $store_url; ?></a></p>
<p style="font-size:12px"><?php echo $text_footer; ?></p>
then just try adding this line of code and see if it works for you
Code: Select all
<body background="URL">
“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.”
- Henry Ford
Will check it out, if it's not working as suspected, I will check with the creator!
Thanks!
Thanks!
It would be nice to set the image to be on the background of the email. I'v tried but can't find the right place for the code. This is how my voucher.tpl loooks like:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
<style type="text/css">
body {
color: #000000;
font-family: Arial, Helvetica, sans-serif;
}
body, td, th, input, textarea, select, a {
font-size: 12px;
}
p {
margin-top: 0px;
margin-bottom: 20px;
}
a, a:visited, a b {
color: #378DC1;
text-decoration: underline;
cursor: pointer;
}
a:hover {
text-decoration: none;
}
a img {
border: none;
}
#container {
width: 680px;
}
</style>
</head>
<body>
<div id="container">
<div style="float: right; margin-left: 20px;"><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><img src="<?php echo $image; ?>" alt="<?php echo $store_name; ?>" /></a></div>
<div>
<p><?php echo $text_greeting; ?></p>
<p><?php echo $text_from; ?></p>
<?php if ($message) { ?>
<p><?php echo $text_message; ?></p>
<p><?php echo $message; ?></p>
<?php } ?>
<p><?php echo $text_redeem; ?></p>
<p><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><?php echo $store_url; ?></a></p>
<p><?php echo $text_footer; ?></p>
</div>
</div>
</body>
</html>
It should look something like this (using non-shorthand inline styles wherever possible):
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
</head>
<body>
<body style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; color: #000000;">
<div style="width: 650px; height: 250px; background-image: url('<?php echo $image; ?>'); background-position: top left; background-repeat: no-repeat; margin-bottom: 20px; border: none;">
<p><?php echo $text_greeting; ?></p>
<p><?php echo $text_from; ?></p>
<?php if ($message) { ?>
<p><?php echo $text_message; ?></p>
<p><?php echo $message; ?></p>
<?php } ?>
<p><?php echo $text_redeem; ?></p>
<p><a href="<?php echo $store_url; ?>" title="<?php echo $store_name; ?>"><?php echo $store_url; ?></a></p>
<p><?php echo $text_footer; ?></p>
</div>
</body>
</html>
Who is online
Users browsing this forum: No registered users and 77 guests