Hi
Has anyone used this extension.
https://www.opencart.com/index.php?rout ... _license=0
It does a good job but does not seem to complete the task and whilst it acknowledges the unsubscribe with the correct message it does not clear the entry box after a new email nor issue a success message. It does add the email to the database. Have tried to contact the author but no success. Any ideas?
Thanks
Has anyone used this extension.
https://www.opencart.com/index.php?rout ... _license=0
It does a good job but does not seem to complete the task and whilst it acknowledges the unsubscribe with the correct message it does not clear the entry box after a new email nor issue a success message. It does add the email to the database. Have tried to contact the author but no success. Any ideas?
Thanks
Yes I understand that but the coding and referencing within the module are not in conflict with OC version, as far as I can see. As I say the module slots into place and runs up until the execution of the end command. I noted that back in Apr another user posted the same issue but followed it up with a quote he had 'fixed it' but frustratingly he did not say how! By the way I have other version modules running on my version that are 2x.
Yeah sorry for the late reply...
I installed this on a fresh default 2.0.3.1 version and it seems to be ok, not sure what im supposed to be looking for but the messages appear and email clears when subscribing and unsubscribing
I installed this on a fresh default 2.0.3.1 version and it seems to be ok, not sure what im supposed to be looking for but the messages appear and email clears when subscribing and unsubscribing
Another thing to add is this looks ok in "content bottom" but wont fit in left or right column layout
Also am getting error message:
so looking into that
EDIT: in said file on line 42 you have
I changed it to and no more error message and all still works
Also am getting error message:
so looking into that

EDIT: in said file on line 42 you have
Code: Select all
<div class="row" id="newsletter<?php echo $module; ?>">
Code: Select all
<div class="row" id="newsletter">
Thanks for that.
I tried the change but no effect. Despite the appearance that everything is similar in structure to the different OC versions there is obviously a difference as you originally wrote. Will investigate further.
Thanks
I tried the change but no effect. Despite the appearance that everything is similar in structure to the different OC versions there is obviously a difference as you originally wrote. Will investigate further.
Thanks
Hi
Have checked everything and there is no reason obvious as to why the extension is not functioning correctly. When I unsubscribe it's fine. When I immediately subscribe another email without cancelling the message I get the following : The message does not disappear and no success message appears BUT the email does get posrted!
Then in a fresh entering of an email I get after 'Loading' appears: Again no success message BUT the email does get posted.
The .tpl scrip appears fine:
and the calling code also seems fine:
The
does work BUT the
does not.
I have tried to contact the author directly and through other posts but no response. So I am stumped.

Have checked everything and there is no reason obvious as to why the extension is not functioning correctly. When I unsubscribe it's fine. When I immediately subscribe another email without cancelling the message I get the following : The message does not disappear and no success message appears BUT the email does get posrted!
Then in a fresh entering of an email I get after 'Loading' appears: Again no success message BUT the email does get posted.
The .tpl scrip appears fine:
Code: Select all
<script language="javascript">
jQuery(document).ready(function($) {
$('#lt_newsletter_form').submit(function(){
$.ajax({
type: 'post',
url: '<?php echo $action; ?>',
data:$("#lt_newsletter_form").serialize(),
dataType: 'json',
beforeSend: function() {
$('.btn-newsletter').attr('disabled', true).button('loading');
},
complete: function() {
$('.btn-newsletter').attr('disabled', false).button('reset');
},
success: function(json) {
$('.alert, .text-danger').remove();
$('.form-group').removeClass('has-error');
if (json.error) {
$('#lt_newsletter_module').after('<div class="alert alert-danger newsletter-msg">' + json.error + '<button type="button" class="close" data-dismiss="alert">×</button></div>');
} else {
$('#lt_newsletter_module').after('<div class="alert alert-success newsletter-msg">' + json.success + '<button type="button" class="close" data-dismiss="alert">×</button></div>');
$('#lt_newsletter_email').val('');
}
}
});
return false;
});
});
</script>
Code: Select all
public function subscribe()
{
$this->load->language('module/lt_newsletter');
$this->load->model('module/lt_newsletter');
if (($this->request->server['REQUEST_METHOD'] == 'POST'))
{
$email = $this->request->post['lt_newsletter_email'];
if ((utf8_strlen($email) > 96) || !preg_match('/^[^\@]+@.*.[a-z]{2,15}$/i', $email)) {
$json['error'] = $this->language->get('error_invalid');
}
else{
$row = $this->model_module_lt_newsletter->row($email);
if($row)
{
$this->model_module_lt_newsletter->unsubscribe($email);
$json['success'] = $this->language->get('text_unsubscribed');
}
else{
$this->model_module_lt_newsletter->subscribe($email);
$json['success'] = $this->language->get('text_subscribed');
Code: Select all
$this->model_module_lt_newsletter->unsubscribe($email);
$json['success'] = $this->language->get('text_unsubscribed');
Code: Select all
$this->model_module_lt_newsletter->subscribe($email);
$json['success'] = $this->language->get('text_subscribed');
I have tried to contact the author directly and through other posts but no response. So I am stumped.

Well as long as all the files were uploaded correctly then i can only assume that another mod/extension is conflicting with it somehow as it works as it should on a default 2.0.3.1 with no extra extensions/mods installed
Depending on how many extra mods you have installed you could disable them one at a time and retry the newsletter module until you come across the culprit. Remember to refresh each time though
Depending on how many extra mods you have installed you could disable them one at a time and retry the newsletter module until you come across the culprit. Remember to refresh each time though

Who is online
Users browsing this forum: No registered users and 4 guests