How to custom Hika emails with name, style, view online options? + activation

  • Posts: 99
  • Thank you received: 0
6 years 8 months ago #275847

-- HikaShop version -- : 3.1.1
-- HikaMarket version -- : 1.7.3
-- Joomla version -- : 3.7.4
-- PHP version -- : 7.1.7
-- Browser(s) name and version -- : CHROME
-- Error-message(debug-mod must be tuned on) -- : No error message

Hello,

I'm trying to custom the Market: Vendor registration in Hikamarket > Configuration > email options.
I already use acymailing for the user registration (not vendor) with an activation email link (confirm your account).

0. Can you confirm that it's not possible to use acymailing plugin for the vendor registration ? It is normal to not have an activation link to confirm the new vendor account (self mode) ? At the end I have 2 completely different registrations, user and vendor, the first one with acymailing + activate link in the email, the second one with hika email system without activate link... :S

1. Add register_username
I would like to welcome the new vendor with the username, "Dear ...,"

I tried:

<h3>Dear 
     <?php $class = hikashop::get('class.order');
echo $data->vendorregister_vendorname;?>,
</h3>

But no name in the email and I get this error:
Deprecated: Non-static method hikashop::get() should not be called statically in /.../public_html/media/com_hikamarket/mail/vendor_registration.html.modified.php on line 83

How to mention the vendor's infos in the email ?

2. I modified the css style:
...
<style type="text/css">
/*body.hikashop_mail { background-color:#dfccbe; color:#40332d; }*/
.hikamarket_mail { background-color:#dfccbe; color:#40332d; }
.ReadMsgBody{width:100%;}
.ExternalClass{width:100%;}
div, p, a, li, td {font-family:'Source Sans Pro', Arial, sans-serif; font-size:13px; color: #40332d;-webkit-text-size-adjust:none;}
a{cursor:pointer; color:#da1f00; text-decoration:none; border:none;font-weight:bold;}
a:hover {text-decoration: underline;}
h1, h3{font-family:'Chewy', cursive, Arial, sans-serif;color:#da1f00!important;font-size:24px;}
h2, h4{font-family:'Dancing Script', cursive, Arial, sans-serif;color:#7d6958 !important;font-size:18px;}
h5{color:#dfccbe !important;}
@media (min-width:600px){
	#hikamarket_mail {width:600px !important;margin:auto !important;}
	.pict img {max-width:500px !important;height:auto !important;}
}
@media (max-width:330px){
	#hikamarket_mail {width:300px !important; margin:auto !important;}
	table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
	td[class="w49"] { width: 10px !important;}
	.pict img {max-width:278px; height:auto !important;}
}
@media (min-width:331px) and (max-width:480px){
	#hikamarket_mail{width:450px !important; margin:auto !important;}
	table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
	td[class="w49"] { width: 20px !important;}
	.pict img {max-width:408px;  height:auto !important;}
}
</style>

<div id="hikamarket_mail">
...

But it's not working, the background color...
Why the css style isn't working ?

3. Quick question to finish, is it possible to have a "View online" link ? Like with acymailing... ? This question is relative to the first one (0.)...

I'm looking forward to your response,

Best regards,

Please Log in or Create an account to join the conversation.

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
6 years 8 months ago #275849

Hello,

0 - Like that, I can't confirm or deny.
There are different ways to use the vendor registration where you can create a Joomla account in the same time, or not.
So the system act differently depending what it has to create.
It only depends on how it is configured and how you're using it.

1 - You got access to several variables within the email, some are object which gives you access to more content :

$data->vendor_name
$data->vendor->... 
$data->user->...

2 - Sorry but your CSS is wrong.
The main div uses an ID and not a classname ; so your CSS should be written according to that.
In our customization documentation you will be able to find links to other website in order to learn more about CSS :
www.hikashop.com/support/documentation/1...the-display.html#css

3 - In HikaMarket like in HikaShop, there is no setting to get a "view online", mostly because it is not a newsletter component and each email is "unique" (despite a newsletter where almost the same content is sent to a bunch of users).
So if you want that feature, it would require custom development.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 99
  • Thank you received: 0
6 years 8 months ago #275927

Thank you Jerome,

0. I use the Hikashop AcyMailing Plugin, I created a newsletter under acymailing with the alias: "hikashop-user-account". The Acyba team told me to set as alias the name of the Hikashop notification email. Can I do the same for the "Market: Vendor registration" email ? How can I know the alias to use for each emails ?

1. Ok thank you, I forgot to read the Preload section... By the way, the Text version is empty. same in other emails, it is normal? Should I write the text version?

2. Sorry, I forgot to add #, but it still not working, even the p, h1... It works only when the style is in the HTML, I just improved the original code... I use a gmail address to test:

<?php
/**
 * @package    HikaMarket for Joomla!
 * @version    1.7.3
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2017 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><style type="text/css">
body.hikashop_mail { background-color:#dfccbe; color:#40332d; }
#hikamarket_mail { background-color:#dfccbe !important; color:#40332d; }
.ReadMsgBody{width:100%;}
.ExternalClass{width:100%;}

div, p, a, li, td {font-family:'Source Sans Pro', Arial, sans-serif; font-size:13px; color: #40332d !important;/*-webkit-text-size-adjust:none;*/}
 
@media (min-width:600px){
	#hikamarket_mail {width:600px !important;margin:auto !important; background-color:#dfccbe; color:#40332d;}
	.pict img {max-width:500px !important;height:auto !important;}
}
@media (max-width:330px){
	#hikamarket_mail {width:300px !important; margin:auto !important; background-color:#dfccbe; color:#40332d;}
	table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
	td[class="w49"] { width: 10px !important;}
	.pict img {max-width:278px; height:auto !important;}
}
@media (min-width:331px) and (max-width:480px){
	#hikamarket_mail{width:450px !important; margin:auto !important; background-color:#dfccbe; color:#40332d;}
	table[class=w600], td[class=w600], table[class=w598], td[class=w598], table[class=w500], td[class=w500], img[class="w600"]{width:100% !important;}
	td[class="w49"] { width: 20px !important;}
	.pict img {max-width:408px;  height:auto !important;}
}

h3{font-family:'Chewy', cursive, Arial, sans-serif;color:#da1f00!important;font-size:24px;}
h1{font-family:'Chewy', cursive, Arial, sans-serif;color:#da1f00!important;font-size:24px;} 
h2, h4{font-family:'Dancing Script', cursive, Arial, sans-serif;color:#7d6958 !important;font-size:18px;}
h5{color:#dfccbe !important;}
  
a{cursor:pointer; color:#da1f00; text-decoration:none; border:none;font-weight:bold;}
a:visited{cursor:pointer;color:#a53831;}
a:hover {text-decoration: underline;}
</style>

<div id="hikamarket_mail">

	<table class="w600" style="line-height:18px;margin:auto;background-color:#ffffff;" border="0" cellspacing="0" cellpadding="0" width="600" align="center">
		<tr>
			<td class="w600" style="" width="600" align="center">
				<table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;">
					<tr>
						<td class="w20" width="20"></td>
						<td class="w560 pict" style="text-align:left" width="560">
							<div id="title">
<h1>
	{TXT:VENDOR_REGISTRATION}
</h1>
							</div>
						</td>
						<td class="w20" width="20"></td>
					</tr>

<tr>
	<td class="w20" width="20"></td>
	<td>
<div class="w550" width="550" id="content">
	<h3>Hi
     {VAR:vendor_name},</h3>

                              <p>	{TXT:VENDOR_REGISTRATION_BEGIN_MESSAGE}
	
</p>
</div>
						</td>
						<td class="w20" width="20"></td>
					</tr>
				</table>
			</td>
		</tr>
		
		<tr style="background-color:#40332d;">
						<td class="w600" width="600" align="center">
						<h5>© 2017-2020 ...
						</h5>
						</td>
					</tr>
	</table>
</div>

3. Thank you, you're right, it's not really necessary.

Regards,

Please Log in or Create an account to join the conversation.

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
6 years 8 months ago #275936

Hello,

0 - In the HikaShop backend when you want to edit an email you will see a parameter called "name" and it contains the mail name that you want.
HikaMarket email are prefixed with a "market." and I think that you would still need that prefix to use the Acymailing override.

1 - If the text part is empty, HikaShop will convert the HTML content into text.
You can put some content if you want to define a different layout or something more specific, but it's optional.

2 - Thanks for the share !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.064 seconds
Powered by Kunena Forum