[Free Module] Mail Alerts 2.3 - Free Modules & Themes - PrestaShop

Jump to content

Photo

[Free Module] Mail Alerts 2.3

mail alerts mail alerts 2.3

#1

Posted 03 October 2011 - 06:33 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts
Hi,

I find quite interesting the Mail Alerts module but wanted one feature more. I looked for a new version but didn't found it. So I've developed it.

(Edit: This module works for PrestaShop 1.3.2. I don't know if it works for other versions, but some people have said that it doesn't work on PS 1.4.)

The extra feature I wanted was that I got noticed when a customer set a new alert to be noticed when a sold out product was available again.

I've also change some things more. Here all the updates:

Mail Alerts 2.3

- Email addresses may be set in the module configuration at back office to notify them when a customer set a new alert to be noticed when a sold out product is available again. Leave blank for no email notification.

- Fixed the product quantity error with the {qty} variable in the productoutofstock.html email. It was displaying only 0 or 1, consequence of a bad sintax in a condition.

- Customized as a translation the no-email "your@email.com", that was hardcoded.

- The new order notification displays the order date and time, and not only the order date.

- A minus ('-') is displayed before the total discounts, as they were displayed as positive. If you want to remove it, go to the '{total_discounts}' set, in mailalerts.php.

Mail Alerts 2.3.2

- Fixed the problem with some payment methods, like PayPal. The out-of-stock email was not sent if a customer paid with PayPal. A cookie issue.

Attached Files



#2

Posted 03 October 2011 - 06:41 PM

ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1405 Active Posts
Thanks AMS777 for sharing your updated Mail Alerts module, nice features you added.

Regards,

ysco..

#3

Posted 03 October 2011 - 06:49 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts
Thanx for the comment, ysco :)

#4

Posted 03 October 2011 - 08:12 PM

jolvil

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2888 Active Posts
Thank you but you should tell wich Prestashop version !
PS 1.3.7.0

#5

Posted 04 October 2011 - 10:00 AM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

Thank you but you should tell wich Prestashop version !


I have used PrestaShop 1.3.2, but I looked for new versions of the Mail Alerts module and found nothing. So I guessed there was no new version of the module since Mail Alerts 2.2 and if you have this version running, the new one should run ok too.

#6

Posted 04 October 2011 - 11:53 AM

ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1405 Active Posts
Hello AMS777

I just looked and compared the versions off mailalert module from PS 1.3.2.3 and PS 1.4.4 but there are a lot off differences between these versions.
I suggest that you better update the module to the latest version off prestashop ;)

Regards,

ysco..

#7

Posted 04 October 2011 - 01:12 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts
Oh, I see...

Yes, it would be better to update the module to the latest version, but I can't do it right now. For that reason I looked for the latest version of Mail Alerts, but I didn't find it separately from the whole installation. So I couldn't try it.

So, then, this Mail Alerts module is only tried for PrestaShop 1.3.2. I don't know if it works on PrestaShop 1.4.

#8

Posted 04 October 2011 - 02:00 PM

ysco

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1405 Active Posts
@ AMS777

Maybe it works but there are to much differences between 1.3.x and 1.4.x , well it would be nice when you have the time to update the module to the latest version some day ;)

Regards,

ysco..

#9

Posted 05 October 2011 - 09:07 AM

need4speed

    PrestaShop Apprentice

  • Members
  • PipPip
  • 300 Active Posts
My standard mail alert system in 1.3.1 does not work any longer.
Is this module a fresh new module that might whould fix my problem that im not recieving any mail alerts?
Orango tilbyder ny hjemmeside med brugervenligt CMS system, som er søgeoptimeret. Vores webdesigner tilbyder kreative og brugervenlige webdesign og Prestashop webshops.

#10

Posted 05 October 2011 - 10:58 AM

haylau

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1021 Active Posts
This is just what I was looking for because as a manufacturer, we may often be out of stock but cn make in days, so knowing what people are needing is vital

We have version 1.4.4.1 prestashop, but I installed anyway

And it seems to work - nearly. I got the notification with the product iD on it so I can work from that. The title does not coe through though - shame, but at least I can use the info given
Many thanks


A customer has asked for a notification when a product is available again.

Customer id: 0

Customer email: haylau@gmail.com

Product id: 4468

Product name:

Product attribute id: 0

Alert already registered: No

Regards, Ron:
Look for our websites at www.graphskill.co.uk, www.u-bolts-r-us.co.uk and www.shackles-r-us.co.uk


#11

Posted 05 October 2011 - 12:05 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

My standard mail alert system in 1.3.1 does not work any longer.
Is this module a fresh new module that might whould fix my problem that im not recieving any mail alerts?


This is not a new fresh module. It is based on the previous version of the module, Mail Alerts 2.2, which is the version that comes with PrestaShop 1.3.2. I don't know if it can fix your problem.

#12

Posted 05 October 2011 - 12:21 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

This is just what I was looking for because as a manufacturer, we may often be out of stock but cn make in days, so knowing what people are needing is vital


That was the idea :)

And it seems to work - nearly. I got the notification with the product iD on it so I can work from that. The title does not coe through though - shame, but at least I can use the info given
Many thanks


Let's take a look at this and see if we can fix it.

The data for the email notifying that a customer has set a new product-available notification is gotten in product.tpl (the template inside /mailalerts). There go to the addNotification() javascript function, which makes an Ajax call. The data are taken here, concretely:

		    data: 'id_product={/literal}{$id_product}{literal}&name_product='
			    +$('h1').text()+'&id_product_attribute='+$('#idCombination').val()
			    +'&customer_email='+$('#oos_customer_email').val()
			    +'&no_email='+$('#oos_no_email').val(),

Well, as you can see, the product name is taken here from the html code. In the PS version 1.3.2, it is within h1 tags. Please, look into your PS version to find out what wrapps the product name, and you can adapt the module code here.

I'd also like to explain some piece of information that appears in the new-product-available-alert email notification:

Alert already registered: No

This datum has no sense for a logged customer, as they cannot register an alert for the same product twice. But a non logged customer may register an alert for the same product multiple times. Though, it will be stored in database only once. But you get this information. This might mean that that customer is very interested on that product.

#13

Posted 09 October 2011 - 03:12 PM

kiamaru

    PrestaShop Apprentice

  • Members
  • PipPip
  • 326 Active Posts
hi

when i put this module in my prestashop version 1.3.1.1, my module page not be displaying. i need this module work, can you help me?

the standard modules doesn't work (when i click un the link for have alert when the product become avaible, nothing happens)
thx
On avait oublié de lui dire que c'était impossible, et lui comme un con, il a fait.
villageafro.com - Toute l'afrique en 1 Clic

#14

Posted 09 October 2011 - 06:00 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

hi

when i put this module in my prestashop version 1.3.1.1, my module page not be displaying. i need this module work, can you help me?

the standard modules doesn't work (when i click un the link for have alert when the product become avaible, nothing happens)
thx


Hi,

I'm sorry, I don't know why it isn't working for PS 1.3.1. I just have 1.3.2 installed. I recommend you to compare the Mail Alert module of PS 1.3.1 and 1.3.2. There must be a big different between both versions, if it breaks like that.

If you want, you can send me the Mail Alert module of PS 1.3.1 so that I can take a look to it. But I can't guarantee anything.

#15

Posted 09 October 2011 - 06:11 PM

kiamaru

    PrestaShop Apprentice

  • Members
  • PipPip
  • 326 Active Posts
hi, i send you the link to MP. thx
On avait oublié de lui dire que c'était impossible, et lui comme un con, il a fait.
villageafro.com - Toute l'afrique en 1 Clic

#16

Posted 09 October 2011 - 07:46 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

hi, i send you the link to MP. thx


I'm afraid I don't know where is the problem. I guess it must be on mailalerts.php, maybe in the _postProcess() function.

A question: When you "put" the new module on your PrestaShop, do you install it or just copy it? It must be installed, as new properties are created in the database.

I see some differences between the module in Mail Alerts 2.3 and PrestaShop 1.3.1, for example:

 
(MA 2.3) if ($this->_customer_qty AND $params['product']['quantity'] > 0)
(PS 1.3.1) if ($this->_customer_qty AND $params['product']->quantity > 0)
 
(MA 2.3) $this->sendCustomerAlert(intval($params['product']['id']), 0);
(PS 1.3.1) $this->sendCustomerAlert(intval($params['product']->id), 0);

'product' is accessed as an array or as an object. But I think it is fixed with this statement in MA 2.3:

		if (is_object($params['product']))
 
			$params['product'] = get_object_vars($params['product']);	

There are other differences like this one:

 
'{product}' => (is_array($product->name) ? $product->name[intval(Configuration::get('PS_LANG_DEFAULT'))] : $product->name),
 
'{product}' => strval($product->name[intval(Configuration::get('PS_LANG_DEFAULT'))]),

But I doubt it may be a problem.

First try to install the module, if you hadn't done it.

If it doesn't work, I'm afraid you have to compare the files of both versions with a file comparer and try changes in Mail Alerts 2.3 to adapt it to your PrestaShop version.

If you don't get it to work and you really want that functionality of Mail Alerts 2.3, you have to apply every change of Mail Alerts 2.3 to your Mail Alerts version. If you are going to do this, I can tell you some guidelines, so you can go direct to the points where the code was changed.

Good luck.

#17

Posted 09 October 2011 - 08:00 PM

kiamaru

    PrestaShop Apprentice

  • Members
  • PipPip
  • 326 Active Posts
i uninstall the 2.2 module anfd install your, but i can't to acces to module page after. the page is empty.

i will be try tp change the line ou give me and i hop this make module 2.2 functionnelly
On avait oublié de lui dire que c'était impossible, et lui comme un con, il a fait.
villageafro.com - Toute l'afrique en 1 Clic

#18

Posted 15 October 2011 - 08:12 PM

cyjambo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 31 Active Posts
Hi AMS777,

Thanks for the update, I don't know if anyone else is having this issue, but when I upload your update the page is blank in Your account/My Alerts for the users. I am using PS 1.4.4.1. If I change back to the original module, the My Alerts page is showing fine for the users.

Any ideas why this would happen?

Thanks and keep up the good work! :)

#19

Posted 15 October 2011 - 09:22 PM

AMS777

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts

Hi AMS777,

Thanks for the update, I don't know if anyone else is having this issue, but when I upload your update the page is blank in Your account/My Alerts for the users. I am using PS 1.4.4.1. If I change back to the original module, the My Alerts page is showing fine for the users.

Any ideas why this would happen?

Thanks and keep up the good work! :)


Hi cyjambo,

Thanks for the comments :)

Yes, unfortunately this module seems to work only for PrestaShop 1.3.2. I don't know if it works for other versions, but some people have said that it doesn't work on PS 1.4.

Sorry, I can't develop it for PS 1.4 right now. It'll have to wait.

#20

Posted 23 February 2012 - 02:38 AM

rossoneri7

    PrestaShop Newbie

  • Members
  • Pip
  • 4 Active Posts
Hi AMS777,

can you add a feature to display price without tax and put the tax in separate line (for example after products subtotal) in mail alerts?
Thank you.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more