TOPefekt_Magesms - Version 1.5.1

Version Notes

2014-2017

Download this release

Release Info

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


Code changes from version 1.4.7 to 1.5.1

Files changed (218) hide show
  1. app/code/community/Topefekt/Magesms/Block/Answers.php +1 -1
  2. app/code/community/Topefekt/Magesms/Block/Answers/Grid.php +1 -1
  3. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php +1 -1
  4. app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php +1 -1
  5. app/code/community/Topefekt/Magesms/Block/Cart.php +1 -1
  6. app/code/community/Topefekt/Magesms/Block/Customer.php +1 -1
  7. app/code/community/Topefekt/Magesms/Block/Customer/Grid.php +1 -1
  8. app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php +1 -1
  9. app/code/community/Topefekt/Magesms/Block/Magesms.php +1 -1
  10. app/code/community/Topefekt/Magesms/Block/Marketing.php +1 -1
  11. app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php +1 -1
  12. app/code/community/Topefekt/Magesms/Block/Marketing/Form.php +1 -1
  13. app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php +1 -1
  14. app/code/community/Topefekt/Magesms/Block/Marketing/Template.php +1 -1
  15. app/code/community/Topefekt/Magesms/Block/Profile.php +1 -1
  16. app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php +1 -1
  17. app/code/community/Topefekt/Magesms/Block/Template.php +1 -1
  18. app/code/community/Topefekt/Magesms/Block/Template/Template.php +1 -1
  19. app/code/community/Topefekt/Magesms/Block/Validate.php +16 -0
  20. app/code/community/Topefekt/Magesms/Block/Validate/Customer.php +16 -0
  21. app/code/community/Topefekt/Magesms/Block/Validate/Mobile.php +16 -0
  22. app/code/community/Topefekt/Magesms/Block/Validate/Script.php +16 -0
  23. app/code/community/Topefekt/Magesms/Block/Wizard.php +1 -1
  24. app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php +1 -1
  25. app/code/community/Topefekt/Magesms/Controller/Action.php +1 -1
  26. app/code/community/Topefekt/Magesms/Controller/Template/Action.php +1 -1
  27. app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php +2 -2
  28. app/code/community/Topefekt/Magesms/Helper/Customer.php +16 -0
  29. app/code/community/Topefekt/Magesms/Helper/Data.php +2 -2
  30. app/code/community/Topefekt/Magesms/Model/Admins.php +1 -1
  31. app/code/community/Topefekt/Magesms/Model/Answers.php +1 -1
  32. app/code/community/Topefekt/Magesms/Model/Api.php +2 -2
  33. app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Observer.php +16 -0
  34. app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Template.php +16 -0
  35. app/code/community/Topefekt/Magesms/Model/Country.php +1 -1
  36. app/code/community/Topefekt/Magesms/Model/Country/Area.php +1 -1
  37. app/code/community/Topefekt/Magesms/Model/Country/Lang.php +1 -1
  38. app/code/community/Topefekt/Magesms/Model/Exceptions.php +1 -1
  39. app/code/community/Topefekt/Magesms/Model/Hooks.php +2 -2
  40. app/code/community/Topefekt/Magesms/Model/Hooks/Admins.php +1 -1
  41. app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php +1 -1
  42. app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php +1 -1
  43. app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php +1 -1
  44. app/code/community/Topefekt/Magesms/Model/Magesms.php +1 -1
  45. app/code/community/Topefekt/Magesms/Model/Maps.php +1 -1
  46. app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php +1 -1
  47. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php +1 -1
  48. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php +1 -1
  49. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php +1 -1
  50. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php +1 -1
  51. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php +1 -1
  52. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php +1 -1
  53. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php +1 -1
  54. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php +2 -2
  55. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php +1 -1
  56. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Marketing.php +16 -0
  57. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php +1 -1
  58. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php +1 -1
  59. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php +2 -2
  60. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php +2 -2
  61. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Sale.php +16 -0
  62. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php +1 -1
  63. app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php +1 -1
  64. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php +1 -1
  65. app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php +1 -1
  66. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php +1 -1
  67. app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php +1 -1
  68. app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template.php +16 -0
  69. app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template/Collection.php +16 -0
  70. app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php +1 -1
  71. app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php +1 -1
  72. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php +1 -1
  73. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php +1 -1
  74. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php +1 -1
  75. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang.php +1 -1
  76. app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Lang/Collection.php +1 -1
  77. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions.php +1 -1
  78. app/code/community/Topefekt/Magesms/Model/Mysql4/Exceptions/Collection.php +1 -1
  79. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks.php +1 -1
  80. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins.php +1 -1
  81. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Admins/Collection.php +1 -1
  82. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Collection.php +1 -1
  83. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers.php +1 -1
  84. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Customers/Collection.php +1 -1
  85. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates.php +1 -1
  86. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Templates/Collection.php +1 -1
  87. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode.php +1 -1
  88. app/code/community/Topefekt/Magesms/Model/Mysql4/Hooks/Unicode/Collection.php +1 -1
  89. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps.php +1 -1
  90. app/code/community/Topefekt/Magesms/Model/Mysql4/Maps/Collection.php +1 -1
  91. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter.php +1 -1
  92. app/code/community/Topefekt/Magesms/Model/Mysql4/Marketing/Filter/Collection.php +1 -1
  93. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order.php +1 -1
  94. app/code/community/Topefekt/Magesms/Model/Mysql4/Optout/Order/Collection.php +1 -1
  95. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender.php +1 -1
  96. app/code/community/Topefekt/Magesms/Model/Mysql4/Ownnumbersender/Collection.php +1 -1
  97. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes.php +1 -1
  98. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative.php +1 -1
  99. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Alternative/Collection.php +1 -1
  100. app/code/community/Topefekt/Magesms/Model/Mysql4/Routes/Collection.php +1 -1
  101. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory.php +1 -1
  102. app/code/community/Topefekt/Magesms/Model/Mysql4/Smshistory/Collection.php +1 -1
  103. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser.php +1 -1
  104. app/code/community/Topefekt/Magesms/Model/Mysql4/Smsuser/Collection.php +2 -2
  105. app/code/community/Topefekt/Magesms/Model/Mysql4/Template.php +1 -1
  106. app/code/community/Topefekt/Magesms/Model/Mysql4/Template/Collection.php +1 -1
  107. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender.php +1 -1
  108. app/code/community/Topefekt/Magesms/Model/Mysql4/Textsender/Collection.php +1 -1
  109. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables.php +1 -1
  110. app/code/community/Topefekt/Magesms/Model/Mysql4/Variables/Collection.php +1 -1
  111. app/code/community/Topefekt/Magesms/Model/Observer.php +32 -2
  112. app/code/community/Topefekt/Magesms/Model/Optout/Order.php +1 -1
  113. app/code/community/Topefekt/Magesms/Model/Otp/Observer.php +16 -0
  114. app/code/community/Topefekt/Magesms/Model/Overide/Cataloginventory/Stock.php +1 -1
  115. app/code/community/Topefekt/Magesms/Model/Ownnumbersender.php +1 -1
  116. app/code/community/Topefekt/Magesms/Model/Routes.php +2 -2
  117. app/code/community/Topefekt/Magesms/Model/Routes/Alternative.php +2 -2
  118. app/code/community/Topefekt/Magesms/Model/Sms.php +2 -2
  119. app/code/community/Topefekt/Magesms/Model/Smshistory.php +1 -1
  120. app/code/community/Topefekt/Magesms/Model/Smsprofile.php +1 -1
  121. app/code/community/Topefekt/Magesms/Model/Smsuser.php +2 -2
  122. app/code/community/Topefekt/Magesms/Model/System/Config/Connector.php +2 -2
  123. app/code/community/Topefekt/Magesms/Model/System/Config/Customergroups.php +1 -1
  124. app/code/community/Topefekt/Magesms/Model/System/Config/Lang.php +1 -1
  125. app/code/community/Topefekt/Magesms/Model/System/Config/OtpType.php +16 -0
  126. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCheckoutType.php +16 -0
  127. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidCustomerType.php +16 -0
  128. app/code/community/Topefekt/Magesms/Model/System/Config/SmsvalidOrderType.php +16 -0
  129. app/code/community/Topefekt/Magesms/Model/Template.php +1 -1
  130. app/code/community/Topefekt/Magesms/Model/Textsender.php +1 -1
  131. app/code/community/Topefekt/Magesms/Model/Variables.php +1 -1
  132. app/code/community/Topefekt/Magesms/controllers/AccountController.php +16 -0
  133. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AboutController.php +2 -2
  134. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AdminsmsController.php +2 -2
  135. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/AnswersController.php +1 -1
  136. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/CustomersmsController.php +2 -2
  137. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/HistoryController.php +2 -2
  138. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/MarketingController.php +3 -3
  139. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/OptoutController.php +1 -1
  140. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/ProfileController.php +2 -2
  141. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/PurchasecreditController.php +1 -1
  142. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/SendsmsController.php +1 -1
  143. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/StatisticsController.php +1 -1
  144. app/code/community/Topefekt/Magesms/controllers/Adminhtml/Magesms/WizardController.php +2 -2
  145. app/code/community/Topefekt/Magesms/controllers/ApiController.php +1 -1
  146. app/code/community/Topefekt/Magesms/controllers/CartController.php +1 -1
  147. app/code/community/Topefekt/Magesms/controllers/DeliveryController.php +2 -2
  148. app/code/community/Topefekt/Magesms/controllers/IndexController.php +1 -1
  149. app/code/community/Topefekt/Magesms/controllers/MarketingController.php +1 -1
  150. app/code/community/Topefekt/Magesms/controllers/Validate/IndexController.php +16 -0
  151. app/code/community/Topefekt/Magesms/controllers/ValidateController.php +16 -0
  152. app/code/community/Topefekt/Magesms/data/magesms_setup/data-install-1.0.0.php +15 -8
  153. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.1-1.0.2.php +1 -1
  154. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.0.3-1.0.4.php +2 -2
  155. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.0-1.1.1.php +1 -1
  156. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.1.1-1.1.2.php +1 -1
  157. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.2.0-1.2.1.php +1 -1
  158. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.1-1.3.2.php +2 -2
  159. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.3.6-1.4.0.php +16 -0
  160. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.0-1.4.1.php +16 -0
  161. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.1-1.4.2.php +16 -0
  162. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.2-1.4.3.php +19 -0
  163. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.4-1.4.5.php +16 -0
  164. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.5-1.4.6.php +16 -0
  165. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.7-1.4.8.php +24 -0
  166. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.4.8-1.5.0.php +28 -0
  167. app/code/community/Topefekt/Magesms/data/magesms_setup/data-upgrade-1.5.0-1.5.1.php +20 -0
  168. app/code/community/Topefekt/Magesms/etc/adminhtml.xml +8 -0
  169. app/code/community/Topefekt/Magesms/etc/config.xml +93 -1
  170. app/code/community/Topefekt/Magesms/etc/system.xml +65 -0
  171. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-0.9.0.php +1 -1
  172. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-install-1.0.0.php +1 -1
  173. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.11-0.9.12.php +1 -1
  174. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-0.9.12-0.9.13.php +1 -1
  175. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.0.1-1.0.2.php +1 -1
  176. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.3-1.1.4.php +2 -2
  177. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.1.5-1.2.0.php +1 -1
  178. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.3-1.3.4.php +3 -3
  179. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.3.6-1.4.0.php +2 -2
  180. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.0-1.4.1.php +2 -2
  181. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.1-1.4.2.php +2 -2
  182. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.2-1.4.3.php +2 -5
  183. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.4-1.4.5.php +2 -2
  184. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.5-1.4.6.php +2 -2
  185. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.7-1.4.8.php +16 -0
  186. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.4.8-1.5.0.php +26 -0
  187. app/code/community/Topefekt/Magesms/sql/magesms_setup/mysql4-upgrade-1.5.0-1.5.1.php +16 -0
  188. app/design/adminhtml/default/default/template/topefekt/magesms/about.phtml +1 -1
  189. app/design/adminhtml/default/default/template/topefekt/magesms/adminsms.phtml +1 -1
  190. app/design/adminhtml/default/default/template/topefekt/magesms/birthdaymessages/form.phtml +16 -0
  191. app/design/adminhtml/default/default/template/topefekt/magesms/customersms.phtml +2 -2
  192. app/design/adminhtml/default/default/template/topefekt/magesms/history.phtml +2 -2
  193. app/design/adminhtml/default/default/template/topefekt/magesms/marketing.phtml +1 -1
  194. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/customer.phtml +1 -1
  195. app/design/adminhtml/default/default/template/topefekt/magesms/marketing/form.phtml +1 -1
  196. app/design/adminhtml/default/default/template/topefekt/magesms/optout.phtml +1 -1
  197. app/design/adminhtml/default/default/template/topefekt/magesms/profile.phtml +2 -2
  198. app/design/adminhtml/default/default/template/topefekt/magesms/purchasecredit.phtml +1 -1
  199. app/design/adminhtml/default/default/template/topefekt/magesms/sendsms.phtml +1 -1
  200. app/design/adminhtml/default/default/template/topefekt/magesms/statistics.phtml +1 -1
  201. app/design/adminhtml/default/default/template/topefekt/magesms/template/form.phtml +1 -1
  202. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-alternative.phtml +1 -1
  203. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-edit.phtml +1 -1
  204. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-list.phtml +1 -1
  205. app/design/adminhtml/default/default/template/topefekt/magesms/wizard-sender.phtml +1 -1
  206. app/design/adminhtml/default/default/template/topefekt/magesms/wizard.phtml +1 -1
  207. app/design/frontend/base/default/layout/magesms.xml +35 -11
  208. app/design/frontend/base/default/template/topefekt/magesms/cart.phtml +1 -1
  209. app/design/frontend/base/default/template/topefekt/magesms/marketing-dashboard.phtml +1 -1
  210. app/design/frontend/base/default/template/topefekt/magesms/validate/checkout-button.phtml +16 -0
  211. app/design/frontend/base/default/template/topefekt/magesms/validate/customer-ajax.phtml +16 -0
  212. app/design/frontend/base/default/template/topefekt/magesms/validate/mobile.phtml +18 -0
  213. app/etc/modules/Topefekt_Magesms.xml +3 -0
  214. app/locale/cs_CZ/Topefekt_Magesms.csv +8 -0
  215. app/locale/de_DE/Topefekt_Magesms.csv +7 -0
  216. app/locale/sk_SK/Topefekt_Magesms.csv +8 -0
  217. js/topefekt/smsvalid.js +115 -0
  218. package.xml +6 -6
app/code/community/Topefekt/Magesms/Block/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('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.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'answers'; $this->_blockGroup = 'magesms'; $this->_headerText = $this->__('SMS Answers'); parent::__construct(); $this->_removeButton('add'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); return $this->getUrl('*/*/filter', array('_current' => true)); } public function getHeaderHtml() { return '<h3 class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3><div style="clear: both">'. $this->__('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.'). '</div>'; } public function getHeaderWidth() { return 'width: 100%'; } }
app/code/community/Topefekt/Magesms/Block/Answers/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setDefaultSort('cas'); $this->setDefaultDir('DESC'); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('magesms/answers_collection'); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('from', array( 'header'=>Mage::helper('magesms')->__('From number'), 'width' => '150px', 'index' => 'from', 'align' => 'right', ) ); $this->addColumn('text', array( 'index' => 'text', 'header'=>Mage::helper('magesms')->__('Text'), ) ); $this->addColumn('cas', array( 'header'=>Mage::helper('magesms')->__('Date'), 'width' => '150px', 'index' => 'cas', 'type' => 'datetime', ) ); $this->addColumn('smsc', array( 'header'=>Mage::helper('magesms')->__('SMS center'), 'width' => '150px', 'index' => 'smsc', 'align' => 'right', 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Smsc', ) ); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read') || Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->addColumn('action', array( 'header' => Mage::helper('magesms')->__('Action'), 'width' => '200px', 'sortable' => false, 'filter' => false, 'type' => 'action', 'is_system' => true, 'renderer' => 'Topefekt_Magesms_Block_Answers_Renderer_Actions' ) ); } $this->addExportType('*/*/exportCsv', Mage::helper('magesms')->__('CSV')); $this->addExportType('*/*/exportExcel', Mage::helper('magesms')->__('Excel XML')); return parent::_prepareColumns(); } protected function _prepareMassaction() { $this->setMassactionIdField('IDs'); $this->getMassactionBlock()->setFormFieldName('answers'); if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $this->getMassactionBlock()->addItem('mark_as_read', array( 'label' => Mage::helper('magesms')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', array('_current'=>true)), )); } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { $this->getMassactionBlock()->addItem('remove', array( 'label' => Mage::helper('magesms')->__('Remove'), 'url' => $this->getUrl('*/*/massRemove'), 'confirm' => Mage::helper('magesms')->__('Are you sure?') )); } return $this; } protected function getNoFilterMassactionColumn(){ return true; } public function getRowClass(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() ? 'read' : 'unread'; } public function getRowClickCallback() { return false; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Actions.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Renderer_Actions extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if (!$iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getProhlednuto() && Mage::getSingleton('admin/session')->isAllowed('magesms/answers/mark_as_read')) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = '<a href="'. $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())).'">'. Mage::helper('magesms')->__('Mark as Read') .'</a>'; } if (Mage::getSingleton('admin/session')->isAllowed('magesms/answers/remove')) { if ($id82aaf2f437652c4b6efbd55703199f614e8e516) $id82aaf2f437652c4b6efbd55703199f614e8e516 .= ' | '; $id82aaf2f437652c4b6efbd55703199f614e8e516 .= sprintf('<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $this->getUrl('*/*/remove/', array( '_current'=>true, 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()) ), Mage::helper('magesms')->__('Are you sure?'), Mage::helper('magesms')->__('Remove') ); } return $id82aaf2f437652c4b6efbd55703199f614e8e516; } }
app/code/community/Topefekt/Magesms/Block/Answers/Renderer/Smsc.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Answers_Renderer_Smsc extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = trim($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getData($this->getColumn()->getIndex())); return $ia61712c27ea241bd7a543dc2b02ea572274d0322 ? '+'.$ia61712c27ea241bd7a543dc2b02ea572274d0322 : '-'; } }
app/code/community/Topefekt/Magesms/Block/Cart.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Cart extends Mage_Checkout_Block_Cart { protected function _construct() { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b && Mage::helper('magesms')->isActive()) { $this->setOptoutProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $this->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8) $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/removeProduct'); else $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/addProduct'); $this->setOptoutAuto(!!$i705fa7c9639d497e1179d7d5691c212668a8c9c8); } return parent::_construct(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Cart extends Mage_Checkout_Block_Cart { protected function _construct() { $i69a1201e93806d55c970dfb18feec53d221ba37b = Mage::helper('magesms')->getOptoutProduct(); if ($i69a1201e93806d55c970dfb18feec53d221ba37b && Mage::helper('magesms')->isActive()) { $this->setOptoutProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $this->getQuote()->getItemByProduct($i69a1201e93806d55c970dfb18feec53d221ba37b); if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8) $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/removeProduct'); else $this->setOptoutUrl(Mage::app()->getDefaultStoreView()->getBaseUrl().'magesms/cart/addProduct'); $this->setOptoutAuto(!!$i705fa7c9639d497e1179d7d5691c212668a8c9c8); } return parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Customer.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'customer'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Customer/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setId('magesms_customer_grid'); } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), 'sortable' => false, ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', 'sortable' => false, ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', 'sortable' => false, )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'url' => array('base'=> '*/*/filter/action/removeCustomer/letter/'.$this->getParam('letter')), 'field' => 'id', 'onclick' => 'removeCustomer(this); return false;', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Customer/Marketing.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer_Marketing extends Mage_Core_Block_Template { protected function _construct() { $i4f9132e504066d4a445dfdf8eab82004739a54d4 = Mage::helper('magesms')->isActive() && Mage::getStoreConfig('magesms/optout/marketing'); $this->setOptoutMarketingActive($i4f9132e504066d4a445dfdf8eab82004739a54d4); if ($i4f9132e504066d4a445dfdf8eab82004739a54d4) { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $this->setOptoutMarketing($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); } parent::_construct(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Customer_Marketing extends Mage_Core_Block_Template { protected function _construct() { $i4f9132e504066d4a445dfdf8eab82004739a54d4 = Mage::helper('magesms')->isActive() && Mage::getStoreConfig('magesms/optout/marketing'); $this->setOptoutMarketingActive($i4f9132e504066d4a445dfdf8eab82004739a54d4); if ($i4f9132e504066d4a445dfdf8eab82004739a54d4) { $i21e55df616c305955791876c1eb4da83448beba2 = Mage::getSingleton('customer/session')->getCustomer(); $this->setOptoutMarketing($i21e55df616c305955791876c1eb4da83448beba2->getMagesmsCustomerMarketing()); } parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Magesms.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Magesms extends Mage_Core_Block_Template { public function __construct() { parent::__construct(); $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/smshistory')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); } protected function _prepareLayout() { parent::_prepareLayout(); $iff0690cb773a7fb817f520d36f525df413577228 = $this->getLayout()->createBlock('page/html_pager', 'custom.pager'); $iff0690cb773a7fb817f520d36f525df413577228->setAvailableLimit(array(2=>2,5=>5,10=>10,20=>20,'all'=>'all')); $iff0690cb773a7fb817f520d36f525df413577228->setCollection($this->getCollection()); $this->setChild('pager', $iff0690cb773a7fb817f520d36f525df413577228); $this->getCollection()->load(); return $this; } public function getPagerHtml() { return $this->getChildHtml('pager'); } }
app/code/community/Topefekt/Magesms/Block/Marketing.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing extends Mage_Adminhtml_Block_Widget_Grid_Container { public function __construct() { $this->_controller = 'marketing'; $this->_blockGroup = 'magesms'; parent::__construct(); $this->_removeButton('add'); } }
app/code/community/Topefekt/Magesms/Block/Marketing/Customer.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (empty($i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53])) $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Customer extends Mage_Adminhtml_Block_Template { public function __construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d = array()) { parent::__construct($i4361b87b8aae0dab8305e7873d3986285df3ff3d); $this->setTemplate('topefekt/magesms/marketing/customer.phtml'); $this->setWebsites(Mage::getSingleton('magesms/marketing_filter')); } protected function _toHtml() { if ($this->getId()) { return '<div id="magesms-marketing-'.$this->getId().'">'.parent::_toHtml().'</div>'; } return parent::_toHtml(); } public function displayByAlphabet() { $i39d2c3f69cb73b5684f101b504090c13c5174bc4 = array(); foreach($this->getCollection() as $i21e55df616c305955791876c1eb4da83448beba2) { $i47b2a41e4081b6f8d8381f411087dcd7042bfb53 = mb_strtoupper(mb_substr(trim($i21e55df616c305955791876c1eb4da83448beba2->lastname), 0, 1, 'utf-8')); if (empty($i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53])) $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53] = new Varien_Data_Collection(); $i39d2c3f69cb73b5684f101b504090c13c5174bc4[$i47b2a41e4081b6f8d8381f411087dcd7042bfb53]->addItem($i21e55df616c305955791876c1eb4da83448beba2); } ksort($i39d2c3f69cb73b5684f101b504090c13c5174bc4); return $i39d2c3f69cb73b5684f101b504090c13c5174bc4; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Form.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Form extends Mage_Adminhtml_Block_Widget_Form { protected function _prepareForm() { $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683 = $this->getUrl('*/*/filter', array('action' => 'applyFilter')); $i1791b2d1f89bb2bd83b34046f59125af207713db = new Varien_Data_Form( array('id' => 'marketing_filter', 'action' => $id7c8c8e1d1b44e9917ce2ae9b4c7d03e2a3ab683, 'method' => 'get', 'onsubmit' => 'applyFilter(\'marketing_filter\'); return false;') ); $i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd = 'magesms_marketing_'; $i1791b2d1f89bb2bd83b34046f59125af207713db->setHtmlIdPrefix($i5a4070f5dbe2b3be0f175bc31d21ce8a0e2e76dd); $i1791b2d1f89bb2bd83b34046f59125af207713db->setUseContainer(true); $i1791b2d1f89bb2bd83b34046f59125af207713db->addField('customer_not', 'hidden', array( 'name' => 'customer_not', )); $i00f9b0a11b6d8c15e9d603e29ad96b2c88140a51 = $i1791b2d1f89bb2bd83b34046f59125af207713db->addFieldset('base_fieldset', array( 'legend' => Mage::helper('magesms')->__('SMS Marketing - bulk SMS filter'), ) ); $i6710129c3d74d2fb5df97ccbaab2621e9e5c1bf9 = '<a onclick="resetFilter(this);return false;" title="'.$this->__('Reset Filter').'" href="'.$this->getUrl('*/*/filter', array('action' => 'reset')).'">['.$this->__('Reset Filter').']</a>
app/code/community/Topefekt/Magesms/Block/Marketing/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); } protected function _prepareCollection() { parent::_prepareCollection(); $this->setAdditionalJavaScript('countitSMS.marketingCount = '.$this->getCollection()->getSize().";\ncountitSMS.count();\n"); return $this; } protected function _construct() { parent::_construct(); } protected function _prepareColumns() { $this->addColumn('entity_id', array( 'header'=>Mage::helper('magesms')->__('Customer ID'), 'width' => '50px', 'index' => 'entity_id', 'type' => 'number', ) ); $this->addColumn('lastname', array( 'index' => 'lastname', 'header'=>Mage::helper('magesms')->__('Last name'), ) ); $this->addColumn('firstname', array( 'header'=>Mage::helper('magesms')->__('First name'), 'index' => 'firstname', ) ); $this->addColumn('country_id', array( 'header'=>Mage::helper('magesms')->__('Country'), 'width' => '50', 'index' => 'country_id', 'sortable' => false, ) ); $this->addColumn('Telephone', array( 'header'=>Mage::helper('magesms')->__('Mobile number'), 'width' => '130', 'index' => 'telephone', 'sortable' => false, ) ); if (!Mage::app()->isSingleStoreMode()) { $this->addColumn('website_id', array( 'header' => Mage::helper('customer')->__('Website'), 'align' => 'center', 'width' => '100px', 'type' => 'options', 'options' => Mage::getSingleton('adminhtml/system_store')->getWebsiteOptionHash(true), 'index' => 'website_id', )); } $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'title' => Mage::helper('magesms')->__('REMOVE customer from this list'), 'field' => 'id', 'onclick' => 'filterRemoveCustomerSubmit(this)', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/customer/edit', array('id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } public function getRowClickCallback() { return 'openGridRowMagesms'; } }
app/code/community/Topefekt/Magesms/Block/Marketing/Template.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Marketing_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_filter_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/marketing_filter')->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/filter', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveFilter(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreFilter'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/filter', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Profile.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Profile extends Mage_Adminhtml_Block_Template { protected $_helper; public function __construct() { exit; parent::__construct(); $this->setTemplate('poll/poll.phtml'); $this->setFormAction(Mage::getUrl('*/*/new')); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Profile extends Mage_Adminhtml_Block_Template { protected $_helper; public function __construct() { exit; parent::__construct(); $this->setTemplate('poll/poll.phtml'); $this->setFormAction(Mage::getUrl('*/*/new')); } }
app/code/community/Topefekt/Magesms/Block/System/Config/Apikeygenerator.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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/Block/Template.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Template extends Mage_Core_Block_Template { public $profile; public $newversion; public function _construct() { parent::_construct(); $this->profile = Mage::getSingleton('magesms/smsprofile'); } public function getFilterUrl() { $this->getRequest()->setParam('filter', null); $this->getRequest()->setParam('sms', null); return $this->getUrl('*/*/', array('_current' => true)); } }
app/code/community/Topefekt/Magesms/Block/Template/Template.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Template_Template extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setSaveParametersInSession(false); $this->setFilterVisibility(false); $this->setPagerVisibility(false); $this->setDefaultSort('date'); $this->setDefaultDir('DESC'); $this->setId('magesms_template_grid'); $this->setUseAjax(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/template')->getCollection(); $i30f20aafde612a957f7f966cb5b85e35782bc88a = ($i8082253d76e74d88c499183ff2cfde28044ae37d = Mage::app()->getRequest()->getParam('type')) ? $i8082253d76e74d88c499183ff2cfde28044ae37d : 0; $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('type', $i30f20aafde612a957f7f966cb5b85e35782bc88a); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); return $this; } protected function _prepareColumns() { $this->addColumn('name', array( 'header'=>Mage::helper('magesms')->__('Name'), 'index' => 'name', 'sortable' => false, ) ); $this->addColumn('date', array( 'header'=>Mage::helper('magesms')->__('Date'), 'index' => 'date', 'width' => '150px', 'type' => 'datetime', 'sortable' => false, ) ); $this->addColumn('action', array( 'header'=>Mage::helper('magesms')->__('Action'), 'align' => 'center', 'width' => '80px', 'type' => 'action', 'getter' => 'getId', 'actions' => array( array( 'caption' => Mage::helper('magesms')->__('REMOVE'), 'title' => Mage::helper('magesms')->__('REMOVE'), 'url' => array('base'=> '*/*/template', 'params'=> array('action' => 'remove')), 'field' => 'id', 'onclick' => 'return window.submitRemoveTemplate(this);', 'class' => 'action-remove', 'id' => '', ) ), 'sortable' => false, 'index' => 'store', 'is_system' => true, ) ); return parent::_prepareColumns(); } public function getRowClickCallback() { return 'submitRestoreTemplate'; } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/template', array('action' => 'restore', 'id' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Block/Validate.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Mobile extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Validate/Customer.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Customer extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); $this->setTemplate('topefekt/magesms/validate/customer-ajax.phtml'); } }
app/code/community/Topefekt/Magesms/Block/Validate/Mobile.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Mobile extends Mage_Core_Block_Template { protected function _construct() { parent::_construct(); } }
app/code/community/Topefekt/Magesms/Block/Validate/Script.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Block_Validate_Script extends Mage_Core_Block_Template { protected function _prepareLayout() { parent::_prepareLayout(); if (Mage::helper('magesms')->isActive() && (Mage::helper('magesms')->getOtpOrderType() || Mage::helper('magesms')->getOtpCheckoutCustomerType())) $this->getLayout()->getBlock('head')->addJs('topefekt/smsvalid.js'); return $this; } public function _toHtml() { if (Mage::helper('magesms')->isActive() && Mage::helper('magesms')->getOtpOrderType()) { $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = 'var magesmsValidUrl = "' . Mage::getUrl('magesms/validate/order', array('_secure' => true)) . '";'; $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 .= "Translator.add('OTP SMS','".Mage::helper('magesms')->__('OTP SMS')."');"; return Mage::helper('core/js')->getScript($i3358fd35282548f1f8ccafbf23d60a4ade466fd3); } return ''; } }
app/code/community/Topefekt/Magesms/Block/Wizard.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Wizard extends Mage_Adminhtml_Block_Widget_Grid_Container { protected function _prepareLayout() { Mage_Adminhtml_Block_Widget_Container::_prepareLayout(); } public function __construct() { $this->_controller = 'wizard'; $this->_headerText = Mage::helper('magesms')->__('SMS Settings'); parent::__construct(); } }
app/code/community/Topefekt/Magesms/Block/Wizard/Grid.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Block_Wizard_Grid extends Mage_Adminhtml_Block_Widget_Grid { public function __construct() { parent::__construct(); $this->setDefaultSort('ID'); $this->setId('ID'); $this->setDefaultDir('asc'); $this->setSaveParametersInSession(true); } protected function _prepareCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/routes') ->getCollection(); $this->setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); parent::_prepareCollection(); if ($this->getCollection()) { $this->getCollection() ->addCustomerTaxClassesToResult() ->addProductTaxClassesToResult() ->addRatesToResult(); } return $this; } protected function _addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7) { if ($this->getCollection()) { switch ($i75f8edda04d6bdede42ee5632d74834e50512ba7->getId()) { case 'tax_rates': $this->getCollection()->joinCalculationData('rate'); break; case 'customer_tax_classes': $this->getCollection()->joinCalculationData('ctc'); break; case 'product_tax_classes': $this->getCollection()->joinCalculationData('ptc'); break; } } return parent::_addColumnFilterToCollection($i75f8edda04d6bdede42ee5632d74834e50512ba7); } protected function _prepareColumns() { $this->addColumn('code', array( 'header'=>Mage::helper('tax')->__('Name'), 'align' =>'left', 'index' => 'code', 'filter_index' => 'code', ) ); $this->addColumn('customer_tax_classes', array( 'header'=>Mage::helper('tax')->__('Customer Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'customer_tax_classes', 'filter_index' => 'ctc.customer_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER)->toOptionHash(), ) ); $this->addColumn('product_tax_classes', array( 'header'=>Mage::helper('tax')->__('Product Tax Class'), 'sortable' => false, 'align' =>'left', 'index' => 'product_tax_classes', 'filter_index' => 'ptc.product_tax_class_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/class')->getCollection()->setClassTypeFilter(Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT)->toOptionHash(), ) ); $this->addColumn('tax_rates', array( 'sortable' => false, 'header' => Mage::helper('tax')->__('Tax Rate'), 'align' => 'left', 'index' => 'tax_rates', 'filter_index' => 'rate.tax_calculation_rate_id', 'type' => 'options', 'show_missing_option_values' => true, 'options' => Mage::getModel('tax/calculation_rate')->getCollection()->toOptionHashOptimized(), ) ); $this->addColumn('priority', array( 'header'=>Mage::helper('tax')->__('Priority'), 'width' => '50px', 'index' => 'priority' ) ); $this->addColumn('position', array( 'header'=>Mage::helper('tax')->__('Sort Order'), 'width' => '50px', 'index' => 'position' ) ); $i087550d202ce604e7a8894605fde8d6e87ee4776 = $this->getUrl('*/*/'); return parent::_prepareColumns(); } public function getRowUrl($iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { return $this->getUrl('*/*/edit', array('rule' => $iebe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId())); } }
app/code/community/Topefekt/Magesms/Controller/Action.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Controller_Action 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; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Controller_Action 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; } return $this; } public function getBlockCustomer() { $i21e55df616c305955791876c1eb4da83448beba2 = $this->getLayout()->createBlock('magesms/customer_grid'); return $i21e55df616c305955791876c1eb4da83448beba2; } protected function _initAction() { $this->loadLayout() ->_title(Mage::helper('magesms')->__('MageSMS')) ; $this->getLayout()->getBlock('head') ->addCss('css/topefekt/magesms/stylesheet.css') ->addJs('topefekt/functions.js') ; if ($i458778f43fe9c6d565ec84d06bb5438f060a17d8 = $this->getLayout()->getBlock('head')) { $i458778f43fe9c6d565ec84d06bb5438f060a17d8->addItem('js', 'prototype/window.js') ->addItem('js_css', 'prototype/windows/themes/default.css') ->addCss('lib/prototype/windows/themes/magento.css') ->addItem('js', 'mage/adminhtml/variables.js'); } return $this; } }
app/code/community/Topefekt/Magesms/Controller/Template/Action.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null, $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0 = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = 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 (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } if (!empty($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0) && is_object($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0)) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getCoupon()->getCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDescription(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'] = Mage::app()->getStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getCurrentCurrencyCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getFromDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getToDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'] = (int)$i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountQty(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Controller_Template_Action extends Topefekt_Magesms_Controller_Action { public function templateAction() { $ia1a238c1f12f3901520c7ca55efa646e471f7f6e = new Varien_Object(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(false); if ($this->getRequest()->getParams()) { $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2 = $this->getRequest(); if ($i1507c94b68f51b22087227858337782550edf618 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('action')) { try { switch ($i1507c94b68f51b22087227858337782550edf618) { case 'saveTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate()); break; case 'loadTemplate': $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); break; case 'save': if ($this->getRequest()->isPost()) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setData(array( 'name' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('saveName'), 'template' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('text'), 'unicode' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unicode'), 'unique' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('unique'), 'date' => date('Y-m-d H:i:s'), 'type' => $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('type') )); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } break; case 'remove': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->delete(); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setHtml($this->_saveTemplate(false)); } break; case 'restore': if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538 = $i628d8ebfdcd1b4d13c7bb90cffb2f53678d994d2->getParam('id')) { $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::getModel('magesms/template'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->load($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->addData(array('data' => $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getData())); } break; } } catch (Exception $i8c174347956f0a76258a09557543e84f88beb4a0) { Mage::getSingleton('adminhtml/session')->addError($i8c174347956f0a76258a09557543e84f88beb4a0->getMessage()); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setError(true); $ia1a238c1f12f3901520c7ca55efa646e471f7f6e->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } } } $this->getResponse()->setBody($ia1a238c1f12f3901520c7ca55efa646e471f7f6e->toJson()); } protected function _prepareText($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null, $i7a5ea366969a291381fafa1448c9a2fafd34ad5e = null, $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0 = null) { if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); if (preg_match_all('/{(.*?)}/', $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ia00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $iebd691e534c6cf2e84cf8a88790a5271154fca05) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b[$iebd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$iebd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_domain'] = Mage::getStoreConfig('web/unsecure/base_url', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getStoreConfig('general/store_information/name', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (empty($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'])) { if (!empty($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = Mage::getModel('core/store')->load($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getName(); } else { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['shop_name'] = 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 (is_object($i7a5ea366969a291381fafa1448c9a2fafd34ad5e) && $i7a5ea366969a291381fafa1448c9a2fafd34ad5e instanceof Varien_Object) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_firstname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_lastname'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getLastname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_email'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getEmail(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_phone'] = $i7a5ea366969a291381fafa1448c9a2fafd34ad5e->getTelephone(); } } if (!empty($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0) && is_object($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0)) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_name'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_code'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getCoupon()->getCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_description'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDescription(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_percent'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_amount'] = Mage::helper('core')->currency($i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountAmount(), false, false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_reduction_currency'] = Mage::app()->getStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getCurrentCurrencyCode(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_start'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getFromDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_date_end'] = $i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getToDate(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['coupon_quantity'] = (int)$i9ec689e1c80cd31f364efa77b20f79dcf2612cf0->getDiscountQty(); } } foreach($i0933475b5bd80561a9f50282fd9eb0b8345cec4b as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace('{'.$i670253c23c6fcba76bc4256a88fdd8fbc1041039.'}', $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); } } return $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; } protected function _saveTemplate($iacea0d13bc5e2676192c06d68cb091dc0ce26320 = true) { $id82aaf2f437652c4b6efbd55703199f614e8e516 = ''; if ($iacea0d13bc5e2676192c06d68cb091dc0ce26320) { $i1791b2d1f89bb2bd83b34046f59125af207713db = $this->getLayout()->createBlock( 'Topefekt_Magesms_Block_Template', 'magesms_marketing_templateform', array('template' => 'topefekt/magesms/template/form.phtml') ); $id82aaf2f437652c4b6efbd55703199f614e8e516 = $i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml(); } $i42cf41da37138d64d37b0778e6561aab5e1239d6 = $this->getLayout()->createBlock('magesms/template_template'); return $id82aaf2f437652c4b6efbd55703199f614e8e516.$i42cf41da37138d64d37b0778e6561aab5e1239d6->toHtml(); } protected function _initAction() { parent::_initAction(); $this->getLayout()->getBlock('head')->addJs('topefekt/template.js'); $i3358fd35282548f1f8ccafbf23d60a4ade466fd3 = '
app/code/community/Topefekt/Magesms/Helper/Adminhtml/Data.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Helper_Adminhtml_Data extends Mage_Adminhtml_Helper_Data { public function setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0=null) { if (strpos(Mage::app()->getRequest()->getControllerName(), 'magesms_') === 0) { $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::getStoreConfig('magesms/template/language').'/'; if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 == 'en') $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = ''; $this->_pageHelpUrl = 'http://www.mage-sms.com/'.$i593f9fb6306ab4cdb862f1ef6769504d63647c90.Mage::helper('magesms')->__('manual').'.html'; } else { return parent::setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0); } return $this; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Helper_Adminhtml_Data extends Mage_Adminhtml_Helper_Data { public function setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0 = null, $ic7752ffb9aa086c6975d05c8329ca1dc33347b5f = null) { if (strpos(Mage::app()->getRequest()->getControllerName(), 'magesms_') === 0) { $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = Mage::getStoreConfig('magesms/template/language').'/'; if ($i593f9fb6306ab4cdb862f1ef6769504d63647c90 == 'en') $i593f9fb6306ab4cdb862f1ef6769504d63647c90 = ''; $this->_pageHelpUrl = 'http://www.mage-sms.com/'.$i593f9fb6306ab4cdb862f1ef6769504d63647c90.Mage::helper('magesms')->__('manual').'.html'; } else { return parent::setPageHelpUrl($ic157485eecbe64d400493d7b9e7f434b83aca5d0, $ic7752ffb9aa086c6975d05c8329ca1dc33347b5f); } return $this; } }
app/code/community/Topefekt/Magesms/Helper/Customer.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Helper_Customer extends Mage_Customer_Helper_Data { public function getRegisterUrl() { if (Mage::getStoreConfig('magesms/smsvalid/customer') != 1) return parent::getRegisterUrl(); return $this->_getUrl('magesms/validate/mobile'); } }
app/code/community/Topefekt/Magesms/Helper/Data.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { const MAGESMS_ENABLE = 'magesms/magesms/enable'; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function isActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { return Mage::getStoreConfig(self::MAGESMS_ENABLE, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } public function prepareFilterString($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2 = base64_decode($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2); parse_str($i215e94a3ecdacdf2b3af7056dddcbb72bf4f3ad2, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}#x2F;', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}#x2F;', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps']; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; $ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0 = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 1; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b; break; } } } } if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 1; continue; } } } } } if(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif (($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7])) $ida3b491904fb073f446bf820cd55a0ff69b347d1 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7] = $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default') { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function hookVariablesJS($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if (preg_match_all('/{(.*?)}/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 = Mage::getSingleton('magesms/variables')->getCollection() ->addFieldToFilter('name', array('in'=>array(array_keys($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b)))); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getName()] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate() ? Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate()) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 = ''; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= ', '; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039.': "'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89.'"'; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7; } } public function filterDates($if66f788c75229f5f3ea1a622ab4dee258553c789, $ic78bc645a0f45c428f6551163ed2dce47dd289ee) { if (empty($ic78bc645a0f45c428f6551163ed2dce47dd289ee)) { return $if66f788c75229f5f3ea1a622ab4dee258553c789; } $i25d716f44b9a21507a214e968cc96805785eff97 = new Zend_Filter_LocalizedToNormalized(array( 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $id1da71c6f00d9b85058894facc6aae99ed82822c = new Zend_Filter_NormalizedToLocalized(array( 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT )); foreach ($ic78bc645a0f45c428f6551163ed2dce47dd289ee as $i36424a86007474ffc648c582cbfca240cda58c1e) { if (array_key_exists($i36424a86007474ffc648c582cbfca240cda58c1e, $if66f788c75229f5f3ea1a622ab4dee258553c789) && !empty($i36424a86007474ffc648c582cbfca240cda58c1e)) { $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $i25d716f44b9a21507a214e968cc96805785eff97->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $id1da71c6f00d9b85058894facc6aae99ed82822c->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); } } return $if66f788c75229f5f3ea1a622ab4dee258553c789; } public function getCustomerCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') ->joinAttribute('shipping_country_id', 'customer_address/country_id', 'default_shipping', null, 'left') ->addFieldToFilter(array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) )); if (version_compare(Mage::getVersion(), '1.6', '>=')) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); } else { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_billing_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_country_id`.`value`, `_table_shipping_country_id`.`value`, `_table_billing_country_id`.`value`) AS country_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function addOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i7fff76b02be2f63877a1782ca871e62a287fa16f) { $i32bd8782f9db301dda31691016fa281ffd5c7c36 = Mage::getResourceModel('catalog/product')->getAttributeRawValue($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId(), 'magesms_optout', Mage::app()->getStore()->getId()); if (!$i32bd8782f9db301dda31691016fa281ffd5c7c36) return $this; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == Mage::getConfig()->getNode('default/config/optout')->sku) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828); } } } return $this; } public function removeOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && !$i7fff76b02be2f63877a1782ca871e62a287fa16f || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); } } } public function getOptoutProduct() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Helper_Data extends Mage_Adminhtml_Helper_Data { const MAGESMS_ENABLE = 'magesms/magesms/enable'; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a = array(); public function isActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { return Mage::getStoreConfig(self::MAGESMS_ENABLE, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); } public function prepareFilterString($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring = base64_decode($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring); parse_str($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2tring, $ia61712c27ea241bd7a543dc2b02ea572274d0322); array_walk_recursive($ia61712c27ea241bd7a543dc2b02ea572274d0322, array($this, 'decodeFilter')); return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function decodeFilter(&$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89 = rawurldecode($ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } public function strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b) { return strlen(utf8_decode($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b)); } public function substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 = -1) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5 = preg_split('//u', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7c53db4e1e286ce8a65b930c9d93cdabb069954b, -1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424 == -1 ? count($ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac = ''; for($ibcdf76f8c9ddc330c79f805116a8bb146c43749d=$ibcdf76f8c9ddc330c79f805116a8bb146c43749dee10b1113e98c522f9d7b19b278ac191206cf98d; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d<$ibcdf76f8c9ddc330c79f805116a8bb146c43749dd3f9e660973a05c72dd2df52c035747f20824128; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d353d238323208401995f652ac6757c9d9fd6d8d5[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]; return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d43e9cdc24374813037dc691df23094b5f8072dac; } public function strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2 = 0) { return mb_strpos($icf8e6d55f3b73687e31b5bfb7df726c05be874e6, $ibcdf76f8c9ddc330c79f805116a8bb146c43749dfba351358ab7c7f378315c6b3cb913d7f4d7b0fa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d37e0852c5c95f9440a8999674f38c2ab1fbd56e2, 'UTF-8'); } public function detectLang($ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 = false) { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90 = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475 = explode(';', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1]); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db473854f4b306e706e896b68ceb14665e7bc5475[0]; } $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[0])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])) { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/country_lang')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFilter('lang', strtolower($ibcdf76f8c9ddc330c79f805116a8bb146c43749d593f9fb6306ab4cdb862f1ef6769504d63647c90[1])); foreach ($iff7e46827cbb6547116c592bf800f4687428abf9 as $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3) { return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dccb00baf62ef7b52dab4785b2fe3e5d6471b5d03 ? $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('iso2') : $i4cf0596ef3a67e5add95b49723a3c49aecd1dbd3->getData('country_name'); } } Mage::log('Dont detect lang: '.$_SERVER['HTTP_ACCEPT_LANGUAGE']); } return 'en'; } public function getMutations() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25 = array(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dce21cd4390308309015957a221ff2bff67f397ce = Mage::app()->getLocale()->getOptionLocales(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getStoreConfig('general/locale/code', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId()); if (isset($ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7])) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array_merge($ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'], array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' )); continue; } foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dce21cd4390308309015957a221ff2bff67f397ce as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3['value'] == $ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4e4643965424fd5279d5992f6c669c0a56d9a1a3; $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['stores'] = array( Mage::getStoreConfig('general/store_information/name', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getStoreId()). ' ('.$i3763a59a4c1873eeb396b46caa87140ccb7bc631['name'].')' ); $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25[$ibcdf76f8c9ddc330c79f805116a8bb146c43749da35eb6e21739b9f362d4085ebe7dee274bc421a7]['selected'] = 0; break; } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749de54fcd5470bd7f31f709089290e33bb03e655c25; } public function formatPrice($ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc = 4) { return number_format((float)$ibcdf76f8c9ddc330c79f805116a8bb146c43749d58457975a91d59a84d2920953badcb7365ac1f01, $i2457499363c0873527a65aa9ad19ce774bd79cbc, ",", " "); } public function moreText($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83) { if($this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83): $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $this->strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, ' ', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4616676bff4c07942c8542e6b4e0ccf29d473424, 'UTF-8'); if($ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae > $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae == 0) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d41874a76da96da0584b16b9f04de6e3f06863c83; return "<span style=\"cursor:help;text-decoration:underline;\" title=\"".$ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa."\">".$this->substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, 0, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d838a72d011cf88c91dfc0040ea07c7fa8e44c6ae)."...</span>"; else: return $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa; endif; } public function isPhoneNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466) { return preg_match('/^[0-9]{7,18}#x2F;', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9e76a736cd2ce866634b875b0e477fe802efd466); } public function isTextSender($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82) { return preg_match('/(?!^\d+$)^[0-9a-zA-Z_.]{3,11}#x2F;', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1e0ab2cc14bf21436fd5165a18812bf40da12d82); } public function countSms($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa = str_replace("\r\n","\n", $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749de8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 71) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 67 == 0) $if295547318143e26fc7026b92d58e3d1eec229db= floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/67) + 1; } else { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 = $this->strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 < 161) $if295547318143e26fc7026b92d58e3d1eec229db = 1; elseif ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956 % 153 == 0) $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153); else $if295547318143e26fc7026b92d58e3d1eec229db = floor($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8cf55ea687bc1e974c51c5dbd65047184db69956/153) + 1; } return $if295547318143e26fc7026b92d58e3d1eec229db; } public function prepareNumber($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = null) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 0; $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = str_replace(array(' ', '-', '(', ')', '/'), '', $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '+') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); if (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '00') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 2); elseif (strpos($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, '0') === 0 ) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 1); $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = Mage::getSingleton('magesms/exceptions')->number($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd); $ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps']; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['maps'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/maps')->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0->count()) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; $ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0 = strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749da272895aa0a96c7311ddc14cd99cfde9b3e11fa0-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290 = 1; $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749db4e103fdfd1ed6cc442d5e4b10b704780717812b; break; } } } } if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) { foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { if (preg_match("/^".$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea()."/", $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d45e0dbda03c5e1b049126d29f809da95d0e0aa03)) { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = substr($ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 0, strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getNumber(); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749db8c2593511e733deb36fb6bc932a747fcf3b754c-strlen($ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getArea())) == $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc155ac0a2e7d522b71a8f6aae45a2917bd596596) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 = 1; continue; } } } } } if(!$ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 && !$ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd.$ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2; elseif (($ibcdf76f8c9ddc330c79f805116a8bb146c43749dbad5149cd536c7e1f814c7b3874463985a5fc9e0 || $ibcdf76f8c9ddc330c79f805116a8bb146c43749db40be13647f8bcb177e647eb770e6ac08b117290) && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; if (!$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd && $i7492a7ab99a6ff1e0ae253366480ecb40a550224) $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd = $i7492a7ab99a6ff1e0ae253366480ecb40a550224; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df = array( 'mobile' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749daab7d0929a7000dca6467ef8cddbf22298ab81f2, 'prefix' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd, 'isms' => '', 'sendertype' => '', 'senderID' => '' ); if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd])) $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a.'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 = Mage::getSingleton('magesms/routes')->getCollection() ->addFieldToFilter('area', $ibcdf76f8c9ddc330c79f805116a8bb146c43749df0177bfe4bf22cfbb3da2ac06eca557829f0a4cd) ->addFieldToFilter('type', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a); if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7 = Mage::getModel('core/store')->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)->getGroup()->getId(); foreach ($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd567d29153b9150b8add34bc81058cd5432e46a0 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['isms'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['isms']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['sendertype'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['sendertype']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d['senderID']; if (!is_null($ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7])) $ida3b491904fb073f446bf820cd55a0ff69b347d1 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7]; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['routes-alternative_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7] = $ida3b491904fb073f446bf820cd55a0ff69b347d1 = Mage::getSingleton('magesms/routes_alternative')->getCollection() ->addFieldToFilter('route_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749debe3a16a01f87f9a4ebbb9731163db3e3e64cc3d->getId()) ->addFieldToFilter('store_group_id', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d898347c1def9d4effdd15deb4483c4b4a4aa8ab7); if ($ida3b491904fb073f446bf820cd55a0ff69b347d1->count()) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df['senderID'] = $ida3b491904fb073f446bf820cd55a0ff69b347d1->getFirstItem()->getTextsender(); } } } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd96ad83fb93ea5189e8edb176831948b382810df; } public function getHooks($i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = 'default', $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 = false) { if (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) && $i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc != 'order_status') { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]); if (is_array($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) && $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { foreach ($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d2bd9743336318d0e14be0600c9129730279505dd=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $if739aceffec69fa2733946a3d319defaa354082d->addFieldToFilter($ibcdf76f8c9ddc330c79f805116a8bb146c43749d2bd9743336318d0e14be0600c9129730279505dd, $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); } } else { $if739aceffec69fa2733946a3d319defaa354082d->addFieldToFilter('system', 1); } } elseif (isset(Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc])) { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getSingleton('magesms/hooks')->getCollection() ->addFieldToFilter('lang', Mage::getStoreConfig('magesms/template/language')) ->addFieldToFilter('owner', array('neq'=>1)) ->addFieldToFilter('system', 1) ->addFieldToFilter('group', Topefekt_Magesms_Model_Hooks::$groups[$i45529c33bd7aa0ebcc4b6e41bd3e02f2889252fc]) ->getFirstItem(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 = Mage::getSingleton('sales/order_status')->getCollection(); $if739aceffec69fa2733946a3d319defaa354082d = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749dd09e842bda9623afdb1b69812abe0b86eaf039c9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05 = clone($i42ee48f418943c9662de0976069476c7dc8f620d); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5 = Mage::helper('sales')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setTemplate2(str_replace('{{order_status_name}}', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0bd865ed0ae1ae72e839b8c033a4c0f7d84122b5, $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->getTemplate2())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getStatus(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setName('orderStatus'.uc_words($ibcdf76f8c9ddc330c79f805116a8bb146c43749da0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05->setStatusName($ibcdf76f8c9ddc330c79f805116a8bb146c43749d712821c3a64ae4a252ded9f3deaaddb6e942d985->getLabel()); $if739aceffec69fa2733946a3d319defaa354082d[] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d35f7502d936f0fb94b528aa6d4fbaca3f779fa05; } } else { $i42ee48f418943c9662de0976069476c7dc8f620d = Mage::getModel('magesms/hooks'); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') Mage::dispatchEvent('topefekt_magesms_customersms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d, 'mutation' => $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6)); else Mage::dispatchEvent('topefekt_magesms_adminsms_hook', array('hook' => $i42ee48f418943c9662de0976069476c7dc8f620d)); } $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array(); foreach($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$i42ee48f418943c9662de0976069476c7dc8f620d->getName()] = $i42ee48f418943c9662de0976069476c7dc8f620d; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getSingleton('magesms/hooks_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a)->getCollection(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'customers') $ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->count()) { foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039 = $ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getName(); if (isset($ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setSmstext($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d30f20aafde612a957f7f966cb5b85e35782bc88a == 'admins') { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039][$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getAdminId().'_'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getStoreGroupId()] = 1; $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive(1); } else { $ia61712c27ea241bd7a543dc2b02ea572274d0322[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039]->setActive($ibcdf76f8c9ddc330c79f805116a8bb146c43749d4df015c4c10bbcf1d38137f3659b01221d2dc076->getActive()); } } } } return $ia61712c27ea241bd7a543dc2b02ea572274d0322; } public function getOtpCustomerType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'customerRegisterOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['customerRegisterOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['customerRegisterOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCustomerType'] = 0; } public function getOtpOrderType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'newOrderOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['newOrderOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['newOrderOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpOrderType'] = 0; } public function getOtpCheckoutCustomerType() { if (isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType']; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66 = Mage::app()->getStore()->getStoreId(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6 = Mage::getStoreConfig('general/locale/code', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0 = $this->getHooks('otp', 'customers', $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7137e40370cf1c5ccf937060891613788203e2d6, array('name' => 'checkoutCustomerOTP')); if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['checkoutCustomerOTP'])) return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749defc930e6dfdf3023610ed7d663c73d176a7544e0['checkoutCustomerOTP']->getActive(); return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a['OtpCheckoutCustomerType'] = 0; } public function getOtpRandCode() { if (Mage::getStoreConfig('magesms/smsvalid/code_type')) { return Mage::helper('core')->getRandomString((int)Mage::getStoreConfig('magesms/smsvalid/code_length'), Mage_Core_Helper_Data::CHARS_LOWERS); } else { return Mage::helper('core')->getRandomString((int)Mage::getStoreConfig('magesms/smsvalid/code_length'), Mage_Core_Helper_Data::CHARS_DIGITS);; } } public function hookVariablesJS($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if (preg_match_all('/{(.*?)}/', $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddfc9fbe8edf868c14fc4a3f15c7f40aabfa080aa, $ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e)) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b = array(); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749da00c63b7b8f0d76f361b9bd281e5073cc0d0aa3e[1] as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05] = '{'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05.'}'; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 = Mage::getSingleton('magesms/variables')->getCollection() ->addFieldToFilter('name', array('in'=>array(array_keys($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b)))); foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d322d20c6b1eb01ecb5d5801e003969fcc1f407a9 as $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b[$ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getName()] = $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate() ? Mage::helper('magesms')->__($ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate()) : $ibcdf76f8c9ddc330c79f805116a8bb146c43749debd691e534c6cf2e84cf8a88790a5271154fca05->getTemplate(); } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 = ''; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d0933475b5bd80561a9f50282fd9eb0b8345cec4b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039=>$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { if (!empty($ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= ', '; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7 .= $ibcdf76f8c9ddc330c79f805116a8bb146c43749d670253c23c6fcba76bc4256a88fdd8fbc1041039.': "'.$ibcdf76f8c9ddc330c79f805116a8bb146c43749df2eee0665f163a28f4adcfe84e3fc666bf1bcd89.'"'; } return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d5528ed14b056e3debe4695094269de3a98f76fe7; } } public function filterDates($if66f788c75229f5f3ea1a622ab4dee258553c789, $ic78bc645a0f45c428f6551163ed2dce47dd289ee) { if (empty($ic78bc645a0f45c428f6551163ed2dce47dd289ee)) { return $if66f788c75229f5f3ea1a622ab4dee258553c789; } $i25d716f44b9a21507a214e968cc96805785eff97 = new Zend_Filter_LocalizedToNormalized(array( 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $id1da71c6f00d9b85058894facc6aae99ed82822c = new Zend_Filter_NormalizedToLocalized(array( 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT )); foreach ($ic78bc645a0f45c428f6551163ed2dce47dd289ee as $i36424a86007474ffc648c582cbfca240cda58c1e) { if (array_key_exists($i36424a86007474ffc648c582cbfca240cda58c1e, $if66f788c75229f5f3ea1a622ab4dee258553c789) && !empty($i36424a86007474ffc648c582cbfca240cda58c1e)) { $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $i25d716f44b9a21507a214e968cc96805785eff97->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); $if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e] = $id1da71c6f00d9b85058894facc6aae99ed82822c->filter($if66f788c75229f5f3ea1a622ab4dee258553c789[$i36424a86007474ffc648c582cbfca240cda58c1e]); } } return $if66f788c75229f5f3ea1a622ab4dee258553c789; } public function getCustomerCollection() { $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getResourceModel('customer/customer_collection') ->addNameToSelect() ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left') ->joinAttribute('shipping_country_id', 'customer_address/country_id', 'default_shipping', null, 'left'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = array( array( 'attribute' => 'billing_telephone', array(array('notnull' => true), array('neq' => '')) ), array( 'attribute' => 'shipping_telephone', array(array('notnull' => true), array('neq' => '')) ) ); $id57d139cfcd7590b603d5b061a6237d01bc011b2 = Mage::getResourceModel('catalog/eav_attribute')->loadByCode('customer', 'mobile'); if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) { $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('customer_mobile', 'customer/mobile', 'mobile', null, 'left'); $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a[] = array( 'attribute' => 'mobile', array(array('notnull' => true), array('neq' => '')) ); } $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); if (version_compare(Mage::getVersion(), '1.6', '>=')) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, `at_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_billing_telephone`.`value`) AS telephone'); else if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, IF(`at_shipping_telephone`.`value`, `at_shipping_telephone`.`value`, `at_mobile`.`value` )) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_billing_telephone`.`value`, `at_billing_telephone`.`value`, `at_shipping_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`at_shipping_country_id`.`value`, `at_shipping_country_id`.`value`, `at_billing_country_id`.`value`) AS country_id'); } else { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, `_table_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_billing_telephone`.`value`) AS telephone'); else if ($id57d139cfcd7590b603d5b061a6237d01bc011b2->getId()) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, IF(`_table_shipping_telephone`.`value`, `_table_shipping_telephone`.`value`, `_table_mobile`.`value`)) AS telephone'); else $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_billing_telephone`.`value`, `_table_billing_telephone`.`value`, `_table_shipping_telephone`.`value`) AS telephone'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('IF(`_table_shipping_country_id`.`value`, `_table_shipping_country_id`.`value`, `_table_billing_country_id`.`value`) AS country_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function addOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { if ($i7fff76b02be2f63877a1782ca871e62a287fa16f) { $i32bd8782f9db301dda31691016fa281ffd5c7c36 = Mage::getResourceModel('catalog/product')->getAttributeRawValue($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId(), 'magesms_optout', Mage::app()->getStore()->getId()); if (!$i32bd8782f9db301dda31691016fa281ffd5c7c36) return $this; } $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->setStoreId(Mage::app()->getStore()->getId()); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->load($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getId()); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItems(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = false; foreach($ibcdf76f8c9ddc330c79f805116a8bb146c43749d12f98417e3df53ca8bc49671d89c1a89cdceeb8b as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getSku() == Mage::getConfig()->getNode('default/config/optout')->sku) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc = true; break; } } if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749ddd690844e5b6fae774e02ace13c0608c4bd6bfbc === false) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->init(); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->addProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b, array('qty' => 1)); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('checkout/session'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->setCartWasUpdated(true); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828 = Mage::helper('checkout')->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getName())); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d0e3e80cee9c51f140b823db0b7df66493acca657->addSuccess($ibcdf76f8c9ddc330c79f805116a8bb146c43749d8091f3f14f616f7c7725a766ecf5f3d4a561a828); } } } return $this; } public function removeOptoutProduct($i7fff76b02be2f63877a1782ca871e62a287fa16f = false) { $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = $this->getOptoutProduct(); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495 = Mage::getSingleton('checkout/cart'); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getQuote()->getItemByProduct($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b); if (($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && !$i7fff76b02be2f63877a1782ca871e62a287fa16f) || ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8 && $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->getItemsCount() == 2)) { $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->removeItem($ibcdf76f8c9ddc330c79f805116a8bb146c43749d705fa7c9639d497e1179d7d5691c212668a8c9c8->getId()); $i45b08fe558d3b8e0743a1b58de231fa7ffc6c495->save(); } } } public function getOptoutProduct() { $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142 = Mage::getConfig()->getNode('default/config/optout')->sku; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b = Mage::getModel('catalog/product')->loadByAttribute('sku', $ibcdf76f8c9ddc330c79f805116a8bb146c43749dc010a5d08128ec6abcd0a1a16cb1d8abe7bf2142); if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b && $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_ENABLED) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d69a1201e93806d55c970dfb18feec53d221ba37b; } }
app/code/community/Topefekt/Magesms/Model/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Admins extends Mage_Core_Model_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } public function validate() { $ieeea3fa58a065e13acdb42aab551831a98e9444c = array(); $i0d09b2a4f282150bf47b02f9f3d82586fe313844 = Mage::helper('magesms'); if (!Zend_Validate::is($this->getName(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid name'); } if (!Zend_Validate::is($this->getNumber(), 'NotEmpty')) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } elseif (!Mage::helper('magesms')->isPhoneNumber($this->getNumber())) { $ieeea3fa58a065e13acdb42aab551831a98e9444c[] = $i0d09b2a4f282150bf47b02f9f3d82586fe313844->__('Invalid number'); } if (empty($ieeea3fa58a065e13acdb42aab551831a98e9444c)) { return true; } return $ieeea3fa58a065e13acdb42aab551831a98e9444c; } public function _afterDelete() { if ($this->getId()) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks_admins') ->getCollection() ->addFieldToFilter('admin_id', $this->getId()); foreach ($if739aceffec69fa2733946a3d319defaa354082d as $i42ee48f418943c9662de0976069476c7dc8f620d) $i42ee48f418943c9662de0976069476c7dc8f620d->delete(); } return parent::_afterDelete(); } }
app/code/community/Topefekt/Magesms/Model/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Answers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/answers'); } }
app/code/community/Topefekt/Magesms/Model/Api.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Api extends Varien_Object { private $v9f1e7fea943b3d06ee78f55d3b61a95353536218 = 'Magento'; private $v9f1e7fea943b3d06ee78f55d3b61a95353536218_version; private $v240a8b53893ca3ef75eff909fc854708b004d86d; private $v178a3e710e3d4aca00fd843753ef02f29eb2145d; private $v45213b023462fa21483839e6493acb7cbe1faeab = 'smsmidlet.com'; private $v7d5fd66476c545cbe20f5b704f5ef46970896444 = '/api/api.php'; private $v9e19674cb6e6518d1f09715fae28b8fe6b262f87; private $v7cb5076e93f299085ab8c3bfa32e5712b4990f85 = 80; private $vb57aea5fc32ac2e31b4752c9f7610744dee1af4d = 443; private $v077a05d1aa14d236b9794734fee8900f425eefdf = 5; private $v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = 'auto'; private $vcb9f213798e6a676a15ee3c66b26bee41d69d0d4; private $vc4185f8999ea79fe5ab81e90671fb9efdd6f4bdb = false; public $data; public $query; private $v31d4e11356546b3c102ad42948b903df3b2dcbfc = array(); private $v8adb8a55748ba4eeb0af088f166489d679f689d0 = array(); public function __construct($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { $this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version = Mage::getVersion(); $this->v240a8b53893ca3ef75eff909fc854708b004d86d = Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = Mage::getStoreConfig('magesms/appId'); if (empty($this->v178a3e710e3d4aca00fd843753ef02f29eb2145d)) $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = 'no-appId'; $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = ($i35beb284d43488e678f4231cd9771c42363194b5 = Mage::getStoreConfig('magesms/magesms/connector', 0)) ? $i35beb284d43488e678f4231cd9771c42363194b5 : 'auto'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; return $this; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Api extends Varien_Object { private $v9f1e7fea943b3d06ee78f55d3b61a95353536218 = 'Magento'; private $v9f1e7fea943b3d06ee78f55d3b61a95353536218_version; private $v240a8b53893ca3ef75eff909fc854708b004d86d; private $v178a3e710e3d4aca00fd843753ef02f29eb2145d; private $v45213b023462fa21483839e6493acb7cbe1faeab = 'smsmidlet.com'; private $v7d5fd66476c545cbe20f5b704f5ef46970896444 = '/api/api.php'; private $v9e19674cb6e6518d1f09715fae28b8fe6b262f87; private $v7cb5076e93f299085ab8c3bfa32e5712b4990f85 = 80; private $vb57aea5fc32ac2e31b4752c9f7610744dee1af4d = 443; private $v077a05d1aa14d236b9794734fee8900f425eefdf = 5; private $v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = 'auto'; private $vcb9f213798e6a676a15ee3c66b26bee41d69d0d4; private $vc4185f8999ea79fe5ab81e90671fb9efdd6f4bdb = false; public $data; public $query; private $v31d4e11356546b3c102ad42948b903df3b2dcbfc = array(); private $v8adb8a55748ba4eeb0af088f166489d679f689d0 = array(); public function __construct($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { $this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version = Mage::getVersion(); $this->v240a8b53893ca3ef75eff909fc854708b004d86d = Mage::getConfig()->getModuleConfig('Topefekt_Magesms')->version; $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = Mage::getStoreConfig('magesms/appId'); if (empty($this->v178a3e710e3d4aca00fd843753ef02f29eb2145d)) $this->v178a3e710e3d4aca00fd843753ef02f29eb2145d = 'no-appId'; $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = ($i35beb284d43488e678f4231cd9771c42363194b5 = Mage::getStoreConfig('magesms/magesms/connector', 0)) ? $i35beb284d43488e678f4231cd9771c42363194b5 : 'auto'; if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } private function f418217640effcf22811abf41fb6822676544f195($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = null) { if ($i4fa8552ddebdef541b5cf2171f90a3e3066468e0 != null) { if (in_array($i4fa8552ddebdef541b5cf2171f90a3e3066468e0, array('auto', 'ssl', 'curl-ssl', 'no-ssl', 'curl'))) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->vb57aea5fc32ac2e31b4752c9f7610744dee1af4d, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl-ssl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl-ssl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'no-ssl') { @$this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, $this->v7cb5076e93f299085ab8c3bfa32e5712b4990f85, $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['no-ssl'], $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['no-ssl'], $this->v077a05d1aa14d236b9794734fee8900f425eefdf); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return 'no-ssl'; } if ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'auto' || $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 == 'curl') { $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.$this->v7d5fd66476c545cbe20f5b704f5ef46970896444); $this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'] = curl_errno($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $this->v8adb8a55748ba4eeb0af088f166489d679f689d0['curl'] = curl_error($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && empty($this->v31d4e11356546b3c102ad42948b903df3b2dcbfc['curl'])) return 'curl'; $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; } return false; } private function fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; $this->query = $ia61712c27ea241bd7a543dc2b02ea572274d0322; preg_match('/action=(.*?)&/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i43da24755ffd60b125b8d028fe9374322824e354); $i87f2ea938389759d33b89c6fb4d2e619c5e100fa = $i43da24755ffd60b125b8d028fe9374322824e354[1]; switch ($this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9) { case 'no-ssl': case 'ssl': fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "POST ".$this->v7d5fd66476c545cbe20f5b704f5ef46970896444." HTTP/1.0\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "User-Agent: Smsmidlet-api/1.0 (".$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218."; ".$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa)\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Host: ".$this->v45213b023462fa21483839e6493acb7cbe1faeab."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "Content-length: ".strlen ($ia61712c27ea241bd7a543dc2b02ea572274d0322)."\r\n"); fwrite($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, "\r\n".$ia61712c27ea241bd7a543dc2b02ea572274d0322."\r\n"); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = ''; while (!feof($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) { @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 .= fgets($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, 2048); } $ie4a1f55ce89a34eb3838ef044286891434352fb7 = fclose($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); list($ie3dffdbcc706f9e096534318ed81a9f59e289e7d, $this->data) = explode("\r\n\r\n", $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3, 2); return $this->data; break; case 'curl': case 'curl-ssl': if (get_resource_type($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) == 'curl') { @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POST, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_POSTFIELDS, $ia61712c27ea241bd7a543dc2b02ea572274d0322); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_HEADER, 0); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_RETURNTRANSFER, 1); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87, CURLOPT_USERAGENT,'Smsmidlet-api/1.0 ('.$this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218.'; '.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version."; call: $i87f2ea938389759d33b89c6fb4d2e619c5e100fa )"); @$i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = curl_exec($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = html_entity_decode($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3); curl_close($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87); return $this->data = $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } break; } return false; } public function getconnectMethod() { return $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9; } public function serverPost($ia61712c27ea241bd7a543dc2b02ea572274d0322, $i17c20960d197486b19dc890665362a4f2fd6f24a = true) { if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 != 'auto') $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195(); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) $i4fa8552ddebdef541b5cf2171f90a3e3066468e0 = $this->f418217640effcf22811abf41fb6822676544f195('auto'); if (empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87)) return false; if (!empty($this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87) && isset($i4fa8552ddebdef541b5cf2171f90a3e3066468e0)) $this->v488f1ce59a4e07137e2e136095a7b0bc80a53bd9 = $i4fa8552ddebdef541b5cf2171f90a3e3066468e0; $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = ''; if (Mage::registry('magesms_store_id')) $i2f4c8461c23acd59e2d84b6cbd67931b74d28001 = '&storeid='.Mage::registry('magesms_store_id'); $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = $this->fba8eb60cc038de71062462629784762fcf874461($ia61712c27ea241bd7a543dc2b02ea572274d0322.$i2f4c8461c23acd59e2d84b6cbd67931b74d28001.'&AppID='.$this->v178a3e710e3d4aca00fd843753ef02f29eb2145d.'&version='.$this->v9f1e7fea943b3d06ee78f55d3b61a95353536218_version.'&moduleVersion='.$this->v240a8b53893ca3ef75eff909fc854708b004d86d); $this->v9e19674cb6e6518d1f09715fae28b8fe6b262f87 = null; return $i17c20960d197486b19dc890665362a4f2fd6f24a ? $this->parser($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3) : $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function parser($ia61712c27ea241bd7a543dc2b02ea572274d0322, $ia9229b7048dd0adf905022d8569b2d2310c74a8d = ';') { if (is_bool($ia61712c27ea241bd7a543dc2b02ea572274d0322)) return $ia61712c27ea241bd7a543dc2b02ea572274d0322; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3 = array('errno' => 99, 'error' => 'Parse error: '.$ia61712c27ea241bd7a543dc2b02ea572274d0322, 'query' => $this->query, 'source' => $ia61712c27ea241bd7a543dc2b02ea572274d0322, 'data' => NULL, 'datasrc' => null); if (preg_match('/<b>(.*?)<\/b>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i712821c3a64ae4a252ded9f3deaaddb6e942d985)) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'] = $i712821c3a64ae4a252ded9f3deaaddb6e942d985[1]; } if (preg_match('/<u>(.*)<\/u>/', $ia61712c27ea241bd7a543dc2b02ea572274d0322, $i5528ed14b056e3debe4695094269de3a98f76fe7)) { if (!in_array($i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['errno'], array(1, 11, 111))) { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; } else { $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['error'] = 'OK'; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['datasrc'] = $i5528ed14b056e3debe4695094269de3a98f76fe7[1]; $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3['data'] = explode($ia9229b7048dd0adf905022d8569b2d2310c74a8d, $i5528ed14b056e3debe4695094269de3a98f76fe7[1]); } } return $i3bd625bb1dc4606e8c0dc77ad823797f51341fc3; } public function analyze() { error_reporting(-1); ini_set('display_errors', 1); echo '<h1>Test napojeni na API</h1><ul>'; echo '<li>Server1:<ul>'; echo '<li>fsockopen ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('ssl://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab, 443); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('https://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.'/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '<li>fsockopen no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen($this->v45213b023462fa21483839e6493acb7cbe1faeab, 80); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('http://'.$this->v45213b023462fa21483839e6493acb7cbe1faeab.'/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '</ul></li>'; echo '<li>Server2:<ul>'; echo '<li>fsockopen ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('ssl://www.vix.cz', 443); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('https://www.vix.cz/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '<li>fsockopen no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = fsockopen('www.vix.cz', 80); echo empty($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA' : 'OK'; echo '</li>'; echo '<li>curl no-ssl: '; $i13e7e92bf1e1fca680dff52183c53c3b088a9193 = curl_init('http://www.vix.cz/'); curl_setopt($i13e7e92bf1e1fca680dff52183c53c3b088a9193, CURLOPT_RETURNTRANSFER, 1); curl_exec($i13e7e92bf1e1fca680dff52183c53c3b088a9193); echo curl_errno($i13e7e92bf1e1fca680dff52183c53c3b088a9193) ? 'CHYBA '.curl_error($i13e7e92bf1e1fca680dff52183c53c3b088a9193) : 'OK'; echo '</li>'; echo '</ul></li>'; echo '</ul>'; echo '<h1>REWRITES</h1><ul>'; echo '<pre>'; print_r(Mage::getConfig()->getNode()->xpath('//rewrite')); echo '</pre>'; echo '<h1>Customer routers</h1><ul>'; echo '<pre>'; print_r(Mage::getConfig()->getNode()->xpath('//frontend/routers/customer')); echo '</pre>'; echo '<h1>List events</h1><ul>'; foreach (Mage::getConfig()->getNode()->xpath('//events') as $i2e68560d8e15e3c18bb400939778a6bf1ae47190) { foreach ($i2e68560d8e15e3c18bb400939778a6bf1ae47190 as $i7fff76b02be2f63877a1782ca871e62a287fa16f=>$i72bc014991db6f86e83f3ab1b7e62f315a25637d) { if (property_exists($i72bc014991db6f86e83f3ab1b7e62f315a25637d, 'observers')) { foreach (get_object_vars($i72bc014991db6f86e83f3ab1b7e62f315a25637d->observers) as $i417760717250c854293598d2ff07a66629a1946d) { if (strpos($i417760717250c854293598d2ff07a66629a1946d->class, 'magesms') !== false) { echo "<li><b>$i7fff76b02be2f63877a1782ca871e62a287fa16f</b><ul>\n"; foreach (get_object_vars($i72bc014991db6f86e83f3ab1b7e62f315a25637d->observers) as $i2bd9743336318d0e14be0600c9129730279505dd=>$i71d48f04d89d325b6b81d9c8cb5cb8d2faa0dc63) { echo "<li>$i2bd9743336318d0e14be0600c9129730279505dd\n"; echo '<pre>'; print_r($i71d48f04d89d325b6b81d9c8cb5cb8d2faa0dc63); echo '</pre>'; echo "</li>\n"; } echo "</ul></li>\n"; } } } } } } }
app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Observer.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_BirthdayMessages_Observer { public function customersmsGroups(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $ie54fcd5470bd7f31f709089290e33bb03e655c25 = $this->f69d077045ec67fdb80677c5f2c3a640cf42697a2(); $i7137e40370cf1c5ccf937060891613788203e2d6 = Mage::app()->getRequest()->getParam('mutation', reset($ie54fcd5470bd7f31f709089290e33bb03e655c25)); $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = Mage::helper('magesms')->__(Mage::getConfig()->getNode('default/birthdaymessages/template')->default); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); $i705fa7c9639d497e1179d7d5691c212668a8c9c8 = $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->getFirstItem(); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setGroup('birthdaymessages') ->setName('birthdayMessages') ->setPlugin('topefekt_birthdaymessages') ->setInfo(Mage::helper('magesms')->__('Birthday Messages notification')) ->setTemplate2($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSmstext() ? $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getSmstext() : $iefc930e6dfdf3023610ed7d663c73d176a7544e0) ->setNotice('{customer_id}, {customer_email}, {customer_password}, {customer_lastname}, {customer_firstname}<br /><br />{shop_domain}, {shop_name}, {shop_email}, {shop_phone}'); if (!$i705fa7c9639d497e1179d7d5691c212668a8c9c8->getRunTime()) { $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setRunTime(Mage::getConfig()->getNode('default/birthdaymessages/template')->time); } $i1791b2d1f89bb2bd83b34046f59125af207713db = Mage::app()->getLayout()->createBlock('Mage_Core_Block_Template')->setTemplate('topefekt/magesms/birthdaymessages/form.phtml'); $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = array( array('value' => 0, 'title' => Mage::helper('magesms')->__('on birthday')), array('value' => -1, 'title' => Mage::helper('magesms')->__('-1 day')), array('value' => -2, 'title' => Mage::helper('magesms')->__('-2 days')), array('value' => -3, 'title' => Mage::helper('magesms')->__('-3 days')), array('value' => -4, 'title' => Mage::helper('magesms')->__('-4 days')), array('value' => -5, 'title' => Mage::helper('magesms')->__('-5 days')), array('value' => -7, 'title' => Mage::helper('magesms')->__('-7 days')), array('value' => -14, 'title' => Mage::helper('magesms')->__('-14 days')), ); foreach($i5d4a7167ae6f10601ecf7cb73a87e638ab815fde as &$i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015) { if ($i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['value'] == $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getDelay()) $i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['selected'] = true; else $i9b0c07ee5a5a3ac4f600994a3a25b10d6c6dd015['selected'] = false; } $i1791b2d1f89bb2bd83b34046f59125af207713db->setDelay($i5d4a7167ae6f10601ecf7cb73a87e638ab815fde); list($i763af8c0bf60af676bd6009608530e253f26d465, $i7627de5569d5cb4533fb00a68acc5f866e381c5b) = explode(':', $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getRunTime()); $i1791b2d1f89bb2bd83b34046f59125af207713db->setRunTimeHour($i763af8c0bf60af676bd6009608530e253f26d465); $i1791b2d1f89bb2bd83b34046f59125af207713db->setRunTimeMinute($i7627de5569d5cb4533fb00a68acc5f866e381c5b); $i705fa7c9639d497e1179d7d5691c212668a8c9c8->setCustomForm($i1791b2d1f89bb2bd83b34046f59125af207713db->toHtml()); $i417760717250c854293598d2ff07a66629a1946d['groups']->addItem(new Varien_Object(array( 'group' => 'birthdaymessages', 'name' => Mage::helper('magesms')->__('Birthday Messages'), 'hooks' => array($i705fa7c9639d497e1179d7d5691c212668a8c9c8->getName() => $i705fa7c9639d497e1179d7d5691c212668a8c9c8) ))); return $this; } public function save(Varien_Event_Observer $i417760717250c854293598d2ff07a66629a1946d) { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $i2e233784f2a54347fff339d5268a637485c8d940 = Mage::app()->getRequest(); if ($i2e233784f2a54347fff339d5268a637485c8d940->getParam('plugin') != 'topefekt_birthdaymessages') return $this; $ie54fcd5470bd7f31f709089290e33bb03e655c25 = $this->f69d077045ec67fdb80677c5f2c3a640cf42697a2(); $i7137e40370cf1c5ccf937060891613788203e2d6 = $i2e233784f2a54347fff339d5268a637485c8d940->getParam('mutation', reset($ie54fcd5470bd7f31f709089290e33bb03e655c25)); $idb618c56be2c8abc9a54a16881dadfd5317ba624 = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $idb618c56be2c8abc9a54a16881dadfd5317ba624->addFieldToFilter('mutation', $i7137e40370cf1c5ccf937060891613788203e2d6); $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $idb618c56be2c8abc9a54a16881dadfd5317ba624->getFirstItem(); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setMutation($i7137e40370cf1c5ccf937060891613788203e2d6); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setRunTime($i2e233784f2a54347fff339d5268a637485c8d940->getParam('run_time_hour').':'.$i2e233784f2a54347fff339d5268a637485c8d940->getParam('run_time_min').':00'); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setDelay($i2e233784f2a54347fff339d5268a637485c8d940->getParam('delay')); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setSmstext($i2e233784f2a54347fff339d5268a637485c8d940->getParam('text')); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->setActive($i2e233784f2a54347fff339d5268a637485c8d940->getParam('active') ? 1 : 0); $iefc930e6dfdf3023610ed7d663c73d176a7544e0->save(); } public function cron() { if (!Mage::getStoreConfig('magesms/birthday/enabled')) return $this; $iff7e46827cbb6547116c592bf800f4687428abf9 = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('active', 1); if (!$iff7e46827cbb6547116c592bf800f4687428abf9->count()) return $this; $iefc930e6dfdf3023610ed7d663c73d176a7544e0 = $iff7e46827cbb6547116c592bf800f4687428abf9->getFirstItem(); Mage::log("MageSms BirthdayMessages cron - run"); $ib74b960a19e96c6107348a44a072d3d572782356 = Mage::getStoreConfig('magesms/birthday/run'); $ic69c406967f5c7f4ff71422703f9dff657d8de71 = Mage::getModel('core/date')->timestamp(); if (!$ib74b960a19e96c6107348a44a072d3d572782356) { if ($ic69c406967f5c7f4ff71422703f9dff657d8de71 < strtotime($ib74b960a19e96c6107348a44a072d3d572782356.' '.$iefc930e6dfdf3023610ed7d663c73d176a7544e0->getRunTime())) { $ib74b960a19e96c6107348a44a072d3d572782356 = date('Y-m-d', Mage::getModel('core/date')->timestamp()); } else { $ib74b960a19e96c6107348a44a072d3d572782356 = date('Y-m-d', Mage::getModel('core/date')->timestamp(strtotime('+1 day'))); } Mage::getModel('core/config')->saveConfig('magesms/birthday/run', $ib74b960a19e96c6107348a44a072d3d572782356); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } if ($ic69c406967f5c7f4ff71422703f9dff657d8de71 >= strtotime($ib74b960a19e96c6107348a44a072d3d572782356.' '.$iefc930e6dfdf3023610ed7d663c73d176a7544e0->getRunTime())) { Mage::log("MageSms BirthdayMessages cron - searching customers"); $ibad8f78c098260b16424eb12ceee5f8336591d56 = Mage::helper('magesms')->getCustomerCollection(); $ibad8f78c098260b16424eb12ceee5f8336591d56->addFieldToFilter('dob', array('notnull' => true)); $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = $ic69c406967f5c7f4ff71422703f9dff657d8de71; if ($iefc930e6dfdf3023610ed7d663c73d176a7544e0->getDelay()) { $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde = strtotime('+'.(-1 * $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getDelay()).' day', $ic69c406967f5c7f4ff71422703f9dff657d8de71); } $ibad8f78c098260b16424eb12ceee5f8336591d56->getSelect()->where('(at_dob.value LIKE \'____-'.date('m', $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde).'-'.date('d', $i5d4a7167ae6f10601ecf7cb73a87e638ab815fde).' %\')'); if ($ibad8f78c098260b16424eb12ceee5f8336591d56->count()) { Mage::log("MageSms BirthdayMessages cron - found ".$ibad8f78c098260b16424eb12ceee5f8336591d56->count()." customer(s)"); $i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18 = Mage::getSingleton('magesms/smsprofile'); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e = Mage::getModel('magesms/birthdaymessages_template')->getCollection(); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('mutation', array('nlike' => 'default')); $i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e->addFieldToFilter('active', 1); foreach ($ibad8f78c098260b16424eb12ceee5f8336591d56 as $i21e55df616c305955791876c1eb4da83448beba2) { if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getShippingTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getShippingCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getBillingCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getBillingTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getBillingCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i21e55df616c305955791876c1eb4da83448beba2->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i21e55df616c305955791876c1eb4da83448beba2->getShippingCountryId(); } } $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i21e55df616c305955791876c1eb4da83448beba2->getEntityId(); $i489c048e0604d314330360b5ee23b42f486ebb98 = $i21e55df616c305955791876c1eb4da83448beba2->getLastName(). ' '.$i21e55df616c305955791876c1eb4da83448beba2->getFirstName(); if ($idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b) { $i854b57231c05dbaa7f22331dbaed4152a402d2f1 = new Zend_Locale_Data(); $i065c883e3f45e58104d21f8196ee3fe9bd2f513d = $i854b57231c05dbaa7f22331dbaed4152a402d2f1->getList('en-EN', 'phonetoterritory'); $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = $i065c883e3f45e58104d21f8196ee3fe9bd2f513d[$idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b]; } else { $i7492a7ab99a6ff1e0ae253366480ecb40a550224 = ''; } $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $iefc930e6dfdf3023610ed7d663c73d176a7544e0->getSmstext(); foreach($i1ddb77d41f3678bb92f39c5c4d47aa6e58d4b89e as $i4df015c4c10bbcf1d38137f3659b01221d2dc076) { if ($i4df015c4c10bbcf1d38137f3659b01221d2dc076->getMutation() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f = $i4df015c4c10bbcf1d38137f3659b01221d2dc076->getSmstext(); break; } } if ($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f) { $if739aceffec69fa2733946a3d319defaa354082d = Mage::getModel('magesms/hooks'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i5e65dd16263683749d16a84171f719e768ed14b5 = Mage::getModel('customer/customer')->load($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i1f1945594819c4321de45ac15ed6d4dc07f41e2f, array('recipient' => $i489c048e0604d314330360b5ee23b42f486ebb98, 'customerId' => $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2, 'country' => $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b)) ->setMessage($if739aceffec69fa2733946a3d319defaa354082d->prepareText($i6d6da9eb4bc3bca1db3f4eb2b907f496d625d20f, 'customerRegisterSuccess', $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject('birthdayMessages') ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setCustomerId($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) ->setStoreId($i21e55df616c305955791876c1eb4da83448beba2->getStoreId()); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer'); foreach($if2014d170e15e7f6f64523fd3238720980ceb64a as $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd) { if ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == $i7492a7ab99a6ff1e0ae253366480ecb40a550224) { $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); break; } elseif ($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getArea() == 'default') $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName('birthdayMessages'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); Mage::log("MageSms BirthdayMessages cron - send sms to ".$i5e65dd16263683749d16a84171f719e768ed14b5->getName().' ('.$i1f1945594819c4321de45ac15ed6d4dc07f41e2f.')'); } } } Mage::getModel('core/config')->saveConfig('magesms/birthday/run', date('Y-m-d', Mage::getModel('core/date')->timestamp(strtotime('+1 day')))); Mage::getConfig()->reinit(); Mage::app()->reinitStores(); } Mage::log("MageSms BirthdayMessages cron - end"); return $this; } private function f69d077045ec67fdb80677c5f2c3a640cf42697a2() { $ie54fcd5470bd7f31f709089290e33bb03e655c25 = array(); $ice21cd4390308309015957a221ff2bff67f397ce = Mage::app()->getLocale()->getOptionLocales(); foreach (Mage::app()->getStores() as $i3763a59a4c1873eeb396b46caa87140ccb7bc631) { $ia35eb6e21739b9f362d4085ebe7dee274bc421a7 = Mage::getStoreConfig('general/locale/code', $i3763a59a4c1873eeb396b46caa87140ccb7bc631->getId()); if (in_array($ia35eb6e21739b9f362d4085ebe7dee274bc421a7, $ie54fcd5470bd7f31f709089290e33bb03e655c25)) { continue; } foreach ($ice21cd4390308309015957a221ff2bff67f397ce as $i4e4643965424fd5279d5992f6c669c0a56d9a1a3) { if ($i4e4643965424fd5279d5992f6c669c0a56d9a1a3['value'] == $ia35eb6e21739b9f362d4085ebe7dee274bc421a7) { $ie54fcd5470bd7f31f709089290e33bb03e655c25[] = $ia35eb6e21739b9f362d4085ebe7dee274bc421a7; break; } } } return $ie54fcd5470bd7f31f709089290e33bb03e655c25; } }
app/code/community/Topefekt/Magesms/Model/Birthdaymessages/Template.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_BirthdayMessages_Template extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/birthdaymessages_template'); } }
app/code/community/Topefekt/Magesms/Model/Country.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country'); } }
app/code/community/Topefekt/Magesms/Model/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country_Area extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Country/Lang.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Country_Lang extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/country_lang'); } }
app/code/community/Topefekt/Magesms/Model/Exceptions.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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 { private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; 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) { if ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = $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; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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 { private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; 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) { if ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) $i04133b282add75cc6fb03b8f23059a4a19ae63c9 = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a; else $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = $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
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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 { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4 ); 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; if (!Mage::helper('magesms')->isActive($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) return $this; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $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') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order && Mage::getStoreConfig('magesms/magesms/customer_groups_enable', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $groups = Mage::getStoreConfig('magesms/magesms/customer_groups', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (!in_array($i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerGroupId(), explode(',', $groups))) return $this; } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1) ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a; } if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order')->getCollection() ->addFieldToFilter('order_id', $i5e65dd16263683749d16a84171f719e768ed14b5->getId()) ->addFieldToFilter('disabled', 1); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->count()) { return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) && !preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f || preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } if (!preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (Mage::helper('core')->isModuleEnabled('Amasty_Orderattr')) { if (($i3a8afabb89bac1f64ee08bc9eeece7680677058c = Mage::app()->getRequest()->getParam('amorderattr')) && !empty($i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel'])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel']; } else { $i0bc4437a5c5941b7f3a262ba60f104077f308455 = Mage::getModel('amorderattr/attribute')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getId(), 'order_id'); if ($i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel(); } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'mobile_number', 'phone', 'phone_number', 'telephone', 'mobile') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66);; break; } } } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7 = $i71e09ed37bc7273d250df9932c1693668e879cdd->getFirstItem(); $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $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_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } 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_payment_html'])) { $ic078737049591e1e2db7c285f3e3b95cb867c6d0 = Mage::helper('payment')->getInfoBlock($i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()) ->setIsSecureMode(true); $ic078737049591e1e2db7c285f3e3b95cb867c6d0->getMethod()->setStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i42745015bca99637011d2ba8a559beb3a8b0961f = strip_tags($ic078737049591e1e2db7c285f3e3b95cb867c6d0->toHtml()); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace('/ +/', ' ', $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/ \n/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n /", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n\n+/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'] = trim($i42745015bca99637011d2ba8a559beb3a8b0961f); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } 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 (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'])) { if (Mage::helper('core')->isModuleEnabled('Wyomind_Estimateddeliverydate')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'] = mb_strtoupper(trim(strip_tags(Mage::helper("estimateddeliverydate/data")->getCartMessage())), 'utf-8'); } } 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') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (!$i9805d668f75b6b461f88474f57c5f6aa86a87316->getId()) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); if (isset($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking']) && ($i71035ea6aa66350bb658a262013eb58377a0934e = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking'])) { $i71035ea6aa66350bb658a262013eb58377a0934e = end($i71035ea6aa66350bb658a262013eb58377a0934e); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['title'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTitle($i71035ea6aa66350bb658a262013eb58377a0934e['title']); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['number'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTrackNumber($i71035ea6aa66350bb658a262013eb58377a0934e['number']); } } if ($i9805d668f75b6b461f88474f57c5f6aa86a87316) { 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']); } } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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 { public static $groups = array( 'order_status' => 0, 'order' => 1, 'account' => 2, 'product' => 3, 'contactform' => 4, 'otp' => 5 ); 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; if (!Mage::helper('magesms')->isActive($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) return $this; if (Mage::registry('magesms_store_id')) Mage::unregister('magesms_store_id'); Mage::register('magesms_store_id', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66, true); $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') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $ib8622dd6b5bb413f7d6f85eb31e2abce529ae0a8->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $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; if (Mage::registry('magesms_hook_admin')) { Mage::unregister('magesms_hook_admin'); } Mage::register('magesms_hook_admin', $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f = Mage::getModel('magesms/sms'); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->addRecipient($i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getNumber(), array('recipient' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getName(), 'adminId' => $i2977ace3ff82db806c1e7c92dd6811f3d76f0e87->getId())) ->setMessage($this->prepareText($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getSmstext(), $i41496536c6b29c24b90c374d9fc25143f114dc9a, $i5e65dd16263683749d16a84171f719e768ed14b5)) ->setSubject($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_ADMIN) ->setPriority(true) ->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->send(); } } if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order && Mage::getStoreConfig('magesms/magesms/customer_groups_enable', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)) { $groups = Mage::getStoreConfig('magesms/magesms/customer_groups', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); if (!in_array($i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerGroupId(), explode(',', $groups))) return $this; } $i71e09ed37bc7273d250df9932c1693668e879cdd = Mage::getSingleton('magesms/hooks_customers')->getCollection() ->addFieldToFilter('active', 1) ->addFieldToFilter('mutation', Mage::getStoreConfig('general/locale/code', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66)); if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'updateOrderStatus') { $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = $i5e65dd16263683749d16a84171f719e768ed14b5->getStatus(); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/[^a-zA-Z0-9_]/', '_', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5 = preg_replace('/^([^a-zA-Z])/', 'x$1', $ia0b4e748647d3e52f7c9741d5f659711a2db6dc5); $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', 'orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, '')); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a.' - orderStatus'.uc_words($ia0b4e748647d3e52f7c9741d5f659711a2db6dc5, ''); } else { $i71e09ed37bc7273d250df9932c1693668e879cdd->addFieldToFilter('name', $i41496536c6b29c24b90c374d9fc25143f114dc9a); $i7744e4decfaad72e8b713dad6e312bdd2770c4da = $i41496536c6b29c24b90c374d9fc25143f114dc9a; } if ($i71e09ed37bc7273d250df9932c1693668e879cdd->count()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5 instanceof Mage_Sales_Model_Order || is_subclass_of($i5e65dd16263683749d16a84171f719e768ed14b5, 'Mage_Sales_Model_Order')) { $ib8129b89cda7dae2cfe1b114353de8ba2385974e = Mage::getModel('magesms/optout_order')->getCollection() ->addFieldToFilter('order_id', $i5e65dd16263683749d16a84171f719e768ed14b5->getId()) ->addFieldToFilter('disabled', 1); if ($ib8129b89cda7dae2cfe1b114353de8ba2385974e->count()) { return $this; } if ($i6abff7c4dab2aa28578ae1dc49699ba6b1d18c18->user->getPrefbilling()) { if ($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); } } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress()->getCountryId(); if (empty($i1f1945594819c4321de45ac15ed6d4dc07f41e2f) || !preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getTelephone(); $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress()->getCountryId(); } } if (!preg_match('/^[0-9+()\/\.\s-]+#x2F;', $i1f1945594819c4321de45ac15ed6d4dc07f41e2f)) $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerId(); if (!$ifb2b31a17a2f13d19aebc5823ae02f42988a78f2) $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = 0; $i489c048e0604d314330360b5ee23b42f486ebb98 = $i5e65dd16263683749d16a84171f719e768ed14b5->getCustomerName(); } else { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = ''; $ifb2b31a17a2f13d19aebc5823ae02f42988a78f2 = $i5e65dd16263683749d16a84171f719e768ed14b5->getId(); } if (Mage::helper('core')->isModuleEnabled('Amasty_Orderattr')) { if (($i3a8afabb89bac1f64ee08bc9eeece7680677058c = Mage::app()->getRequest()->getParam('amorderattr')) && !empty($i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel'])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i3a8afabb89bac1f64ee08bc9eeece7680677058c['contact_tel']; } else { $i0bc4437a5c5941b7f3a262ba60f104077f308455 = Mage::getModel('amorderattr/attribute')->load($i5e65dd16263683749d16a84171f719e768ed14b5->getId(), 'order_id'); if ($i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel()) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0bc4437a5c5941b7f3a262ba60f104077f308455->getContactTel(); } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); foreach(array('mobilenumber', 'mobile_number', 'phone', 'phone_number', 'telephone', 'mobile', 'mobilephone') as $i670253c23c6fcba76bc4256a88fdd8fbc1041039) { if (!empty($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039])) { $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]; $idcde4f5fb5532c8e634fa3aa4c7ce182a046d76b = Mage::getStoreConfig('general/country/default', $i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); break; } } } if (!$i1f1945594819c4321de45ac15ed6d4dc07f41e2f) { $i0e3e80cee9c51f140b823db0b7df66493acca657 = Mage::getSingleton('customer/session'); $i1f1945594819c4321de45ac15ed6d4dc07f41e2f = $i0e3e80cee9c51f140b823db0b7df66493acca657->getData('magesms_validate_mobile'); } if ($i1f1945594819c4321de45ac15ed6d4dc07f41e2f && is_numeric($ifb2b31a17a2f13d19aebc5823ae02f42988a78f2)) { $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7 = $i71e09ed37bc7273d250df9932c1693668e879cdd->getFirstItem(); $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($i7744e4decfaad72e8b713dad6e312bdd2770c4da) ->setType(Topefekt_Magesms_Model_Sms::TYPE_CUSTOMER) ->setPriority(true) ->setStoreId($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $if2014d170e15e7f6f64523fd3238720980ceb64a = Mage::getSingleton('magesms/hooks_unicode')->getCollection() ->addFieldToFilter('type', 'customer') ->addFieldToFilter('area', $ifede0aa7d9c3f77f8ca4eb9c1002d82f3a770ae7->getMutation()); if ($if2014d170e15e7f6f64523fd3238720980ceb64a->count()) { $ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd = $if2014d170e15e7f6f64523fd3238720980ceb64a->getFirstItem(); $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setUnicode($ie8d90f6313614fbb6564426c0b0cb59a0ca4cecd->getUnicode()); } $i2012325f8714e1168a6c4fd06b9fa8eee23fcc7f->setHookName($i7744e4decfaad72e8b713dad6e312bdd2770c4da); $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 ($i3d68c0cf53594c3449a7debf01d1c337a93fc4ae = Mage::registry('magesms_hook_admin')) { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_name'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_name'] = $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getName(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_phone'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['admin_phone'] = $i3d68c0cf53594c3449a7debf01d1c337a93fc4ae->getNumber(); } } 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_password'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_password'] = Mage::app()->getRequest()->getParam('password'); } 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 (empty($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); if (empty($i22b151d2a920ca46892d343096abbccfad9f3678)) $i22b151d2a920ca46892d343096abbccfad9f3678 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_firstname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_firstname'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getFirstname(); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_lastname'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['customer_shipping_lastname'] = $i22b151d2a920ca46892d343096abbccfad9f3678->getLastname(); } 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 (empty($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getBillingAddress(); if (empty($i560c12365c45b205daa0512840c70486783226b1)) $i560c12365c45b205daa0512840c70486783226b1 = $i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAddress(); 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_payment_html'])) { $ic078737049591e1e2db7c285f3e3b95cb867c6d0 = Mage::helper('payment')->getInfoBlock($i5e65dd16263683749d16a84171f719e768ed14b5->getPayment()) ->setIsSecureMode(true); $ic078737049591e1e2db7c285f3e3b95cb867c6d0->getMethod()->setStore($i3bf172bc34c83f4a18624b192bc0bd7c4d647a66); $i42745015bca99637011d2ba8a559beb3a8b0961f = strip_tags($ic078737049591e1e2db7c285f3e3b95cb867c6d0->toHtml()); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace('/ +/', ' ', $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/ \n/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n /", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i42745015bca99637011d2ba8a559beb3a8b0961f = preg_replace("/\n\n+/", "\n", $i42745015bca99637011d2ba8a559beb3a8b0961f); $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_payment_html'] = trim($i42745015bca99637011d2ba8a559beb3a8b0961f); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_total_paid'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getGrandTotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_subtotal'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_subtotal'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getSubtotal(), array('display'=>Zend_Currency::NO_SYMBOL), false); } if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_amount'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['order_shipping_amount'] = Mage::getModel('directory/currency')->format($i5e65dd16263683749d16a84171f719e768ed14b5->getShippingAmount(), array('display'=>Zend_Currency::NO_SYMBOL), false); } 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 (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'])) { if (Mage::helper('core')->isModuleEnabled('Wyomind_Estimateddeliverydate')) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['estimated_delivery_date'] = mb_strtoupper(trim(strip_tags(Mage::helper("estimateddeliverydate/data")->getCartMessage())), 'utf-8'); } } 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') { if (!($i9805d668f75b6b461f88474f57c5f6aa86a87316 = Mage::registry('magesms_track_obj'))) $i9805d668f75b6b461f88474f57c5f6aa86a87316 = $i5e65dd16263683749d16a84171f719e768ed14b5->getTracksCollection()->getLastItem(); if (!$i9805d668f75b6b461f88474f57c5f6aa86a87316->getId()) { $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a = Mage::app()->getRequest()->getParams(); if (isset($ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking']) && ($i71035ea6aa66350bb658a262013eb58377a0934e = $ia8a35a47a8e61218e15d1a33dac64bdc2449c01a['tracking'])) { $i71035ea6aa66350bb658a262013eb58377a0934e = end($i71035ea6aa66350bb658a262013eb58377a0934e); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['title'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTitle($i71035ea6aa66350bb658a262013eb58377a0934e['title']); if (!empty($i71035ea6aa66350bb658a262013eb58377a0934e['number'])) $i9805d668f75b6b461f88474f57c5f6aa86a87316->setTrackNumber($i71035ea6aa66350bb658a262013eb58377a0934e['number']); } } if ($i9805d668f75b6b461f88474f57c5f6aa86a87316) { 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(); } } } } if ($i41496536c6b29c24b90c374d9fc25143f114dc9a == 'customerRegisterOTP' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'newOrderOTP' || $i41496536c6b29c24b90c374d9fc25143f114dc9a == 'checkoutCustomerOTP') { if (isset($i0933475b5bd80561a9f50282fd9eb0b8345cec4b['code'])) { $i0933475b5bd80561a9f50282fd9eb0b8345cec4b['code'] = $i5e65dd16263683749d16a84171f719e768ed14b5->getCode(); } } 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/Hooks/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Admins extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_admins'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Customers.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Customers extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_customers'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Templates.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Templates extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_templates'); } }
app/code/community/Topefekt/Magesms/Model/Hooks/Unicode.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 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_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 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_Unicode extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('magesms/hooks_unicode'); } }
app/code/community/Topefekt/Magesms/Model/Magesms.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Magesms extends Mage_Core_Model_Abstract { public function _construct() { die(get_class($this)); parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Maps.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init ( 'magesms/maps' ); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Maps extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init ( 'magesms/maps' ); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$colors)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter extends Mage_Core_Model_Abstract { static protected $_websites; static public $colors = array( "#ed6502", "#229922", "#999922", "#229999", "#999999", "#885566", "#9933aa", "#19aba3", "#dcca00", "#96c8a3", ); protected function _construct() { $this->_init( 'magesms/marketing_filter' ); } public function getWebsites() { if (!empty(self::$_websites)) return self::$_websites; self::$_websites = Mage::app()->getWebsites(); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; foreach(self::$_websites as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d == count(self::$colors)) $ibcdf76f8c9ddc330c79f805116a8bb146c43749d = 0; $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->setColorWebsite(self::$colors[$ibcdf76f8c9ddc330c79f805116a8bb146c43749d]); $ibcdf76f8c9ddc330c79f805116a8bb146c43749d++; } return self::$_websites; } public function getColorWebsite($ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { foreach($this->getWebsites() as $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc) if ($ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId() == $ibcdf76f8c9ddc330c79f805116a8bb146c43749d7d411c0cc32cdb65ec82b9e8d79aa996946f5538) return $ibcdf76f8c9ddc330c79f805116a8bb146c43749d9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getColorWebsite(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthday.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Birthday extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: '), 'type' => 'date', 'name' => 'birthday', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Birthdayall.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Birthdayall extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of birth from: ').'('.Mage::helper('magesms')->__('All years').')', 'type' => 'birthdayall', 'name' => 'birthdayall', 'color' => '#907090', 'glue' => ' / ', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]) && !empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_dob.value LIKE \'____-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]).'-'.sprintf('%02d', $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]).' %\''; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('dob', array('notnull' => true)); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->where('('.implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/City.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_City extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('City'), 'type' => 'input', 'name' => 'city', 'color' => '#ff8000', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => '%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_city', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Collection extends Varien_Object { private $ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c; private $v148194b5b9cc653ce2e35e9709e441dc6fd4123a; private $vb3aef862e6f33bb77b0548e126396581908637bb; public function __construct() { $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c = new Varien_Data_Collection(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = unserialize(Mage::app()->loadCache('magesms_marketing_filter')); if (empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) || !$this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); } } public function setCollection($iff7e46827cbb6547116c592bf800f4687428abf9) { parent::setCollection($iff7e46827cbb6547116c592bf800f4687428abf9); if (($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds())) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('entity_id', array('nin' => $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538bc1a1bf6d5c2813b31ab86ea82f7ca5e65de27a)); } public function addFilter($i2bd9743336318d0e14be0600c9129730279505dd) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) $this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); return $this; } public function addFilters(array $ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c) { foreach($ie7d1f3c0ab09749c63a4d4213221b59ce80ea45c as $i2bd9743336318d0e14be0600c9129730279505dd) $this->addFilter($i2bd9743336318d0e14be0600c9129730279505dd); } public function getFilters() { $i5528ed14b056e3debe4695094269de3a98f76fe7 = array('' => '- '.Mage::helper('magesms')->__('Please Select').' -'); foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $i5528ed14b056e3debe4695094269de3a98f76fe7[$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['name']] = str_replace(':', '', $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->filter['title']); } return $i5528ed14b056e3debe4695094269de3a98f76fe7; } public function setFilters($iff7e46827cbb6547116c592bf800f4687428abf9) { foreach($this->ve713b4c10ff4c8425970eab3a4d765b3fe6fed6c as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if (method_exists($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a, 'getFilter')) $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $this->getCache()->getFilters()); } } public function getCache() { return isset($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) ? $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a : null; } public function getAppliedFilters() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a) && $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a instanceof Varien_Object) { return $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters(); } } public function addApplyFilter($i2bd9743336318d0e14be0600c9129730279505dd, $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a = Mage::getModel('magesms/marketing_filter_'.$i2bd9743336318d0e14be0600c9129730279505dd); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); $i092fed12249a415fe47769fa9b0bb17968e798c0 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValues(); if (!empty($i092fed12249a415fe47769fa9b0bb17968e798c0[0]) && is_array($i092fed12249a415fe47769fa9b0bb17968e798c0[0])) { foreach($i092fed12249a415fe47769fa9b0bb17968e798c0 as $i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa) { if ($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['value'] == $if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538fc9fbe8edf868c14fc4a3f15c7f40aabfa080aa['label']); break; } } } elseif (is_array($i092fed12249a415fe47769fa9b0bb17968e798c0) && in_array($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89, array_keys($i092fed12249a415fe47769fa9b0bb17968e798c0))) { $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->setLabel($i092fed12249a415fe47769fa9b0bb17968e798c0[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89]); } $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = false; foreach ($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { if ($i705fa7c9639d497e1179d7d5691c212668a8c9c8 == $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $ia8418ed18227005524e0f3a24e89ce5b21e9b483 = true; break; } } if (!$ia8418ed18227005524e0f3a24e89ce5b21e9b483) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->addItem($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } } else Mage::log('Magesms: Do not load marketing filter: '.$i2bd9743336318d0e14be0600c9129730279505dd); } public function removeFilter($i670253c23c6fcba76bc4256a88fdd8fbc1041039) { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters()->removeItemByKey($i670253c23c6fcba76bc4256a88fdd8fbc1041039); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function addRemoveCustomer($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538) { $iea1c44f6137731e1b13c494f784074e6a133577a = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); if (!is_array($iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array(); if (in_array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538, $iea1c44f6137731e1b13c494f784074e6a133577a)) $iea1c44f6137731e1b13c494f784074e6a133577a = array_diff($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); else $iea1c44f6137731e1b13c494f784074e6a133577a = array_merge($iea1c44f6137731e1b13c494f784074e6a133577a, array($i7d411c0cc32cdb65ec82b9e8d79aa996946f5538)); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($iea1c44f6137731e1b13c494f784074e6a133577a); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function resetFilter() { $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a = new Varien_Object(); $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->setData(array( 'filters' => new Varien_Data_Collection(), 'customers' => new Varien_Object() )); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } public function toSerialize() { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = array('filters' => array(), 'customers' => array()); foreach($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getFilters() as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) { $ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'][] = array('name' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->filter['name'], 'value' => $i705fa7c9639d497e1179d7d5691c212668a8c9c8->getValue()); } $ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'] = $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->getIds(); return serialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); } public function fromSerialize($ia61712c27ea241bd7a543dc2b02ea572274d0322) { $ia61712c27ea241bd7a543dc2b02ea572274d0322 = unserialize($ia61712c27ea241bd7a543dc2b02ea572274d0322); $this->resetFilter(); if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'])) { foreach($ia61712c27ea241bd7a543dc2b02ea572274d0322['filters'] as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { $this->addApplyFilter($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['name'], $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a['value']); } } if (!empty($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']) && is_array($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers'])) $this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a->getCustomers()->setIds($ia61712c27ea241bd7a543dc2b02ea572274d0322['customers']); $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } private function f403d2b0a9c44d21482a17bcb162aa54ccb79be64() { if (!empty($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a)) Mage::app()->saveCache(serialize($this->v148194b5b9cc653ce2e35e9709e441dc6fd4123a), 'magesms_marketing_filter'); } public function __destruct() { $this->f403d2b0a9c44d21482a17bcb162aa54ccb79be64(); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Country.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Country extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Country'), 'firstItem' => Mage::helper('magesms')->__('All countries'), 'type' => 'select', 'name' => 'country', 'color' => '#005784', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('directory/country')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('billing_country_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Firstname.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Firstname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('First name'), 'type' => 'input', 'name' => 'firstname', 'color' => '#c71585', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('firstname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Gender.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Gender extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Gender:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'gender', 'color' => '#eeaaaa', ); } public function getValues() { $id92fd65e479a45fd28bc877dc5d15fc219af26db = array(); $ic7e041f1c0f99ab24f17177e95509393b8ba49be = Mage::getModel('eav/config')->getAttribute('customer', 'gender'); if ($ic7e041f1c0f99ab24f17177e95509393b8ba49be->getId()) { $id92fd65e479a45fd28bc877dc5d15fc219af26db = $ic7e041f1c0f99ab24f17177e95509393b8ba49be->getSource()->getAllOptions(false); foreach($id92fd65e479a45fd28bc877dc5d15fc219af26db as $i670253c23c6fcba76bc4256a88fdd8fbc1041039=>$i287bcbe0c9dfb97b6c1bb92e5d892c0dea8b7ab0) $id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label'] = Mage::helper('magesms')->__($id92fd65e479a45fd28bc877dc5d15fc219af26db[$i670253c23c6fcba76bc4256a88fdd8fbc1041039]['label']); $id92fd65e479a45fd28bc877dc5d15fc219af26db = array_merge(array(array('value' => '', 'label' => $this->filter['firstItem'])), $id92fd65e479a45fd28bc877dc5d15fc219af26db); } return $id92fd65e479a45fd28bc877dc5d15fc219af26db; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('gender', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Group.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Group extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Groups'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'group', 'color' => '#d2b48c', ); } public function getValues() { return array_merge( array(array('value' => '', 'label' => $this->filter['firstItem'])), Mage::getModel('customer/group')->getCollection()->toOptionArray(false) ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc = false; $i76200fed8240be52de0fc75ec3367898a197407f = Mage::getModel('eav/entity_attribute')->loadByCode('customer', 'group_id'); if ($i76200fed8240be52de0fc75ec3367898a197407f->getFrontendInput() == 'multiselect') $i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc = true; $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('%'.$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array((int)$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) if ($i3381b8e0f8a10cba70bd1ec41b87d5c91ed140dc) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', array('like' => $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); else $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('group_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Lastname.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Lastname extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Last name'), 'type' => 'input', 'name' => 'lastname', 'color' => '#006600', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array('like' => $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue().'%'); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('lastname', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Marketing.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Marketing extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Marketing:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'marketing', 'color' => '#ccca28', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_magesms_customer_marketing.`value` = 1 OR at_magesms_customer_marketing.`value` IS NULL'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'at_magesms_customer_marketing.`value` = 0 OR at_magesms_customer_marketing.`value` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addAttributeToSelect('magesms_customer_marketing', 0); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Newsletter.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Newsletter extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Newsletter:'), 'firstItem' => Mage::helper('magesms')->__('All'), 'type' => 'select', 'name' => 'newsletter', 'color' => '#cd1818', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('Yes'), '2' => Mage::helper('magesms')->__('No') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 1'; else $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'ns.`subscriber_status` = 0 OR ns.`subscriber_status` IS NULL'; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->joinLeft( array('ns' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('newsletter/subscriber')), 'ns.`customer_id` = e.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where(implode(' OR ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Orderssum.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Orderssum extends Varien_Object { public $filter; private $v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e; public function __construct() { $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array('<', '>', '=', '<>'); $this->filter = array( 'title' => '∑ '.Mage::helper('magesms')->__('Order'), 'type' => 'number', 'name' => 'orderssum', 'color' => '#886543', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'orders_sum '.$this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]].' '.(float)$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('SUM('.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.`grand_total`) AS orders_sum') ->having(implode(' AND ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) ->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $this->filter['cond'] = $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]]; return parent::setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Orderssum extends Varien_Object { public $filter; private $v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e; public function __construct() { $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array('<', '>', '=', '<>'); $this->filter = array( 'title' => '∑ '.Mage::helper('magesms')->__('Order'), 'type' => 'number', 'name' => 'orderssum', 'color' => '#886543', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = 'orders_sum '.$this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]].' '.(float)$i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]; } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns('SUM('.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.`grand_total`) AS orders_sum') ->having(implode(' AND ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) ->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } public function setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89) { $this->filter['cond'] = $this->v717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[$if2eee0665f163a28f4adcfe84e3fc666bf1bcd89[0]]; return parent::setValue($if2eee0665f163a28f4adcfe84e3fc666bf1bcd89); } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Product.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Marketing_Filter_Product extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Product'), 'type' => 'input', 'name' => 'product', 'color' => '#77aacc', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = (int)$iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->join( array('soi' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_item')), 'soi.`order_id` = `'.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'`.`entity_id`' ); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where('soi.`product_id` IN ('.implode(', ', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).')'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Product extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Product'), 'type' => 'input', 'name' => 'product', 'color' => '#77aacc', ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->join( array('soi' => $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_item')), 'soi.`order_id` = `'.$iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'`.`entity_id`' ); $i35beb284d43488e678f4231cd9771c42363194b5 = array(); foreach ($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e as $i705fa7c9639d497e1179d7d5691c212668a8c9c8) if (is_numeric($i705fa7c9639d497e1179d7d5691c212668a8c9c8)) $i35beb284d43488e678f4231cd9771c42363194b5[] = $i705fa7c9639d497e1179d7d5691c212668a8c9c8; $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->where((count($i35beb284d43488e678f4231cd9771c42363194b5) ? 'soi.`product_id` IN ('.implode(', ', $i35beb284d43488e678f4231cd9771c42363194b5).') OR ' : '').'soi.`sku` LIKE "'.implode('%" OR soi.`sku` LIKE "', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e).'%"'); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->group('e.entity_id'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Register.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
- class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Register extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Date of registration from: '), 'type' => 'datetime', 'name' => 'register', 'color' => '#907523', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = array('from' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0]))); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = array('to' => date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1]))); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('created_at', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Sale.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Marketing_Filter_Sale extends Varien_Object { public $filter; public function _construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Sales from: '), 'type' => 'datetime', 'name' => 'sale', 'color' => '#886543', 'glue' => ' / '.Mage::helper('magesms')->__('to: '), ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e = array(); $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69 = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { $i3ca4aff6918962dee4a8054ca52f13ef3b6bab08 = $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue(); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])) $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e[] = date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[0])); if (!empty($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])) $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69[] = date('Y-m-d H:i:s', strtotime($i3ca4aff6918962dee4a8054ca52f13ef3b6bab08[1])); } } if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e) || count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) { if (strpos($iff7e46827cbb6547116c592bf800f4687428abf9->getSelect(), $iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid')) === false) $iff7e46827cbb6547116c592bf800f4687428abf9->joinTable('sales/order_grid', 'customer_id=entity_id', array('entity_id')); $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect() ->columns($iff7e46827cbb6547116c592bf800f4687428abf9->getTable('sales/order_grid').'.created_at AS created_at_sale') ->group('e.entity_id'); if (count($i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e)) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->having('`created_at_sale` >= "'.implode('" AND `created_at_sale` => "', $i62074d2d0e606cbe67bd6b024f6c2eaac2029c2e).'"'); if (count($ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69)) $iff7e46827cbb6547116c592bf800f4687428abf9->getSelect()->having('`created_at_sale` <= "'.implode('" AND `created_at_sale` <= "', $ie2a167ef859b6a69d0dc6803ded0a2a49f59ce69).'"'); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Type.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Type extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Type'), 'firstItem' => Mage::helper('magesms')->__('All customers'), 'type' => 'select', 'name' => 'type', 'color' => '#9acd32', ); } public function getValues() { return array( '' => $this->filter['firstItem'], '1' => Mage::helper('magesms')->__('company customers'), '2' => Mage::helper('magesms')->__('private customers') ); } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 1) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('notnull' => true)); if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue() == 2) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array(array('null' => true)); } } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) $iff7e46827cbb6547116c592bf800f4687428abf9->joinAttribute('billing_vat_id', 'customer_address/vat_id', 'default_billing', null, 'left') ->addFieldToFilter('billing_vat_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Marketing/Filter/Website.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Marketing_Filter_Website extends Varien_Object { public $filter; public function __construct() { $this->filter = array( 'title' => Mage::helper('magesms')->__('Store'), 'firstItem' => Mage::helper('magesms')->__('All stores'), 'type' => 'select', 'name' => 'website', 'color' => '#8880aa', ); } public function getValues() { $if71cbed623a99cd5a1032d4d3388bfd486053db2 = array('' => $this->filter['firstItem']); foreach (Mage::app()->getWebsites($this->_isAdminScopeAllowed) as $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc) { $if71cbed623a99cd5a1032d4d3388bfd486053db2[$i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getId()] = $i9fdb3b1e2e6984ebdd1220ec199279013c5483fc->getDataUsingMethod('name'); } return $if71cbed623a99cd5a1032d4d3388bfd486053db2; } public function getFilter($iff7e46827cbb6547116c592bf800f4687428abf9, $i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2) { $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e = array(); foreach($i2d8fb6b6f17ec9aa17899ea311cc26bc493cd9a2 as $iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a) { if ($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a instanceof $this) $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e[] = array($iba20acc78644ac0e9cd48ea35d8ad03b058f6b5a->getValue()); } if (count($i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e)) { $iff7e46827cbb6547116c592bf800f4687428abf9->addFieldToFilter('website_id', $i717aafa07eeca1a7c0f40cc18a0eb90e0984de3e); } return $iff7e46827cbb6547116c592bf800f4687428abf9; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Admins extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/admins', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Admins/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Admins_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/admins'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Answers extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/answers', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Answers/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Answers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/answers'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Answers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/answers'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Mysql4_BirthdayMessages_Template extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/birthdaymessages_template', 'id'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Birthdaymessages/Template/Collection.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-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
+ * @license http://opensource.org/licenses/BSD-3-Clause
15
+ */
16
+ class Topefekt_Magesms_Model_Mysql4_BirthdayMessages_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/birthdaymessages_template'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Countries_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/countries'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country', 'name'); $this->_isPkAutoIncrement = false; } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country', 'name'); $this->_isPkAutoIncrement = false; } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Area extends Mage_Core_Model_Mysql4_Abstract { public function _construct() { $this->_init('magesms/country_area', 'ID'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Area/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Area_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country_area'); } }
app/code/community/Topefekt/Magesms/Model/Mysql4/Country/Collection.php CHANGED
@@ -10,7 +10,7 @@
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
- * @copyright Copyright (c) 2012-2015 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }
10
*
11
* @category TOPefekt
12
* @package TOPefekt_Magesms
13
+ * @copyright Copyright (c) 2012-2017 TOPefekt s.r.o. (http://www.mage-sms.com)
14
* @license http://opensource.org/licenses/BSD-3-Clause
15
*/
16
class Topefekt_Magesms_Model_Mysql4_Country_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract { public function _construct() { parent::_construct(); $this->_init('magesms/country'); } }