SUbscription expiration notice: email are empty

  • Posts: 224
  • Thank you received: 8
5 years 10 months ago #302075

-- HikaShop version -- : 4.0.1
-- HikaSerial version -- : 2.2.0
-- Joomla version -- : 3.9.1

Hello,
my subscription expiration notice email seems to go out empty
emails list: nimb.ws/VgebHn
single email: nimb.ws/21e8Hb
email configs: nimb.ws/yvrOs2
hikaserial configs: nimb.ws/wuK2AM

email code

<?php
/**
 * @package    HikaSerial for Joomla!
 * @version    2.2.0
 * @author     Obsidev S.A.R.L.
 * @copyright  (C) 2011-2018 OBSIDEV. All rights reserved.
 * @license    GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">
	<tr>
		<td class="w20" width="20"></td>
		<td class="w560 pict" style="text-align:left; color:#575757" width="560">
			<div id="title" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;">

<img src="{VAR:LIVE_SITE}/media/com_hikashop/images/icons/icon-48-subscription.png" border="0" alt="" style="float:left;margin-right:4px;"/>
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold; border-bottom:1px solid #ddd; padding-bottom:10px">
	{TXT:MAIL_TITLE}
</h1>

			</div>
		</td>
		<td class="w20" width="20"></td>
	</tr>
	<tr>
		<td class="w20" width="20"></td>
		<td style="border:1px solid #adadad;background-color:#ffffff;">
			<div class="w550" width="550" id="content" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;margin-left:5px;margin-right:5px;">
<p>
	{TXT:HI_USER}
</p>
<p>
	{TXT:SUBSCRIPTION_EXPIRATION_CONTENT}
</p>
			</div>
		</td>
		<td class="w20" width="20"></td>
	</tr>
</table>


custom email template code (using it with all hikashop emails, everything works fine)

justpaste.it/1ur7b

language strings
SUBSCRIPTION_EXPIRATION_NOTICE_SUBJECT="La tua iscrizione sta per scadere - rinnovala con lo sconto del 30%"
SUBSCRIPTION_EXPIRATION_NOTICE_X_DAYS_SUBJECT="La tua iscrizione scadrà tra %d giorni - rinnovala con lo sconto del 30%"
SUBSCRIPTION_EXPIRATION_NOTICE_1_DAY_SUBJECT="La tua iscrizione scadrà tra 1 giorno - rinnovala con lo sconto del 30%"
SUBSCRIPTION_EXPIRATION_NOTICE_CONTENT="<p style='font-size: 16px;'>Ciao,<br />la tua iscrizione a <strong>%s</strong> scadr&agrave; presto,<br /><a href='https://accademiainfinita.it/shop/subscription/listing'><strong>clicca qui</strong> per rinnovarla con uno sconto del 30%</a>.</p><p>Questa iscrizione ti da accesso a tutte le nostre meditazioni guidate,<br />alla nostra collezione di musica a 432 Hz, e un sconto del 20% su tutti<br />i nostri corsi online.</p><p><em>Per rinnovare l'iscrizione, assicurati aver effettuato l'accesso al tuo account <br />altrimenti riceverai un messaggio di errore.<br />Per poter usufruire dello sconto del 30%, devi rinnovarla prima che scada<br />accedendo al cruscotto del tuo shop in questa pagina:<br /></em><em><a href='https://accademiainfinita.it/shop/dashboard/subscription/listing'>https://accademiainfinita.it/shop/dashboard/subscription/listing</a>.<br /></em></p><p>grazie,<br />Accademia Infinita</p>"

the only thing that comes to mind is that the very long language string containing html code is creating a conflict, it look fine in sublime text editor (in the sintax that the highlight doesn0t show any error")

if you also think that this may be the cause of the problem, could you suggest an alternative solution to insert that html code in the email body?
Should I customize the email template where it says {TXT:SUBSCRIPTION_EXPIRATION_CONTENT} ?
I prefer using the language strings than hacking a template, but if this is the best solution please advice.

Thank you!


Thank you

Last edit: 5 years 10 months ago by oloccina.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 10 months ago #302076

Hello,

I would rather recommend you to customize the email in order to add more html content into.
Please note that the SUBSCRIPTION_EXPIRATION_CONTENT is processed by the "preload" part of the email in order to handle the dynamic part of the content ; the information for when the subscription will expire.
So it would be better to add your extra content via customization and some extra translations if you want to have multiple languages for your email.

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: 224
  • Thank you received: 8
5 years 10 months ago #302141

Hello,
the email content now is there as I have customized the template directly
but I still have a couple of issues:

1 - the email subject is empty

in the email template the subject is indeed empty (see: nimb.ws/ZUwT9a ), but I have the below language strings in place in my language file and I thought it would be created dinamically

SUBSCRIPTION_EXPIRATION_NOTICE_SUBJECT="La tua iscrizione sta per scadere - rinnovala con lo sconto del 30%"
SUBSCRIPTION_EXPIRATION_NOTICE_X_DAYS_SUBJECT="La tua iscrizione scadrà tra %d giorni - rinnovala con lo sconto del 30%"
SUBSCRIPTION_EXPIRATION_NOTICE_1_DAY_SUBJECT="La tua iscrizione scadrà tra 1 giorno - rinnovala con lo sconto del 30%"

isn't this what the "preload" part of the template should do? (I haven't touched anything there)
html version: justpaste.it/46pla
preload version: justpaste.it/5pcro

2 - the template surrounding the email is still hikashop default one, even if I have selected a custom one (see: nimb.ws/ZUwT9a )
I am using this custom template for all hikashop email and it works, it's just for hikaserial subscription notices that it doesn't work

custom template code: justpaste.it/5fkve

thank you

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 10 months ago #302157

Hello,

I cannot reproduce your issue in my local website.

The only way I found to get an email with an empty subject and empty content, is to perform a modification in the HikaSerial core and remove the modification of the "mail_folder" when the email is loaded by the HikaSerial mail class.
Because the email is not loaded (no html, no preload), there is only an empty content from the parameters of the email.
Since the subject is generated dynamically by the preload, if the preload is not called, the email cannot have a subject.

Because you're using HikaSerial 2.2.0 and HikaSerial 4.0.1 ; I would recommend you to update to HikaSerial 3.0
www.hikashop.com/support/documentation/1...erial-changelog.html

In the mean time, I'll continue my investigation regarding the issue and perform further tests for the support of email templates.

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: 224
  • Thank you received: 8
5 years 10 months ago #302166

Thanks Jerome,
I'll update , make more tests and let you now.
It's not urgent since for now I just pasted a subject in the mail subject field in the notification configs and the fact that the notification is still using Hikashop default email template is not an urgent matter.

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

  • Posts: 224
  • Thank you received: 8
5 years 10 months ago #302218

Hello again,
I updated to the latest version and run more tests in the last few days.
I still have these issues:

1 - the email subject is empty
2 - the template surrounding the email is still hikashop default one, even if I have selected a custom one

as for now I don't now what else to do, so I'll just put a subject line in the mail subject field in the notification configs

let me know if you are able to solve the issue (I can provide access to a test site if you need)

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 10 months ago #302247

Hello,

The template can be caused by the folders structure since HikaSerial emails are not in the HikaShop mail folder.
I have submit a patch in the HikaShop core to be able to not force the modification of the mail folder (so HikaShop would still find HikaSerial emails).
That patch would be in the next HikaShop release and then I would be able to release a new HikaSerial version to handle that.

Regarding the empty subject, I really don't understand how it could be possible since last lines in the "preload" are setting the subject to the email object.
So it would mean that the variable "MAIL_TITLE" is empty too OR the preload is never called (but in its case, you wouldn't have any dynamic content in the email).

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.068 seconds
Powered by Kunena Forum