Version Notes
+ message box in order
+ change status code to status name in sms
+ add sms at status "pending"
Download this release
Release Info
Developer | SMSAPI |
Extension | Smsapi_Sms |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
- app/code/community/Smsapi/Sms/Block/Adminhtml/System/Config/Fieldset/Branding.php +1 -1
- app/code/community/Smsapi/Sms/Block/sales/order/view/Info.php +5 -0
- app/code/community/Smsapi/Sms/Model/Observer.php +105 -103
- app/code/community/Smsapi/Sms/controllers/IndexController.php +62 -0
- app/code/community/Smsapi/Sms/etc/config.xml +58 -42
- app/code/community/Smsapi/Sms/etc/system.xml +20 -1
- app/design/adminhtml/base/default/layout/Smsapi_Sms.xml +0 -9
- app/design/adminhtml/base/default/template/sms/system/config/fieldset/branding.phtml +0 -8
- app/design/adminhtml/default/default/layout/smsapi_sms.xml +7 -0
- app/design/adminhtml/default/default/template/sms/sales/order/view/info.phtml +280 -0
- app/locale/pl_PL/Smsapi_Sms.csv +7 -1
- js/smsapi/sms/counter.js +0 -83
- package.xml +11 -9
- skin/adminhtml/base/default/images/smsapi/sms/smsapi_logo.jpg +0 -0
app/code/community/Smsapi/Sms/Block/Adminhtml/System/Config/Fieldset/Branding.php
CHANGED
@@ -14,7 +14,7 @@ class Smsapi_Sms_Block_Adminhtml_System_Config_Fieldset_Branding
|
|
14 |
*/
|
15 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
16 |
{
|
17 |
-
$elementOriginalData = $element->getOriginalData();
|
18 |
return $this->toHtml();
|
19 |
}
|
20 |
}
|
14 |
*/
|
15 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
16 |
{
|
17 |
+
$elementOriginalData = $element->getOriginalData();
|
18 |
return $this->toHtml();
|
19 |
}
|
20 |
}
|
app/code/community/Smsapi/Sms/Block/sales/order/view/Info.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Smsapi_Sms_Block_Sales_Order_View_Info extends Mage_Adminhtml_Block_Sales_Order_View_Info
|
4 |
+
{
|
5 |
+
}
|
app/code/community/Smsapi/Sms/Model/Observer.php
CHANGED
@@ -7,160 +7,162 @@
|
|
7 |
* @copyright Copyright (c) 2012 Smsapi (http://smsapi.pl/)
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
* @author Marek Jasiukiewicz <dev@jasiukiewicz.pl>
|
10 |
-
* ...
|
11 |
-
*/
|
12 |
-
class Smsapi_Sms_Model_Observer
|
13 |
-
|
|
|
14 |
/**
|
15 |
-
*
|
16 |
* @param type $observer
|
17 |
* @return type
|
18 |
*/
|
19 |
-
|
20 |
-
public function handleStatus($observer) {
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
$order = $observer->getEvent()->getOrder();
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
|
36 |
|
37 |
-
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
$last_tracking_number = 'no_tracking'; //if no tracking number set "no_tracking" message for {TRACKINGNUMBER} template
|
46 |
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
|
53 |
-
|
54 |
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
|
63 |
-
|
64 |
|
65 |
|
|
|
|
|
66 |
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
-
//prepare sms content
|
71 |
-
$msg['recipient'] = $address->getData('telephone'); //or getBillingAddress
|
72 |
-
$msg['message'] = $message;
|
73 |
-
$msg['eco'] = $config->isEco(); //eco version - without sender
|
74 |
-
$msg['test'] = $config->testMode();
|
75 |
-
$msg['single_message'] = $config->isSingle(); //allow_long_sms
|
76 |
-
$msg['sender'] = $config->getSender();//sender
|
77 |
|
|
|
78 |
|
79 |
-
|
80 |
|
81 |
-
|
|
|
|
|
82 |
|
83 |
-
$response = $api->msgContent($msg)->send();
|
84 |
-
$newComment = Mage::helper('sms')->__('SMS notification sent (SMS id:').$response->response[0]->id.') ' ;
|
85 |
-
$order->addStatusToHistory($newStatus,$newComment,true);
|
86 |
|
|
|
|
|
|
|
|
|
87 |
|
88 |
-
|
89 |
-
$newComment = Mage::helper('sms')->__('SMS notification sending error: "').$e->getMessage().'"';
|
90 |
-
$order->addStatusToHistory($newStatus,$newComment,false);
|
91 |
-
}
|
92 |
|
93 |
-
$this->checkPointsLimit(); //check
|
94 |
|
|
|
|
|
|
|
95 |
|
96 |
-
} catch ( Exception $e ) {
|
97 |
-
Mage::log('exception'.$e->getMessage());
|
98 |
-
}
|
99 |
-
|
100 |
}
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
/**
|
105 |
* Generating alert notification if SMSAPI account balance is low
|
106 |
-
*
|
107 |
* @return none
|
108 |
*/
|
109 |
-
|
110 |
-
function checkPointsLimit()
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
116 |
$limit = $config->pointsAllertLimit();
|
117 |
-
|
118 |
-
if ($limit==0) return; //If limit allert is turned off
|
119 |
-
|
120 |
-
|
121 |
try {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
}
|
133 |
-
|
134 |
-
Mage::log('SMSAPI: '.$e->getMessage());
|
135 |
}
|
136 |
-
|
137 |
}
|
138 |
-
|
139 |
/**
|
140 |
* Check SMSAPI authorization data (login/password)
|
141 |
* and throw error notification to admin panel
|
142 |
-
*
|
143 |
* @return none
|
144 |
*/
|
145 |
-
public function checkAuthorizationData()
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
149 |
if ($config->getApiLogin() && $config->getApiPassword()) {
|
150 |
-
|
151 |
try {
|
152 |
$api = Mage::getModel('sms/apiClient');
|
153 |
$api->connect()->getPoints();
|
154 |
-
}
|
155 |
-
catch (Exception $e) {
|
156 |
Mage::getSingleton('core/session')->addError(Mage::helper('sms')->__('SMSAPI: Wrong Password and/or Username'));
|
157 |
}
|
158 |
}
|
159 |
-
|
160 |
-
|
161 |
}
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
}
|
7 |
* @copyright Copyright (c) 2012 Smsapi (http://smsapi.pl/)
|
8 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
9 |
* @author Marek Jasiukiewicz <dev@jasiukiewicz.pl>
|
10 |
+
* ...
|
11 |
+
*/
|
12 |
+
class Smsapi_Sms_Model_Observer
|
13 |
+
{
|
14 |
+
|
15 |
/**
|
16 |
+
*
|
17 |
* @param type $observer
|
18 |
* @return type
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
public function handleStatus($observer)
|
22 |
+
{
|
23 |
+
|
24 |
+
$config = Mage::getModel('sms/config');
|
25 |
+
if ($config->isApiEnabled() == 0)
|
26 |
+
return; //do nothing if api is disabled
|
27 |
|
28 |
$order = $observer->getEvent()->getOrder();
|
29 |
+
$stateCode = $order->getStatus();
|
30 |
+
$statuses = Mage::getResourceModel('sales/order_status_collection')
|
31 |
+
->toOptionHash();
|
32 |
+
|
33 |
+
$newStatus = $statuses[$stateCode];
|
34 |
+
|
35 |
+
if (Mage::registry($stateCode . '_executed') == true)
|
36 |
+
return;
|
37 |
|
38 |
+
Mage::register($stateCode . '_executed', true);
|
39 |
+
$message = $config->getMessageTemplate($stateCode); //get template for new status (if active and exists)
|
40 |
+
if (!$message) //return if no active message template
|
41 |
+
return;
|
42 |
|
43 |
|
44 |
+
//getting last tracking number
|
45 |
+
$trackings = Mage::getResourceModel('sales/order_shipment_track_collection')->setOrderFilter($order)->getData();
|
46 |
|
47 |
+
if (!empty($trackings)) {
|
48 |
+
$last = count($trackings) - 1;
|
49 |
+
$last_tracking_number = $trackings[$last]['track_number'];
|
50 |
+
} else
|
51 |
+
$last_tracking_number = 'no_tracking'; //if no tracking number set "no_tracking" message for {TRACKINGNUMBER} template
|
|
|
52 |
|
53 |
|
54 |
+
$address = $order->getShippingAddress();
|
55 |
+
if (!$address)
|
56 |
+
$address = $order->getBillingAddress();
|
57 |
|
58 |
|
59 |
+
try { //try to send message
|
60 |
|
61 |
|
62 |
+
//getting order data to generate message template
|
63 |
+
$messageOrderData['{NAME}'] = $address->getData('firstname');
|
64 |
+
$messageOrderData['{ORDERNUMBER}'] = $order->getIncrement_id();
|
65 |
+
$messageOrderData['{ORDERSTATUS}'] = $newStatus;
|
66 |
+
$messageOrderData['{TRACKINGNUMBER}'] = $last_tracking_number;
|
67 |
+
$messageOrderData['{STORENAME}'] = $config->getApiStoreName();
|
68 |
|
69 |
+
$message = strtr($message, $messageOrderData);
|
70 |
|
71 |
|
72 |
+
$api = Mage::getModel('sms/apiClient');
|
73 |
+
$api->connect();
|
74 |
|
75 |
+
//prepare sms content
|
76 |
+
$msg['recipient'] = $address->getData('telephone'); //or getBillingAddress
|
77 |
+
$msg['message'] = $message;
|
78 |
+
$msg['eco'] = $config->isEco(); //eco version - without sender
|
79 |
+
$msg['test'] = $config->testMode();
|
80 |
+
$msg['single_message'] = $config->isSingle(); //allow_long_sms
|
81 |
+
$msg['sender'] = $config->getSender();//sender
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
+
//sending sms and getting API response
|
85 |
|
86 |
+
try {
|
87 |
|
88 |
+
$response = $api->msgContent($msg)->send();
|
89 |
+
$newComment = Mage::helper('sms')->__('SMS notification sent (SMS id:') . $response->response[0]->id . ') ';
|
90 |
+
$order->addStatusToHistory($newStatus, $newComment, true);
|
91 |
|
|
|
|
|
|
|
92 |
|
93 |
+
} catch (Exception $e) {
|
94 |
+
$newComment = Mage::helper('sms')->__('SMS notification sending error: "') . $e->getMessage() . '"';
|
95 |
+
$order->addStatusToHistory($newStatus, $newComment, false);
|
96 |
+
}
|
97 |
|
98 |
+
$this->checkPointsLimit(); //check
|
|
|
|
|
|
|
99 |
|
|
|
100 |
|
101 |
+
} catch (Exception $e) {
|
102 |
+
Mage::log('exception' . $e->getMessage());
|
103 |
+
}
|
104 |
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
+
|
107 |
+
|
|
|
108 |
/**
|
109 |
* Generating alert notification if SMSAPI account balance is low
|
110 |
+
*
|
111 |
* @return none
|
112 |
*/
|
113 |
+
|
114 |
+
function checkPointsLimit()
|
115 |
+
{
|
116 |
+
|
117 |
+
$config = Mage::getModel('sms/config');
|
118 |
+
if ($config->isApiEnabled() == 0) return; //do nothing if api is disabled
|
119 |
+
|
120 |
+
|
121 |
$limit = $config->pointsAllertLimit();
|
122 |
+
|
123 |
+
if ($limit == 0) return; //If limit allert is turned off
|
124 |
+
|
125 |
+
|
126 |
try {
|
127 |
+
|
128 |
+
$api = Mage::getModel('sms/apiClient');
|
129 |
+
$api->connect();
|
130 |
+
$res = $api->getPoints();
|
131 |
+
|
132 |
+
if ($res->points < $limit) { //alert admin if API account balance is lower than $limit
|
133 |
+
|
134 |
+
Mage::getSingleton('core/session')->addError(Mage::helper('sms')->__($config::LOW_POINTS_WARNING_MESSAGE));
|
135 |
+
|
136 |
+
}
|
137 |
+
} catch (Exception $e) {
|
138 |
+
Mage::log('SMSAPI: ' . $e->getMessage());
|
|
|
139 |
}
|
140 |
+
|
141 |
}
|
142 |
+
|
143 |
/**
|
144 |
* Check SMSAPI authorization data (login/password)
|
145 |
* and throw error notification to admin panel
|
146 |
+
*
|
147 |
* @return none
|
148 |
*/
|
149 |
+
public function checkAuthorizationData()
|
150 |
+
{
|
151 |
+
$config = Mage::getModel('sms/config');
|
152 |
+
if ($config->isApiEnabled() == 0) return; //do nothing if api is disabled
|
153 |
+
|
154 |
if ($config->getApiLogin() && $config->getApiPassword()) {
|
155 |
+
|
156 |
try {
|
157 |
$api = Mage::getModel('sms/apiClient');
|
158 |
$api->connect()->getPoints();
|
159 |
+
} catch (Exception $e) {
|
|
|
160 |
Mage::getSingleton('core/session')->addError(Mage::helper('sms')->__('SMSAPI: Wrong Password and/or Username'));
|
161 |
}
|
162 |
}
|
163 |
+
|
164 |
+
|
165 |
}
|
166 |
+
|
167 |
+
|
|
|
|
|
168 |
}
|
app/code/community/Smsapi/Sms/controllers/IndexController.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Smsapi_Sms_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function sendsmsAction()
|
6 |
+
{
|
7 |
+
$params = $this->_request->getParams();
|
8 |
+
$config = Mage::getModel('sms/config');
|
9 |
+
$observer = new Smsapi_Sms_Model_Observer();
|
10 |
+
|
11 |
+
$res['status'] = 'success';
|
12 |
+
|
13 |
+
$trackNumbersIter = 0;
|
14 |
+
for ($i = 0; $i < count($params); $i++) {
|
15 |
+
if (isset($params['trackingnumber' . $i])) {
|
16 |
+
$msgWithTrackingNumber['{TRACKINGNUMBER}'] = $params['trackingnumber' . $i];
|
17 |
+
$trackNumbersIter++;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
try {
|
22 |
+
$api = Mage::getModel('sms/apiClient');
|
23 |
+
$api->connect();
|
24 |
+
|
25 |
+
|
26 |
+
//prepare sms content
|
27 |
+
$msg['recipient'] = $params['rec']; //or getBillingAddress
|
28 |
+
$msg['message'] = $params['msg'];
|
29 |
+
$msg['eco'] = $config->isEco(); //eco version - without sender
|
30 |
+
$msg['test'] = $config->testMode();
|
31 |
+
$msg['single_message'] = $config->isSingle(); //allow_long_sms
|
32 |
+
$msg['sender'] = $config->getSender();//sender
|
33 |
+
|
34 |
+
if (strpos($msg['message'], '{TRACKINGNUMBER}') !== false && !isset($msgWithTrackingNumber)) {
|
35 |
+
$res['message'] = Mage::helper('sms')->__('You have used {TRACKINGNUMBER} variable but tracking number is not defined. Please delete {TRACKINGNUMBER} variable from the message.');
|
36 |
+
$res['class'] = 'error-msg';
|
37 |
+
$this->_response->setBody(json_encode($res));
|
38 |
+
} else {
|
39 |
+
$msg['message'] = strtr($msg['message'], $msgWithTrackingNumber);
|
40 |
+
try {
|
41 |
+
$api->msgContent($msg)->send();
|
42 |
+
$res['class'] = 'success-msg';
|
43 |
+
$res['message'] = Mage::helper('sms')->__('SMS notification sent');
|
44 |
+
$this->_response->setBody(json_encode($res));
|
45 |
+
} catch (Exception $e) {
|
46 |
+
$res['message'] = Mage::helper('sms')->__('SMS notification error');
|
47 |
+
$res['class'] = 'error-msg';
|
48 |
+
$this->_response->setBody(json_encode($res));
|
49 |
+
}
|
50 |
+
}
|
51 |
+
//sending sms and getting API response
|
52 |
+
|
53 |
+
$observer->checkPointsLimit(); //check
|
54 |
+
|
55 |
+
|
56 |
+
} catch (Exception $e) {
|
57 |
+
Mage::log('exception' . $e->getMessage());
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
}
|
62 |
+
}
|
app/code/community/Smsapi/Sms/etc/config.xml
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
|
36 |
<modules>
|
37 |
<Smsapi_Sms>
|
38 |
-
<version>0.1.
|
39 |
</Smsapi_Sms>
|
40 |
</modules>
|
41 |
|
@@ -50,26 +50,31 @@
|
|
50 |
<class>Smsapi_Sms_Model</class>
|
51 |
</sms>
|
52 |
</models>
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
<blocks>
|
64 |
<sms>
|
65 |
<class>Smsapi_Sms_Block</class>
|
66 |
</sms>
|
|
|
|
|
|
|
|
|
|
|
67 |
</blocks>
|
68 |
</global>
|
69 |
<default>
|
70 |
<sms>
|
71 |
-
<main_conf>
|
72 |
-
<points_alert_limit>0</points_alert_limit>
|
73 |
</main_conf>
|
74 |
<admin_conf>
|
75 |
<test_mode>1</test_mode>
|
@@ -85,14 +90,14 @@
|
|
85 |
</updates>
|
86 |
</layout>
|
87 |
<translate>
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
<events>
|
97 |
<admin_session_user_login_success>
|
98 |
<observers>
|
@@ -112,28 +117,39 @@
|
|
112 |
</admin_system_config_changed_section_sms>
|
113 |
</events>
|
114 |
<acl>
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
<children>
|
121 |
-
<system>
|
122 |
-
<children>
|
123 |
-
<config>
|
124 |
<children>
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
</children>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
</children>
|
134 |
-
</admin>
|
135 |
-
</resources>
|
136 |
-
</acl>
|
137 |
</adminhtml>
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
</config>
|
35 |
|
36 |
<modules>
|
37 |
<Smsapi_Sms>
|
38 |
+
<version>0.1.3</version>
|
39 |
</Smsapi_Sms>
|
40 |
</modules>
|
41 |
|
50 |
<class>Smsapi_Sms_Model</class>
|
51 |
</sms>
|
52 |
</models>
|
53 |
+
<events>
|
54 |
+
<sales_order_save_commit_after>
|
55 |
+
<observers>
|
56 |
+
<smsapi_sms>
|
57 |
+
<class>Smsapi_Sms_Model_Observer</class>
|
58 |
+
<method>handleStatus</method>
|
59 |
+
</smsapi_sms>
|
60 |
+
</observers>
|
61 |
+
</sales_order_save_commit_after>
|
62 |
+
</events>
|
63 |
<blocks>
|
64 |
<sms>
|
65 |
<class>Smsapi_Sms_Block</class>
|
66 |
</sms>
|
67 |
+
<adminhtml>
|
68 |
+
<rewrite>
|
69 |
+
<sales_order_view_info>Smsapi_Sms_Block_Sales_Order_View_Info</sales_order_view_info>
|
70 |
+
</rewrite>
|
71 |
+
</adminhtml>
|
72 |
</blocks>
|
73 |
</global>
|
74 |
<default>
|
75 |
<sms>
|
76 |
+
<main_conf>
|
77 |
+
<points_alert_limit>0</points_alert_limit>
|
78 |
</main_conf>
|
79 |
<admin_conf>
|
80 |
<test_mode>1</test_mode>
|
90 |
</updates>
|
91 |
</layout>
|
92 |
<translate>
|
93 |
+
<modules>
|
94 |
+
<Smsapi_Sms>
|
95 |
+
<files>
|
96 |
+
<default>Smsapi_Sms.csv</default>
|
97 |
+
</files>
|
98 |
+
</Smsapi_Sms>
|
99 |
+
</modules>
|
100 |
+
</translate>
|
101 |
<events>
|
102 |
<admin_session_user_login_success>
|
103 |
<observers>
|
117 |
</admin_system_config_changed_section_sms>
|
118 |
</events>
|
119 |
<acl>
|
120 |
+
<resources>
|
121 |
+
<all>
|
122 |
+
<title>Allow Everything</title>
|
123 |
+
</all>
|
124 |
+
<admin>
|
|
|
|
|
|
|
|
|
125 |
<children>
|
126 |
+
<system>
|
127 |
+
<children>
|
128 |
+
<config>
|
129 |
+
<children>
|
130 |
+
<sms translate="title">
|
131 |
+
<title>SMS API</title>
|
132 |
+
<sort_order>100</sort_order>
|
133 |
+
</sms>
|
134 |
+
</children>
|
135 |
+
</config>
|
136 |
+
</children>
|
137 |
+
</system>
|
138 |
</children>
|
139 |
+
</admin>
|
140 |
+
</resources>
|
141 |
+
</acl>
|
|
|
|
|
|
|
|
|
142 |
</adminhtml>
|
143 |
+
<frontend>
|
144 |
+
<routers>
|
145 |
+
<sms>
|
146 |
+
<use>standard</use>
|
147 |
+
<args>
|
148 |
+
<module>Smsapi_Sms</module>
|
149 |
+
<frontName>smsapi</frontName>
|
150 |
+
</args>
|
151 |
+
</sms>
|
152 |
+
</routers>
|
153 |
+
</frontend>
|
154 |
+
|
155 |
</config>
|
app/code/community/Smsapi/Sms/etc/system.xml
CHANGED
@@ -109,7 +109,7 @@
|
|
109 |
<show_in_default>1</show_in_default>
|
110 |
<show_in_website>1</show_in_website>
|
111 |
<show_in_store>1</show_in_store>
|
112 |
-
<comment>To add new SMS Sender go to "http://www.
|
113 |
</sender>
|
114 |
|
115 |
<allow_long_sms translate="label">
|
@@ -146,6 +146,25 @@
|
|
146 |
<expanded>1</expanded>
|
147 |
<fields>
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
<status_pending_payment_active translate="label">
|
150 |
<label>Send SMS after status changed to "Pending Payment"</label>
|
151 |
<frontend_type>select</frontend_type>
|
109 |
<show_in_default>1</show_in_default>
|
110 |
<show_in_website>1</show_in_website>
|
111 |
<show_in_store>1</show_in_store>
|
112 |
+
<comment>To add new SMS Sender go to "http://www.smsapi.pl" -> (left menu) USTAWIENIA -> POLA NADAWCY</comment>
|
113 |
</sender>
|
114 |
|
115 |
<allow_long_sms translate="label">
|
146 |
<expanded>1</expanded>
|
147 |
<fields>
|
148 |
|
149 |
+
<status_pending_active translate="label">
|
150 |
+
<label>Send SMS after status changed to "Pending"</label>
|
151 |
+
<frontend_type>select</frontend_type>
|
152 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
153 |
+
<sort_order>1</sort_order>
|
154 |
+
<show_in_default>1</show_in_default>
|
155 |
+
<show_in_website>1</show_in_website>
|
156 |
+
<show_in_store>1</show_in_store>
|
157 |
+
</status_pending_active>
|
158 |
+
<status_pending translate="label">
|
159 |
+
<label>Template</label>
|
160 |
+
<frontend_type>textarea</frontend_type>
|
161 |
+
<sort_order>2</sort_order>
|
162 |
+
<show_in_default>1</show_in_default>
|
163 |
+
<show_in_website>1</show_in_website>
|
164 |
+
<show_in_store>1</show_in_store>
|
165 |
+
<depends><status_pending_active>1</status_pending_active></depends>
|
166 |
+
</status_pending>
|
167 |
+
|
168 |
<status_pending_payment_active translate="label">
|
169 |
<label>Send SMS after status changed to "Pending Payment"</label>
|
170 |
<frontend_type>select</frontend_type>
|
app/design/adminhtml/base/default/layout/Smsapi_Sms.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="head">
|
5 |
-
<action method="addJs"><script>smsapi/sms/counter.js</script></action>
|
6 |
-
</reference>
|
7 |
-
</default>
|
8 |
-
</layout>
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/base/default/template/sms/system/config/fieldset/branding.phtml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<style type="text/css">
|
2 |
-
|
3 |
-
.entry-edit .entry-edit-head { background:#0383cc !important; }
|
4 |
-
.content-header { margin-bottom: 0px !important; }
|
5 |
-
|
6 |
-
</style>
|
7 |
-
<div style="overflow: hidden;"><img src="<?php echo $this->getSkinUrl('images/smsapi/sms/smsapi_logo.jpg'); ?>"></div>
|
8 |
-
<div class="comment"><?php echo Mage::helper('sms')->__('SMSAPI Module for Magento-based stores enables automatic send SMS notifications to customers. SMS communication has many benefits including facilitates communication with your customers and speeds up reaching the details of the order. Short text messages are sent primarily as information on the status of the order, such as a message confirming the correct course of a transaction or message about delivery time of orders. SMS is fastest communication with your customers, and savings for the company due to reduced costs associated with undelivered shipments. SMS notifications in Magento module can be sent from the field in active sender SMSAPI account. Content templates are fully editable.'); ?></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/smsapi_sms.xml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<layout version="0.1.0">
|
2 |
+
<adminhtml_sales_order_view>
|
3 |
+
<reference name="order_info">
|
4 |
+
<action method="setTemplate"><template>sms/sales/order/view/info.phtml</template></action>
|
5 |
+
</reference>
|
6 |
+
</adminhtml_sales_order_view>
|
7 |
+
</layout>
|
app/design/adminhtml/default/default/template/sms/sales/order/view/info.phtml
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magento.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @var Mage_Sales_Model_Order $_order
|
30 |
+
*/
|
31 |
+
$_order = $this->getOrder();
|
32 |
+
/**
|
33 |
+
* @var Mage_Sales_Model_Resource_Order_Shipment_Collection $shipmentCollection
|
34 |
+
*/
|
35 |
+
$shipmentCollection = $_order->getShipmentsCollection();
|
36 |
+
?>
|
37 |
+
<?php
|
38 |
+
$orderAdminDate = $this->formatDate($_order->getCreatedAtDate(), 'medium', true);
|
39 |
+
$orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium', true);
|
40 |
+
?>
|
41 |
+
<div class="box-left">
|
42 |
+
<!--Order Information-->
|
43 |
+
<div class="entry-edit">
|
44 |
+
<?php if ($_order->getEmailSent()):
|
45 |
+
$_email = Mage::helper('sales')->__('the order confirmation email was sent');
|
46 |
+
else:
|
47 |
+
$_email = Mage::helper('sales')->__('the order confirmation email is not sent');
|
48 |
+
endif; ?>
|
49 |
+
<div class="entry-edit-head">
|
50 |
+
<?php if ($this->getNoUseOrderLink()): ?>
|
51 |
+
<h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?>
|
52 |
+
(<?php echo $_email ?>)</h4>
|
53 |
+
<?php else: ?>
|
54 |
+
<a href="<?php echo $this->getViewUrl($_order->getId()) ?>"><?php echo Mage::helper('sales')->__('Order # %s', $_order->getRealOrderId()) ?></a>
|
55 |
+
<strong>(<?php echo $_email ?>)</strong>
|
56 |
+
<?php endif; ?>
|
57 |
+
</div>
|
58 |
+
<div class="fieldset">
|
59 |
+
<table cellspacing="0" class="form-list">
|
60 |
+
<tr>
|
61 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Order Date') ?></label></td>
|
62 |
+
<td class="value"><strong><?php echo $orderAdminDate ?></strong></td>
|
63 |
+
</tr>
|
64 |
+
<?php if ($orderAdminDate != $orderStoreDate): ?>
|
65 |
+
<tr>
|
66 |
+
<td class="label">
|
67 |
+
<label><?php echo Mage::helper('sales')->__('Order Date (%s)', $_order->getCreatedAtStoreDate()->getTimezone()) ?></label>
|
68 |
+
</td>
|
69 |
+
<td class="value"><strong><?php echo $orderStoreDate ?></strong></td>
|
70 |
+
</tr>
|
71 |
+
<?php endif; ?>
|
72 |
+
<tr>
|
73 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Order Status') ?></label></td>
|
74 |
+
<td class="value"><strong><span
|
75 |
+
id="order_status"><?php echo $_order->getStatusLabel() ?></span></strong></td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Purchased From') ?></label></td>
|
79 |
+
<td class="value"><strong><?php echo $this->getOrderStoreName() ?></strong></td>
|
80 |
+
</tr>
|
81 |
+
<?php if ($_order->getRelationChildId()): ?>
|
82 |
+
<tr>
|
83 |
+
<td class="label">
|
84 |
+
<label><?php echo Mage::helper('sales')->__('Link to the New Order') ?></label></td>
|
85 |
+
<td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationChildId()) ?>">
|
86 |
+
<?php echo $_order->getRelationChildRealId() ?>
|
87 |
+
</a></td>
|
88 |
+
</tr>
|
89 |
+
<?php endif; ?>
|
90 |
+
<?php if ($_order->getRelationParentId()): ?>
|
91 |
+
<tr>
|
92 |
+
<td class="label">
|
93 |
+
<label><?php echo Mage::helper('sales')->__('Link to the Previous Order') ?></label></td>
|
94 |
+
<td class="value"><a href="<?php echo $this->getViewUrl($_order->getRelationParentId()) ?>">
|
95 |
+
<?php echo $_order->getRelationParentRealId() ?>
|
96 |
+
</a></td>
|
97 |
+
</tr>
|
98 |
+
<?php endif; ?>
|
99 |
+
<?php if ($_order->getRemoteIp() && $this->shouldDisplayCustomerIp()): ?>
|
100 |
+
<tr>
|
101 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Placed from IP') ?></label></td>
|
102 |
+
<td class="value"><strong><?php echo $_order->getRemoteIp();
|
103 |
+
echo ($_order->getXForwardedFor()) ? ' (' . $this->escapeHtml($_order->getXForwardedFor()) . ')' : ''; ?></strong>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<?php endif; ?>
|
107 |
+
<?php if ($_order->getGlobalCurrencyCode() != $_order->getBaseCurrencyCode()): ?>
|
108 |
+
<tr>
|
109 |
+
<td class="label">
|
110 |
+
<label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getGlobalCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label>
|
111 |
+
</td>
|
112 |
+
<td class="value"><strong><?php echo $_order->getBaseToGlobalRate() ?></strong></td>
|
113 |
+
</tr>
|
114 |
+
<?php endif; ?>
|
115 |
+
<?php if ($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
|
116 |
+
<tr>
|
117 |
+
<td class="label">
|
118 |
+
<label><?php echo Mage::helper('sales')->__('%s / %s rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></label>
|
119 |
+
</td>
|
120 |
+
<td class="value"><strong><?php echo $_order->getBaseToOrderRate() ?></strong></td>
|
121 |
+
</tr>
|
122 |
+
<?php endif; ?>
|
123 |
+
</table>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
<div class="box-right">
|
128 |
+
<!--Account Information-->
|
129 |
+
<div class="entry-edit">
|
130 |
+
<div class="entry-edit-head">
|
131 |
+
<h4 class="icon-head head-account"><?php echo Mage::helper('sales')->__('Account Information') ?></h4>
|
132 |
+
|
133 |
+
<div class="tools"><?php echo $this->getAccountEditLink() ?></div>
|
134 |
+
</div>
|
135 |
+
<div class="fieldset">
|
136 |
+
<div class="hor-scroll">
|
137 |
+
<table cellspacing="0" class="form-list">
|
138 |
+
<tr>
|
139 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Customer Name') ?></label></td>
|
140 |
+
<td class="value">
|
141 |
+
<?php if ($_customerUrl = $this->getCustomerViewUrl()) : ?>
|
142 |
+
<a href="<?php echo $_customerUrl ?>"
|
143 |
+
target="_blank"><strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong></a>
|
144 |
+
<?php else: ?>
|
145 |
+
<strong><?php echo $this->escapeHtml($_order->getCustomerName()) ?></strong>
|
146 |
+
<?php endif; ?>
|
147 |
+
</td>
|
148 |
+
</tr>
|
149 |
+
<tr>
|
150 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Email') ?></label></td>
|
151 |
+
<td class="value"><a
|
152 |
+
href="mailto:<?php echo $_order->getCustomerEmail() ?>"><strong><?php echo $_order->getCustomerEmail() ?></strong></a>
|
153 |
+
</td>
|
154 |
+
</tr>
|
155 |
+
<?php if ($_groupName = $this->getCustomerGroupName()) : ?>
|
156 |
+
<tr>
|
157 |
+
<td class="label"><label><?php echo Mage::helper('sales')->__('Customer Group') ?></label>
|
158 |
+
</td>
|
159 |
+
<td class="value"><strong><?php echo $_groupName ?></strong></td>
|
160 |
+
</tr>
|
161 |
+
<?php endif; ?>
|
162 |
+
<?php foreach ($this->getCustomerAccountData() as $data): ?>
|
163 |
+
<tr>
|
164 |
+
<td class="label"><label><?php echo $data['label'] ?></label></td>
|
165 |
+
<td class="value"><strong><?php echo $data['value'] ?></strong></td>
|
166 |
+
</tr>
|
167 |
+
<?php endforeach; ?>
|
168 |
+
</table>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
</div>
|
173 |
+
<div class="clear"></div>
|
174 |
+
|
175 |
+
<div class="box-left">
|
176 |
+
<!--Billing Address-->
|
177 |
+
<div class="entry-edit">
|
178 |
+
<div class="entry-edit-head">
|
179 |
+
<h4 class="icon-head head-billing-address"><?php echo Mage::helper('sales')->__('Billing Address') ?></h4>
|
180 |
+
|
181 |
+
<div class="tools"><?php echo $this->getAddressEditLink($_order->getBillingAddress()) ?></div>
|
182 |
+
</div>
|
183 |
+
<fieldset>
|
184 |
+
<address><?php echo $_order->getBillingAddress()->getFormated(true) ?></address>
|
185 |
+
</fieldset>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
<?php if (!$this->getOrder()->getIsVirtual()): ?>
|
189 |
+
<div class="box-right">
|
190 |
+
<!--Shipping Address-->
|
191 |
+
<div class="entry-edit">
|
192 |
+
<div class="entry-edit-head">
|
193 |
+
<h4 class="icon-head head-shipping-address"><?php echo Mage::helper('sales')->__('Shipping Address') ?></h4>
|
194 |
+
|
195 |
+
<div class="tools"><?php echo $this->getAddressEditLink($_order->getShippingAddress()) ?></div>
|
196 |
+
</div>
|
197 |
+
<fieldset>
|
198 |
+
<address><?php echo $_order->getShippingAddress()->getFormated(true) ?></address>
|
199 |
+
</fieldset>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<div class="clear"></div>
|
203 |
+
<?php endif; ?>
|
204 |
+
<div class="clear"></div>
|
205 |
+
<div class="box-left">
|
206 |
+
<div class="entry-edit">
|
207 |
+
<div class="entry-edit-head">
|
208 |
+
<h4 class="icon-head"><?php echo $this->__('Send sms') ?></h4>
|
209 |
+
|
210 |
+
</div>
|
211 |
+
<fieldset>
|
212 |
+
<div class="input-box">
|
213 |
+
<form id="messageform">
|
214 |
+
<div id="messages">
|
215 |
+
<ul class="messages" id="msgs">
|
216 |
+
</ul>
|
217 |
+
</div>
|
218 |
+
<label>
|
219 |
+
<tr>
|
220 |
+
<td class="label"><label><strong>Available variable:</strong></label></td>
|
221 |
+
<td class="value">
|
222 |
+
<label>{TRACKINGNUMBER}</label>
|
223 |
+
</td>
|
224 |
+
</tr>
|
225 |
+
</label>
|
226 |
+
<br/>
|
227 |
+
<label for="recipient">
|
228 |
+
<?php echo $this->__('Recipient') ?>
|
229 |
+
</label>
|
230 |
+
<?php foreach ($shipmentCollection as $shipment): ?>
|
231 |
+
<?php foreach ($shipment->getAllTracks() as $index => $trackNum): ?>
|
232 |
+
<input type="hidden" name="<?= 'trackingnumber' . $index ?>"
|
233 |
+
value="<?= $trackNum->getNumber() ?>">
|
234 |
+
<?php endforeach; ?>
|
235 |
+
<?php endforeach; ?>
|
236 |
+
<br/>
|
237 |
+
<input type="text" name="rec" id="recipient"
|
238 |
+
value="<?php echo $_order->getBillingAddress()->getTelephone() ?>">
|
239 |
+
<br/>
|
240 |
+
<label for="msg">
|
241 |
+
<?php echo $this->__('Content message') ?>
|
242 |
+
</label>
|
243 |
+
<br/>
|
244 |
+
<textarea name="msg" id="msg" rows="6" style="width: 80%;"></textarea>
|
245 |
+
<br/>
|
246 |
+
<button type="button" class="scalable" onclick="sendsms()">
|
247 |
+
<span>
|
248 |
+
<?php echo $this->__('Send') ?>
|
249 |
+
</span>
|
250 |
+
</button>
|
251 |
+
</form>
|
252 |
+
</div>
|
253 |
+
</fieldset>
|
254 |
+
</div>
|
255 |
+
</div>
|
256 |
+
<div class="clear"></div>
|
257 |
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
258 |
+
<script type="text/javascript">jQuery.noConflict();</script>
|
259 |
+
<script>
|
260 |
+
function sendsms() {
|
261 |
+
var msg = document.getElementById("msg");
|
262 |
+
var msgs = document.getElementById("msgs");
|
263 |
+
|
264 |
+
jQuery.ajax({
|
265 |
+
url: "<?php echo $this->getUrl('smsapi/index/sendsms') ?>",
|
266 |
+
type: "POST",
|
267 |
+
data: jQuery("#messageform").serialize(),
|
268 |
+
success: function (data) {
|
269 |
+
var d = JSON.parse(data);
|
270 |
+
if (d['status'] === 'success') {
|
271 |
+
msgs.innerHTML = '<li class="' + d['class'] + '"><ul><li><span>' + d['message'] + '</span></li></ul></li>';
|
272 |
+
if (d['class'] === 'success-msg') {
|
273 |
+
msg.value = '';
|
274 |
+
}
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
);
|
279 |
+
}
|
280 |
+
</script>
|
app/locale/pl_PL/Smsapi_Sms.csv
CHANGED
@@ -70,4 +70,10 @@
|
|
70 |
|
71 |
"Open registration form","Otwórz formularz rejestracyjny"
|
72 |
|
73 |
-
"SMSAPI Module for Magento-based stores enables automatic send SMS notifications to customers. SMS communication has many benefits including facilitates communication with your customers and speeds up reaching the details of the order. Short text messages are sent primarily as information on the status of the order, such as a message confirming the correct course of a transaction or message about delivery time of orders. SMS is fastest communication with your customers, and savings for the company due to reduced costs associated with undelivered shipments. SMS notifications in Magento module can be sent from the field in active sender SMSAPI account. Content templates are fully editable.","Moduł SMSAPI dla sklepów opartych na Magento umożliwia automatyczne wysyłanie powiadomień SMS w sklepie. Komunikacja SMS daje wiele korzyści między innymi usprawnia komunikację z e-klientami oraz przyspiesza dotarcie informacji dotyczących zamówienia. Krótkie wiadomości tekstowe wysyłane są przede wszystkim jako informacje o statusie realizacji zamówienia, np. jako wiadomość potwierdzająca poprawny przebieg transakcji czy wiadomość o czasie dostarczenia zamówienia pod wskazany adres. Powiadomienia SMS to zarówno szybsza komunikacja z e-klientami, jak i oszczędność dla przedsiębiorstwa ze względu na ograniczenie kosztów związanych z niedostraczonymi przesyłkami. Powiadomienia SMS w module Magento mogą być wysyłane z pola nadawcy aktywnego w koncie SMSAPI. Szablony treści są w pełni edytowalne."
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
"Open registration form","Otwórz formularz rejestracyjny"
|
72 |
|
73 |
+
"SMSAPI Module for Magento-based stores enables automatic send SMS notifications to customers. SMS communication has many benefits including facilitates communication with your customers and speeds up reaching the details of the order. Short text messages are sent primarily as information on the status of the order, such as a message confirming the correct course of a transaction or message about delivery time of orders. SMS is fastest communication with your customers, and savings for the company due to reduced costs associated with undelivered shipments. SMS notifications in Magento module can be sent from the field in active sender SMSAPI account. Content templates are fully editable.","Moduł SMSAPI dla sklepów opartych na Magento umożliwia automatyczne wysyłanie powiadomień SMS w sklepie. Komunikacja SMS daje wiele korzyści między innymi usprawnia komunikację z e-klientami oraz przyspiesza dotarcie informacji dotyczących zamówienia. Krótkie wiadomości tekstowe wysyłane są przede wszystkim jako informacje o statusie realizacji zamówienia, np. jako wiadomość potwierdzająca poprawny przebieg transakcji czy wiadomość o czasie dostarczenia zamówienia pod wskazany adres. Powiadomienia SMS to zarówno szybsza komunikacja z e-klientami, jak i oszczędność dla przedsiębiorstwa ze względu na ograniczenie kosztów związanych z niedostraczonymi przesyłkami. Powiadomienia SMS w module Magento mogą być wysyłane z pola nadawcy aktywnego w koncie SMSAPI. Szablony treści są w pełni edytowalne."
|
74 |
+
|
75 |
+
"SMS notification sent", "Powiadomienie SMS zostało wysłane"
|
76 |
+
|
77 |
+
"SMS notification error", "Błąd wysyłki powiadomienia sms",
|
78 |
+
|
79 |
+
"You have used {TRACKINGNUMBER} variable but tracking number is not defined. Please delete {TRACKINGNUMBER} variable from the message.", "W wiadomości została użyta zmienna {TRACKINGNUMBER}, która nie jest zdefiniowana. Proszę usuń tę zmienną z wiadomości."
|
js/smsapi/sms/counter.js
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
// Create the class
|
2 |
-
|
3 |
-
var mySmsapiCounter = Class.create({
|
4 |
-
|
5 |
-
initialize:function(eventToObserve) // Is called when the page has finished loading by the Event.observe code below
|
6 |
-
{
|
7 |
-
|
8 |
-
var counter = document.getElementById('counter');
|
9 |
-
var counterContainer = document.getElementById('counterContainer');
|
10 |
-
var maxchars = 160;
|
11 |
-
var childAdded = false;
|
12 |
-
var activeTextArea = false;
|
13 |
-
var textAreaId = false;
|
14 |
-
|
15 |
-
$('sms_templates').observe(eventToObserve, function(event) {
|
16 |
-
var textlength = 0;
|
17 |
-
activeTextArea = event.findElement('textarea');
|
18 |
-
|
19 |
-
if(activeTextArea) {
|
20 |
-
|
21 |
-
counterContainer.show(); //snow counter div at starts
|
22 |
-
|
23 |
-
if (textAreaId != activeTextArea.id) {
|
24 |
-
counterContainer.remove(); //remove old counterContainer
|
25 |
-
activeTextArea.insert({ //reinitialize conterContainer in new position
|
26 |
-
after: counterContainer
|
27 |
-
});
|
28 |
-
}
|
29 |
-
|
30 |
-
textlength = activeTextArea.value.length;
|
31 |
-
counter.update(textlength);
|
32 |
-
|
33 |
-
if(textlength<=(maxchars-50)) {
|
34 |
-
|
35 |
-
$('counter').setStyle({
|
36 |
-
border:'0px',
|
37 |
-
fontWeight:' normal',
|
38 |
-
color: 'inherit',
|
39 |
-
backgroundColor: 'inherit'
|
40 |
-
});
|
41 |
-
$('toolongalert').hide();
|
42 |
-
|
43 |
-
}
|
44 |
-
else if(textlength<=(maxchars-20)) {
|
45 |
-
|
46 |
-
$('counter').setStyle({
|
47 |
-
border:'1px solid orange',
|
48 |
-
fontWeight:' normal',
|
49 |
-
color: 'black',
|
50 |
-
backgroundColor: 'yellow'
|
51 |
-
});
|
52 |
-
$('toolongalert').hide();
|
53 |
-
|
54 |
-
} else {
|
55 |
-
|
56 |
-
$('counter').setStyle ({
|
57 |
-
border:'1px solid red',
|
58 |
-
fontWeight:' bold',
|
59 |
-
color: 'white',
|
60 |
-
backgroundColor: '#900'
|
61 |
-
});
|
62 |
-
$('toolongalert').show();
|
63 |
-
|
64 |
-
}
|
65 |
-
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
});
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
});
|
77 |
-
// Global variable for the instance of the class
|
78 |
-
// Creating an instance of the class if the page has finished loading
|
79 |
-
Event.observe(window, 'load', function() {
|
80 |
-
document.getElementById('counterContainer').hide(); //hide counter div at start
|
81 |
-
new mySmsapiCounter('click');
|
82 |
-
new mySmsapiCounter('keyup');
|
83 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Smsapi_Sms</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
-
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>SMS
|
10 |
-
<description>SMSAPI Module for Magento-based stores enables automatic send SMS notifications to customers. SMS communication has many benefits including facilitates communication with your customers and speeds up reaching the details of the order. Short text messages are sent primarily as information on the status of the order, such as a message confirming the correct course of a transaction or message about delivery time of orders. SMS is fastest communication with your customers, and savings for the company due to reduced costs associated with undelivered shipments. SMS notifications in Magento module can be sent from the field in active sender SMSAPI account. Content templates are fully editable
|
11 |
-
<notes
|
12 |
-
|
13 |
-
|
14 |
-
<
|
15 |
-
<
|
|
|
|
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Smsapi_Sms</name>
|
4 |
+
<version>0.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>SMS Plugin</summary>
|
10 |
+
<description>SMSAPI Module for Magento-based stores enables automatic send SMS notifications to customers. SMS communication has many benefits including facilitates communication with your customers and speeds up reaching the details of the order. Short text messages are sent primarily as information on the status of the order, such as a message confirming the correct course of a transaction or message about delivery time of orders. SMS is fastest communication with your customers, and savings for the company due to reduced costs associated with undelivered shipments. SMS notifications in Magento module can be sent from the field in active sender SMSAPI account. Content templates are fully editable.</description>
|
11 |
+
<notes>+ message box in order
|
12 |
+
+ change status code to status name in sms
|
13 |
+
+ add sms at status "pending"</notes>
|
14 |
+
<authors><author><name>SMSAPI</name><user>SMSAPI</user><email>bok@smsapi.pl</email></author></authors>
|
15 |
+
<date>2015-10-22</date>
|
16 |
+
<time>13:38:13</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Smsapi"><dir name="Sms"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Branding.php" hash="0dbad05e38f0755b06aa30a61c22af62"/></dir></dir></dir></dir><file name="Buttons.php" hash="9c3419026c5a9e89ccd6d0203faeee51"/><dir name="sales"><dir name="order"><dir name="view"><file name="Info.php" hash="63734807fafe6bfbbccc1a4aeb9333ea"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="c9f5c5eda233f035bf8d44d5bdf040ea"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Attributes.php" hash="daec22c1bf38a90c4cce45a264f82516"/></dir><file name="ApiClient.php" hash="74ab753538d8effa2d837ac50ebb9b40"/><file name="Config.php" hash="e19170fc3519ba96493770096f730ba0"/><file name="Observer.php" hash="8d33275d5b8fc642b6ef1e01277a06dc"/></dir><dir name="controllers"><file name="IndexController.php" hash="7fe68c78eeca4a1a290276d55fd90da9"/></dir><dir name="etc"><file name="config.xml" hash="6070fc60aff325ea97641afeba804c78"/><file name="system.xml" hash="9e9784ffacd82d993fc9a521bfb8445b"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="sms"><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="6424a69999cb16dbd56c087e798f1e80"/></dir></dir></dir></dir></dir><dir name="layout"><file name="smsapi_sms.xml" hash="d3e85084ec20b0f180b2be0787f7975d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Smsapi_Sms.xml" hash="4e65007f9573a00788a27745861bcaab"/></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Smsapi_Sms.csv" hash="8654b78e7a429dd084ffa671a1600685"/></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|
skin/adminhtml/base/default/images/smsapi/sms/smsapi_logo.jpg
DELETED
Binary file
|