TOPefekt_Magesms - Version 1.0.4

Version Notes

2014

Download this release

Release Info

Developer Frantisek Barancik
Extension TOPefekt_Magesms
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php ADDED
@@ -0,0 +1,16 @@
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_System_Config_Apikeygenerator extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $id23e685c18c58238831a9a9f8356004faff20ddc) { $i0fc064cffe35dbf98852d574adf2c91e8ad7190b = parent::_getElementHtml($id23e685c18c58238831a9a9f8356004faff20ddc); $this->setElement($id23e685c18c58238831a9a9f8356004faff20ddc); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel('Generator new API key') ->setOnClick("document.getElementById('magesms_api_apikey').value = 'xxxxxx-xxxx-yxxx-yxxx-xxxxxx'.replace(/[xy]/g, function(c) {var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);return v.toString(16);});") ->toHtml(); return $i0fc064cffe35dbf98852d574adf2c91e8ad7190b.$id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Model/Exceptions.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.Mage::getSingleton('magesms/smsprofile')->user->user; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Exceptions extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/exceptions'); } public function updateData() { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showexc&username='.urlencode(Mage::getSingleton('magesms/smsprofile')->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 = array(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) $if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()] = 1; foreach($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'] as $ia61712c27ea241bd7a543dc2b02ea572274d0322) { list($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc, $i4616676bff4c07942c8542e6b4e0ccf29d473424, $i4de11663a9306b410e28ff008f89a06a42664d88) = explode(',', $ia61712c27ea241bd7a543dc2b02ea572274d0322); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = true; foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == $i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == $i4616676bff4c07942c8542e6b4e0ccf29d473424 && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() == $i4de11663a9306b410e28ff008f89a06a42664d88) { unset($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997[$i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getId()]); $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = false; break; } } if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad === true) { $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0 = Mage::getModel('magesms/exceptions'); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setPrefix($if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setFirstPrefix($i5bf792bc27965e6366ed7dd55d8a4f1216ffd4bc); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setLength($i4616676bff4c07942c8542e6b4e0ccf29d473424); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->setTrim($i4de11663a9306b410e28ff008f89a06a42664d88); $i7c94c9b9e96dc295bc0fe1b03a5f04b0633533e0->save(); } } foreach($if2363dc4f19bfec9b2f6c8c836b58e55c25e6997 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538=>$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08) Mage::getModel('magesms/exceptions')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); } } public function number($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->getCollection(); foreach($i04133b282add75cc6fb03b8f23059a4a19ae63c9 as $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f) { if ($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getPrefix() == $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getLength() == strlen($i39404799a9171a012cb8b15cd8f27b347aa44a5f) && $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getFirstPrefix() == substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 0, 2)) { return $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.($i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim() ? substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i3f4f633cf43d2d0313bcae3ea42defdb5a5dbf8f->getTrim()) : $i39404799a9171a012cb8b15cd8f27b347aa44a5f); } } return $i39404799a9171a012cb8b15cd8f27b347aa44a5f; } }
app/code/community/Topefekt/Magesms/Model/Hooks.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'admin')->getFirstItem(); foreach($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 as $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae) { $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getModel('magesms/admins')->load($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getAdminId()); if (!$i2977ace3ff82db806c1e7c92dd6811f3d76f0e87) continue; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(1) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = ''; foreach($i71e09ed37bc7273d250df9932c1693668e879cdd as $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7) { if ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); break; } elseif ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == 'default') $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($this->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(2) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (!isset($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getVatId(); } if (!isset($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Hooks extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks'); } public function send($i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::app()->getStore()->getGroupId(); if (!$i589c2cccd18de711ec5e779b98b9f98d0347a925 && $i5e65dd16263683749d16a84171f719e768ed14b5->hasStoreId()) { $i589c2cccd18de711ec5e779b98b9f98d0347a925 = Mage::getModel('core/store')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getStoreId())->getGroupId(); } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 = Mage::getSingleton('magesms/hooks_admins')->getCollection(); if ($i589c2cccd18de711ec5e779b98b9f98d0347a925 || !Mage::getSingleton('admin/session')->isLoggedIn()) { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('store_group_id', $i589c2cccd18de711ec5e779b98b9f98d0347a925); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->getSelect()->group('admin_id'); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'admin')->getFirstItem(); foreach($ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8 as $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae) { $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getModel('magesms/admins')->load($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getAdminId()); if (!$i2977ace3ff82db806c1e7c92dd6811f3d76f0e87) continue; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.ucfirst($i5e65dd16263683749d16a84171f719e768ed14b5->getStatus())); else $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('catalog/product')->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = false; foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $ibfceba0b027e7caa5ff39764963a80a73f4cdfeb = true; break; } } if (!$ibfceba0b027e7caa5ff39764963a80a73f4cdfeb) return $this; } $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = ''; foreach($i71e09ed37bc7273d250df9932c1693668e879cdd as $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7) { if ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); break; } elseif ($ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation() == 'default') $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getSmstext(); } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($this->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i41496536c6b29c24b90c374d9fc25143f114dc9a) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } } } return $this; } public function prepareText($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5) { if (preg_match_all('/{(.*?)}/', $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if ($i5e65dd16263683749d16a84171f719e768ed14b5->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStore()->getId(); elseif (Mage::app()->getStore()) $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); else $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null; if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $ic157485eecbe64d400493d7b9e7f434b83aca5d0 = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = $ic157485eecbe64d400493d7b9e7f434b83aca5d0['host'].($ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] != '/' ? $ic157485eecbe64d400493d7b9e7f434b83aca5d0['path'] : ''); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name2'] = Mage::app()->getStore()->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_email'] = Mage::getStoreConfig('trans_email/ident_general/email', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_phone'] = Mage::getStoreConfig('general/store_information/phone', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'contactForm') { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_name'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('name')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('telephone')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message'] = trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short1'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 120); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short2'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 100); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_message_short3'] = Mage::helper('magesms')->substr(trim($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('comment')), 0, 80); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterSuccess') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getLastname(); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerLastname(); } if (!isset($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_company'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_address'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_postcode'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_city'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_country'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_state'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_vat_number'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getVatId(); } if (!isset($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_company'] = $i560c12365c45b205daa0512840c70486783226b1->getCompany(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_firstname'] = $i560c12365c45b205daa0512840c70486783226b1->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_lastname'] = $i560c12365c45b205daa0512840c70486783226b1->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_address'] = $i560c12365c45b205daa0512840c70486783226b1->getStreet(1); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_postcode'] = $i560c12365c45b205daa0512840c70486783226b1->getPostcode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_city'] = $i560c12365c45b205daa0512840c70486783226b1->getCity(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_country'] = $i560c12365c45b205daa0512840c70486783226b1->getCountry(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_state'] = $i560c12365c45b205daa0512840c70486783226b1->getRegion(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_phone'] = $i560c12365c45b205daa0512840c70486783226b1->getTelephone(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_invoice_vat_number'] = $i560c12365c45b205daa0512840c70486783226b1->getVatId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getIncrementId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()->getMethodInstance()->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_currency'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrderCurrency()->getCurrencyCode(); } $this->f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51($i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i5e65dd16263683749d16a84171f719e768ed14b5->getCreatedAt()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'])) { $ifd002a4ef735f38a6030baa73fafafa1118ff492 = Mage::getModel('ecommerceteam_ddc/order'); if ($ifd002a4ef735f38a6030baa73fafafa1118ff492) { $i82d8f80a6f30d2bff1b6b037fd170117a61f4e69 = $ifd002a4ef735f38a6030baa73fafafa1118ff492->load($i5e65dd16263683749d16a84171f719e768ed14b5->getEntityId(), 'order_id')->getData(); if (isset($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['order_id'])) { if (strtotime($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'])) { $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414 = Mage::getSingleton('core/locale')->date($i82d8f80a6f30d2bff1b6b037fd170117a61f4e69['delivery_date'], Zend_Date::ISO_8601, null, false)->toString(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i5b8dea0c150539c8b78ffa4a4ee9b4ea0bf09414; } } elseif ($i2d35534ee8eb5c1c7e742a61e000486ce24db667 = Mage::app()->getRequest()->getParam('delivery_date')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['delivery_date'] = $i2d35534ee8eb5c1c7e742a61e000486ce24db667; } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrder') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['cart_id'] = Mage::getSingleton('checkout/session')->getQuoteId(); } $i32ce098f2dde8081cf3c4de31f52b408a6ad48be = $i5e65dd16263683749d16a84171f719e768ed14b5->getItemsCollection(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder1'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('name').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getName().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder2'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder3'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = 'id:'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getId().', ' .Mage::helper('magesms')->__('qty').':'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder4'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'])) { $i813c950729f632ca03f8c203c0a769de5e8bdf29 = array(); foreach($i32ce098f2dde8081cf3c4de31f52b408a6ad48be as $i69a1201e93806d55c970dfb18feec53d221ba37b) { $i813c950729f632ca03f8c203c0a769de5e8bdf29[] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getId().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getSku().'/'.$i69a1201e93806d55c970dfb18feec53d221ba37b->getQtyOrdered(); } $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['newOrder5'] = implode('; ', $i813c950729f632ca03f8c203c0a769de5e8bdf29); } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderTrackingNumber') { $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['carrier_name'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTitle(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_number'] = $i9805d668f75b6b461f88474f57c5f6aa86a87316->getTrackNumber(); } $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87 = Mage::getSingleton('admin/session')->getUser(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_id'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['employee_email'] = $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getEmail(); } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productOutOfStock' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'productLowStock') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_id'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getProductId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_quantity'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getQty(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product'); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_name'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['product_ref'] = $i69a1201e93806d55c970dfb18feec53d221ba37b->getSku(); } } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname']) || isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { if ($i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer()) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_id'] = $i21e55df616c305955791876c1eb4da83448beba2->getId(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i21e55df616c305955791876c1eb4da83448beba2->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i21e55df616c305955791876c1eb4da83448beba2->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i21e55df616c305955791876c1eb4da83448beba2->getFirstname(); } } } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } private function f2b4066ec99f97011a4a9f20dd18d97b5a49b8b51(&$i0933475b5bd80561a9f50282fd9eb0b8345cec4b, $i53ddb2282ac3aca0d44abe35abcf69959ed66574) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date'] = $i53ddb2282ac3aca0d44abe35abcf69959ed66574; } $i17c20960d197486b19dc890665362a4f2fd6f24a = date_parse($i53ddb2282ac3aca0d44abe35abcf69959ed66574); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date2'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date3'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date4'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['year'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date5'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'.'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date6'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'/'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_date7'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['month'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['day'].'-'.$i17c20960d197486b19dc890665362a4f2fd6f24a['year']; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_time1'] = $i17c20960d197486b19dc890665362a4f2fd6f24a['hour'].':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['minute']).':'.sprintf('%02.0f', $i17c20960d197486b19dc890665362a4f2fd6f24a['second']); } } }
app/code/community/Topefekt/Magesms/Model/Observer.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getShipment(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->count()) { Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_'.$i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($i12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($idd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($i69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $i8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($i69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($i8091f3f14f616f7c7725a766ecf5f3d4a561a828); $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(false); } } } return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ($i417760717250c854293598d2ff07a66629a1946d->getQuoteItem()->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(true); } else{ $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === true && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 1) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } elseif ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === false && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } } } return $this; } public function cartRemoveAllClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved()) && !$i417760717250c854293598d2ff07a66629a1946d->getCart()->getItemsCount()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function cronUpdate() { $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Observer { public function updateOrderTrackingNumber(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getShipment(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges() && $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->count()) { Mage::getSingleton('magesms/hooks')->send('updateOrderTrackingNumber', $i5e65dd16263683749d16a84171f719e768ed14b5->getOrder()); } return $this; } public function newOrder(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('newOrder', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); return $this; } public function updateOrderStatus(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if ($i417760717250c854293598d2ff07a66629a1946d->getOrder()->getOrigData('status') != $i417760717250c854293598d2ff07a66629a1946d->getOrder()->getData('status')) { Mage::getSingleton('magesms/hooks')->send('updateOrderStatus', $i417760717250c854293598d2ff07a66629a1946d->getOrder()); } return $this; } public function createCreditMemo(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('createCreditMemo', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function customerRegisterSuccess(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('customerRegisterSuccess', $i417760717250c854293598d2ff07a66629a1946d['customer']); return $this; } public function productStock(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i5e65dd16263683749d16a84171f719e768ed14b5 = $i417760717250c854293598d2ff07a66629a1946d->getEvent()->getItem(); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getManageStock()) { if (!($i34b2041d68b0c6d2dfd61d3d36f96caad687688c = Mage::registry('magesms_stock_item_'.$i5e65dd16263683749d16a84171f719e768ed14b5->getProductId()))) { $i34b2041d68b0c6d2dfd61d3d36f96caad687688c = $i5e65dd16263683749d16a84171f719e768ed14b5->getOrigData(); } if (!$i34b2041d68b0c6d2dfd61d3d36f96caad687688c) return $this; if ($i5e65dd16263683749d16a84171f719e768ed14b5->hasDataChanges()) { if ($i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] > 0 && $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() <= 0) Mage::getSingleton('magesms/hooks')->send('productOutOfStock', $i5e65dd16263683749d16a84171f719e768ed14b5); if ($i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty() > $i5e65dd16263683749d16a84171f719e768ed14b5->getQty() && $i34b2041d68b0c6d2dfd61d3d36f96caad687688c['qty'] >= $i5e65dd16263683749d16a84171f719e768ed14b5->getNotifyStockQty()) Mage::getSingleton('magesms/hooks')->send('productLowStock', $i5e65dd16263683749d16a84171f719e768ed14b5); } } return $this; } public function contactForm(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { Mage::getSingleton('magesms/hooks')->send('contactForm', $i417760717250c854293598d2ff07a66629a1946d); return $this; } public function cartAddProductAddOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) return $this; $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($i69a1201e93806d55c970dfb18feec53d221ba37b) { $i69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $i69a1201e93806d55c970dfb18feec53d221ba37b->load($i69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $i12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($i12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $idd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($idd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($i69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $i0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $i8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($i69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $i0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($i8091f3f14f616f7c7725a766ecf5f3d4a561a828); $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(false); } } } return $this; } public function cartRemoveProductClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved())) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; if ($i417760717250c854293598d2ff07a66629a1946d->getQuoteItem()->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) { $i0e3e80cee9c51f140b823db0b7df66493acca657->setMageOptoutRemoved(true); } else{ $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); if ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === true && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 1) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } elseif ($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved() === false && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } } } return $this; } public function cartRemoveAllClearOptout(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); if (!is_null($i0e3e80cee9c51f140b823db0b7df66493acca657->getMageOptoutRemoved()) && !$i417760717250c854293598d2ff07a66629a1946d->getCart()->getItemsCount()) { $i0e3e80cee9c51f140b823db0b7df66493acca657->unsMageOptoutRemoved(); } return $this; } public function lockSkuAttribute(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $i7fff76b02be2f63877a1782ca871e62a287fa16f = $i417760717250c854293598d2ff07a66629a1946d->getEvent(); $i69a1201e93806d55c970dfb18feec53d221ba37b = $i7fff76b02be2f63877a1782ca871e62a287fa16f->getProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b->getSku() == $ic010a5d08128ec6abcd0a1a16cb1d8abe7bf2142) $i69a1201e93806d55c970dfb18feec53d221ba37b->lockAttribute('sku'); return $this; } public function cronUpdate() { $i36c92dc65e84acd6954001035d3b86efb10057bf = Mage::app()->loadCache('magesms_update_lastcheck'); $idef7cbe5fc44de57058ffe420bace11327a9b243 = 24 * 3600; if (($idef7cbe5fc44de57058ffe420bace11327a9b243 + $i36c92dc65e84acd6954001035d3b86efb10057bf) > time()) { return $this; } $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=showlastversion&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720) && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0])) { if (version_compare($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version) > 0) { Mage::app()->saveCache($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0], 'magesms_update_available'); Mage::log("MageSms cron - new version {$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]} available"); } else Mage::app()->saveCache('', 'magesms_update_available'); } Mage::app()->saveCache(time(), 'magesms_update_lastcheck'); Mage::getSingleton('magesms/routes')->updatepricelist(); Mage::getSingleton('magesms/exceptions')->updateData(); return $this; } }
app/code/community/Topefekt/Magesms/Model/Routes.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user.'&password='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd.'&area='.$this->getArea().'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Routes extends Mage_Core_Model_Abstract { const SENDER_TEXT = 0; const SENDER_SYSTEM = 1; const SENDER_OWN = 2; const SENDER_SIM = 3; public $displayCode = false; protected function _construct() { $this->_init('magesms/routes'); } public function loadData($i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array(); foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getSingleton('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); if ($i9bd2c88ca2206122845c5e189e2b6856a2409e3a->count()) $ice10b700e3771fcda63608142bce93b608228583->setAlternatives($i9bd2c88ca2206122845c5e189e2b6856a2409e3a); $i5528ed14b056e3debe4695094269de3a98f76fe7[] = $ice10b700e3771fcda63608142bce93b608228583; } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function getGate($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $i30f20aafde612a957f7f966cb5b85e35782bc88a) { foreach (Mage::getSingleton('magesms/routes')->getCollection()->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a) as $ice10b700e3771fcda63608142bce93b608228583) { if (preg_match('/^'.$ice10b700e3771fcda63608142bce93b608228583->getArea().'/', $i39404799a9171a012cb8b15cd8f27b347aa44a5f)) { return $ice10b700e3771fcda63608142bce93b608228583; } } return Mage::getSingleton('magesms/routes'); } public function getInfo() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('payment' => array(), 'dph' => null, 'sms' => array()); $i107ca03708f38d42ec504f51f62355fc45d87e69 = explode("%",$this->getData('info')); $i6048c89aa6f25872dad4b719d7b6d821cac48774 = explode("_",$i107ca03708f38d42ec504f51f62355fc45d87e69[0]); $i8e506de2f16bb925ad71fe7bfd4757aeec48a809 = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[0]); $i9fb8b58187be1d03efeb03cbaa24d23651e7360e = explode(";",$i6048c89aa6f25872dad4b719d7b6d821cac48774[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[0]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[1]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2] = explode(":",$i9fb8b58187be1d03efeb03cbaa24d23651e7360e[2]); $ia61712c27ea241bd7a543dc2b02ea572274d0322['dph'] = $i107ca03708f38d42ec504f51f62355fc45d87e69[1]; for($i039030c921e1cb0961cdfe7905a8744d586dd8f5=0;$i039030c921e1cb0961cdfe7905a8744d586dd8f5<count($i8e506de2f16bb925ad71fe7bfd4757aeec48a809);$i039030c921e1cb0961cdfe7905a8744d586dd8f5++){ $ie61606c2d8de1e806ab2adf90e40cc4bb671be43 = explode("|",$i8e506de2f16bb925ad71fe7bfd4757aeec48a809[$i039030c921e1cb0961cdfe7905a8744d586dd8f5]); if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==4) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][0][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==3) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][1][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==1 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==2 || $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==5) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][2][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } if($ie61606c2d8de1e806ab2adf90e40cc4bb671be43[3]==10) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['sms'][3][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[0]][$ie61606c2d8de1e806ab2adf90e40cc4bb671be43[1]] = array( 'credit' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay1' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][0][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay2' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][1][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'pay3' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['payment'][2][1] * $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[2], 'unicode' => $ie61606c2d8de1e806ab2adf90e40cc4bb671be43[4]); } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function _beforeSave() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getModel('magesms/smsprofile'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd).'&area='.urlencode($this->getArea()).'&currency='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); } return parent::_beforeSave(); } public function _beforeDelete() { $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getId()); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) $ida3b491904fb073f446bf820cd55a0ff69b347d1->delete(); return parent::_beforeDelete(); } public function validate($ia2537252e3e7dbac0ba1e1693e8531161842da87 = false) { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if ($this->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT && $ia2537252e3e7dbac0ba1e1693e8531161842da87 !== false) { if (!Zend_Validate::is($this->getData('senderID'), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } elseif (!Mage::helper('magesms')->isTextSender($this->getData('senderID'))) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('possible characters: ').'a-z A-Z 0-9 _ .'; } } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function updatepricelist() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = $this->getCollection(); foreach($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec as $ice10b700e3771fcda63608142bce93b608228583) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } return $this; } }
app/code/community/Topefekt/Magesms/Model/Sms.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; protected $_routes_type = array( 1 => 'admin', 2 => 'customer', 3 => 'customer', 4 => 'customer'); public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => 4, 'priority' => true, 'unique' => false, 'adminId' => 0, 'customerId' => 0, 'recipientName' => '', 'storeId' => null )); parent::_construct(); } public function send() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $i8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($i8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'admin_id'=>array(), 'customer_id'=>array()); foreach($this->getRecipient() as $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $i39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$i39404799a9171a012cb8b15cd8f27b347aa44a5f; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); } } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user.'&password='.$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd .'&unicode='.($this->getUnicode() ? 1 : 0).'&data='.$icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519; if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0] .'&isms='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0].'&sender='.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]; else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.$this->getSendlater(); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($i55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $i55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($i55dd4e7042a1f9031b84f07f04c37165ce3d0720); foreach($id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($i17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else Mage::getSingleton('adminhtml/session')->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function status($i7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($i7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Sms extends Varien_Object { const SENT = 1; const ERROR = 2; const DELIVERED = 3; const UNAVAILABLE = 4; const SIMULATION = 5; const SCHEDULED = 6; const DELETED = 7; const DND = 8; const DUPLICATE = 9; const TYPE_ADMIN = 1; const TYPE_CUSTOMER = 2; const TYPE_MARKETING = 3; const TYPE_SIMPLE = 4; protected $_routes_type = array( self::TYPE_ADMIN => 'admin', self::TYPE_CUSTOMER => 'customer', self::TYPE_MARKETING => 'customer', self::TYPE_SIMPLE => 'customer'); private $v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; public function _construct() { $this->setData(array( 'recipient' => new Varien_Data_Collection(), 'message' => '', 'subject' => '', 'unicode' => false, 'sendlater' => false, 'type' => self::TYPE_SIMPLE, 'priority' => true, 'unique' => false, 'adminId' => 0, 'customerId' => 0, 'recipientName' => '', 'storeId' => null )); parent::_construct(); } public function send() { $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); try { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(); if (!strlen($this->getMessage())) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Fill in SMS text.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if ($this->getSendlater()) { $i8284e7e828b5452004207db69edd7aa7ff0703ab = Mage::getModel('core/date')->gmtTimestamp(); if ($i8284e7e828b5452004207db69edd7aa7ff0703ab >= $this->getSendlater()) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Wrong time of SMS sending.'); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); if (!count($this->getRecipient())) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('Recipients found: 0'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519 = html_entity_decode($this->getMessage(), ENT_QUOTES, 'UTF-8'); $if295547318143e26fc7026b92d58e3d1eec229db = Mage::helper('magesms')->countSms($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519, $this->getUnicode()); if (!$i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms && count($this->getRecipient())*$if295547318143e26fc7026b92d58e3d1eec229db*0.05 > $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->credit) $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__('You do not have enough credit to send SMS to all ') .count($this->getRecipient()).Mage::helper('magesms')->__(' recipients.'); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) Mage::throwException($ibdd27a8dd714410289189d318feb96fe6ed8e07f[0]); $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2 = array('number'=>array(), 'isms'=>array(), 'sendertype'=>array(), 'senderID'=>array(), 'admin_id'=>array(), 'customer_id'=>array()); foreach($this->getRecipient() as $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802) { $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getNumber(); $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() ? $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCountry() : ''; $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = ''; if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4 && $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4] && !(strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '+') === 0 || strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '00') === 0)) { if (strpos($i39404799a9171a012cb8b15cd8f27b347aa44a5f, '0') === 0) $i39404799a9171a012cb8b15cd8f27b347aa44a5f = substr($i39404799a9171a012cb8b15cd8f27b347aa44a5f, 1); $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i037b855bc01175f2c77d5c3e19eda9a0003feff4]; $i39404799a9171a012cb8b15cd8f27b347aa44a5f = $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$i39404799a9171a012cb8b15cd8f27b347aa44a5f; } $i813c950729f632ca03f8c203c0a769de5e8bdf29 = Mage::helper('magesms')->prepareNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $this->_routes_type[$this->getType()], $if0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $this->getStoreId()); if(is_array($i813c950729f632ca03f8c203c0a769de5e8bdf29)) { if ($this->getUnique()) { if (in_array($i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile'], $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) continue; } $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['mobile']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['isms']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['sendertype'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['sendertype']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][] = $i813c950729f632ca03f8c203c0a769de5e8bdf29['senderID']; $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getAdminId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getCustomerId(); $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][] = $i90bf5ab4e4ec7f89dc69f079d1a10e0bfa14c802->getRecipient(); } } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->simulatesms) { foreach($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'] as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SIMULATION); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid('simulate'.md5(microtime())); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } if (count($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'])) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent (simulation).')); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'username='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->user).'&password='.urlencode($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->passwd) .'&unicode='.($this->getUnicode() ? 1 : 0).'&data='.urlencode($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); if ($this->getPriority()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsms&number='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][0]) .'&isms='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms'][0]).'&sender='.urlencode($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][0]); else $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&action=sendsmsall&number='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number']) .'&isms='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['isms']).'&sender='.implode(';', $if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID']); if ($this->getSendlater()) $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= '&datelater='.urlencode($this->getSendlater()); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, false); if (!empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720)) { if (strpos($i55dd4e7042a1f9031b84f07f04c37165ce3d0720, 'QQQ___QQQ') !== false) $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = explode("QQQ___QQQ", $i55dd4e7042a1f9031b84f07f04c37165ce3d0720); else $id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 = array($i55dd4e7042a1f9031b84f07f04c37165ce3d0720); foreach($id18c7e5bc71d5242a8b8cc24d43559e5dccbddb5 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i17c20960d197486b19dc890665362a4f2fd6f24a = Mage::getModel('magesms/api')->parser($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, '__'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getModel('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['number'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d H:i:s')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($icd14fe4ea296b55b8ecbf19d2fd7bfef3a511519); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::ERROR); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][1]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][2]); if (isset($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($i17c20960d197486b19dc890665362a4f2fd6f24a['data'][0]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['senderID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setAdminId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['admin_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customer_id'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode($this->getUnicode()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType($this->getType()); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal($if295547318143e26fc7026b92d58e3d1eec229db); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSubject($this->getSubject()); if ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 1 || $i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 11) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SENT); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 111) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::SCHEDULED); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('SMS will be send later - ').Mage::helper('core')->formatDate(date('Y-m-d H:i:s', $this->getSendlater()), 'medium', true)); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 9) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('wrong number or unavailable')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 15) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unauthorized senderID in confirmation sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 10) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('low credit for sending sms')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 22) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('unicode is not supported')); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3 && $i17c20960d197486b19dc890665362a4f2fd6f24a['datasrc'] == 23) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('message duplicity')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(self::DUPLICATE); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 3) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__($i17c20960d197486b19dc890665362a4f2fd6f24a['error'])); } elseif ($i17c20960d197486b19dc890665362a4f2fd6f24a['errno'] == 4) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNote(Mage::helper('magesms')->__('')); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCustomerId($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['customerID'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); if (isset($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setRecipient($if85a12d6e5fb576dbfd0203ae61d13b94a9fadd2['recipient'][$i670253c23c6fcba76bc4256a88fdd8fbc1041039]); } else { continue; } $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); } $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = false; if ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SENT) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was sent.')); elseif ($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getStatus() == self::SCHEDULED) Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('SMS was saved.')); else { Mage::getSingleton('adminhtml/session')->addError($i5ee2fa256ff77dd811a9c1911f7563263a694e4b->getNote()); $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b = true; } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); } } public function setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (is_string($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } elseif (is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322)) { foreach ($ia61712c27ea241bd7a543dc2b02ea572274d0322 as $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (!trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)) continue; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber(trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d)); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); } } return $this; } public function addRecipient($i39404799a9171a012cb8b15cd8f27b347aa44a5f, $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array()) { $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setNumber($i39404799a9171a012cb8b15cd8f27b347aa44a5f); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['country'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCountry($ia61712c27ea241bd7a543dc2b02ea572274d0322['country']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setCustomerId($ia61712c27ea241bd7a543dc2b02ea572274d0322['customerId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setAdminId($ia61712c27ea241bd7a543dc2b02ea572274d0322['adminId']); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient'])) $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setRecipient($ia61712c27ea241bd7a543dc2b02ea572274d0322['recipient']); $this->getRecipient()->addItem($if66cdb02406b60b7d525f1fed0b5904ce5586ee6); return $this; } public function isError() { return $this->v3a95f9a85ae3fecc89b69aa9ea2d057ac2807b0b ? true : false; } public function status($i7e9551ab4470830f87be4f9ff5edc75013bc9257 = false) { $i2e68560d8e15e3c18bb400939778a6bf1ae47190 = array(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SENT); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_sent.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SENT to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::ERROR); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_canceled.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('ERROR')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELIVERED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_accepted.gif'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELIVERED to recipient')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::UNAVAILABLE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_buffered.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('RECIPIENT UNAVAILABLE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SIMULATION); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_simulation.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SIMULATION')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::SCHEDULED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_scheduled.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('SCHEDULED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DELETED); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_deleted.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DELETED')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DND); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_donotdisturb.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DO NOT DISTURB registry (DND)')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; $if66cdb02406b60b7d525f1fed0b5904ce5586ee6 = new Varien_Object(); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setStatus(self::DUPLICATE); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setIcon('i_duplicate.png'); $if66cdb02406b60b7d525f1fed0b5904ce5586ee6->setName(Mage::helper('magesms')->__('DUPLICATE')); $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$if66cdb02406b60b7d525f1fed0b5904ce5586ee6->status] = $if66cdb02406b60b7d525f1fed0b5904ce5586ee6; if ($i7e9551ab4470830f87be4f9ff5edc75013bc9257 === false) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190; elseif (isset($i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257])) return $i2e68560d8e15e3c18bb400939778a6bf1ae47190[$i7e9551ab4470830f87be4f9ff5edc75013bc9257]; return false; } }
app/code/community/Topefekt/Magesms/Model/Smsprofile.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.$this->user->user.'&password='.$this->user->passwd); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Smsprofile extends Mage_Core_Model_Abstract { public $user; public $admins; public $credit; public $lang; public $currency = 'EUR'; public $_error; public function _construct() { parent::_construct(); $this->user = $this->loadUser(); $this->country = Mage::getModel('magesms/country')->getCollection(); $this->lang = Mage::helper('magesms')->detectLang(); if ($this->user->user) { $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost('action=info&username='.urlencode($this->user->user).'&password='.urlencode($this->user->passwd)); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $this->user = Mage::getModel('magesms/smsuser'); $this->_error = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']; } else { $this->credit = $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]; $this->admins = Mage::getModel('magesms/admins'); } foreach($this->country as $i037b855bc01175f2c77d5c3e19eda9a0003feff4) { if ($this->user->getCountry0() == $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getName()) { $this->currency = $i037b855bc01175f2c77d5c3e19eda9a0003feff4->getCurrency(); break; } } } } public function loadUser() { $i77d22463fc16d92f418e384077adc971e57f8cd8 = Mage::getModel('magesms/smsuser')->getCollection()->setOrder('ID', 'DESC'); $i77d22463fc16d92f418e384077adc971e57f8cd8->getSelect()->limit(1); foreach ($i77d22463fc16d92f418e384077adc971e57f8cd8 as $if63180c174f143cf7a7c15db835b3c86c46375ad) { return $if63180c174f143cf7a7c15db835b3c86c46375ad; } return Mage::getModel('magesms/smsuser'); } }
app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_System_Config_Lang { public function toOptionArray() { return array( array( 'value' => 'cz', 'label' => 'Czech', ), array( 'value' => 'de', 'label' => 'German', ), array( 'value' => 'el', 'label' => 'Greek', ), array( 'value' => 'en', 'label' => 'English', ), array( 'value' => 'es', 'label' => 'Spanish', ), array( 'value' => 'fr', 'label' => 'French', ), array( 'value' => 'it', 'label' => 'Italian', ), array( 'value' => 'pl', 'label' => 'Polish', ), array( 'value' => 'pt', 'label' => 'Portuguese', ), array( 'value' => 'ru', 'label' => 'Russian', ), array( 'value' => 'sk', 'label' => 'Slovak', ), array( 'value' => 'sr', 'label' => 'Serbian', ), array( 'value' => 'tr', 'label' => 'Turkish', ), ); } }
app/code/community/Topefekt/Magesms/api_test1.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ $url_address = ""; //write url of your eshop, without http://
3
+ $folder = ""; //eshop subfolder on hosting
4
+ $to = ""; // number, in international format, no leading zeros or a “+” sign, e.g., 447971796595
5
+ $text = "hello world"; // SMS text
6
+ $unicode = 1; // unicode yes=1, no=0
7
+ $key = ""; // security key from module configuration
8
+
9
+ $status = "";
10
+ $query = "to=".$to."&text=".$text."&unicode=".$unicode."&key=".$key;
11
+
12
+ if(strlen(trim($folder)) > 0)
13
+ {
14
+ $folder = "/".$folder;
15
+ }
16
+
17
+ $fp = fsockopen($url_address, 80, $errno, $errstr, 30);
18
+ if (!$fp)
19
+ {
20
+ die("Not connected");
21
+ }
22
+ else
23
+ {
24
+ fwrite($fp, "POST ".$folder."/magesms/api HTTP/1.0\r\n");
25
+ fwrite($fp, "User-Agent: Mozilla/4.0\r\n");
26
+ fwrite($fp, "Host: ".$url_address."\r\n");
27
+ fwrite($fp, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n");
28
+ fwrite($fp, "Content-length: ".strlen ($query)."\r\n");
29
+ fwrite($fp, "\r\n".$query."\r\n");
30
+
31
+ while (!feof($fp))
32
+ {
33
+ $res= fgets ($fp, 30000);
34
+ if(preg_match("/SMSSTATUS:OK/i",$res))
35
+ {
36
+ $status = "OK";
37
+ }
38
+ if(preg_match ("/SMSSTATUSERROROK:OK/i",$res))
39
+ {
40
+ $status = "ERROR";
41
+ }
42
+ }
43
+ fclose ($fp);
44
+ }
45
+ if(strlen($status) > 0)
46
+ {
47
+ echo "status: ".$status; //print status of SMS sending
48
+ }
49
+ else
50
+ {
51
+ die("Not connected");
52
+ }
app/code/community/Topefekt/Magesms/api_test2.php ADDED
@@ -0,0 +1,38 @@
1
+ <?php
2
+ $url_address = ""; //write url of your eshop, without http://
3
+
4
+ $to = "447971796595"; // number, in international format, no leading zeros or a “+” sign, e.g., 447971796595
5
+ $text = "hello world"; // SMS text
6
+ $unicode=0; // unicode yes=1, no=0
7
+ $key = ""; // security key from module configuration
8
+
9
+ $status = "";
10
+ $query = "to=".urlencode($to)."&text=".urlencode($text)."&unicode=".$unicode."&key=".$key;
11
+
12
+ function URLopen($url)
13
+ {
14
+ $dh = fopen("$url",'r');
15
+ $result = fread($dh, 8192);
16
+ return $result;
17
+ }
18
+
19
+ $data = @URLopen("http://".$url_address."/magesms/api?".$query);
20
+
21
+ if (!$data)
22
+ {
23
+ die("Not connected");
24
+ }
25
+ else
26
+ {
27
+ $res = $data;
28
+ if(preg_match("/SMSSTATUS:OK/i",$res))
29
+ {
30
+ $status = "OK";
31
+ }
32
+ if(preg_match ("/SMSSTATUSERROROK:OK/i",$res))
33
+ {
34
+ $status = "ERROR";
35
+ }
36
+ }
37
+
38
+ echo "status: ".$status; //print status of SMS sending
app/code/community/Topefekt/Magesms/api_test3.php ADDED
@@ -0,0 +1,35 @@
1
+ <?php
2
+ $url_address = ""; //write url of your eshop, without http://
3
+
4
+ $to = "447971796595"; // number, in international format, no leading zeros or a “+” sign, e.g., 447971796595
5
+ $text = "hello world"; // SMS text
6
+ $unicode=0; // unicode yes=1, no=0
7
+ $key = ""; // security key from module configuration
8
+
9
+ $status = "";
10
+ $query = "to=".urlencode($to)."&text=".urlencode($text)."&unicode=".$unicode."&key=".$key;
11
+
12
+ function URLopen($url)
13
+ {
14
+ return file_get_contents("$url");
15
+ }
16
+
17
+ $data = @URLopen("http://".$url_address."/magesms/api?".$query);
18
+ if (!$data)
19
+ {
20
+ die("Not connected");
21
+ }
22
+ else
23
+ {
24
+ $res = $data;
25
+ if(preg_match("/SMSSTATUS:OK/i",$res))
26
+ {
27
+ $status = "OK";
28
+ }
29
+ if(preg_match ("/SMSSTATUSERROROK:OK/i",$res))
30
+ {
31
+ $status = "ERROR";
32
+ }
33
+ }
34
+
35
+ echo "status: ".$status; //print status of SMS sending
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Adminhtml_Magesms_MarketingController extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function indexAction() { $this->_initAction(); $iff7e46827cbb6547116c592bf800f4687428abf9 = $this->_getCollection(); Mage::register('magesms_marketing_collection', $iff7e46827cbb6547116c592bf800f4687428abf9); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing'); $i42cf41da37138d64d37b0778e6561aab5e1239d6->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($i42cf41da37138d64d37b0778e6561aab5e1239d6); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(3) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } foreach($this->_getCollection() as $iff7e46827cbb6547116c592bf800f4687428abf9) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname())); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirectReferer(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->indexAction(); } } else { $this->_redirect('*/*/index'); } return $this; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterData; if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGender()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGender()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getFirstname()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', array('like' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getFirstname().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getLastname()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', array('like' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getLastname().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getWebsiteId()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getWebsiteId()); if (!is_null($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGroupId(null))) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGroupId()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getType() == 1) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', array('notnull' => true)); elseif ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getType() == 2) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', array('null' => true)); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getNewsletter()) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.customer_id = e.entity_id' ); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getNewsletter() == 1) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('ns.`subscriber_status` = 1'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCountryId()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCountryId()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCity()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', array('like' => '%'.$i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCity().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegAllyears()) { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(created_at, INTERVAL (YEAR(?) - YEAR(created_at)) YEAR)) >= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(created_at, INTERVAL (YEAR(?) - YEAR(created_at)) YEAR)) <= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()); } else { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', array('from' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom().' 00:00:00')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', array('to' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo().' 23:59:59')); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthAllyears()) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(at_dob.value, INTERVAL (YEAR(?) - YEAR(at_dob.value)) YEAR)) >= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(at_dob.value, INTERVAL (YEAR(?) - YEAR(at_dob.value)) YEAR)) <= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()); } else { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('from' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom().' 00:00:00')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('to' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo().' 23:59:59')); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCustomerNot()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => explode(',', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCustomerNot()))); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/marketing') ->_addBreadcrumb(Mage::helper('magesms')->__('SMS Marketing'), Mage::helper('magesms')->__('SMS Marketing')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('SMS Marketing')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Adminhtml_Magesms_MarketingController extends Mage_Adminhtml_Controller_Action { public $profile; protected $_filterData; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } else { $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter')); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterDates($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa, array('reg_from', 'reg_to', 'birth_from', 'birth_to')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_filterData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('sms')); $ia309f32db02d9de4490b0dcce975d0ccbce2c215 = $this->_filterDates($ia309f32db02d9de4490b0dcce975d0ccbce2c215, array('datumodesl')); $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = new Varien_Object(); foreach ($ia309f32db02d9de4490b0dcce975d0ccbce2c215 as $i670253c23c6fcba76bc4256a88fdd8fbc1041039 => $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) || is_numeric($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89)) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a->setData($i670253c23c6fcba76bc4256a88fdd8fbc1041039, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } } $this->_smsData = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a; } return $this; } public function indexAction() { $this->_initAction(); $iff7e46827cbb6547116c592bf800f4687428abf9 = $this->_getCollection(); Mage::register('magesms_marketing_collection', $iff7e46827cbb6547116c592bf800f4687428abf9); $i5509ac707290a86add15ab0ce4da982d395f4c4f = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/marketing.phtml') ); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setSmsData($this->_smsData ? $this->_smsData : $this->getRequest()->getParams()); $i5509ac707290a86add15ab0ce4da982d395f4c4f->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($i5509ac707290a86add15ab0ce4da982d395f4c4f); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = $this->getLayout()->createBlock('magesms/marketing_form'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/marketing'); $i42cf41da37138d64d37b0778e6561aab5e1239d6->setFilterData($this->_filterData); $this->getLayout()->getBlock('content')->append($i42cf41da37138d64d37b0778e6561aab5e1239d6); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_MARKETING) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096; $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } foreach($this->_getCollection() as $iff7e46827cbb6547116c592bf800f4687428abf9) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($iff7e46827cbb6547116c592bf800f4687428abf9->getTelephone(), array( 'country' => $iff7e46827cbb6547116c592bf800f4687428abf9->getCountryId(), 'customerId' => $iff7e46827cbb6547116c592bf800f4687428abf9->getId(), 'recipient' => $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstname().' '.$iff7e46827cbb6547116c592bf800f4687428abf9->getLastname())); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirectReferer(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->indexAction(); } } else { $this->_redirect('*/*/index'); } return $this; } protected function _getCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::helper('magesms')->getCustomerCollection(); $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa = $this->_filterData; if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGender()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGender()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getFirstname()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', array('like' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getFirstname().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getLastname()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', array('like' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getLastname().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getWebsiteId()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getWebsiteId()); if (!is_null($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGroupId(null))) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getGroupId()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getType() == 1) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', array('notnull' => true)); elseif ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getType() == 2) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', array('null' => true)); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getNewsletter()) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.customer_id = e.entity_id' ); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getNewsletter() == 1) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('ns.`subscriber_status` = 1'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCountryId()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCountryId()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCity()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', array('like' => '%'.$i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCity().'%')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegAllyears()) { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(created_at, INTERVAL (YEAR(?) - YEAR(created_at)) YEAR)) >= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(created_at, INTERVAL (YEAR(?) - YEAR(created_at)) YEAR)) <= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()); } else { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', array('from' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegFrom().' 00:00:00')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', array('to' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getRegTo().' 23:59:59')); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthAllyears()) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(at_dob.value, INTERVAL (YEAR(?) - YEAR(at_dob.value)) YEAR)) >= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('DAYOFYEAR(DATE_ADD(at_dob.value, INTERVAL (YEAR(?) - YEAR(at_dob.value)) YEAR)) <= DAYOFYEAR(?)', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()); } else { if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('from' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthFrom().' 00:00:00')); if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('to' => $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getBirthTo().' 23:59:59')); } if ($i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCustomerNot()) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => explode(',', $i5b3aa260bb208b1f4c5808ffd6ec3b60c98869aa->getCustomerNot()))); return $iff7e46827cbb6547116c592bf800f4687428abf9; } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/marketing') ->_addBreadcrumb(Mage::helper('magesms')->__('SMS Marketing'), Mage::helper('magesms')->__('SMS Marketing')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('SMS Marketing')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Adminhtml_Magesms_ProfileController extends Mage_Adminhtml_Controller_Action { public $profile; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { return parent::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.$i065df39c07d6c930a4781ba0b0f312703847fa81.'&password='.$i54d1b2514929b4ead571e37199167cb71517da24); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").$this->profile->user->user. base64_decode("JnBhc3N3b3JkPQ==").$this->profile->user->passwd; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.$ie955ee51cd0c7df255b696081bc48b422055d462.'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").$this->profile->user->email. base64_decode("JmptZW5vPQ==").$this->profile->user->companyname. base64_decode("Jmtvc29iYT0=").$this->profile->user->firstname. base64_decode("JmtwcmlqbWVuaT0=").$this->profile->user->lastname. "&adresa_ulice=".$this->profile->user->addressstreet. "&adresa_mesto=".$this->profile->user->addresscity. "&adresa_PSC=".$this->profile->user->addresszip. "&country0=".$this->profile->user->country0. base64_decode("JklDTz0=").$this->profile->user->companyid. base64_decode("JkRJQz0=").$this->profile->user->companyvat; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").$this->profile->user->user. base64_decode("JnBhc3N3b3JkPQ==").$this->profile->user->passwd. "&shop_domain=".$ie2d3c964f264968835c26fc02ee0d5f0820fe0ce; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->save(); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").$this->profile->user->user. base64_decode("JnBhc3N3b3JkPQ==").$this->profile->user->passwd. "&shop_domain=".$ie2d3c964f264968835c26fc02ee0d5f0820fe0ce. base64_decode("JnBvY2V0a3JlZGl0PQ==").$this->profile->user->pocetkredit. base64_decode("JmVtYWlsPQ==").$this->profile->user->deliveryemail; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->save(); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.$i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country').'&DIC='.$i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat'); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/profile') ->_addBreadcrumb(Mage::helper('magesms')->__('Edit user account'), Mage::helper('magesms')->__('Edit user account')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('Edit user account')); ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Adminhtml_Magesms_ProfileController extends Mage_Adminhtml_Controller_Action { public $profile; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { return parent::preDispatch(); } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/profile.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if ($this->profile->user->user) Mage::getModel('magesms/observer')->cronUpdate(); if (Mage::app()->loadCache('magesms_update_available')) { Mage::getSingleton('adminhtml/session')->addNotice($this->__('New version available for download:').' '.Mage::app()->loadCache('magesms_update_available')); } return $this; } public function loginAction() { $i065df39c07d6c930a4781ba0b0f312703847fa81 = Mage::app()->getRequest()->getParam('username'); $i54d1b2514929b4ead571e37199167cb71517da24 = Mage::app()->getRequest()->getParam('password'); $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost('action=login&username='.urlencode($i065df39c07d6c930a4781ba0b0f312703847fa81).'&password='.urlencode($i54d1b2514929b4ead571e37199167cb71517da24)); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] != 1) { Mage::getSingleton('adminhtml/session')->addError($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } else { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538d5406ca9a19e1687923f28236de86b1936c5757 = Mage::getModel('magesms/smsuser')->addData( array( 'user' => $i065df39c07d6c930a4781ba0b0f312703847fa81, 'passwd' => $i54d1b2514929b4ead571e37199167cb71517da24, 'email' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][0], 'companyname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1], 'regtype' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][1] ? 'firm' : 'person', 'addressstreet' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][2], 'addresscity' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][3], 'addresszip' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][4], 'companyid' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][5], 'companyvat' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][6], 'country0' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][7], 'firstname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][8], 'lastname' => $ia61712c27ea241bd7a543dc2b02ea572274d0322['data'][9] ) )->save(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__($ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } $this->_redirect('*/*/'); } public function validateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('email', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('email', '')); $this->profile->user->setData('addressstreet', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addressstreet', '')); $this->profile->user->setData('addresszip', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresszip', '')); $this->profile->user->setData('addresscity', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('addresscity', '')); $this->profile->user->setData('country0', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0', '')); $this->profile->user->setData('regtype', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('regtype', '')); $this->profile->user->setData('firstname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('firstname', '')); $this->profile->user->setData('lastname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('lastname', '')); if ($this->profile->user->getRegtype() == 'firm') { $this->profile->user->setData('companyname', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyname', '')); $this->profile->user->setData('companyid', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyid', '')); $this->profile->user->setData('companyvat', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('companyvat', '')); } else { $this->profile->user->setData('companyname', ''); $this->profile->user->setData('companyid', ''); $this->profile->user->setData('companyvat', ''); } $this->profile->user->setData('agree', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('agree', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } if ($this->profile->user->user) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQmdXNlcm5hbWU9").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd); } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = Mage::getConfig()->getNode('default/config/referer'); if ($ie955ee51cd0c7df255b696081bc48b422055d462) { $ie955ee51cd0c7df255b696081bc48b422055d462 = $ie955ee51cd0c7df255b696081bc48b422055d462->id; } else { $ie955ee51cd0c7df255b696081bc48b422055d462 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('refererid', ''); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=register&refererid='.urlencode($ie955ee51cd0c7df255b696081bc48b422055d462).'&'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 .= base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->email). base64_decode("JmptZW5vPQ==").urlencode($this->profile->user->companyname). base64_decode("Jmtvc29iYT0=").urlencode($this->profile->user->firstname). base64_decode("JmtwcmlqbWVuaT0=").urlencode($this->profile->user->lastname). "&adresa_ulice=".urlencode($this->profile->user->addressstreet). "&adresa_mesto=".urlencode($this->profile->user->addresscity). "&adresa_PSC=".urlencode($this->profile->user->addresszip). "&country0=".urlencode($this->profile->user->country0). base64_decode("JklDTz0=").urlencode($this->profile->user->companyid). base64_decode("JkRJQz0=").urlencode($this->profile->user->companyvat); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 1 || empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error']); } else { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array(Mage::helper('magesms')->__($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'])); } } elseif (!$this->profile->user->user && $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1) { $this->profile->user->setUser($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][0]); $this->profile->user->setPasswd($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'][1]); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i5bf407a3ecf35ff195a9c7e8f546cfc606253fad = $this->profile->user->getId(); $this->profile->user->save(); if ($i5bf407a3ecf35ff195a9c7e8f546cfc606253fad) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); else { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was created.')); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) $this->profile->user->setData('URLreports', 1)->save(); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function saveAction() { $this->_redirect('*/*/'); } public function deleteadminAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $this->profile->admins->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Admin to delete.')); $this->_redirect('*/*/'); } public function saveadminAction() { $this->_redirect('*/*/'); } public function validateadminAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $this->profile->admins->setData(Mage::app()->getRequest()->getPost()); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 > 0) { $this->profile->admins->setId($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->admins->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->admins->save(); if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was changed.')); else Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin was created.')); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesettingsAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $this->profile->user->setData('simulatesms', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('simulatesms', 0)); $this->profile->user->setData('deletedb', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deletedb', 0)); $this->profile->user->setData('URLreports', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('URLreports', 0)); $this->profile->user->setData('pocetkredit', (int)$iacbd1c78463510856e506611fe14b5e1173581a6->getPost('pocetkredit', 0)); $this->profile->user->setData('deliveryemail', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('deliveryemail', '')); $this->profile->user->setData('prefbilling', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('prefbilling', 0)); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $this->profile->user->validate(); $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = ''; if ($this->profile->user->getData('URLreports')) { $ie2d3c964f264968835c26fc02ee0d5f0820fe0ce = Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/delivery'; } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = base64_decode("YWN0aW9uPWVkaXQyJnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). "&shop_domain=".urlencode($ie2d3c964f264968835c26fc02ee0d5f0820fe0ce). base64_decode("JnBvY2V0a3JlZGl0PQ==").urlencode($this->profile->user->pocetkredit). base64_decode("JmVtYWlsPQ==").urlencode($this->profile->user->deliveryemail); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] != 99 || !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 || $i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 5) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed.')); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 11) { Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Account was changed, but module URL for DR does not answer.')); $this->profile->user->setData('URLreports', 0); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 3) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } elseif ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 4) { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('you can change account after ').$i55dd4e7042a1f9031b84f07f04c37165ce3d0720['error'].Mage::helper('magesms')->__(' seconds'); } } else { $if3b1e2c1706de4c1bca112c669caba3a0420b880 = Mage::helper('magesms')->__('error'); } if (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880) && is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f[] = $if3b1e2c1706de4c1bca112c669caba3a0420b880; } elseif (!empty($if3b1e2c1706de4c1bca112c669caba3a0420b880)) { $ibdd27a8dd714410289189d318feb96fe6ed8e07f = array($if3b1e2c1706de4c1bca112c669caba3a0420b880); } if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $this->profile->user->save(); } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesettingsAction() { $this->_redirect('*/*/'); } public function vatvalidateAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country') && $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=checkVAT&country0='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('country')).'&DIC='.urlencode($i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('companyvat')); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getSingleton('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = 'true'; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/profile') ->_addBreadcrumb(Mage::helper('magesms')->__('Edit user account'), Mage::helper('magesms')->__('Edit user account')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('Edit user account')); ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Adminhtml_Magesms_SendsmsController extends Mage_Adminhtml_Controller_Action { public $profile; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } return $this; } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(4) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/sendsms') ->_addBreadcrumb(Mage::helper('magesms')->__('Send SMS'), Mage::helper('magesms')->__('Send SMS')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('Send SMS')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Adminhtml_Magesms_SendsmsController extends Mage_Adminhtml_Controller_Action { public $profile; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } return $this; } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } public function sendAction() { if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('text'); $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unicode') ? true : false; $ifc17de93671eea5715520ecfbc4dc543818685b8 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('unique') ? true : false; $ief058b7f255db4398d193a2545513eb1c6eb5e8b = explode(',', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('recipients')); if (!empty($_FILES['sms_file']['tmp_name']) && is_uploaded_file($_FILES['sms_file']['tmp_name'])) { $ief058b7f255db4398d193a2545513eb1c6eb5e8b = array_merge($ief058b7f255db4398d193a2545513eb1c6eb5e8b, str_getcsv(file_get_contents($_FILES['sms_file']['tmp_name']), "\n")); } if (!$ief058b7f255db4398d193a2545513eb1c6eb5e8b) Mage::throwException(Mage::helper('magesms')->__('Recipients found: 0')); if (!$idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) Mage::throwException(Mage::helper('magesms')->__('Fill in SMS text.')); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setRecipient($ief058b7f255db4398d193a2545513eb1c6eb5e8b) ->setMessage($idfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) ->setPriority(false) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) ->setUnique($ifc17de93671eea5715520ecfbc4dc543818685b8); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sendlater') && $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl')) { $i4c323947385ff52539168f26084feed4bc17e2dc = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl'); $i6aa8d50211ad373efab0896425f6f5fa0e013c29 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_hour'); $if8001c570b9f0e904df8b36797628015beb8fa80 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datumodesl_min'); $i836a3cd8c554d1c35cc3c6cf3e3f49052b683096 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('datereal', 0); $i4c323947385ff52539168f26084feed4bc17e2dc = Mage::getModel('core/date')->gmtTimestamp(strtotime("$i4c323947385ff52539168f26084feed4bc17e2dc $i6aa8d50211ad373efab0896425f6f5fa0e013c29:$if8001c570b9f0e904df8b36797628015beb8fa80:00") + 3600*$i836a3cd8c554d1c35cc3c6cf3e3f49052b683096); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setSendlater($i4c323947385ff52539168f26084feed4bc17e2dc); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); $this->_redirect('*/*/index'); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/sendsms.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->renderLayout(); } } else { $this->_redirect('*/*/index'); } return $this; } public function loadCustomersAction() { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = ''; if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i933cfa8bba921101c14f35998fc501e030c9db5b = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('char')) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('lastname', array('like' => $i933cfa8bba921101c14f35998fc501e030c9db5b.'%')); $ibad8f78c098260b16424eb12ceee5f8336591d56->addAttributeToSort('lastname', 'ASC'); foreach($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $i21e55df616c305955791876c1eb4da83448beba2->getLastname().', '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstname().';'; $id1caa2f79c0787a3e797d6d388cd6f00ced4282f = Mage::helper('magesms')->prepareNumber($i21e55df616c305955791876c1eb4da83448beba2->getTelephone(), 'customer', empty($i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]) ? '' : $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$i21e55df616c305955791876c1eb4da83448beba2->getCountryId()]); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 .= $id1caa2f79c0787a3e797d6d388cd6f00ced4282f['mobile']."\n"; } } } $this->getResponse()->clearHeaders()->setHeader('Content-Type', 'text/html')->setBody($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/sendsms') ->_addBreadcrumb(Mage::helper('magesms')->__('Send SMS'), Mage::helper('magesms')->__('Send SMS')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('Send SMS')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php CHANGED
@@ -13,4 +13,4 @@
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Mage_Adminhtml_Controller_Action { public $profile; public $confirmsms; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } return $this; } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.$this->profile->user->user.'&password='.$this->profile->user->passwd.'&area='.$i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea().'&currency='.$this->profile->currency; $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").$i74c7f58458d186850e8386ae20067ea0a7958311->getIsms().base64_decode("JnNlbmRlcj0=").$i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID'); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".$this->confirmsms.base64_decode("JnVzZXJuYW1lPQ==").$this->profile->user->user.base64_decode("JnBhc3N3b3JkPQ==").$this->profile->user->passwd.base64_decode("JnNlbmRlcklEPQ==").$i1b3f50fe6674f47cc7c1967f93ff153879178f04.$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".$this->profile->user->user.base64_decode("JnBhc3N3b3JkPQ==").$this->profile->user->passwd.base64_decode("JmNvZGU9").$id3e549697752385571e09ffe4add9278d2d6923b.base64_decode("JnNlbmRlcklEPQ==").$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/wizard') ->_addBreadcrumb(Mage::helper('magesms')->__('Wizard'), Mage::helper('magesms')->__('Wizard')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('SMS Settings')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
13
* @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Adminhtml_Magesms_WizardController extends Mage_Adminhtml_Controller_Action { public $profile; public $confirmsms; protected function _construct() { $this->profile = Mage::getSingleton('magesms/smsprofile'); $this->confirmsms = Mage::helper('magesms')->__('Confirmation code: '); } public function preDispatch() { parent::preDispatch(); if (!$this->profile->user->getUser()) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); if (!empty($this->profile->_error)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('magesms')->__($this->profile->_error)); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('magesms')->__('Not registered yet? Create account now!')); } $this->_redirect('*/magesms_profile'); } return $this; } public function indexAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); if (!Mage::app()->loadCache('magesms_pricelist_update') || Mage::app()->loadCache('magesms_pricelist_update') != date('Y-m-d')) { Mage::app()->saveCache(date('Y-m-d'), 'magesms_pricelist_update'); $this->updatepricelistAction(); } return $this; } public function editAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = true; if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { $i037b855bc01175f2c77d5c3e19eda9a0003feff4 = Mage::getSingleton('magesms/country_area')->getCollection()->addFilter('country_name', $ia118aa93019887b74fdff43dbcf59dce271cae7d); if ($i037b855bc01175f2c77d5c3e19eda9a0003feff4->count()) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = 'action=dost&username='.urlencode($this->profile->user->user).'&password='.urlencode($this->profile->user->passwd). '&area='.urlencode($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()).'&currency='.urlencode($this->profile->currency); $i55dd4e7042a1f9031b84f07f04c37165ce3d0720 = Mage::getModel('magesms/api')->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['errno'] == 1 && !empty($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['data'])) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setInfo($i55dd4e7042a1f9031b84f07f04c37165ce3d0720['datasrc']); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($i037b855bc01175f2c77d5c3e19eda9a0003feff4->getFirstItem()->getArea()); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($i30f20aafde612a957f7f966cb5b85e35782bc88a); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($ia118aa93019887b74fdff43dbcf59dce271cae7d); Mage::register('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } else { $i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4 = false; } } if ($i4d3f3bffcd16d5910b26a4511d33ad3b5e4c61d4) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-edit.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function deleteAction() { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id')) { try { $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ice10b700e3771fcda63608142bce93b608228583->delete(); Mage::getSingleton('adminhtml/session')->addSuccess($ice10b700e3771fcda63608142bce93b608228583->getAreaText().$this->__(' was deleted.')); $this->_redirect('*/*/'); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to delete.')); $this->_redirect('*/*/'); } public function addcountrycustomerAction() { $this->getRequest()->setParam('type', 'customer'); $this->addcountryAction(); } public function addcountryadminAction() { $this->getRequest()->setParam('type', 'admin'); $this->addcountryAction(); } public function addcountryAction() { $ia118aa93019887b74fdff43dbcf59dce271cae7d = $this->getRequest()->getParam('country0'); $i30f20aafde612a957f7f966cb5b85e35782bc88a = $this->getRequest()->getParam('type'); if ($ia118aa93019887b74fdff43dbcf59dce271cae7d && $i30f20aafde612a957f7f966cb5b85e35782bc88a) { try { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->getCollection(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->addFilter('area_text', $ia118aa93019887b74fdff43dbcf59dce271cae7d)->addFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->count()) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getFirstItem()->getId(); $this->_redirect('*/*/edit', array('id'=>$i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); return; } $this->_redirect('*/*/edit', array('country0'=>$ia118aa93019887b74fdff43dbcf59dce271cae7d, 'type'=>$i30f20aafde612a957f7f966cb5b85e35782bc88a, 'id'=>0)); return; } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($this->__($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage())); $this->_redirect('*/*/'); return; } } Mage::getSingleton('adminhtml/session')->addError($this->__('Unable to find a Route to load.')); $this->_redirect('*/*/'); } public function addrouteAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess').$this->__(' was saved.')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function addroutesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-sender.phtml') ); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } else { $this->_redirect('*/*/index'); } } public function validateAction($i5ba2c5364d6756af3701b475c0706df889a2545f = false) { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes'); if ($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->load($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('id')); } $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setArea($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('area')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setAreaText($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('country0')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setType($iacbd1c78463510856e506611fe14b5e1173581a6->getPost('type')); $iecc25823227283479c5811005734b6ee2bd56071 = explode(';', $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('isms')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setIsms($iecc25823227283479c5811005734b6ee2bd56071[0]); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setSendertype($iecc25823227283479c5811005734b6ee2bd56071[1]); $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { if ($i5ba2c5364d6756af3701b475c0706df889a2545f === true) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); } else { if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SYSTEM || $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_SIM) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', ''); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); Mage::getSingleton('adminhtml/session')->setData('routesuccess', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText()); } else { Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function validatesenderAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('adminhtml/session')->getData('routes'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = trim(($i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('sender')) ? $i51c6d8e5b3a92b4b73711680253408ec6d3d25f6 : $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('newsender')); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->setData('senderID', $i1b3f50fe6674f47cc7c1967f93ff153879178f04); } else { $id3e549697752385571e09ffe4add9278d2d6923b = $iacbd1c78463510856e506611fe14b5e1173581a6->getPost('code'); $i1b3f50fe6674f47cc7c1967f93ff153879178f04 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID'); } $ibdd27a8dd714410289189d318feb96fe6ed8e07f = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->validate(true); if (is_array($ibdd27a8dd714410289189d318feb96fe6ed8e07f) && sizeof($ibdd27a8dd714410289189d318feb96fe6ed8e07f)) { Mage::throwException(implode('<br />', $ibdd27a8dd714410289189d318feb96fe6ed8e07f)); } else { $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235 = Mage::getModel('core/resource_transaction') ->addObject($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_OWN) { $i451f679eaafeecb81387b150019f0d9e0fa83d16 = Mage::getModel('magesms/api'); if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i74c7f58458d186850e8386ae20067ea0a7958311 = $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getGate($i1b3f50fe6674f47cc7c1967f93ff153879178f04, 'admin'); $i9e1925546463c5a41ccbc625ed973556cc86a495 = ''; if(!$i74c7f58458d186850e8386ae20067ea0a7958311->isEmpty()): $i9e1925546463c5a41ccbc625ed973556cc86a495 = base64_decode("JmlzbXM9").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getIsms()).base64_decode("JnNlbmRlcj0=").urlencode($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); endif; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderID&text_sms=".urlencode($this->confirmsms).base64_decode("JnVzZXJuYW1lPQ==").urlencode($this->profile->user->user). base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd).base64_decode("JnNlbmRlcklEPQ==").urlencode($i1b3f50fe6674f47cc7c1967f93ff153879178f04).$i9e1925546463c5a41ccbc625ed973556cc86a495; $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if (in_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'], array(1, 11))) { $i5ee2fa256ff77dd811a9c1911f7563263a694e4b = Mage::getSingleton('magesms/smshistory'); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setNumber('+'.$i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setDate(date('Y-m-d h:i:s', Mage::getModel('core/date')->timestamp(time()))); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setText($this->confirmsms); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setStatus(1); list($ie10d5ed46013be2962a9d08e0e1912a9c56891b4, $i58457975a91d59a84d2920953badcb7365ac1f01, $if928b7780c12c52495a2f84d8c183269cfcb7c63) = explode("__", $ia61712c27ea241bd7a543dc2b02ea572274d0322['datasrc']); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setPrice($i58457975a91d59a84d2920953badcb7365ac1f01); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setCredit($if928b7780c12c52495a2f84d8c183269cfcb7c63); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSender($i74c7f58458d186850e8386ae20067ea0a7958311->getData('senderID')); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setUnicode(0); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setSmsid($ie10d5ed46013be2962a9d08e0e1912a9c56891b4); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->setTotal(1); $i5ee2fa256ff77dd811a9c1911f7563263a694e4b->save(); $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = true; Mage::getSingleton('adminhtml/session')->setData('routes', $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 111) { } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 9) { Mage::throwException(Mage::helper('magesms')->__('error - wrong number or unavailable')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 10) { Mage::throwException(Mage::helper('magesms')->__('error - low credit for sending validation SMS')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3 && $ia61712c27ea241bd7a543dc2b02ea572274d0322['error'] == 15) { Mage::throwException(Mage::helper('magesms')->__('error - unauthorized senderID in confirmation sms')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error'])); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server').' '.$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = "action=checksenderIDcode&username=".urlencode($this->profile->user->user).base64_decode("JnBhc3N3b3JkPQ==").urlencode($this->profile->user->passwd). base64_decode("JmNvZGU9").urlencode($id3e549697752385571e09ffe4add9278d2d6923b).base64_decode("JnNlbmRlcklEPQ==").urlencode($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getData('senderID')); $ia61712c27ea241bd7a543dc2b02ea572274d0322 = $i451f679eaafeecb81387b150019f0d9e0fa83d16->serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322); if ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 1) { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode = false; } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 3) { Mage::throwException(Mage::helper('magesms')->__('error - ').$ia61712c27ea241bd7a543dc2b02ea572274d0322['error']); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 4) { Mage::throwException(Mage::helper('magesms')->__('login error')); } elseif ($ia61712c27ea241bd7a543dc2b02ea572274d0322['errno'] == 5) { Mage::throwException(Mage::helper('magesms')->__('correctly confirm sms code')); } else { Mage::throwException(Mage::helper('magesms')->__('can not connect to SMS server')); } } $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'ownnumbersender'; } else { $i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd = 'textsender'; } if ($ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->displayCode !== true) { $i5b2de9a29c087ac444f7af969b9863250e38aa27 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->getCollection()->addFilter('val', $i1b3f50fe6674f47cc7c1967f93ff153879178f04)->getFirstItem(); $i0a2378e8d343fdb890a9c568b07c541a35a12341 = Mage::getSingleton('magesms/'.$i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd)->load($i5b2de9a29c087ac444f7af969b9863250e38aa27->getId())->setVal($i1b3f50fe6674f47cc7c1967f93ff153879178f04); $i47f954bfb9dd4be93a5c46b2c8260d3fbc064235->addObject($i0a2378e8d343fdb890a9c568b07c541a35a12341) ->save(); Mage::getSingleton('adminhtml/session')->unsetData('routes'); if ($i2e5aa867ea7c6f8ed9ffffe56b63b837364669dd == 'textsender') { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } else { Mage::getSingleton('adminhtml/session')->setData('routesuccess', $this->__('Own number sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); } } } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderAction() { if (Mage::getSingleton('adminhtml/session')->hasData('routes')) { $this->_redirect('*/*/addroutesender'); } else { Mage::getSingleton('adminhtml/session')->addSuccess(Mage::getSingleton('adminhtml/session')->getData('routesuccess')); Mage::getSingleton('adminhtml/session')->unsetData('routesuccess'); $this->_redirect('*/*/index'); } } public function updatepricelistAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getSingleton('magesms/routes')->updatepricelist($this->profile->currency); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Pricelist was successfully updated.')); $this->_redirect('*/*/index'); } public function alternativeAction() { $this->_initAction(); $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'my_block_name_here', array('template' => 'topefekt/magesms/wizard-alternative.phtml') ); $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $this->getRequest()->getParam('id'); $ice10b700e3771fcda63608142bce93b608228583 = Mage::getModel('magesms/routes')->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); if ($ice10b700e3771fcda63608142bce93b608228583->getSendertype() == Topefekt_Magesms_Model_Routes::SENDER_TEXT) { $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setRoute($ice10b700e3771fcda63608142bce93b608228583); $ie7d1444276fe9dee937fd96d6e0519397fdc5701 = Mage::getModel('core/store_group')->getCollection()->setLoadDefault(false); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $ice10b700e3771fcda63608142bce93b608228583->getId()); foreach($ie7d1444276fe9dee937fd96d6e0519397fdc5701 as $i7079b107a03c03d74ad14b853dad74b85b2d25d1) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsender($ice10b700e3771fcda63608142bce93b608228583->getData('senderID')); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i7079b107a03c03d74ad14b853dad74b85b2d25d1->getId()) { $i7079b107a03c03d74ad14b853dad74b85b2d25d1->setTextsenderAlternative($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender()); break; } } } $i8ee45e0018a32fb1a855b82624506e35789cc4d2->setStores($ie7d1444276fe9dee937fd96d6e0519397fdc5701); $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); return $this; } $this->_redirect('*/*/index'); } public function validatesenderalternativeAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ( $this->getRequest()->getPost() ) { $i75cfaf6baf7d451ab67af9aeef048aecfea24a82 = Mage::getModel('core/resource_transaction'); try { $iacbd1c78463510856e506611fe14b5e1173581a6 = Mage::app()->getRequest(); $i9bd2c88ca2206122845c5e189e2b6856a2409e3a = Mage::getModel('magesms/routes_alternative')->getCollection()->addFieldToFilter('route_id', $this->getRequest()->getParam('id')); $if2edf17aeebbb7b610065024e328c82ec7b37bbe = $iacbd1c78463510856e506611fe14b5e1173581a6->getParam('store_group'); foreach($i9bd2c88ca2206122845c5e189e2b6856a2409e3a as $ida3b491904fb073f446bf820cd55a0ff69b347d1) { $if433319f9b66f967b64d332ee0b51bea06276d26 = false; foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getStoreGroupId() == $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66) { $if433319f9b66f967b64d332ee0b51bea06276d26 = true; if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->getTextsender() != $i340682ca0ed5a64e8ea449191da847abaf0aec6f) { if (!$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); } else { $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); } } unset($if2edf17aeebbb7b610065024e328c82ec7b37bbe[$i3bf172bc34c83f4a18624b192bc0bd7c4d647a66]); break; } } if ($if433319f9b66f967b64d332ee0b51bea06276d26 !== true) $ida3b491904fb073f446bf820cd55a0ff69b347d1->isDeleted(true); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } foreach($if2edf17aeebbb7b610065024e328c82ec7b37bbe as $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66=>$i340682ca0ed5a64e8ea449191da847abaf0aec6f) { $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getModel('magesms/routes_alternative'); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setRouteId($this->getRequest()->getParam('id')); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setStoreGroupId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ida3b491904fb073f446bf820cd55a0ff69b347d1->setTextsender($i340682ca0ed5a64e8ea449191da847abaf0aec6f); $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->addObject($ida3b491904fb073f446bf820cd55a0ff69b347d1); } $i75cfaf6baf7d451ab67af9aeef048aecfea24a82->save(); } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $this->_initLayoutMessages('adminhtml/session'); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } public function savesenderalternativeAction() { $ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec = Mage::getModel('magesms/routes')->load($this->getRequest()->getParam('id')); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Text sender ID for ').$ie8b7b1b62dc29a284d794c9f11a8ee2ea7472eec->getAreaText().$this->__(' was saved.')); $this->_redirect('*/*/index'); } protected function _initAction() { $this->loadLayout() ->_setActiveMenu('magesms/wizard') ->_addBreadcrumb(Mage::helper('magesms')->__('Wizard'), Mage::helper('magesms')->__('Wizard')) ->_title(Mage::helper('magesms')->__('MageSMS')) ->_title(Mage::helper('magesms')->__('SMS Settings')) ; $this->getLayout()->getBlock('head')->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/jquery-1.9.1.min.js') ->addJs('topefekt/jquery-noconflict.js') ->addJs('topefekt/functions.js'); return $this; } }
app/code/community/Topefekt/Magesms/controllers/ApiController.php ADDED
@@ -0,0 +1,41 @@
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_ApiController extends Mage_Core_Controller_Front_Action {
17
+ public function indexAction() {
18
+ if (!Mage::getStoreConfig('magesms/api/active') || !Mage::getStoreConfig('magesms/api/apikey'))
19
+ die('DISABLED');
20
+ $params = $this->getRequest();
21
+ $auth = $params->getParam('key') == Mage::getStoreConfig('magesms/api/apikey') ? true : false;
22
+ $to = $params->getParam('to');
23
+ $text = $params->getParam('text');
24
+ $unicode = $params->getParam('unicode') ? true : false;
25
+
26
+ if ($auth && $to && $text) {
27
+ $sms = Mage::getModel('magesms/sms');
28
+ $sms->setRecipient($to)
29
+ ->setMessage($text)
30
+ ->setType(Topefekt_Magesms_Model_Sms::TYPE_SIMPLE) // simple sms
31
+ ->setUnicode($unicode)
32
+ ->send();
33
+ if ($sms->isError())
34
+ echo "SMSSTATUS:ERROR";
35
+ else
36
+ echo "SMSSTATUS:OK";
37
+ } else {
38
+ echo "SMSSTATUS:ERROR";
39
+ }
40
+ }
41
+ }
app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php ADDED
@@ -0,0 +1,28 @@
1
+ <?php
2
+ /**
3
+ * Mage SMS - SMS notification & SMS marketing
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the BSD 3-Clause License
8
+ * It is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/BSD-3-Clause
10
+ *
11
+ * @category TOPefekt
12
+ * @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2014 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ $iddb18dc4afa6663cf07a52c741943ff87cbe3896 = $this; $iddb18dc4afa6663cf07a52c741943ff87cbe3896->startSetup(); $i195899c9895b81b9bc75dba762c949638a6f36dd = Mage::getModel('magesms/country_lang')->getCollection()->addFieldToFilter('lang', array('like' => 'fr-fr')); if (!$i195899c9895b81b9bc75dba762c949638a6f36dd->count()) { $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("INSERT INTO {$this->getTable('magesms_country_lang')} (`country_name`, `lang`, `iso2`) VALUES ('France', 'fr-fr', 'fr');"); } $iddb18dc4afa6663cf07a52c741943ff87cbe3896->run("
17
+ INSERT INTO `{$this->getTable('magesms_hooks')}` (`name`, `info`, `owner`, `group`, `background`, `icon`, `template`, `template2`, `notice`, `lang`) VALUES
18
+ ('updateOrderStatus', 'Ενημέρωση κατάστασης παραγγελίας για', 3, 0, '', '', 'Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ {{order_status_name}}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'el'),
19
+ ('customerRegisterSuccess', 'Δημιουργία λογαριασμού πελάτη επιτυχής', 3, 2, '', '', 'Ο πελάτης {customer_firstname} {customer_lastname}, ID: {customer_id}, ΕΧΕΙ ΚΑΝΕΙ ΕΓΓΡΑΦΗ ΣΤΟ {shop_name}.', 'ΑΓΑΠΗΤΕ {customer_firstname} {customer_lastname}, Ο ΛΟΓΑΡΙΑΣΜΟΣ ΣΑΣ ΣΤΟ {shop_name} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ ΜΕ ΟΝΟΜΑ ΧΡΗΣΤΗ: {customer_email}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ!', '{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'el'),
20
+ ('newOrder', 'Νέες παραγγελίες', 3, 1, '', '', 'ΝΕΑ ΠΑΡΑΓΓΕΛΙΑ ΑΠΟ {customer_firstname} {customer_lastname}, ID ΠΕΛΑΤΗ: {customer_id}, ID ΠΑΡΑΓΓΕΛΙΑΣ: {order_id}, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΠΑΡΑΓΓΕΛΙΑ: {order_products2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ {shop_name}.', '{customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, <br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}<br /><br /> {newOrder1}, {newOrder2}, {newOrder3}, {newOrder4}, {newOrder5}<br /><br />{cart_id}, {customer_message}', 'el'),
21
+ ('contactForm', 'Φόρμα επικοινωνίας', 3, 4, '', '', '{customer_email} - {customer_message}', '', '{customer_email}, {customer_name}, {customer_phone}{customer_message}, {customer_message_short1}, {customer_message_short2}, {customer_message_short3}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}', 'el'),
22
+ ('updateOrderTrackingNumber', 'Ενημέρωση για το Κωδικό Ανίχνευσης (Tracking Code) της παραγγελίας', 3, 1, '', '', 'Η ΠΑΡΑΓΓΕΛΙΑ {order_id} ΕΧΕΙ ΕΝΗΜΕΡΩΘΕΙ, Ο ΚΩΔ. ΑΝΙΧΝΕΥΣΗΣ ΕΙΝΑΙ {order_shipping_number}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΕΧΕΙ ΑΠΟΣΤΑΛΕΙ, Ο ΚΩΔΙΚΟΣ ΑΝΙΧΝΕΥΣΗΣ (TRACKING CODE) ΕΙΝΑΙ {order_shipping_number}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{employee_id}, {employee_email}', 'el'),
23
+ ('createCreditMemo', 'Χρησιμοποιείται όταν η ποσότητα ενός προϊόντος αλλάξει μέσα σε μια παραγγελία', 3, 1, '', '', 'ΣΤΗ ΠΑΡΑΓΓΕΛΙΑ {order_id} ΕΧΕΙ ΑΛΛΑΞΕΙ Η ΠΟΣΟΤΗΤΑ, {orderSlip2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', 'ΣΤΗ ΠΑΡΑΓΓΕΛΙΑ ΣΑΣ {order_id} ΕΧΕΙ ΑΛΛΑΞΕΙ Η ΠΟΣΟΤΗΤΑ, {orderSlip2}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}.', ' {customer_id}, {customer_email}, {customer_company}, {customer_lastname}, {customer_firstname}, {customer_address}, {customer_postcode}, {customer_city}, {customer_country}, {customer_state}, {customer_phone}, {customer_vat_number}, {customer_invoice_company}, {customer_invoice_lastname}, {customer_invoice_firstname}, {customer_invoice_address}, {customer_invoice_postcode}, {customer_invoice_city}, {customer_invoice_country}, {customer_invoice_state}, {customer_invoice_phone}, {customer_invoice_vat_number}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{order_id}, {order_payment}, {order_total_paid}, {order_currency}, {order_date}, {order_date1}, {order_date2}, {order_date3}, {order_date4}, {order_date5}, {order_date6}, {order_date7}, {order_time}, {order_time1}, {order_shipping_number}, {order_reference}, {carrier_name}<br /><br />{creditMemo1}, {creditMemo2}, {creditMemo3}, {creditMemo4}, {creditMemo5}\r\n<br /><br />{employee_id}, {employee_email}', 'el'),
24
+ ('productOutOfStock', 'Προϊόν εκτός αποθέματος', 3, 3, '', '', 'ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΕΙΝΑΙ ΣΧΕΔΟΝ ΕΚΤΟΣ ΑΠΟΘΕΜΑΤΟΣ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'el'),
25
+ ('productLowStock', 'Προϊόν εκτός αποθέματος', 3, 3, '', '', 'ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΕΙΝΑΙ ΣΧΕΔΟΝ ΕΚΤΟΣ ΑΠΟΘΕΜΑΤΟΣ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}.', '', '{shop_domain}, {shop_name}, {shop_email}, {shop_phone}<br /><br />{customer_id}, {customer_email}, {customer_lastname}, {customer_firstname}<br /><br />{product_id}, {product_quantity}, {product_name}, {product_ref}, {product_supplier_ref}, {product_ean13}, {product_upc}, {product_supplier_id}, {product_supplier}', 'el');
26
+
27
+ UPDATE `{$this->getTable('magesms_country_lang')}` SET `iso2` = 'el' WHERE `country_name` LIKE 'Greece';
28
+ ");
app/code/community/Topefekt/Magesms/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
<config>
3
<modules>
4
<Topefekt_Magesms>
5
- <version>1.0.3</version>
6
</Topefekt_Magesms>
7
</modules>
8
2
<config>
3
<modules>
4
<Topefekt_Magesms>
5
+ <version>1.0.4</version>
6
</Topefekt_Magesms>
7
</modules>
8
app/code/community/Topefekt/Magesms/etc/system.xml CHANGED
@@ -30,6 +30,40 @@
30
</language>
31
</fields>
32
</template>
33
</groups>
34
</magesms>
35
</sections>
30
</language>
31
</fields>
32
</template>
33
+ <api translate="label" module="magesms">
34
+ <label>API</label>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>103</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>0</show_in_website>
39
+ <show_in_store>0</show_in_store>
40
+ <fields>
41
+ <active translate="label,comment" module="magesms">
42
+ <label>Enabled</label>
43
+ <comment>http://domain/magesms/api or http://domain/en/magesms/api</comment>
44
+ <frontend_type>select</frontend_type>
45
+ <source_model>adminhtml/system_config_source_yesno</source_model>
46
+ <sort_order>100</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>0</show_in_website>
49
+ <show_in_store>0</show_in_store>
50
+ </active>
51
+ <apikey translate="label,comment" module="magesms">
52
+ <label>API Key</label>
53
+ <comment>API secured key</comment>
54
+ <frontend_type>text</frontend_type>
55
+ <frontend_model>magesms/system_config_apikeygenerator</frontend_model>
56
+ <depends>
57
+ <active>1</active>
58
+ </depends>
59
+ <validate>required-entry</validate>
60
+ <sort_order>150</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>0</show_in_website>
63
+ <show_in_store>0</show_in_store>
64
+ </apikey>
65
+ </fields>
66
+ </api>
67
</groups>
68
</magesms>
69
</sections>
app/locale/el_GR/Topefekt_Magesms.csv ADDED
@@ -0,0 +1,503 @@
1
+ "lang_iso_code","el"
2
+ "smscurrency","EUR"
3
+ "lang_alphabet","Α;Β;Γ;Δ;Ε;Ζ;Η;Θ;Ι;Κ;Λ;Μ;Ν;Ξ;Ο;Π;Ρ;Σ;Τ;Υ;Φ;Χ;Ψ;Ω;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"
4
+ "v_all_years","Όλα τα έτη"
5
+ "Settings","Ρυθμίσεις"
6
+ "Developer:","Προγραμματιστής:"
7
+ "TOPefekt s.r.o.","TOPefekt s.r.o."
8
+ "Address:","Διεύθυνση:"
9
+ "B. Nemcove 767/13","B. Nemcove 767/13"
10
+ "78701 Sumperk","78701 Sumperk"
11
+ "Czech Republic","Δημοκρατία της Τσεχίας"
12
+ "VAT: CZ29444268","ΑΦΜ: CZ29444268"
13
+ "Office Telephone:","Τηλέφωνο γραφείου:"
14
+ "+420 581 110 998","+420 581 110 998"
15
+ "E-mail:","E-mail:"
16
+ "sales@topefekt.com","sales@topefekt.com"
17
+ "support@topefekt.com","support@topefekt.com"
18
+ "Web:","Ιστοσελίδα:"
19
+ "Admin SMS","SMS Διαχειριστή"
20
+ "Select events during which shall be shop administrators notified via SMS and customize text of messages.","Επιλέξτε τα γεγονότα τα οποία οι διαχειριστές του καταστήματος θα πρέπει να ειδοποιηθούν μέσω SMS και προσαρμόστε τα κείμενα των μηνυμάτων αυτών."
21
+ "Unicode SMS","Unicode SMS"
22
+ "unicode","Unicode"
23
+ "Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).","Επιλέξτε το μόνο εάν θέλετε να χρησιμοποιήσετε Ελληνικά, Κινέζικα, Αραβικά, Εβραϊκά, Κορεάτικα κ.α. ή διακριτικά μέσα στο κείμενο του SMS σας (Το Unicode κείμενο σας επιτρέπει να εισάγετε τους χαρακτήρες αυτούς σε όλες τις γραμματοσειρές καθώς και διάφορα άλλα σύμβολα ταυτόχρονα. Ο αριθμός των χαρακτήρων σε ένα SMS θα μειωθεί σε 70). ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode"
24
+ "Save","Αποθήκευση"
25
+ "Sending notifications via SMS is ACTIVE","Η αποστολή ειδοποιήσεων μέσω SMS είναι ΕΝΕΡΓΗ"
26
+ "Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check at least one administrator.","Η αποστολή ειδοποιήσεων μέσω SMS είναι ΑΝΕΝΕΡΓΗ. Για να ενεργοποιήσετε την αποστολή SMS επιλέξτε τουλάχιστον έναν Διαχειριστή."
27
+ "Update of order status"," Ενημέρωση κατάστασης παραγγελίας για "
28
+ "Account","Λογαριασμός"
29
+ "Product","Προϊόν"
30
+ "Order status","Κατάσταση παραγγελίας"
31
+ "Order","Παραγγελία"
32
+ "Admin SMS - not active","SMS Διαχειριστή - ΑΝΕΝΕΡΓΟ"
33
+ "Please add at least one administrator!","Παρακαλώ προσθέστε τουλάχιστον έναν διαχειριστή!"
34
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
35
+ "Invalid SMS text","Μη έγκυρο κείμενο SMS"
36
+ "Text of SMS was saved.","Το κείμενο του SMS έχει αποθηκευτεί."
37
+ "Unicode saved.","Unicode αποθηκεύτηκε."
38
+ "char","Χαρακτήρας"
39
+ "chars","Χαρακτήρες"
40
+ "label","επιγραφή"
41
+ "SMS text","Κείμενο SMS"
42
+ "total sms:","Συνολικά sms:"
43
+ "Enter SMS text","Εισάγετε το κείμενο του SMS"
44
+ "Preview","Προεπισκόπηση"
45
+ "Administrators","Διαχειριστές"
46
+ "Save","Αποθήκευση"
47
+ "Cancel","Ακύρωση"
48
+ "Restore unsaved changes to its original state.","Επαναφορά μη αποθηκευμένων αλλαγών στην αρχική κατάσταση."
49
+ "User profile - not active","Προφίλ χρήστη - Ανενεργό"
50
+ "User profile - active","Προφίλ χρήστη - Ενεργό"
51
+ "New user account","Εγγραφή νέου χρήστη"
52
+ "Not registered yet? Create account now!","Δεν έχετε εγγραφεί ακόμα; Δημιουργία λογαριασμού τώρα!"
53
+ "Email:","Email:"
54
+ "Company name:","Όνομα Εταιρείας:"
55
+ "Street:","Δρόμος:"
56
+ "City:","Πόλη:"
57
+ "ZIP:","Τ.Κ.:"
58
+ "Country:","Χώρα:"
59
+ "Company ID:","ID Εταιρείας:"
60
+ "Company VAT:","ΑΦΜ Εταιρείας:"
61
+ "Referer ID:","Referer ID:"
62
+ "View licence terms:","Δείτε τους όρους άδειας χρήσης:"
63
+ "I agree","Συμφωνώ"
64
+ "I dont agree","Δεν συμφωνώ"
65
+ "Register","Εγγραφή"
66
+ "Required field","Υποχρεωτικό πεδίο"
67
+ "Sign in","Σύνδεση"
68
+ "If You already have an account, please sign in.","Αν έχετε ήδη λογαριασμό, παρακαλώ συνδεθείτε."
69
+ "Username:","Όνομα Χρήστη:"
70
+ "Password:","Κωδικός:"
71
+ "Log in","Σύνδεση"
72
+ "Edit user account","Επεξεργασία Λογαριασμού Χρήστη"
73
+ "Save","Αποθήκευση"
74
+ "User account info","Πληροφορίες Λογαριασμού Χρήστη"
75
+ "SMS Credit:","Διαθέσιμες μονάδες:"
76
+ "Add administrators","Προσθήκη Διαχειριστή"
77
+ "Name:","Όνομα:"
78
+ "Mobile number:","Αριθμός κινητού:"
79
+ "Edit","Επεξεργασία"
80
+ "Add","Προσθήκη"
81
+ "Other settings","Άλλες Ρυθμίσεις"
82
+ "Simulate SMS sending:","ΠΡΟΣΟΜΟΙΩΤΗΣ SMS:"
83
+ "Allows to test sending of SMS in modul and to view sent SMS in SMS history with a special status.","Σας επιτρέπει να δοκιμάσετε την αποστολή SMS και να την δείτε στο Ιστορικό SMS με ειδική ένδειξη. Οι παραλήπτες δε θα λάβουν κάποιο SMS."
84
+ "Delete database:","Διαγραφή δεδομένων:"
85
+ "Allows to decide if current SMS settings and database of sent SMS shall be stored when uninstalling SMS module.","Σας επιτρέπει εάν θέλετε να διαγραφούν όλες οι τρέχουσες ρυθμίσεις και τα δεδομένα των απεσταλμένων SMS όταν κάνετε απεγκατάσταση του πρόσθετου των SMS."
86
+ "Delivery reports:","Αναφορές παράδοσης:"
87
+ "Allows to see delivery reports of SMS in SMS history Tab.","Σας επιτρέπει να δείτε τις αναφορές παράδοσης των SMS στη καρτέλα Ιστορικό SMS."
88
+ "Low credit alert:","Προειδοποίηση ορίου μονάδων:"
89
+ " Allows to receive email when your SMS credit is low.","Σας επιτρέπει να λαμβάνετε email όταν οι μονάδες σας φτάσουν σε χαμηλά επίπεδα."
90
+ "Email for delivery reports:","Email για τις αναφορές παράδοσης:"
91
+ "Allows to receive email with delivery report of SMS.","Σας επιτρέπει να λαμβάνετε email με τις αναφορές παράδοσης των SMS."
92
+ "Admin was created.","Ο Διαχειριστής δημιουργήθηκε."
93
+ "You have to agree with licence terms.","Θα πρέπει να συμφωνήσετε με τους όρους της άδειας."
94
+ "Account was created.","Ο λογαριασμός δημιουργήθηκε."
95
+ "you can add another account after ","μπορείτε να προσθέσετε έναν άλλο λογαριασμό μετά από "
96
+ "minutes","λεπτά"
97
+ "can not connect to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή των SMS"
98
+ "You were succesfully loged in.","Συνδεθήκατε επιτυχώς."
99
+ "error","σφάλμα"
100
+ "Invalid e-mail for delivery report.","Μη έγκυρο e-mail για την αναφορά παράδοσης."
101
+ "Invalid e-mail","Μη έγκυρο e-mail"
102
+ "Account was changed.","Ο λογαριασμός άλλαξε."
103
+ "Account was changed, but module URL for DR does not answer.","Ο λογαριασμός άλλαξε, αλλά η URL του πρόσθετου για το DR δεν απαντά."
104
+ "you can change account after ","μπορείτε να αλλάξετε το λογαριασμό μετά από "
105
+ " seconds"," δευτερόλεπτα"
106
+ "Invalid name","Μη έγκυρο όνομα"
107
+ "Invalid number","Μη έγκυρος αριθμός"
108
+ "Admin was changed.","Ο Διαχειριστής άλλαξε."
109
+ "Admin was deleted.","Ο Διαχειριστής διαγράφηκε."
110
+ "no changes were made","Δεν έγιναν αλλαγές"
111
+ "login error","Σφάλμα σύνδεσης"
112
+ "Are you sure to delete","Είστε σίγουροι ότι θέλετε να διαγράψετε"
113
+ "DELETE administrator","ΔΙΑΓΡΑΦΗ Διαχειριστή"
114
+ "EDIT administrator","ΕΠΕΞΕΡΓΑΣΙΑ Διαχειριστή"
115
+ "in international format, no leading zeros or a “+” sign, e.g., 447971796595","σε διεθνή μορφή, χωρίς μηδενικά μπροστά ή το σύμβολο “+”, π.χ. 306932345678"
116
+ "(when uninstall)","(κατά την απεγκατάσταση)"
117
+ "(0 = no alert)","(0 = χωρίς προειδοποίηση)"
118
+ "Fill in username and password.","Συμπληρώστε το όνομα χρήστη και τον κωδικό πρόσβασης."
119
+ "Customer SMS - ","SMS Πελάτη - "
120
+ "Customer SMS - not active","SMS Πελάτη - Ανενεργό"
121
+ " language version"," έκδοση γλώσσας"
122
+ "Select events during which shall be customer notified via SMS and customize text of messages. You can also add a new language version of SMS messages for each country separately. In countries with undefined language version will be used default language version.","Επιλέξτε τα γεγονότα τα οποία οι πελάτες του καταστήματος θα πρέπει να ειδοποιηθούν μέσω SMS και προσαρμόστε τα κείμενα των μηνυμάτων αυτών. Μπορείτε επίσης να προσθέσετε μια νέα γλώσσα των μηνυμάτων SMS για κάθε χώρα ξεχωριστά. Αν δεν επιλέξετε κάποια γλώσσα τότε θα χρησιμοποιηθεί η προεπιλεγμένη της σελίδας σας. (παράδειγμα: Αν η προεπιλεγμένη γλώσσα της σελίδας σας είναι τα Ελληνικά, δε χρειαζεται να επιλέξετε κάποια έκδοση γλώσσας)."
123
+ "Add SMS text version","Προσθέστε νέα έκδοση κειμένου SMS"
124
+ "Select country: ","Επιλέξτε χώρα: "
125
+ "Unicode SMS","Unicode SMS"
126
+ "Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).","Επιλέξτε το μόνο εάν θέλετε να χρησιμοποιήσετε Ελληνικά, Κινέζικα, Αραβικά, Εβραϊκά, Κορεάτικα κ.α. ή διακριτικά μέσα στο κείμενο του SMS σας (Το Unicode κείμενο σας επιτρέπει να εισάγετε τους χαρακτήρες αυτούς σε όλες τις γραμματοσειρές καθώς και διάφορα άλλα σύμβολα ταυτόχρονα. Ο αριθμός των χαρακτήρων σε ένα SMS θα μειωθεί σε 70). ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι, με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode"
127
+ "Order status","Κατάσταση παραγγελίας"
128
+ "Sending notifications via SMS is ACTIVE","Η αποστολή ειδοποιήσεων μέσω SMS είναι ΕΝΕΡΓΗ"
129
+ "Sending notifications via SMS is NOT ACTIVE. To activate SMS sending check „Active“ in desired status detail.","Η αποστολή ειδοποιήσεων μέσω SMS είναι ΑΝΕΝΕΡΓΗ. Για να ενεργοποιήσετε την αποστολή SMS τσεκάρετε το κουτάκι „Ενεργό“ δίπλα από την επιθυμητή κατάσταση."
130
+ " Update of order status "," Ενημέρωση κατάστασης παραγγελίας για "
131
+ "Account","Λογαριασμός"
132
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα εμφανίσει στην οθόνη σας την καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
133
+ "Invalid SMS text","Μη έγκυρο κείμενο SMS"
134
+ "Text of SMS was saved.","Το κείμενο του SMS έχει αποθηκευτεί."
135
+ "SMS text version was deleted.","Έκδοση κειμένου SMS διεγράφη."
136
+ "Are you sure to delete","Είστε σίγουροι ότι θέλετε να διαγράψετε"
137
+ "DELETE language version","ΔΙΑΓΡΑΦΗ έκδοσης γλώσσας"
138
+ "SMS text","Κείμενο SMS"
139
+ "unicode","Unicode"
140
+ "SMS text version for ","Έκδοση κειμένου SMS για "
141
+ " was saved"," αποθηκεύτηκε"
142
+ "Preview","Προεπισκόπηση"
143
+ "Active","Ενεργό"
144
+ "Save","Αποθήκευση"
145
+ "Cancel","Ακύρωση"
146
+ "total sms:","Συνολικά sms:"
147
+ "EDIT language version","ΕΠΕΞΕΡΓΑΣΙΑ έκδοσης γλώσσας"
148
+ "default","προεπιλεγμένα"
149
+ "Edit","Επεξεργασία"
150
+ "Add","Προσθήκη"
151
+ "Order","Παραγγελία"
152
+ "Chars","Χαρακτήρες"
153
+ "Unicode was saved.","Unicode αποθηκεύτηκε."
154
+ "Restore unsaved changes to its original state.","Επαναφορά μη αποθηκευμένων αλλαγών στην αρχική κατάσταση."
155
+ "Purchase Credit","Αγορά Μονάδων"
156
+ "Purchase Credit - not active","Αγορά Μονάδων - Ανενεργό"
157
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
158
+ " In case methods for credit purchase are not displayed properly, please click here:"," Σε περίπτωση που οι μέθοδοι για αγορά μονάδων δεν εμφανίζονται σωστά, παρακαλώ κάντε κλικ εδώ:"
159
+ "Bulk SMS text","Μαζικά SMS"
160
+ "Add recipients ","Προσθέστε παραλήπτες "
161
+ "Add one or more recipients separated by commas. Number must be in international format, no leading zeros or “+“ sign.","Προσθέστε έναν ή περισσότερους παραλήπτες διαχωρισμένες με κόμμα. Ο αριθμός πρέπει να είναι σε διεθνή μορφή, χωρίς μηδενικά μπροστά ή το σύμβολο “+”."
162
+ " (e.g. 447971796595)"," (π.χ. 306932345678)"
163
+ "Enter SMS text","Εισάγετε το κείμενο SMS"
164
+ "Add recipients in CSV file ","Προσθέστε παραλήπτες από CSV αρχείο "
165
+ "CSV file - 1 column, 1st column - number (Number must be in international format, no leading zeros or “+“ sign; e.g. 447971796595)","CSV αρχείο - 1 στήλη, 1η στήλη - αριθμός (Ο αριθμός πρέπει να είναι σε διεθνή μορφή, χωρίς μηδενικά μπροστά ή το σύμβολο “+”, π.χ. 306932345678)"
166
+ " Unicode "," Unicode "
167
+ "Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).","Επιλέξτε το μόνο εάν θέλετε να χρησιμοποιήσετε Ελληνικά, Κινέζικα, Αραβικά, Εβραϊκά, Κορεάτικα κ.α. ή διακριτικά μέσα στο κείμενο του SMS σας (Το Unicode κείμενο σας επιτρέπει να εισάγετε τους χαρακτήρες αυτούς σε όλες τις γραμματοσειρές καθώς και διάφορα άλλα σύμβολα ταυτόχρονα. Ο αριθμός των χαρακτήρων σε ένα SMS θα μειωθεί σε 70). ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι, με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode"
168
+ "Your time: ","Η ώρα σας: "
169
+ "Time: ","Ώρα: "
170
+ "time zone: ","ζώνη ώρας: "
171
+ "time zone settings","ρυθμίσεις ζώνης ώρας"
172
+ "Text is too long","Το κείμενο είναι πάρα πολύ μακρύ"
173
+ "Send SMS","Αποστολή SMS"
174
+ "Send","Αποστολή"
175
+ "Send SMS or bulk SMS. Enter mobile numbers or upload CSV file.","Στείλτε μεμονωμένα ή μαζικά SMS. Εισάγετε τους αριθμούς κινητού ή ανεβάστε το αρχείο CSV. ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode."
176
+ "Send SMS - not active","Αποστολή SMS - Ανενεργό"
177
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
178
+ "Fill in SMS text.","Συμπληρώστε το κείμενο SMS."
179
+ "SMS text is too long (max. 612 characters).","Το κείμενο είναι πάρα πολύ μακρύ (max. 612 χαρακτήρες)."
180
+ "SMS text is too long (max. 268 unicode characters).","Το κείμενο είναι πάρα πολύ μακρύ (max. 268 unicode χαρακτήρες)."
181
+ "Wrong time of SMS sending.","Λανθασμένη ώρα για αποστολή SMS."
182
+ "Recipients found: 0","Παραλήπτες που βρέθηκαν: 0"
183
+ "You do not have enough credit to send SMS to all ","Δεν έχετε αρκετές μονάδες για να στείλετε SMS προς όλους "
184
+ " recipients."," παραλήπτες."
185
+ "SMS was sent.","SMS εστάλη."
186
+ "SMS was saved.","SMS αποθηκεύτηκε."
187
+ "wrong number or unavailable","λάθος αριθμός ή μη διαθέσιμος"
188
+ "unauthorized senderID in confirmation sms","μη εξουσιοδοτημένο ID αποστολέα στο sms επιβεβαίωσης"
189
+ "low credit for sending sms","λίγες μονάδες για αποστολή sms"
190
+ "unicode is not supported","δεν υποστηρίζονται οι unicode χαρακτήρες"
191
+ "can not connect to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή SMS"
192
+ "SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)","ΠΡΟΣΟΜΟΙΩΤΗΣ SMS (Η αποστολή του SMS ηταν σε προσομοίωση. Ο παραλήπτης δεν έλαβε κανένα SMS)"
193
+ "SMS was sent (simulation).","SMS εστάλη (προσομοιωση)."
194
+ "error","σφάλμα"
195
+ "login error","Σφάλμα σύνδεσης"
196
+ " Send later "," Αποστολή αργότερα (προγραμματισμένα) "
197
+ "Characters: ","Χαρακτήρες: "
198
+ "1hr","1ώρα"
199
+ "Date: ","Ημερομηνία: "
200
+ "SMS Answers","SMS Απαντήσεις"
201
+ "SMS answer from customer is displayed only when customer receives SMS from your shop with SMS sender type „System number“ and customer replies using his own mobile phone.","Η απάντηση SMS από πελάτη εμφανίζεται μόνο όταν ο πελάτης λάβει SMS από το κατάστημα σας με τύπο αποστολέα „Αριθμός συστήματος“ και ο πελάτης απαντήσει χρησιμοποιώντας το δικό του κινητό τηλέφωνο."
202
+ "Show","Εμφάνιση"
203
+ "Search results ","Αποτελέσματα αναζήτησης "
204
+ " of "," από "
205
+ "SMS center","Κέντρο SMS"
206
+ "Date","Ημερομηνία"
207
+ "From number","Από τον αριθμό"
208
+ "new","νέο"
209
+ "Previous","Προηγούμενη"
210
+ "Next","Επόμενη"
211
+ " Page: "," Σελίδα: "
212
+ "SMS Answers - not active","SMS Απαντήσεις - Ανενεργό"
213
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
214
+ "year","έτος"
215
+ "month","μήνας"
216
+ "SMS","SMS"
217
+ "Text:","Κείμενο:"
218
+ "Total SMS answers: 0","Συνολικές απαντήσεις SMS: 0"
219
+ "SENT to recipient","ΑΠΕΣΤΑΛΜΕΝΟ στο παραλήπτη"
220
+ "ERROR","ΣΦΑΛΜΑ"
221
+ "DELIVERED to recipient","ΠΑΡΑΔΟΘΗΚΕ στο παραλήπτη"
222
+ "RECIPIENT UNAVAILABLE","ΠΑΡΑΛΗΠΤΗΣ ΜΗ ΔΙΑΘΕΣΙΜΟΣ"
223
+ "SMS History","Ιστορικό SMS"
224
+ "History of sent SMS from SMS module.","Ιστορικό σταλμένων SMS από το πρόσθετο των SMS."
225
+ " admin sms"," SMS διαχειριστή"
226
+ " customer sms"," SMS πελάτη"
227
+ " marketing sms"," SMS Καμπάνια"
228
+ " simple sms"," Απλό SMS"
229
+ "Show","Εμφάνιση"
230
+ "Search results ","Αποτελέσματα αναζήτησης "
231
+ " of "," από "
232
+ "Type","Τύπος"
233
+ "Date","Ημερομηνία"
234
+ "SMS subject","Θέμα SMS"
235
+ "Number","Αριθμός"
236
+ "yes","ναι"
237
+ "no","όχι"
238
+ "system number","αριθμός συστήματος"
239
+ "Credit balance:","Υπόλοιπο μονάδων:"
240
+ "Display customer detail","Εμφάνιση λεπτομερειών πελάτη"
241
+ "Text:","Κείμενο:"
242
+ "Total SMS:","Συνολικά SMS:"
243
+ "SMS History - not active","Ιστορικό SMS - Ανενεργό"
244
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
245
+ "SMS price in credits:","Κόστος SMS σε μονάδες:"
246
+ "year","έτος"
247
+ "month","μήνας"
248
+ "Status","Κατάσταση"
249
+ "Recipient","Παραλήπτης"
250
+ "Unicode:","Unicode:"
251
+ "senderID:","ID αποστολέα:"
252
+ "Previous","Προηγούμενη"
253
+ "Next","Επόμενη"
254
+ " Page: "," Σελίδα: "
255
+ "Total SMS: 0","Συνολικά SMS: 0"
256
+ "SMS","SMS"
257
+ "","Διαγραφή ιστορικού SMS"
258
+ "","Είστε σίγουροι ότι θέλετε να διαγράψετε το ιστορικό SMS;"
259
+ "SMS Marketing - bulk SMS text","SMS Καμπάνιες - Μαζική αποστολή SMS"
260
+ "Enter SMS text","Εισάγετε το κείμενο SMS"
261
+ " Unicode "," Unicode "
262
+ "Check only if you want to use Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message (Unicode text allows you to insert characters in all fonts and various other symbols simultaneously. Number of characters in one SMS will be reduced to 70).","Επιλέξτε το μόνο εάν θέλετε να χρησιμοποιήσετε Ελληνικά, Κινέζικα, Αραβικά, Εβραϊκά, Κορεάτικα κ.α. ή διακριτικά μέσα στο κείμενο του SMS σας (Το Unicode κείμενο σας επιτρέπει να εισάγετε τους χαρακτήρες αυτούς σε όλες τις γραμματοσειρές καθώς και διάφορα άλλα σύμβολα ταυτόχρονα. Ο αριθμός των χαρακτήρων σε ένα SMS θα μειωθεί σε 70). ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι, με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode"
263
+ " Send later "," Αποστολή αργότερα (προγραμματισμένα) "
264
+ "Your time: ","Η ώρα σας: "
265
+ "Total customers:","Σύνολο πελατών:"
266
+ "Total SMS:","Συνολικά SMS:"
267
+ "SMS Marketing - bulk SMS filter","SMS Καμπάνιες - φίλτρο μαζικού SMS"
268
+ "All customers","Όλοι οι πελάτες"
269
+ "company customers","Εταιρικοί πελάτες"
270
+ "private customers","Ιδιώτες πελάτες"
271
+ "All countries","Όλες οι χώρες"
272
+ "Last name:","Επίθετο:"
273
+ "First name:","Όνομα:"
274
+ "Last name","Επίθετο"
275
+ "First name","Όνομα"
276
+ "Groups:","Ομάδες:"
277
+ "All","Όλοι"
278
+ "Gender:","Φύλο:"
279
+ "Male","Άντρας"
280
+ "Female","Γυναίκα"
281
+ "Newsletter:","Ενημερωτικό Δελτίο:"
282
+ "Yes","Ναι"
283
+ "No","Όχι"
284
+ "Apply filter","Εφαρμογή φίλτρου"
285
+ "Date of birth from: ","Ημερομηνία γέννησης από: "
286
+ "to: ","μέχρι: "
287
+ "Date of registration from: ","Ημερομηνία εγγραφής από: "
288
+ "Customers found: ","Πελάτες που βρέθηκαν: "
289
+ "results","αποτελέσματα"
290
+ "Action","Ενέργεια"
291
+ "Mobile number","Αριθμός κινητού"
292
+ "Customer ID","ID Πελάτη"
293
+ "REMOVE customer from this list","ΑΦΑΙΡΕΣΗ πελάτη από αυτή τη λίστα"
294
+ "Next","Επόμενη"
295
+ "Previous","Προηγούμενη"
296
+ " Page: "," Σελίδα: "
297
+ "SMS Marketing - customers found: ","SMS Καμπάνιες - οι πελάτες που βρέθηκαν: "
298
+ "Write text of message and use advanced filter to target your marketing campaign.","Γράψτε το κείμενο του μηνύματος και κάντε χρήση προηγμένων φίλτρων για να στοχεύσετε την καμπάνια σας. ΣΗΜΕΙΩΣΗ: Αν το κείμενο του SMS είναι στα Ελληνικά, μπορείτε να χρησιμοποιήσετε ΚΕΦΑΛΑΙΑ ΓΡΑΜΜΑΤΑ ώστε να μην χρειάζετε να ενεργοποιήσετε το 'UNICODE'! Έτσι με αυτό το τρόπο, θα έχετε 160 χαρ. διαθέσιμους ανά SMS και όχι 70 που έχει το Unicode"
299
+ "SMS Marketing","SMS Καμπάνια"
300
+ "SMS Marketing - not active","SMS Καμπάνια - Ανενεργό"
301
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
302
+ "Fill in SMS text","Συμπληρώστε το κείμενο SMS"
303
+ "SMS text is too long (max. 612 characters).","Το κείμενο είναι πάρα πολύ μακρύ (max. 612 χαρακτήρες)."
304
+ "SMS text is too long (max. 268 unicode characters).","Το κείμενο είναι πάρα πολύ μακρύ (max. 268 unicode χαρακτήρες)."
305
+ "Customers found: 0","Πελάτες που βρέθηκαν: 0"
306
+ "Wrong time of SMS sending.","Λανθασμένη ώρα για αποστολή SMS."
307
+ "You do not have enough credit to send SMS to all ","Δεν έχετε αρκετές μονάδες για να στείλετε SMS προς όλους "
308
+ " customers."," πελάτες."
309
+ "SMS was sent.","SMS εστάλη."
310
+ "SMS was saved.","SMS αποθηκεύτηκε."
311
+ "wrong number or unavailable","λάθος αριθμός ή μη διαθέσιμος"
312
+ "unauthorized senderID in confirmation sms","μη εξουσιοδοτημένο ID αποστολέα στο sms επιβεβαίωσης"
313
+ "low credit for sending sms","λιγες μονάδες για αποστολή sms"
314
+ "unicode is not supported","δεν υποστηρίζονται οι unicode χαρακτήρες"
315
+ "can not connect to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή SMS"
316
+ "SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)","ΠΡΟΣΟΜΟΙΩΤΗΣ SMS (Η αποστολή του SMS ήταν σε προσομοίωση. Ο παραλήπτης δεν έλαβε κανένα SMS)"
317
+ "SMS was sent (simulation).","SMS εστάλη (προσομοιωση)."
318
+ "error","σφάλμα"
319
+ "login error","σφάλμα σύνδεσης"
320
+ "Date:","Ημερομηνία:"
321
+ "Time: ","Ώρα: "
322
+ "1hr","1ώρα"
323
+ "time zone: ","ζώνη ώρας: "
324
+ "time zone settings","ρυθμίσεις ζώνης ώρας"
325
+ "Send","Αποστολή"
326
+ "Characters: ","Χαρακτήρες: "
327
+ "Text is too long","Το κείμενο είναι πάρα πολύ μακρύ"
328
+ "Type:","Τύπος:"
329
+ "Country:","Χώρα:"
330
+ "City:","Πόλη:"
331
+ "Advert:","Διαφήμιση:"
332
+ "Store:","Κατάστημα:"
333
+ "All stores","Όλα τα καταστήματα"
334
+ "Presta SMS","Presta SMS"
335
+ "presta-sms.com - send SMS from your Prestashop!","presta-sms.com - Στείλτε SMS από το Prestashop σας!"
336
+ "Admin SMS","SMS Διαχειριστή"
337
+ "Customer SMS","SMS Πελάτη"
338
+ "SMS Settings","Ρυθμίσεις SMS"
339
+ "SMS History","Ιστορικό SMS"
340
+ "Purchase Credit","Αγορά Μονάδων"
341
+ "SMS Marketing","SMS Καμπάνιες"
342
+ "SMS Answers","SMS Απαντήσεις"
343
+ "Send SMS","Αποστολή SMS"
344
+ "About","Περί"
345
+ "wrong number or unavailable","λάθος αριθμός ή μη διαθέσιμος"
346
+ "unauthorized senderID in confirmation sms","μη εξουσιοδοτημένο ID αποστολέα στο sms επιβεβαίωσης"
347
+ "low credit for sending sms","λίγες μονάδες για αποστολή sms"
348
+ "unicode is not supported","δεν υποστηρίζονται οι unicode χαρακτήρες"
349
+ "login error","Σφάλμα σύνδεσης"
350
+ "can not connect to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή SMS"
351
+ "SMS SIMULATION (Sending of SMS was simulated. Recipient will not receive SMS)","ΠΡΟΣΟΜΟΙΩΤΗΣ SMS (Η αποστολή του SMS ήταν σε προσομοίωση. Ο παραλήπτης δεν έλαβε κανένα SMS)"
352
+ "unknown mobile number","άγνωστος αριθμός κινητού"
353
+ "not connected to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή SMS"
354
+ "New orders","Νέες παραγγελίες"
355
+ "New order from {customer_firstname} {customer_lastname}, customer id: {customer_id}, order id: {order_id}, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Order: {newOrder2}. Info from {shop_name}.","ΝΕΑ ΠΑΡΑΓΓΕΛΙΑ ΑΠΟ {customer_firstname} {customer_lastname}, ID ΠΕΛΑΤΗ: {customer_id}, ID ΠΑΡΑΓΓΕΛΙΑΣ: {order_id}, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΠΑΡΑΓΓΕΛΙΑ: {order_products2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
356
+ "Your order {order_id} was successfully created, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Have a nice day, {shop_name}.","Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
357
+ "Possible variables:","Πιθανές μεταβλητές:"
358
+ "Successful customer create account","Δημιουργία λογαριασμού πελάτη επιτυχής"
359
+ "Customer {customer_firstname} {customer_lastname}, id: {customer_id}, has just subscribed to {shop_name}.","Ο πελάτης {customer_firstname} {customer_lastname}, ID: {customer_id}, ΕΧΕΙ ΚΑΝΕΙ ΕΓΓΡΑΦΗ ΣΤΟ {shop_name}."
360
+ "Dear {customer_firstname} {customer_lastname}, your account in {shop_name} was successfully created. Your username: {customer_email}. Have a nice day!","ΑΓΑΠΗΤΕ {customer_firstname} {customer_lastname}, Ο ΛΟΓΑΡΙΑΣΜΟΣ ΣΑΣ ΣΤΟ {shop_name} ΔΗΜΙΟΥΡΓΗΘΗΚΕ ΕΠΙΤΥΧΩΣ ΜΕ ΟΝΟΜΑ ΧΡΗΣΤΗ: {customer_email}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ!"
361
+ "Product returned","Επιστρεφόμενο προϊόν"
362
+ "Customer {customer_firstname} {customer_lastname}, id: {customer_id}, has returned product from order {order_id}. Order: {orderReturn2}. Customer text: {customer_question}. Info from {shop_name}.","Ο ΠΕΛΑΤΗΣ {customer_firstname} {customer_lastname}, ID: {customer_id}, ΕΧΕΙ ΕΠΙΣΤΡΕΨΕΙ ΠΡΟΙΟΝ ΑΠΟ ΤΗ ΠΑΡΑΓΓΕΛΙΑ {order_id}. ΠΑΡΑΓΓΕΛΙΑ: {orderReturn2}. ΚΕΙΜΕΝΟ ΠΕΛΑΤΗ: {customer_question}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
363
+ "We have received your request. Order {order_id}. Have a nice day, {shop_name}.","ΛΑΒΑΜΕ ΤΟ ΑΙΤΗΜΑ ΣΑΣ. ΠΑΡΑΓΓΕΛΙΑ {order_id}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
364
+ "Called when a quantity of one product change in an order","Χρησιμοποιείται όταν η ποσότητα ενός προϊόντος αλλάξει μέσα σε μια παραγγελία"
365
+ "In order {order_id} was changed quantity, {orderSlip2}. Info from {shop_name}.","ΣΤΗ ΠΑΡΑΓΓΕΛΙΑ {order_id} ΕΧΕΙ ΑΛΛΑΞΕΙ Η ΠΟΣΟΤΗΤΑ, {orderSlip2}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
366
+ "In your order {order_id} was changed quantity, {orderSlip2}. Have a nice day, {shop_name}.","ΣΤΗ ΠΑΡΑΓΓΕΛΙΑ ΣΑΣ {order_id} ΕΧΕΙ ΑΛΛΑΞΕΙ Η ΠΟΣΟΤΗΤΑ, {orderSlip2}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
367
+ "Payment confirmation","Επιβεβαίωση πληρωμής"
368
+ "Payment confirmation, order id: {order_id}, payment: {order_payment}, amount: {order_total_paid} {order_currency}. Info from {shop_name}.","ΕΠΙΒΕΒΑΙΩΣΗ ΠΛΗΡΩΜΗΣ, ID ΠΑΡΑΓΓΕΛΙΑΣ: {order_id}, ΠΛΗΡΩΜΗ ΜΕ: {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
369
+ "We have successfully received payment for your order {order_id} via {order_payment}, amount: {order_total_paid} {order_currency}. Have a nice day, {shop_name}.","ΕΧΟΥΜΕ ΛΑΒΕΙ ΜΕ ΕΠΙΤΥΧΙΑ ΤΗΝ ΠΛΗΡΩΜΗ ΓΙΑ ΤΗ ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΜΕ {order_payment}, ΠΟΣΟ: {order_total_paid} {order_currency}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
370
+ "Update of tracking number in order","Ενημέρωση για το Κωδικό Ανίχνευσης (Tracking Code) της παραγγελίας"
371
+ "Order {order_id} was updated, tracking number is {order_shipping_number}. Info from {shop_name}.","Η ΠΑΡΑΓΓΕΛΙΑ {order_id} ΕΧΕΙ ΕΝΗΜΕΡΩΘΕΙ, Ο ΚΩΔ. ΑΝΙΧΝΕΥΣΗΣ ΕΙΝΑΙ {order_shipping_number}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
372
+ "Dear Customer, your order {order_id} was shipped, tracking number is {order_shipping_number}. Have a nice day, {shop_name}.","ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΕΧΕΙ ΑΠΟΣΤΑΛΕΙ, Ο ΚΩΔΙΚΟΣ ΑΝΙΧΝΕΥΣΗΣ (TRACKING CODE) ΕΙΝΑΙ {order_shipping_number}. ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
373
+ "Called when a product is deleted","Χρησιμοποιείται όταν ένα προϊόν διαγραφεί"
374
+ "This product was deleted from {shop_name}, id: {product_id}, ref: {product_ref}, name: {product_name}. Deleted by user {employee_id}, {employee_email}.","ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΔΙΑΓΡΑΦΗΚΕ ΑΠΟ {shop_name}, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}. ΔΙΑΓΡΑΦΗ ΑΠΟ ΤΟ ΧΡΗΣΤΗ {employee_id}, {employee_email}."
375
+ "Quantity is updated only when the customer effectively place his order","Η ποσότητα ενημερώνετε μόνο όταν ο πελάτης τοποθετήσει τη παραγγελία του"
376
+ "Quantity of product has changed, id: {product_id}, ref: {product_ref}, name: {product_name}, current quantity: {product_quantity}, supplier: {product_supplier}. Info from {shop_name}.","Η ΠΟΣΟΤΗΤΑ ΤΟΥ ΠΡΟΙΟΝΤΟΣ ΑΛΛΑΞΕ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}, ΠΡΟΜΗΘΕΥΤΗΣ: {product_supplier}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
377
+ "Product out of stock","Προϊόν εκτός αποθέματος"
378
+ "This product is almost out of stock, id: {product_id}, ref: {product_ref}, name: {product_name}, current quantity: {product_quantity}. Info from {shop_name}.","ΑΥΤΟ ΤΟ ΠΡΟΙΟΝ ΕΙΝΑΙ ΣΧΕΔΟΝ ΕΚΤΟΣ ΑΠΟΘΕΜΑΤΟΣ, ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}, ΤΡΕΧΟΥΣΑ ΠΟΣΟΤΗΤΑ: {product_quantity}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
379
+ "Called when admin or customer cancel a product in an order","Χρησιμοποιείται όταν ο διαχειριστής ή ο πελάτης ακυρώσουν ένα προϊόν από μια παραγγελία"
380
+ "In order {order_id} was canceled product with id: {product_id}, ref: {product_ref}, name: {product_name}. Quantity: {product_quantity}, quantity reinjected: {product_quantity_reinjected}. Info from {shop_name}.","ΣΤΗ ΠΑΡΑΓΓΕΛΙΑ {order_id} ΕΧΕΙ ΔΙΑΓΡΑΦΕΙ ΤΟ ΠΡΟΙΟΝ ΜΕ ID: {product_id}, REF: {product_ref}, ΟΝΟΜΑ: {product_name}. ΠΟΣΟΤΗΤΑ: {product_quantity}, ΠΟΣΟΤΗΤΑ ΕΠΑΝΑΕΙΣΑΓΩΜΕΝΗ: {product_quantity_reinjected}. ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
381
+ "Status of order {order_id} has changed to ","Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ "
382
+ ". Info from {shop_name}.",". ΠΛΗΡΟΦ. ΑΠΟ {shop_name}."
383
+ "Dear Customer, status of your order {order_id} has changed to ","ΑΓΑΠΗΤΕ ΠΕΛΑΤΗ, Η ΚΑΤΑΣΤΑΣΗ ΤΗΣ ΠΑΡΑΓΓΕΛΙΑΣ ΣΑΣ {order_id} ΑΛΛΑΞΕ ΣΕ "
384
+ ". Have a nice day, {shop_name}.",". ΝΑ ΕΧΕΤΕ ΜΙΑ ΟΜΟΡΦΗ ΜΕΡΑ, {shop_name}."
385
+ "Bank wire","ΚΑΤΑΘΕΣΗ ΣΕ ΤΡΑΠΕΖΑ"
386
+ "Company Name","Όνομα εταιρείας"
387
+ "Country","Χώρα"
388
+ "City","Πόλη"
389
+ "qty","ποσότητα"
390
+ "qty reinjected","ποσότητα επαναεισαγώμενη"
391
+ "qty returned","επιστρεφόμενη ποσότητα"
392
+ "name","όνομα"
393
+ "not found","δεν βρέθηκε"
394
+ "SMS Settings - Select Own number sender ID for ","Ρυθμίσεις SMS - Επιλέξτε το δικό σας ID αποστολέα για "
395
+ "Own number sender ID settings","Ρυθμίσεις του ID αποστολέα σας"
396
+ "own number sender ID","Επιλέξτε ή δημιουργήστε"
397
+ "Existing Own number:","Οι υπάρχοντες αριθμοί σας:"
398
+ "New Own number sender ID:","Νέος προσωπικός αριθμός:"
399
+ "in international format, no leading <br />zeros or a “+” sign, e.g., 447971796595","σε διεθνή μορφή, χωρίς μηδενικά μπροστά ή το σύμβολο “+”, π.χ. 306932345678"
400
+ "SMS code:","Κωδικός επιβεβαίωσης:"
401
+ "CONFIRM","ΕΠΙΒΕΒΑΙΩΣΗ"
402
+ "Required field","Υποχρεωτικό πεδίο"
403
+ "SMS Settings - Select Text sender ID for ","Ρυθμίσεις SMS - Επιλέξτε ID αποστολέα με κείμενο για "
404
+ "Text sender ID settings","Ρυθμίσεις ID αποστολέα με κείμενο"
405
+ "Existing Text sender ID:","Τα υπάρχοντα ID κειμένου:"
406
+ "New Text sender ID:","Νέο ID κειμένου:"
407
+ "max. 11 characters","max. 11 χαρακτήρες"
408
+ "SMS Settings","Ρυθμίσεις SMS"
409
+ "Define SMS Sender Type for each country separately (Text sender ID, Own mobile number or System number). SMS price depends on the recipient country, selected SMS sender type and amount of payment. In countries with undefined SMS sender type will be used System number sender type.","Καθορίστε το τύπο αποστολέα για κάθε χώρα ξεχωριστά (ID αποστολέα με κείμενο, με τον αριθμό του κινητού σας ή με τον αριθμό συστήματος). Η τιμή του SMS εξαρτάται από τη χώρα του παραλήπτη, το τύπο ID αποστολέα καθώς και από το ποσό της πληρωμής που κάνατε. Σε χώρες με απροσδιόριστο τύπο ID αποστολέα θα χρησιμοποιηθεί ο Αριθμός συστήματος ως ID αποστολέα."
410
+ "Customer SMS settings","Customer SMS settings"
411
+ "SENDER TYPE","ΤΥΠΟΣ ΑΠΟΣΤΟΛΕΑ"
412
+ "NETWORK","ΔΙΚΤΥΟ"
413
+ "SMS PRICE<br />IN CREDITS","ΚΟΣΤΟΣ SMS ΣΕ ΜΟΝΑΔΕΣ"
414
+ "SMS PRICE IN EUR (excl. VAT)","ΚΟΣΤΟΣ SMS ΣΕ ΕΥΡΩ (χωρίς ΦΠΑ)"
415
+ "payment","πληρωμή"
416
+ "Unicode ","Unicode "
417
+ "Unicode characters support (Unicode allows you to enter characters in all fonts and various symbols simultaneously. Is used for Chinese, Arabic, Greek, Hebrew, Korean, Cyrillic, etc. or diacritic in the text of your SMS message)","Υποστήριξη Unicode χαρακτήρων (Οι Unicode σας επιτρέπει να εισάγετε τους χαρακτήρες σε όλες τις γραμματοσειρές και άλλα διάφορα σύμβολα ταυτόχρονα. Χρησιμοποιείται οταν το κείμενο των SMS σας περιέχει Ελληνικά, Κινέζικα, Αραβικά, Εβραϊκά, Κορεάτικα, Κυριλλικά κλπ. ή διακριτικά ώστε να γίνει η σωστή προβολή στο παραλήπτη)"
418
+ "TEXT SENDER ID","ΚΕΙΜΕΝΟ ID ΑΠΟΣΤΟΛΕΑ"
419
+ "Text sender ID","Κείμενο ID αποστολέα"
420
+ "SYSTEM NUMBER","ΑΡΙΘΜΟΣ ΣΥΣΤΗΜΑΤΟΣ"
421
+ "OWN NUMBER SENDER ID","ΠΡΟΣΩΠΙΚΟΣ ΑΡΙΘΜΟΣ ID ΑΠΟΣΤΟΛΕΑ"
422
+ "SIM HOSTING","ΦΙΛΟΞΕΝΙΑ SIM"
423
+ "UNICODE SUPPORTED","ΟΙ UNICODE ΥΠΟΣΤΗΡΙΖΟΝΤΑΙ"
424
+ "UNICODE NOT SUPPORTED","ΟΙ UNICODE ΔΕΝ ΥΠΟΣΤΗΡΙΖΟΝΤΑΙ"
425
+ "SAVE SMS SETTINGS","ΑΠΟΘΗΚΕΥΣΗ ΡΥΘΜΙΣΕΩΝ SMS"
426
+ "Are you sure to delete","Είστε σίγουροι ότι θέλετε να διαγράψετε"
427
+ "Select country: ","Επιλογή χώρας: "
428
+ "ADD/CHANGE SELECTED COUNTRY","ΠΡΟΣΘΗΚΗ/ΑΛΛΑΓΗ ΕΠΙΛΕΓΜΕΝΗΣ ΧΩΡΑΣ"
429
+ "SMS settings - not active","Ρυθμίσεις SMS - Ανενεργό"
430
+ "User profile is not active! To register click on the SMS tab in the main menu. Module will display you screen for entering registration data. If you have used our module in the past and you know your username and password, fill in form for existing account. Otherwise fill in your email, accept the license terms and click register.","Το προφίλ χρήστη δεν είναι ενεργό! Για να εγγραφείτε, κάντε κλικ στην καρτέλα SMS στο κύριο μενού. Το πρόσθετο θα σας εμφανίσει τα πεδία για καταχώρηση των δεδομένων της εγγραφής σας. Εάν στο παρελθόν είχατε χρησιμοποιήσει το πρόσθετό μας και γνωρίζετε το όνομα χρήστη και τον κωδικό πρόσβασης, συμπληρώστε τη φόρμα για τον υπάρχοντα λογαριασμό. Διαφορετικά, συμπληρώστε το email σας, αποδεχτείτε τους όρους της άδειας χρήσης και κάντε κλικ στην εγγραφή."
431
+ "error","σφάλμα"
432
+ "can not connect to SMS server","δεν μπορεί να συνδεθεί με το διακομιστή SMS"
433
+ " was deleted."," διαγράφηκε."
434
+ "choose sender type","επιλέξτε τύπο του αποστολέα"
435
+ " was saved."," αποθηκεύτηκε."
436
+ "fill in own number sender ID","συμπληρώστε το προσωπικό σας αριθμό για ID αποστολέα"
437
+ "own number sender ID must be number","ο προσωπικός σας αριθμός για ID αποστολέα πρέπει να είναι αριθμός"
438
+ "correctly confirm sms code","Επιβεβαιώστε σωστά το κωδικό του SMS"
439
+ "Own number sender ID for ","Ο προσωπικός αριθμός ID αποστολέα για "
440
+ " was saved."," αποθηκεύτηκε."
441
+ "error - ","σφάλμα - "
442
+ "login error","σφάλμα σύνδεσης"
443
+ "Now retype SMS code.","Τώρα πληκτρολογήστε ξανά τον κωδικό του SMS."
444
+ "Now retype SMS code. SMS will be send in next 60 seconds.","Τώρα πληκτρολογήστε ξανά τον κωδικό του SMS. Το SMS θα σταλθεί μέσα στα επόμενα 60 δευτερόλεπτα."
445
+ "error - wrong number or unavailable","σφάλμα - λάθος αριθμός ή μη διαθέσιμος"
446
+ "error - unauthorized senderID in confirmation sms","σφάλμα - μη εξουσιοδοτημένο ID αποστολέα στο SMS επιβεβαίωσης"
447
+ "error - low credit for sending validation SMS","σφάλμα - λίγες μονάδες για την αποστολή του SMS επιβεβαίωσης"
448
+ "fill in text sender ID","συμπληρώστε το κείμενο για ID αποστολέα"
449
+ "fill in text sender ID, 3-11 characters","συμπληρώστε το κείμενο για ID αποστολέα, 3-11 χαρακτήρες"
450
+ "possible characters: ","πιθανοί χαρακτήρες: "
451
+ "text sender ID can't be number","Το κείμενο ID αποστολέα δε μπορεί να είναι αριθμός"
452
+ "Text sender ID for ","Κείμενο ID αποστολέα για "
453
+ "Admin SMS settings","Ρυθμίσεις SMS Διαχειριστή"
454
+ "VALIDATE","ΕΠΙΚΥΡΩΣΗ"
455
+ "SMS validation","επικύρωση SMS"
456
+ "Confirmation code: ","Κωδικός επιβεβαίωσης: "
457
+ "Update pricelist","Ενημέρωση τιμοκαταλόγου"
458
+ "e.g.:","π.χ.:"
459
+ "Pricelist was successfully updated.","Ο τιμοκατάλογος ενημερώθηκε επιτυχώς."
460
+ "edit","επεξεργασία"
461
+ "delete","διαγραφή"
462
+ "Your online stores","Τα ηλεκτρονικά καταστήματά σας"
463
+ "SMS opt-out","SMS opt-out"
464
+ "SMS opt-out - setting SMS opt-out option from the cart and SMS charging","SMS opt-out - ρύθμιση επιλογής SMS opt-out στο καλάθι και χρέωση της υπηρεσίας SMS"
465
+ "Select an online store for which you want to set in the cart option to unsubscribe SMS notifications, setup cost of SMS messages and define the text that is displayed to the customer in the cart.","Επιλέξτε ένα ηλεκτρονικό κατάστημα για το οποίο θέλετε να ορίσετε την επιλογή διαγραφής των πελατών απο τις ειδοποιήσεις μέσω SMS, να ρυθμίσετε το κόστος εγκατάστασης των SMS καθώς και τη περιγραφή που θα βλέπει ο πελάτης στο καλάθι του."
466
+ "For sending SMS prefer phone nr. from:","Για την αποστολή SMS προτιμάτε τηλ. αριθμό από:"
467
+ "delivery address","διεύθυνση παράδοσης"
468
+ "invoice address", "διεύθυνση τιμολόγιου"
469
+ "Price of SMS","Κόστος SMS"
470
+ "Text displayed in the cart","Κείμενο που θα εμφανίζεται στο καλάθι"
471
+ "Activate displaying SMS opt-out feature in the cart","Ενεργοποίηση εμφάνισης του SMS opt-out στο καλάθι"
472
+ "SMS opt-out is ACTIVE","Το SMS opt-out είναι ΕΝΕΡΓΟ"
473
+ "SMS opt-out is NOT ACTIVE. To activate SMS opt-out check the checkbox „Activate displaying SMS opt-out feature in the cart“","Το SMS opt-out ΔΕΝ ΕΙΝΑΙ ΕΝΕΡΓΟ. Για να ενεργοποιήσετε το SMS opt-out επιλέξτε το κουτάκι „Ενεργοποίηση εμφάνισης του SMS opt-out στο καλάθι“"
474
+ "Setting of the SMS opt-out feature was successfully changed","Η ρύθμιση του SMS opt-out έχει αλλάξει επιτυχώς"
475
+ "Price of SMS messages has changed in the following countries:","Το κόστος των SMS μηνυμάτων έχει αλλάξει για τις ακόλουθες χώρες:"
476
+ "New version available for download:","Νέα έκδοση είναι διαθέσιμη για λήψη:"
477
+ "Manual:","Εγχειρίδιο"
478
+ "Contact form","Φόρμα επικοινωνίας"
479
+ "Remove duplicate numbers","Αφαίρεση διπλών αριθμών"
480
+ "Registration type:","Τύπος Εγγραφής:"
481
+ "Personal","Ιδιώτης"
482
+ "Business","Επιχείρηση"
483
+ "Address","Διεύθυνση"
484
+ "Billing information","Πληροφορίες χρέωσης"
485
+ "Contact person","Υπεύθυνος επικοινωνίας"
486
+ "Enter the name of the company.","Εισάγετε το όνομα της εταιρείας."
487
+ "Invalid VAT","Μη έγκυρο ΑΦΜ"
488
+ "Statistics","Στατιστικά"
489
+ "Statistics - not active","Στατιστικά - Ανενεργό"
490
+ "day","ημέρα"
491
+ "Date from:","Ημερομηνία από:"
492
+ "to:","έως:"
493
+ "SIMULATION","ΠΡΟΣΟΜΟΙΩΣΗ"
494
+ "DELETED","ΔΙΑΓΡΑΜΕΝΟ"
495
+ "SCHEDULED","ΠΡΟΓΡΑΜΜΑΤΙΣΜΕΝΟ"
496
+ "DO NOT DISTURB registry (DND)","DO NOT DISTURB registry (DND)"
497
+ "DUPLICATE","ΔΙΠΛΟΕΓΓΡΑΦΗ"
498
+ "Mage SMS module 2013-%s, version ","Mage SMS module 2013-%s, έκδοση "
499
+ "Supported Magento versions:","Υποστηριζόμενες εκδόσεις του Magento:"
500
+ "www.mage-sms.com/manual.html","www.mage-sms.com/manual.html"
501
+ "www.mage-sms.com","www.mage-sms.com"
502
+ "www.mage-sms.com/index.html","www.mage-sms.com/index.html"
503
+ "ADD/CHANGE TEXT SENDER ID","ΠΡΟΣΘΗΚΗ/ΑΛΛΑΓΗ ΚΕΙΜΕΝΟΥ ID ΑΠΟΣΤΟΛΕΑ"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>TOPefekt_Magesms</name>
4
- <version>1.0.3</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
7
<channel>community</channel>
@@ -10,9 +10,9 @@
10
<description>Free SMS module for Magento with advanced features and user friendly design.</description>
11
<notes>2014</notes>
12
<authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
13
- <date>2014-05-19</date>
14
- <time>14:59:48</time>
15
- <contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="40929bc0aaff8b8ff3139cd13dac74f7"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Form.php" hash="1b05abfc7b1b598f98b5d937b824baea"/><file name="Grid.php" hash="3606dacb3696180d03826dd488976a1f"/></dir><file name="Marketing.php" hash="84b0da551c13d7fc0c8c6db12699d14f"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><file name="ShowTabsAdminBlock.php" hash="9d021b7bfa6ca922d7074313865bde87"/><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="6380801a1cb39f5e31147d650e37bb59"/></dir><dir name="Model"><file name="Admins.php" hash="84b3ffac65e6bcb9cecb0d6602c4dc4a"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="6b5b23ac096fd8090926bc7fc5e6900c"/><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="155ae0f9420370abfeb16c3bc21704a8"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="e43f635001b07023df508466c67f97e6"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="7526a18b5bda119e8b564b95e13c823f"/><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="dd1e7ba04fb2d2484fcd14d35fd63513"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="781323404157c7935539212e6c9d5948"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="dad8d028a32e3a860d254c0957f9d23f"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="8925cd5966f1532121af1c9a69a47285"/><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="619e819c9c8420dafd7e43fb3857a82c"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="c52374301eb8e0726dc54e8b08b24a8d"/></dir><file name="Routes.php" hash="df83c6aeff6174c5747ed306c969955c"/><file name="Sms.php" hash="c76cd38d452626d69d4176b0fbad1928"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="0dbf55d236b4fc11f44ca270e2d4b51a"/><file name="Smsuser.php" hash="1f4906fe7a288e95de706b1343f5b985"/><dir name="System"><dir name="Config"><file name="Lang.php" hash="0668cf17f7cedd4d5d5a95b2fd3b0fdf"/></dir></dir><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="3a6683154b4f05cc69f3762d76e41e7b"/><file name="AdminsmsController.php" hash="aa574d38ae24aa6d608d4b5c10af294b"/><file name="AnswersController.php" hash="9c773dc062fc6ce0c5f67e43eada46eb"/><file name="CustomersmsController.php" hash="17cab88ce2f019a1659831d00d617502"/><file name="HistoryController.php" hash="48c853e5a62d0afd88b5c714aaf7f1ad"/><file name="MarketingController.php" hash="0e815df5ae942189f9152f9f9ed3eeea"/><file name="OptoutController.php" hash="e4c91d3b0bf2fb230fdd9b0661a9f9ab"/><file name="ProfileController.php" hash="96688b6c243f288f551589614617e37f"/><file name="PurchasecreditController.php" hash="92d1b476ec1223f0df985dd769dddfa2"/><file name="SendsmsController.php" hash="7afd6f4a9ee99a544092b4c59f8cebc5"/><file name="StatisticsController.php" hash="b9d22942f91b79d8be3ec26ba4424952"/><file name="WizardController.php" hash="6788d66a886d2a06f6b92355eb8c20b0"/></dir></dir><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="aa69e6f90f6e822941f382b1162c75d6"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="5df79e7e9193abbac12191f35c4d45a9"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="290c4939bebfd6a0529dc7da20534bf5"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="721a1b92b0bbffe8ef4a01dd99310ddc"/><file name="system.xml" hash="e01d70255db18b31fa2517e519ad541c"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="d7363753089c833e275847a9137b6c89"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="02b2fecd79ace03940cd7c50419c8878"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="a37fbbcd2253c762a6cd73117b71489e"/><file name="adminsms.phtml" hash="a46fe7a4a1993e57c9b1c00bd9641d53"/><file name="customersms.phtml" hash="3f0b4418cee53502623ae0a9a9bb5b77"/><file name="history.phtml" hash="a7870b44cae7b3f0f6346e40801f2151"/><file name="marketing.phtml" hash="6f7df9bdab39b17ff4d3398806cd8881"/><file name="optout.phtml" hash="11708c9466f19f075c9d8a18b1af06a5"/><file name="profile.phtml" hash="1c88aa44d7642b69eb42974a11c0349d"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="c2aa0626c648c353841014027bb9cef0"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><file name="wizard-alternative.phtml" hash="2e5756949f26271f3714d8484468f643"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="beeccd6a4e8d5231c894498e5d9c725c"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="d88282bf3409717dcc6c8d36102480a3"/></dir></target><target name="magelocale"><dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="250b0c2fecd47a39f021e82acc243bba"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="2e7287b30954b3126169403822669f2a"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="2aeade9ce5193f08d1b19959631764d0"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="66aae8475301ad574cdecec4511aab80"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="b9f82cdd6f0779e8b13dee31e7bd8974"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="aa2a250c18b47bf5ccad1787e2dbebda"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="622944ce311c1ffb5e9e8fb6c4c447cc"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="d7b14419f2ee4469bcf023729b523e3d"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="c92302b7f783678c0903695a6a47fcee"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="ce40b33a4f083bbb7fc0f2284d84fa7b"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="17761427d3db52adb3d55bc68c7fece9"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="c64505ca859e2004090fd2729ffe7b65"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="db71d2c9c18714595677b8af9bba8415"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="46560fa35839fa7888afbe42c0164276"/><file name="jquery-1.9.1.min.js" hash="397754ba49e9e0cf4e7c190da78dda05"/><file name="jquery-noconflict.js" hash="10bdc1b7f2effa529e5baae786007688"/></dir></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>TOPefekt_Magesms</name>
4
+ <version>1.0.4</version>
5
<stability>stable</stability>
6
<license uri="http://opensource.org/licenses/BSD-3-Clause">BSD</license>
7
<channel>community</channel>
10
<description>Free SMS module for Magento with advanced features and user friendly design.</description>
11
<notes>2014</notes>
12
<authors><author><name>Frantisek Barancik</name><user>SIRAPY</user><email>barancik@sirapy.cz</email></author><author><name>Lubomir Kozak</name><user>TOPefekt</user><email>info@topefekt.com</email></author></authors>
13
+ <date>2014-06-17</date>
14
+ <time>19:08:40</time>
15
+ <contents><target name="magecommunity"><dir name="Topefekt"><dir name="Magesms"><dir name="Block"><dir name="Answers"><file name="Grid.php" hash="40929bc0aaff8b8ff3139cd13dac74f7"/><dir name="Renderer"><file name="Actions.php" hash="8978857641921533a7ef1a511d6e98cc"/><file name="Smsc.php" hash="dec1e2ffb867499edaf2660e83a1f763"/></dir></dir><file name="Answers.php" hash="d8e8f1ddc9dc2c200d48ba61fd45f258"/><file name="Magesms.php" hash="80c1ac3571e5305b9a18a332d50d3598"/><dir name="Marketing"><file name="Form.php" hash="1b05abfc7b1b598f98b5d937b824baea"/><file name="Grid.php" hash="3606dacb3696180d03826dd488976a1f"/></dir><file name="Marketing.php" hash="84b0da551c13d7fc0c8c6db12699d14f"/><file name="Profile.php" hash="87be5911ea730b61179eaa43274ed031"/><file name="ShowTabsAdminBlock.php" hash="9d021b7bfa6ca922d7074313865bde87"/><dir name="System"><dir name="Config"><file name="Apikeygenerator.php" hash="9b5f9256de21a985efbacbbc00032296"/></dir></dir><file name="Template.php" hash="1420e7b7615214a3cfe8ef87d86ebd1a"/><dir name="Wizard"><file name="Grid.php" hash="62ea044623fda139cdc23e8a768d1b60"/></dir><file name="Wizard.php" hash="ef10fbfc80385cb9e90e7a6bfbf555f4"/></dir><dir name="Helper"><dir name="Adminhtml"><file name="Data.php" hash="ebf8c3ac5f4ede5e30218f307c60c9c3"/></dir><file name="Data.php" hash="39bb7460cd1ab908745890f3db033527"/></dir><dir name="Model"><file name="Admins.php" hash="84b3ffac65e6bcb9cecb0d6602c4dc4a"/><file name="Answers.php" hash="33fcc03e70064860f47b17291b2682ec"/><file name="Api.php" hash="6b5b23ac096fd8090926bc7fc5e6900c"/><dir name="Country"><file name="Area.php" hash="4268548148d51c519328472ae744e0cd"/><file name="Lang.php" hash="1c47ceb19d913853c9ee7ab9b50f010a"/></dir><file name="Country.php" hash="6ea4a1f25f0c43c14392903328bbf794"/><file name="Exceptions.php" hash="856910cdd46ffcfb8b961826c8563670"/><dir name="Hooks"><file name="Admins.php" hash="c42b32a696e6101f50dc67942d738e6d"/><file name="Customers.php" hash="cc275a7f7c738174b420bd3c3301f79d"/><file name="Templates.php" hash="bcf959ff2f2c84bc8f287e5d7dfd637a"/><file name="Unicode.php" hash="351a49d393871e186921a98376aaa5bb"/></dir><file name="Hooks.php" hash="da49bb439fa153ddb3c72a12a68a2e73"/><file name="Magesms.php" hash="e299fef5c1617dc2aba79861a170ee57"/><file name="Maps.php" hash="7526a18b5bda119e8b564b95e13c823f"/><dir name="Mysql4"><dir name="Admins"><file name="Collection.php" hash="c1ada270e5c640cc77beca20a90c06c1"/></dir><file name="Admins.php" hash="c1efc07554a47ddd61add948f8d7184d"/><dir name="Answers"><file name="Collection.php" hash="e0d1dfb4666cd442105b786cd8e1938b"/></dir><file name="Answers.php" hash="9b116c0acd6598b22fda9a3f7bfd0e1f"/><file name="Collection.php" hash="0713d799c11bcc14437ca3924d0aae0f"/><dir name="Country"><dir name="Area"><file name="Collection.php" hash="57076e9ef2eaee34ede11fd2b8c079ea"/></dir><file name="Area.php" hash="cb14e562273148090fcafe17a5764dcf"/><file name="Collection.php" hash="9d1c5aa0e9d956d98e45706dd24dc0f0"/><dir name="Lang"><file name="Collection.php" hash="5784492b259d0636c5c37f3f945873cf"/></dir><file name="Lang.php" hash="45c61334ccc799908468603a1601f75f"/></dir><file name="Country.php" hash="dd1e7ba04fb2d2484fcd14d35fd63513"/><dir name="Exceptions"><file name="Collection.php" hash="0f27011bb167d3686149edcea2cf9af0"/></dir><file name="Exceptions.php" hash="087363570c7e19e98343508fde136b71"/><dir name="Hooks"><dir name="Admins"><file name="Collection.php" hash="08c59f372ae4d724d1451836df655deb"/></dir><file name="Admins.php" hash="0b97679a105c98c53fb27e6f35cc49da"/><file name="Collection.php" hash="781323404157c7935539212e6c9d5948"/><dir name="Customers"><file name="Collection.php" hash="9f85b8e63521abcc575d717eaca6f7b0"/></dir><file name="Customers.php" hash="446451f0e038bc5b25ec0d3032a608a9"/><dir name="Templates"><file name="Collection.php" hash="10d674db501bdd93bfc11e0411be53b2"/></dir><file name="Templates.php" hash="b9d88cc611aa7c5ea369d9b4056a3858"/><dir name="Unicode"><file name="Collection.php" hash="e30a9e81400f25829b89d8fa4927e4e7"/></dir><file name="Unicode.php" hash="930b9f23e7b0674cef75898bebd8d4f5"/></dir><file name="Hooks.php" hash="db0d3898325974475d39f0dd786a0c7d"/><dir name="Maps"><file name="Collection.php" hash="2b8609291dc25d2445b1c168024c1783"/></dir><file name="Maps.php" hash="21e7e04096b879db02971223dbf11a1a"/><dir name="Ownnumbersender"><file name="Collection.php" hash="0f77ebc089da24e306dc2616178fab35"/></dir><file name="Ownnumbersender.php" hash="0b8963a836de22ff2c54ec8a6f0819bd"/><dir name="Routes"><dir name="Alternative"><file name="Collection.php" hash="dd8908e3c72bef9a4d54ab4d04119fc9"/></dir><file name="Alternative.php" hash="0b07c80a9b35a1dc6f16e310614ddbda"/><file name="Collection.php" hash="9a9f26422877c0ff82f5bc3a6865ed1f"/></dir><file name="Routes.php" hash="f500ad3e8d96b8742a194015acdd4c58"/><dir name="Smshistory"><file name="Collection.php" hash="76f838ee4e14af4789e494badf46ad84"/></dir><file name="Smshistory.php" hash="15edfec649fa894ec310e3e37d97f694"/><dir name="Smsuser"><file name="Collection.php" hash="dad8d028a32e3a860d254c0957f9d23f"/></dir><file name="Smsuser.php" hash="b9913d6c444f646623d6e282f35e8a08"/><dir name="Textsender"><file name="Collection.php" hash="1574273dc207231460977dce7af007a9"/></dir><file name="Textsender.php" hash="242e7ac5f28b7e7b8521e201fe7cf806"/><dir name="Variables"><file name="Collection.php" hash="0c249b390280ba16db97d3acd320fedb"/></dir><file name="Variables.php" hash="e364920ad4d1a69f33ec037184f27de7"/></dir><file name="Observer.php" hash="a4132d2473c8b282284dd34d58122264"/><dir name="Overide"><dir name="Cataloginventory"><file name="Stock.php" hash="619e819c9c8420dafd7e43fb3857a82c"/></dir></dir><file name="Ownnumbersender.php" hash="c209b3a3756491c3d9f30c1a9055361b"/><dir name="Routes"><file name="Alternative.php" hash="c52374301eb8e0726dc54e8b08b24a8d"/></dir><file name="Routes.php" hash="917bf19f5983ccafa6e61cd9cc1d8f13"/><file name="Sms.php" hash="faec45a6bd7e93637bbfe7dda3010a3b"/><file name="Smshistory.php" hash="b96ef0d1f609d28159c5a03777c953ce"/><file name="Smsprofile.php" hash="4ff023aa338c1eab827448e2c0712852"/><file name="Smsuser.php" hash="1f4906fe7a288e95de706b1343f5b985"/><dir name="System"><dir name="Config"><file name="Lang.php" hash="7bb45d97a8c3f4b4a32bf1229f5cab8b"/></dir></dir><file name="Textsender.php" hash="589c0a2087ba27d6e5310796b60e6a48"/><file name="Variables.php" hash="12844fb6fc0c4258cdcbb8d6b5343fc9"/></dir><file name="api_test1.php" hash="8a71c6b1d085ee65b3bde60c20379c9d"/><file name="api_test2.php" hash="6c1d19f8fc1e8a71a1f3129541939262"/><file name="api_test3.php" hash="9c162033d327a93bc974aa20804c161d"/><dir name="controllers"><dir name="Adminhtml"><dir name="Magesms"><file name="AboutController.php" hash="3a6683154b4f05cc69f3762d76e41e7b"/><file name="AdminsmsController.php" hash="aa574d38ae24aa6d608d4b5c10af294b"/><file name="AnswersController.php" hash="9c773dc062fc6ce0c5f67e43eada46eb"/><file name="CustomersmsController.php" hash="17cab88ce2f019a1659831d00d617502"/><file name="HistoryController.php" hash="48c853e5a62d0afd88b5c714aaf7f1ad"/><file name="MarketingController.php" hash="4e7d45a4e39863637372c08afe49f61b"/><file name="OptoutController.php" hash="e4c91d3b0bf2fb230fdd9b0661a9f9ab"/><file name="ProfileController.php" hash="04c4f7ae1000e9b1c91ce40ba1e4e811"/><file name="PurchasecreditController.php" hash="92d1b476ec1223f0df985dd769dddfa2"/><file name="SendsmsController.php" hash="51879908e7ef2345446cc921a2718aa2"/><file name="StatisticsController.php" hash="b9d22942f91b79d8be3ec26ba4424952"/><file name="WizardController.php" hash="09a835b6def6c92c8d2ecd7c48895d48"/></dir></dir><file name="ApiController.php" hash="9756da9bfb339b1ddbab7883b7e362b1"/><file name="DeliveryController.php" hash="8f604254b6c19c9adb84bea325e3c8ea"/><file name="IndexController.php" hash="aa69e6f90f6e822941f382b1162c75d6"/></dir><dir name="data"><dir name="magesms_setup"><file name="data-install-1.0.0.php" hash="5df79e7e9193abbac12191f35c4d45a9"/><file name="data-upgrade-1.0.1-1.0.2.php" hash="290c4939bebfd6a0529dc7da20534bf5"/><file name="data-upgrade-1.0.3-1.0.4.php" hash="a60b7ce260a43d71c3afcb62e4f875e2"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="637551698f955e9428774cc64e91ccb9"/><file name="config.xml" hash="ce86a833fc5ca789262e556b7681aa5f"/><file name="system.xml" hash="dbc73379e62abcbe045e203f6a0a6b41"/></dir><dir name="sql"><dir name="magesms_setup"><file name="mysql4-install-0.9.0.php" hash="b3d8975e98cb1cfe12194d7a18bbfc2f"/><file name="mysql4-install-1.0.0.php" hash="d7363753089c833e275847a9137b6c89"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="765533b9d6f9fa987949c0a5f73ff37d"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="0d3ea4875bd51593c8113805402e58fd"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="02b2fecd79ace03940cd7c50419c8878"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="topefekt"><dir name="magesms"><file name="about.phtml" hash="a37fbbcd2253c762a6cd73117b71489e"/><file name="adminsms.phtml" hash="a46fe7a4a1993e57c9b1c00bd9641d53"/><file name="customersms.phtml" hash="3f0b4418cee53502623ae0a9a9bb5b77"/><file name="history.phtml" hash="a7870b44cae7b3f0f6346e40801f2151"/><file name="marketing.phtml" hash="6f7df9bdab39b17ff4d3398806cd8881"/><file name="optout.phtml" hash="11708c9466f19f075c9d8a18b1af06a5"/><file name="profile.phtml" hash="1c88aa44d7642b69eb42974a11c0349d"/><file name="purchasecredit.phtml" hash="0ec35354e68a85b0fff078f9a8b14d96"/><file name="sendsms.phtml" hash="c2aa0626c648c353841014027bb9cef0"/><file name="statistics.phtml" hash="dd708338a0a5ad36bb10141ad394ea22"/><file name="wizard-alternative.phtml" hash="2e5756949f26271f3714d8484468f643"/><file name="wizard-edit.phtml" hash="e247901a92b290fcb85128b4a08ee91d"/><file name="wizard-list.phtml" hash="cee281d28e0b61f93c0acb90f064c922"/><file name="wizard-sender.phtml" hash="beeccd6a4e8d5231c894498e5d9c725c"/><file name="wizard.phtml" hash="d0a70bb920e76604959c48de8fe57c84"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Topefekt_Magesms.xml" hash="d88282bf3409717dcc6c8d36102480a3"/></dir></target><target name="magelocale"><dir><dir name="cs_CZ"><file name="Topefekt_Magesms.csv" hash="250b0c2fecd47a39f021e82acc243bba"/></dir><dir name="de_DE"><file name="Topefekt_Magesms.csv" hash="2e7287b30954b3126169403822669f2a"/></dir><dir name="el_GR"><file name="Topefekt_Magesms.csv" hash="b4d8c7090d22aa1ae994ea2f13b27593"/></dir><dir name="en_US"><file name="Topefekt_Magesms.csv" hash="2aeade9ce5193f08d1b19959631764d0"/></dir><dir name="es_ES"><file name="Topefekt_Magesms.csv" hash="66aae8475301ad574cdecec4511aab80"/></dir><dir name="fr_FR"><file name="Topefekt_Magesms.csv" hash="b9f82cdd6f0779e8b13dee31e7bd8974"/></dir><dir name="it_IT"><file name="Topefekt_Magesms.csv" hash="aa2a250c18b47bf5ccad1787e2dbebda"/></dir><dir name="pl_PL"><file name="Topefekt_Magesms.csv" hash="622944ce311c1ffb5e9e8fb6c4c447cc"/></dir><dir name="pt_PT"><file name="Topefekt_Magesms.csv" hash="d7b14419f2ee4469bcf023729b523e3d"/></dir><dir name="ru_RU"><file name="Topefekt_Magesms.csv" hash="c92302b7f783678c0903695a6a47fcee"/></dir><dir name="sk_SK"><file name="Topefekt_Magesms.csv" hash="ce40b33a4f083bbb7fc0f2284d84fa7b"/></dir><dir name="sr_RS"><file name="Topefekt_Magesms.csv" hash="17761427d3db52adb3d55bc68c7fece9"/></dir><dir name="tr_TR"><file name="Topefekt_Magesms.csv" hash="c64505ca859e2004090fd2729ffe7b65"/></dir></dir></target><target name="magemedia"><dir name="magesms"><file name="About.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminCatalog.gif" hash="2500d6277ec65b73cec8e858e8f3e5ef"/><file name="AdminCustomers.gif" hash="2575dfefce12bc9451e4dfa1e0972a1e"/><file name="AdminEmployees.gif" hash="cdb742ba271aae8e0f5129e9422d8480"/><file name="AdminOrders.gif" hash="b0b296f24674d37c3749a4c68e014173"/><file name="AdminSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminSmsProfile.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="AdminTools.gif" hash="a3d566311d5cdd11470e60a30c4f1a1d"/><file name="CustomerSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="Empty.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="PayPal123.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SendSms.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsAnswers.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsCharging.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsHistory.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsMarketing.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="SmsWizard.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="calendar.jpg" hash="ec1c2dde2879bca23fb232bdfb6459b1"/><file name="delete.gif" hash="b658193cc19b4be4776fbca433c86354"/><file name="edit.gif" hash="100198930f65efde449cce2d4fd3dd49"/><file name="i_accepted.gif" hash="befd5320058efee73744cb53f1ac58a6"/><file name="i_buffered.png" hash="df919a54ebb68a101899da77671a7ae4"/><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_deleted.png" hash="2cac2bf05b4f0bfc7f0b24ad3274c8aa"/><file name="i_donotdisturb.png" hash="cc15ea466d59c68c2278f9eac825fac9"/><file name="i_duplicate.png" hash="9a12c256c640bae544204d17933a8e0b"/><file name="i_error.gif" hash="45f02b921ce504353050a3921c6a6b70"/><file name="i_minus.gif" hash="16e4ff79084066203148d261b4d14712"/><file name="i_plus.gif" hash="1cc64296ccbf2bd9dfd61a0ce6a7f117"/><file name="i_scheduled.png" hash="b644f202e2a2cf0fccf073dfdc8befb1"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/><file name="i_simulation.png" hash="6b6f65f4c1ca5e9017c978274a186091"/><file name="licence_cz.pdf" hash="c61b5f052326b3cb74dd3346911c41bb"/><file name="licence_en.pdf" hash="5a96ef0dcb08cee786ef574c16608365"/><file name="logo.gif" hash="a5e975f6b52cd9dbf20fed18216d1536"/><file name="logocart.png" hash="cb095b552c60e3c23ac449a453981e6c"/><file name="magesms-logo.png" hash="5352d2cb3b95990a1eb237f0d48ed811"/><file name="next.gif" hash="d4a145a07fa436e51cbaa4a28c14b622"/><file name="prev.gif" hash="d1dab45da5f0690fcaac4ce62f6bd04d"/><file name="sms.png" hash="5473a773314938564ad2f8fb826445bd"/><file name="topefekt-logo.gif" hash="149c7fd9bb2a4f70637963b0036e5a07"/><file name="translation.gif" hash="d2f85c78ea940b1a62919e50175a4c4f"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><dir name="topefekt"><dir name="magesms"><dir name="img"><file name="i_canceled.gif" hash="f54cd085dc4a709a590650df64c9307a"/><file name="i_sent.png" hash="938d41c783cc770339e1febbe2fe538e"/></dir><file name="stylesheet.css" hash="db71d2c9c18714595677b8af9bba8415"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="topefekt"><file name="functions.js" hash="46560fa35839fa7888afbe42c0164276"/><file name="jquery-1.9.1.min.js" hash="397754ba49e9e0cf4e7c190da78dda05"/><file name="jquery-noconflict.js" hash="10bdc1b7f2effa529e5baae786007688"/></dir></dir></target></contents>
16
<compatible/>
17
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
</package>