Uipl_Stockalert - Version 1.0.0.2

Version Notes

After installation of this module you should enable cron job at cpanel for magento.

Download this release

Release Info

Developer Ujjal
Extension Uipl_Stockalert
Version 1.0.0.2
Comparing to
See all releases


Code changes from version 1.0.0.1 to 1.0.0.2

app/code/community/Uipl/Stockalert/Model/Cron.php CHANGED
@@ -33,7 +33,7 @@ class Uipl_Stockalert_Model_Cron{
33
  $expro .='</table>';
34
 
35
  $email_to=Mage::getStoreConfig('trans_email/ident_sales/email');
36
-
37
  $email_template_variables = array(
38
  'alertGrid' => $expro,
39
 
@@ -50,7 +50,7 @@ class Uipl_Stockalert_Model_Cron{
50
 
51
  $processedTemplate = $emailTemplate->getProcessedTemplate($email_template_variables);
52
 
53
- $emailTemplate->send($email_to,'Product Stock Alert Notification', $email_template_variables);
54
 
55
 
56
 
33
  $expro .='</table>';
34
 
35
  $email_to=Mage::getStoreConfig('trans_email/ident_sales/email');
36
+ $email_to .=",".Mage::getStoreConfig('general/stockalert/otheremails');
37
  $email_template_variables = array(
38
  'alertGrid' => $expro,
39
 
50
 
51
  $processedTemplate = $emailTemplate->getProcessedTemplate($email_template_variables);
52
 
53
+ $emailTemplate->send($email_to,'Product Low Stock Notification', $email_template_variables);
54
 
55
 
56
 
app/code/community/Uipl/Stockalert/Model/Observer.php CHANGED
@@ -30,7 +30,7 @@ class Uipl_Stockalert_Model_Observer {
30
  $qtyStock=$qtyStock-$orderqty;
31
  if($num<=$qtyStock){
32
  $email_to=Mage::getStoreConfig('trans_email/ident_sales/email');
33
-
34
  $emailTemplate = Mage::getModel('core/email_template')
35
  ->loadDefault('outofstock_email_template');
36
 
@@ -59,9 +59,10 @@ class Uipl_Stockalert_Model_Observer {
59
  $emailTemplate->setSenderName($sender_name);
60
  $emailTemplate->setSenderEmail( $sender_email);
61
 
62
- $processedTemplate = $emailTemplate->getProcessedTemplate($email_template_variables);
63
-
64
- $emailTemplate->send($email_to,'Product Stock Alert Notification', $email_template_variables);
 
65
 
66
 
67
  }
30
  $qtyStock=$qtyStock-$orderqty;
31
  if($num<=$qtyStock){
32
  $email_to=Mage::getStoreConfig('trans_email/ident_sales/email');
33
+ $email_to .=",".Mage::getStoreConfig('general/stockalert/otheremails');
34
  $emailTemplate = Mage::getModel('core/email_template')
35
  ->loadDefault('outofstock_email_template');
36
 
59
  $emailTemplate->setSenderName($sender_name);
60
  $emailTemplate->setSenderEmail( $sender_email);
61
 
62
+ echo $processedTemplate = $emailTemplate->getProcessedTemplate($email_template_variables);
63
+ echo $email_to;
64
+ exit;
65
+ $emailTemplate->send($email_to,'Product Low Stock Notification', $email_template_variables);
66
 
67
 
68
  }
app/code/community/Uipl/Stockalert/etc/system.xml CHANGED
@@ -28,6 +28,16 @@
28
  <show_in_store>1</show_in_store>
29
  <comment>Enable this extension to run stock alert notification.</comment>
30
  </active>
 
 
 
 
 
 
 
 
 
 
31
 
32
  </fields>
33
  </stockalert>
28
  <show_in_store>1</show_in_store>
29
  <comment>Enable this extension to run stock alert notification.</comment>
30
  </active>
31
+
32
+ <otheremails translate="label">
33
+ <label>Emails</label>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>2</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <comment>Please enter email address to send copy to multiple users seperated by comma.</comment>
40
+ </otheremails>
41
 
42
  </fields>
43
  </stockalert>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Uipl_Stockalert</name>
4
- <version>1.0.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Out of stock alert for admin</summary>
10
  <description>This module will generate out of stock alert notification for admin when product goes below minimum stock.</description>
11
  <notes>After installation of this module you should enable cron job at cpanel for magento.</notes>
12
  <authors><author><name>Ujjal Dutta</name><user>ujjaldutta</user><email>ujjal.dutta.pro@gmail.com</email></author></authors>
13
- <date>2015-03-06</date>
14
- <time>14:19:18</time>
15
- <contents><target name="magecommunity"><dir name="Uipl"><dir name="Stockalert"><dir name="Model"><file name="Cron.php" hash="d75fe9ceeb5e9f9a4b6fd538c662b8d3"/><file name="Observer.php" hash="446283f53d2d55004c0cf69320ce366b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d39956779ec5c37a2cff0bf04c70729d"/><file name="config.xml" hash="51c340059949d28e9cfe791b18e0cb16"/><file name="system.xml" hash="ac3ac618bc2215ef914add4cdac30b77"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="admin_stock_alert.html" hash="14fc57366851be80b061cf29356794eb"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Uipl_Stockalert.xml" hash="c441dfaa4fcc00683f7541f730345c0c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Uipl_Stockalert</name>
4
+ <version>1.0.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Low Stock Notification</summary>
10
  <description>This module will generate out of stock alert notification for admin when product goes below minimum stock.</description>
11
  <notes>After installation of this module you should enable cron job at cpanel for magento.</notes>
12
  <authors><author><name>Ujjal Dutta</name><user>ujjaldutta</user><email>ujjal.dutta.pro@gmail.com</email></author></authors>
13
+ <date>2015-10-29</date>
14
+ <time>14:52:08</time>
15
+ <contents><target name="magecommunity"><dir name="Uipl"><dir name="Stockalert"><dir name="Model"><file name="Cron.php" hash="6ad38b494f7573d7c986a006a382ee23"/><file name="Observer.php" hash="ba703cec79a8580bc49cb1c17594b76b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d39956779ec5c37a2cff0bf04c70729d"/><file name="config.xml" hash="51c340059949d28e9cfe791b18e0cb16"/><file name="system.xml" hash="ef575d85bf311bf2f11727ba7a651d61"/></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="admin_stock_alert.html" hash="14fc57366851be80b061cf29356794eb"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Uipl_Stockalert.xml" hash="c441dfaa4fcc00683f7541f730345c0c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>