dMkPostman - Version 1.1.0

Version Notes

Stabile Version zum Erstellen von Newslettern.
Neue Features: Tracking von Newslettern, drei Vorlagen für die Gestaltung

Download this release

Release Info

Developer Holger Lösken
Extension dMkPostman
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.5 to 1.1.0

Files changed (241) hide show
  1. app/code/local/DMK/Postman/Block/Adminhtml/Lists.php +1 -1
  2. app/code/local/DMK/Postman/Block/Adminhtml/Lists/Edit/Form.php +2 -1
  3. app/code/local/DMK/Postman/Block/Adminhtml/Lists/Grid.php +57 -57
  4. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Queue.php +2 -1
  5. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Sent.php +3 -2
  6. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Sent/Grid.php +25 -38
  7. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic.php +30 -0
  8. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic/Grid.php +111 -0
  9. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic/View.php +140 -0
  10. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template.php +21 -0
  11. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Edit.php +44 -0
  12. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Edit/Form.php +136 -0
  13. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Grid.php +94 -0
  14. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent.php +53 -1
  15. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Form.php +42 -2
  16. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Tab/General.php +55 -41
  17. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Tab/Html.php +2 -2
  18. app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Grid.php +148 -94
  19. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers.php +1 -0
  20. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit.php +116 -116
  21. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Form.php +55 -55
  22. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tab/Lists.php +72 -62
  23. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tab/Main.php +113 -113
  24. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tabs.php +75 -78
  25. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Testrecipients.php +1 -0
  26. app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Testrecipients/Edit/Form.php +65 -46
  27. app/code/local/DMK/Postman/Block/Adminhtml/Widget/Grid/Column.php +33 -0
  28. app/code/local/DMK/Postman/Block/Adminhtml/Widget/Grid/Column/Renderer/Action.php +32 -1
  29. app/code/local/DMK/Postman/Block/Frontend/Customer/Account/Dashboard.php +20 -0
  30. app/code/local/DMK/Postman/Block/Frontend/Customer/Account/Dashboard/Info.php +34 -0
  31. app/code/local/DMK/Postman/Block/Frontend/Customer/Form/Register.php +23 -0
  32. app/code/local/DMK/Postman/Block/Frontend/Customer/Newsletter.php +22 -0
  33. app/code/local/DMK/Postman/Block/Frontend/Newsletter/Registration.php +45 -32
  34. app/code/local/DMK/Postman/Block/Widget/Product.php +80 -0
  35. app/code/local/DMK/Postman/Helper/Data.php +41 -31
  36. app/code/local/DMK/Postman/Helper/Email.php +67 -136
  37. app/code/local/DMK/Postman/Model/Email/Template.php +49 -0
  38. app/code/local/DMK/Postman/Model/Lists.php +25 -4
  39. app/code/local/DMK/Postman/Model/Mysql4/Lists/Collection.php +20 -6
  40. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Queuecontent.php +8 -4
  41. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Statistic/Basic.php +11 -0
  42. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Statistic/Basic/Collection.php +9 -0
  43. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Template.php +15 -0
  44. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Template/Collection.php +15 -0
  45. app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Unsent.php +70 -16
  46. app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Import.php +126 -126
  47. app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Lists.php +17 -0
  48. app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Lists/Collection.php +15 -0
  49. app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Subscribers/Collection.php +20 -37
  50. app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Testrecipients/Collection.php +5 -6
  51. app/code/local/DMK/Postman/Model/Newsletters/Statistic/Basic.php +101 -0
  52. app/code/local/DMK/Postman/Model/Newsletters/Template.php +15 -0
  53. app/code/local/DMK/Postman/Model/Newsletters/Unsent.php +80 -64
  54. app/code/local/DMK/Postman/Model/Observer.php +230 -11
  55. app/code/local/DMK/Postman/Model/Subscribers/Lists.php +18 -0
  56. app/code/local/DMK/Postman/Model/Subscribers/Subscribers.php +18 -7
  57. app/code/local/DMK/Postman/Model/Subscribers/Testrecipients.php +23 -9
  58. app/code/local/DMK/Postman/Model/TinyMce/Config.php +53 -0
  59. app/code/local/DMK/Postman/Model/TinyMce/Observer.php +31 -0
  60. app/code/local/DMK/Postman/Model/Variable/Config.php +45 -51
  61. app/code/local/DMK/Postman/controllers/ActivateController.php +4 -6
  62. app/code/local/DMK/Postman/controllers/Adminhtml/CustomerController.php +37 -0
  63. app/code/local/DMK/Postman/controllers/Adminhtml/ListsController.php +6 -9
  64. app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/QueueController.php +3 -2
  65. app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/SentController.php +34 -21
  66. app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/StatisticController.php +66 -0
  67. app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/TemplateController.php +162 -0
  68. app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/UnsentController.php +210 -129
  69. app/code/local/DMK/Postman/controllers/Adminhtml/Subscribers/SubscribersController.php +273 -265
  70. app/code/local/DMK/Postman/controllers/Adminhtml/Subscribers/TestrecipientsController.php +60 -45
  71. app/code/local/DMK/Postman/controllers/Adminhtml/WidgetController.php +55 -0
  72. app/code/local/DMK/Postman/controllers/IndexController.php +68 -34
  73. app/code/local/DMK/Postman/controllers/Newsletter/ManageController.php +41 -0
  74. app/code/local/DMK/Postman/etc/adminhtml.xml +21 -3
  75. app/code/local/DMK/Postman/etc/config.xml +194 -134
  76. app/code/local/DMK/Postman/etc/system.xml +10 -11
  77. app/code/local/DMK/Postman/etc/widget.xml +90 -0
  78. app/code/local/DMK/Postman/sql/postman_setup/mysql4-install-0.1.0.php +34 -2
  79. app/code/local/Varien/Data/Form/Element/Fieldset.php +196 -0
  80. app/design/adminhtml/default/default/layout/postman.xml +8 -0
  81. app/design/adminhtml/default/default/template/postman/grid/container.phtml +38 -0
  82. app/design/adminhtml/default/default/template/postman/grid/container_with_hints.phtml +41 -0
  83. app/design/adminhtml/default/default/template/postman/magento_vars_js.phtml +3 -0
  84. app/design/adminhtml/default/default/template/postman/statistic/view.phtml +84 -0
  85. app/design/frontend/base/default/template/authorizenet/directpost/form.phtml +135 -0
  86. app/design/frontend/base/default/template/authorizenet/directpost/iframe.phtml +55 -0
  87. app/design/frontend/base/default/template/authorizenet/directpost/info.phtml +35 -0
  88. app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml +52 -0
  89. app/design/frontend/base/default/template/bundle/catalog/product/price.phtml +258 -0
  90. app/design/frontend/base/default/template/bundle/catalog/product/view/options/notice.phtml +27 -0
  91. app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml +93 -0
  92. app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml +41 -0
  93. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml +45 -0
  94. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +52 -0
  95. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +49 -0
  96. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +65 -0
  97. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml +55 -0
  98. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml +43 -0
  99. app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml +168 -0
  100. app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml +169 -0
  101. app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml +174 -0
  102. app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml +92 -0
  103. app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml +271 -0
  104. app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml +328 -0
  105. app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml +352 -0
  106. app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml +375 -0
  107. app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml +111 -0
  108. app/design/frontend/base/default/template/callouts/left_col.phtml +39 -0
  109. app/design/frontend/base/default/template/callouts/right_col.phtml +39 -0
  110. app/design/frontend/base/default/template/catalog/category/page.phtml +36 -0
  111. app/design/frontend/base/default/template/catalog/category/view.phtml +71 -0
  112. app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml +27 -0
  113. app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml +27 -0
  114. app/design/frontend/base/default/template/catalog/layer/filter.phtml +45 -0
  115. app/design/frontend/base/default/template/catalog/layer/state.phtml +48 -0
  116. app/design/frontend/base/default/template/catalog/layer/view.phtml +56 -0
  117. app/design/frontend/base/default/template/catalog/navigation/left.phtml +59 -0
  118. app/design/frontend/base/default/template/catalog/navigation/top.phtml +49 -0
  119. app/design/frontend/base/default/template/catalog/product/compare/list.phtml +160 -0
  120. app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml +60 -0
  121. app/design/frontend/base/default/template/catalog/product/gallery.phtml +66 -0
  122. app/design/frontend/base/default/template/catalog/product/list.phtml +128 -0
  123. app/design/frontend/base/default/template/catalog/product/list/related.phtml +94 -0
  124. app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml +96 -0
  125. app/design/frontend/base/default/template/catalog/product/list/upsell.phtml +52 -0
  126. app/design/frontend/base/default/template/catalog/product/new.phtml +59 -0
  127. app/design/frontend/base/default/template/catalog/product/price.phtml +414 -0
  128. app/design/frontend/base/default/template/catalog/product/view.phtml +158 -0
  129. app/design/frontend/base/default/template/catalog/product/view/additional.phtml +29 -0
  130. app/design/frontend/base/default/template/catalog/product/view/addto.phtml +41 -0
  131. app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml +38 -0
  132. app/design/frontend/base/default/template/catalog/product/view/attributes.phtml +52 -0
  133. app/design/frontend/base/default/template/catalog/product/view/description.phtml +39 -0
  134. app/design/frontend/base/default/template/catalog/product/view/media.phtml +78 -0
  135. app/design/frontend/base/default/template/catalog/product/view/options.phtml +182 -0
  136. app/design/frontend/base/default/template/catalog/product/view/options/js.phtml +89 -0
  137. app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml +92 -0
  138. app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml +30 -0
  139. app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml +103 -0
  140. app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml +40 -0
  141. app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml +41 -0
  142. app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml +33 -0
  143. app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml +29 -0
  144. app/design/frontend/base/default/template/catalog/product/view/price.phtml +34 -0
  145. app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml +28 -0
  146. app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml +181 -0
  147. app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml +31 -0
  148. app/design/frontend/base/default/template/catalog/product/view/type/default.phtml +36 -0
  149. app/design/frontend/base/default/template/catalog/product/view/type/grouped.phtml +91 -0
  150. app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml +48 -0
  151. app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml +31 -0
  152. app/design/frontend/base/default/template/catalog/product/view/type/virtual.phtml +31 -0
  153. app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml +27 -0
  154. app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml +27 -0
  155. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml +55 -0
  156. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml +46 -0
  157. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml +46 -0
  158. app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml +65 -0
  159. app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml +62 -0
  160. app/design/frontend/base/default/template/catalog/rss/product/price.phtml +356 -0
  161. app/design/frontend/base/default/template/catalog/seo/sitemap.phtml +50 -0
  162. app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml +38 -0
  163. app/design/frontend/base/default/template/catalog/seo/tree.phtml +43 -0
  164. app/design/frontend/base/default/template/cataloginventory/qtyincrements.phtml +35 -0
  165. app/design/frontend/base/default/template/cataloginventory/stockqty/composite.phtml +62 -0
  166. app/design/frontend/base/default/template/cataloginventory/stockqty/default.phtml +35 -0
  167. app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml +95 -0
  168. app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml +60 -0
  169. app/design/frontend/base/default/template/catalogsearch/form.mini.phtml +40 -0
  170. app/design/frontend/base/default/template/catalogsearch/result.phtml +55 -0
  171. app/design/frontend/base/default/template/catalogsearch/term.phtml +38 -0
  172. app/design/frontend/base/default/template/centinel/authentication.phtml +56 -0
  173. app/design/frontend/base/default/template/centinel/authentication/complete.phtml +41 -0
  174. app/design/frontend/base/default/template/centinel/authentication/start.phtml +40 -0
  175. app/design/frontend/base/default/template/centinel/logo.phtml +33 -0
  176. app/design/frontend/base/default/template/checkout/cart.phtml +138 -0
  177. app/design/frontend/base/default/template/checkout/cart/coupon.phtml +59 -0
  178. app/design/frontend/base/default/template/checkout/cart/crosssell.phtml +59 -0
  179. app/design/frontend/base/default/template/checkout/cart/item/configure/updatecart.phtml +39 -0
  180. app/design/frontend/base/default/template/checkout/cart/item/default.phtml +254 -0
  181. app/design/frontend/base/default/template/checkout/cart/noItems.phtml +34 -0
  182. app/design/frontend/base/default/template/checkout/cart/render/default.phtml +70 -0
  183. app/design/frontend/base/default/template/checkout/cart/render/simple.phtml +70 -0
  184. app/design/frontend/base/default/template/checkout/cart/shipping.phtml +143 -0
  185. app/design/frontend/base/default/template/checkout/cart/sidebar.phtml +76 -0
  186. app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml +135 -0
  187. app/design/frontend/base/default/template/checkout/cart/totals.phtml +43 -0
  188. app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml +58 -0
  189. app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml +81 -0
  190. app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml +49 -0
  191. app/design/frontend/base/default/template/checkout/multishipping/billing.phtml +116 -0
  192. app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml +54 -0
  193. app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml +45 -0
  194. app/design/frontend/base/default/template/checkout/multishipping/link.phtml +27 -0
  195. app/design/frontend/base/default/template/checkout/multishipping/overview.phtml +241 -0
  196. app/design/frontend/base/default/template/checkout/multishipping/overview/item.phtml +238 -0
  197. app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml +129 -0
  198. app/design/frontend/base/default/template/checkout/multishipping/state.phtml +39 -0
  199. app/design/frontend/base/default/template/checkout/multishipping/success.phtml +50 -0
  200. app/design/frontend/base/default/template/checkout/onepage.phtml +61 -0
  201. app/design/frontend/base/default/template/checkout/onepage/agreements.phtml +51 -0
  202. app/design/frontend/base/default/template/checkout/onepage/billing.phtml +203 -0
  203. app/design/frontend/base/default/template/checkout/onepage/failure.phtml +32 -0
  204. app/design/frontend/base/default/template/checkout/onepage/link.phtml +29 -0
  205. app/design/frontend/base/default/template/checkout/onepage/login.phtml +120 -0
  206. app/design/frontend/base/default/template/checkout/onepage/payment.phtml +70 -0
  207. app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml +57 -0
  208. app/design/frontend/base/default/template/checkout/onepage/progress.phtml +110 -0
  209. app/design/frontend/base/default/template/checkout/onepage/review.phtml +29 -0
  210. app/design/frontend/base/default/template/checkout/onepage/review/button.phtml +27 -0
  211. app/design/frontend/base/default/template/checkout/onepage/review/info.phtml +84 -0
  212. app/design/frontend/base/default/template/checkout/onepage/review/item.phtml +239 -0
  213. app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml +47 -0
  214. app/design/frontend/base/default/template/checkout/onepage/shipping.phtml +154 -0
  215. app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml +46 -0
  216. app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml +29 -0
  217. app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml +99 -0
  218. app/design/frontend/base/default/template/checkout/success.phtml +64 -0
  219. app/design/frontend/base/default/template/checkout/total/default.phtml +38 -0
  220. app/design/frontend/base/default/template/checkout/total/nominal.phtml +56 -0
  221. app/design/frontend/base/default/template/checkout/total/tax.phtml +68 -0
  222. app/design/frontend/base/default/template/cms/content.phtml +27 -0
  223. app/design/frontend/base/default/template/cms/content_heading.phtml +31 -0
  224. app/design/frontend/base/default/template/cms/default/home.phtml +27 -0
  225. app/design/frontend/base/default/template/cms/default/no-route.phtml +27 -0
  226. app/design/frontend/base/default/template/cms/meta.phtml +32 -0
  227. app/design/frontend/base/default/template/cms/widget/link/link_block.phtml +27 -0
  228. app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml +27 -0
  229. app/design/frontend/base/default/template/cms/widget/static_block/default.phtml +27 -0
  230. app/design/frontend/base/default/template/contacts/form.phtml +73 -0
  231. app/design/frontend/base/default/template/core/formkey.phtml +27 -0
  232. app/design/frontend/base/default/template/core/link.phtml +27 -0
  233. app/design/frontend/base/default/template/core/messages.phtml +47 -0
  234. app/design/frontend/base/default/template/customer/account/dashboard.phtml +43 -0
  235. app/design/frontend/base/default/template/customer/account/dashboard/address.phtml +50 -0
  236. app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml +30 -0
  237. app/design/frontend/base/default/template/customer/account/dashboard/info.phtml +62 -0
  238. app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml +31 -0
  239. app/design/frontend/base/default/template/customer/account/link/back.phtml +29 -0
  240. app/design/frontend/base/default/template/customer/account/navigation.phtml +46 -0
  241. app/design/frontend/base/default/template/customer/address.phtml +87 -0
app/code/local/DMK/Postman/Block/Adminhtml/Lists.php CHANGED
@@ -36,7 +36,6 @@ class DMK_Postman_Block_Adminhtml_Lists extends Mage_Adminhtml_Block_Widget_Grid
36
  {
37
  /**
38
  * Method to initialize the grid container settings
39
- *
40
  * @access public
41
  */
42
  public function __construct()
@@ -47,6 +46,7 @@ class DMK_Postman_Block_Adminhtml_Lists extends Mage_Adminhtml_Block_Widget_Grid
47
 
48
  parent::__construct();
49
 
 
50
  $this->_updateButton('add', 'label', Mage::helper('postman')->__('Add mailing list'));
51
  }
52
 
36
  {
37
  /**
38
  * Method to initialize the grid container settings
 
39
  * @access public
40
  */
41
  public function __construct()
46
 
47
  parent::__construct();
48
 
49
+ $this->setTemplate('postman/grid/container.phtml');
50
  $this->_updateButton('add', 'label', Mage::helper('postman')->__('Add mailing list'));
51
  }
52
 
app/code/local/DMK/Postman/Block/Adminhtml/Lists/Edit/Form.php CHANGED
@@ -124,7 +124,8 @@ class DMK_Postman_Block_Adminhtml_Lists_Edit_Form extends Mage_Adminhtml_Block_W
124
 
125
  if ($model->getId()) {
126
  $fieldset->addField('list_id', 'hidden', array(
127
- 'name' => 'list_id',
 
128
  ));
129
  }
130
 
124
 
125
  if ($model->getId()) {
126
  $fieldset->addField('list_id', 'hidden', array(
127
+ 'name' => 'list_id',
128
+ 'value' => $model->getId()
129
  ));
130
  }
131
 
app/code/local/DMK/Postman/Block/Adminhtml/Lists/Grid.php CHANGED
@@ -86,67 +86,67 @@ class DMK_Postman_Block_Adminhtml_Lists_Grid extends Mage_Adminhtml_Block_Widget
86
  * @access protected
87
  * @return DMK_Postman_Block_Adminhtml_Lists_Grid
88
  */
89
- protected function _prepareColumns()
90
- {
91
- $this->addColumn('list_id', array(
92
- 'header' => Mage::helper('postman')->__('ID'),
93
- 'align' => 'right',
94
- 'width' => '50px',
95
- 'index' => 'list_id',
96
- )
97
- );
98
-
99
- $this->addColumn('list_title', array(
100
- 'header' => Mage::helper('postman')->__('Title'),
101
- 'align' => 'left',
102
- 'width' => '250px',
103
- 'index' => 'list_title',
104
- )
105
- );
106
 
107
- $this->addColumn('list_description', array(
108
- 'header' => Mage::helper('postman')->__('Description'),
109
- 'align' => 'left',
110
- 'index' => 'list_description',
111
- 'sortable' => false,
112
- )
113
- );
114
-
115
- if (!Mage::app()->isSingleStoreMode()) {
116
- $this->addColumn('visible_in', array(
117
- 'header' => Mage::helper('postman')->__('Visible in'),
118
- 'index' => 'stores',
119
- 'type' => 'store',
120
- 'width' => '250px',
121
- 'store_all' => true,
122
- 'store_view' => true,
123
  'sortable' => false,
124
- ));
125
- }
126
-
127
- $this->addColumn('is_active', array(
128
- 'header' => Mage::helper('postman')->__('Status'),
129
- 'align' => 'left',
130
- 'width' => '150px',
131
- 'index' => 'is_active',
132
- 'type' => 'options',
133
- 'options' => array(
134
- 0 => Mage::helper('postman')->__('Disabled'),
135
- 1 => Mage::helper('postman')->__('Enabled'),
136
- )
137
- )
138
- );
139
 
140
- $this->addColumn('list_subscribers', array(
141
- 'header' => Mage::helper('postman')->__('# subscribers'),
142
- 'align' => 'left',
143
- 'width' => '50px',
144
- 'index' => 'subscriber_lists_count',
145
- )
146
- );
 
 
 
 
147
 
148
- return parent::_prepareColumns();
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
  /**
152
  * Method to get the row edit url
86
  * @access protected
87
  * @return DMK_Postman_Block_Adminhtml_Lists_Grid
88
  */
89
+ protected function _prepareColumns()
90
+ {
91
+ $this->addColumn('list_id', array(
92
+ 'header' => Mage::helper('postman')->__('ID'),
93
+ 'align' => 'right',
94
+ 'width' => '50px',
95
+ 'index' => 'list_id',
96
+ )
97
+ );
 
 
 
 
 
 
 
 
98
 
99
+ $this->addColumn('list_title', array(
100
+ 'header' => Mage::helper('postman')->__('Title'),
101
+ 'align' => 'left',
102
+ 'width' => '250px',
103
+ 'index' => 'list_title',
104
+ )
105
+ );
106
+
107
+ $this->addColumn('list_description', array(
108
+ 'header' => Mage::helper('postman')->__('Description'),
109
+ 'align' => 'left',
110
+ 'index' => 'list_description',
 
 
 
 
111
  'sortable' => false,
112
+ )
113
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
+ // if (!Mage::app()->isSingleStoreMode()) {
116
+ // $this->addColumn('visible_in', array(
117
+ // 'header' => Mage::helper('postman')->__('Visible in'),
118
+ // 'index' => 'stores',
119
+ // 'type' => 'store',
120
+ // 'width' => '250px',
121
+ // 'store_all' => true,
122
+ // 'store_view' => true,
123
+ // 'sortable' => false,
124
+ // ));
125
+ // }
126
 
127
+ $this->addColumn('is_active', array(
128
+ 'header' => Mage::helper('postman')->__('Status'),
129
+ 'align' => 'left',
130
+ 'width' => '150px',
131
+ 'index' => 'is_active',
132
+ 'type' => 'options',
133
+ 'options' => array(
134
+ 0 => Mage::helper('postman')->__('Disabled'),
135
+ 1 => Mage::helper('postman')->__('Enabled'),
136
+ )
137
+ )
138
+ );
139
+
140
+ $this->addColumn('list_subscribers', array(
141
+ 'header' => Mage::helper('postman')->__('# subscribers'),
142
+ 'align' => 'left',
143
+ 'width' => '50px',
144
+ 'index' => 'subscriber_lists_count',
145
+ )
146
+ );
147
+
148
+ return parent::_prepareColumns();
149
+ }
150
 
151
  /**
152
  * Method to get the row edit url
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Queue.php CHANGED
@@ -46,7 +46,8 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Queue extends Mage_Adminhtml_Block
46
  $this->_headerText = Mage::helper('postman')->__('Newsletters queue');
47
 
48
  parent::__construct();
49
-
 
50
  $this->_removeButton('add');
51
  }
52
  }
46
  $this->_headerText = Mage::helper('postman')->__('Newsletters queue');
47
 
48
  parent::__construct();
49
+
50
+ $this->setTemplate('postman/grid/container.phtml');
51
  $this->_removeButton('add');
52
  }
53
  }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Sent.php CHANGED
@@ -43,10 +43,11 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Sent extends Mage_Adminhtml_Block_
43
  {
44
  $this->_controller = 'adminhtml_newsletters_sent';
45
  $this->_blockGroup = 'postman';
46
- $this->_headerText = Mage::helper('postman')->__('Newsletters sent');
47
 
48
  parent::__construct();
49
-
 
50
  $this->_removeButton('add');
51
 
52
  }
43
  {
44
  $this->_controller = 'adminhtml_newsletters_sent';
45
  $this->_blockGroup = 'postman';
46
+ $this->_headerText = Mage::helper('postman')->__('Archive');
47
 
48
  parent::__construct();
49
+
50
+ $this->setTemplate('postman/grid/container.phtml');
51
  $this->_removeButton('add');
52
 
53
  }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Sent/Grid.php CHANGED
@@ -79,9 +79,6 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Sent_Grid extends Mage_Adminhtml_B
79
  */
80
  protected function _prepareColumns()
81
  {
82
- //$collection = Mage::getModel('postman/newsletters_sent_collection')->getCollection();
83
-
84
-
85
  $this->addColumn('newsletter_id', array(
86
  'header' => Mage::helper('postman')->__('ID'),
87
  'align' => 'right',
@@ -112,25 +109,25 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Sent_Grid extends Mage_Adminhtml_B
112
  'width' => '200px',
113
  'index' => 'newsletter_author',
114
  'format' => '$fullname',
115
- 'filter' => false,
116
  'sortable' => false,
117
  'filter_condition_callback' => array($this, '_customerNameCondition')
118
  )
119
  );
120
 
121
- $this->addColumn('is_active', array(
122
- 'header' => Mage::helper('postman')->__('Status'),
123
- 'align' => 'left',
124
- 'width' => '150px',
125
- 'index' => 'is_active',
126
- 'filter_index' => 'main_table.is_active',
127
- 'type' => 'options',
128
- 'options' => array(
129
- 0 => Mage::helper('postman')->__('Disabled'),
130
- 1 => Mage::helper('postman')->__('Enabled'),
131
- )
132
- )
133
- );
134
 
135
  $this->addColumn('action', array(
136
  'header' => Mage::helper('postman')->__('Action'),
@@ -140,26 +137,23 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Sent_Grid extends Mage_Adminhtml_B
140
  'getter' => 'getId',
141
  'actions' => array(
142
  array(
143
- 'caption' => Mage::helper('postman')->__('Copy newsletter'),
144
  'url' => array('base' => '*/*/copy'),
145
  'field' => 'newsletter_id',
146
  ),
147
  array(
148
- //TODO Aktion abhängig vom is_active-Zustand ausgeben
149
- 'caption' => Mage::helper('postman')->__('Enable newsletter'),
150
- 'url' => array('base' => '*/*/enabledisable',
151
- 'params'=>array('enable_newsletter'=>'1')),
152
- 'field' => 'newsletter_id',
153
- 'condition' => array('data'=>'is_active', 'operator'=>'eq', 'value'=>'1')
154
- ),
155
- array(
156
- //TODO Aktion abhängig vom is_active-Zustand ausgeben
157
- 'caption' => Mage::helper('postman')->__('Disable newsletter'),
158
- 'url' => array('base' => '*/*/enabledisable',
159
- 'params'=>array('enable_newsletter'=>'0')),
160
  'field' => 'newsletter_id',
161
- 'condition' => array('data'=>'is_active', 'operator'=>'eq', 'value'=>'0')
162
  ),
 
 
 
 
 
 
 
163
  ),
164
  'filter' => false,
165
  'sortable' => false,
@@ -181,11 +175,4 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Sent_Grid extends Mage_Adminhtml_B
181
  {
182
  return false;
183
  }
184
-
185
-
186
-
187
- protected function _customerNameCondition()
188
- {
189
-
190
- }
191
  }
79
  */
80
  protected function _prepareColumns()
81
  {
 
 
 
82
  $this->addColumn('newsletter_id', array(
83
  'header' => Mage::helper('postman')->__('ID'),
84
  'align' => 'right',
109
  'width' => '200px',
110
  'index' => 'newsletter_author',
111
  'format' => '$fullname',
112
+ 'filter' => false,
113
  'sortable' => false,
114
  'filter_condition_callback' => array($this, '_customerNameCondition')
115
  )
116
  );
117
 
118
+ // $this->addColumn('is_active', array(
119
+ // 'header' => Mage::helper('postman')->__('Status'),
120
+ // 'align' => 'left',
121
+ // 'width' => '150px',
122
+ // 'index' => 'is_active',
123
+ // 'filter_index' => 'main_table.is_active',
124
+ // 'type' => 'options',
125
+ // 'options' => array(
126
+ // 0 => Mage::helper('postman')->__('Disabled'),
127
+ // 1 => Mage::helper('postman')->__('Enabled'),
128
+ // )
129
+ // )
130
+ // );
131
 
132
  $this->addColumn('action', array(
133
  'header' => Mage::helper('postman')->__('Action'),
137
  'getter' => 'getId',
138
  'actions' => array(
139
  array(
140
+ 'caption' => Mage::helper('postman')->__('Reuse newsletter'),
141
  'url' => array('base' => '*/*/copy'),
142
  'field' => 'newsletter_id',
143
  ),
144
  array(
145
+ 'caption' => Mage::helper('postman')->__('Show statistic'),
146
+ 'url' => array('base' => '*/adminhtml_newsletters_statistic/view',
147
+ 'params'=>array('newletter_id'=>$this->getNewsletterId())),
 
 
 
 
 
 
 
 
 
148
  'field' => 'newsletter_id',
 
149
  ),
150
+ // array(
151
+ // //TODO Aktion abhängig vom is_active-Zustand ausgeben
152
+ // 'caption' => Mage::helper('postman')->__('Disable newsletter'),
153
+ // 'url' => array('base' => '*/*/enabledisable',
154
+ // 'params'=>array('enable_newsletter'=>'0')),
155
+ // 'field' => 'newsletter_id',
156
+ // ),
157
  ),
158
  'filter' => false,
159
  'sortable' => false,
175
  {
176
  return false;
177
  }
 
 
 
 
 
 
 
178
  }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Statistic extends Mage_Adminhtml_Block_Widget_Grid_Container
4
+ {
5
+ /**
6
+ * Method to initialize the grid container settings
7
+ *
8
+ * @access public
9
+ * @return void
10
+ */
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_newsletters_statistic';
14
+ $this->_blockGroup = 'postman';
15
+ $this->_headerText = Mage::helper('postman')->__('Newsletters statistic');
16
+
17
+ parent::__construct();
18
+
19
+ $this->_removeButton('add');
20
+
21
+ $this->_addButton('saveandcontinue', array(
22
+ 'label' => Mage::helper('postman')->__('Refresh'),
23
+ 'onclick' => 'window.location.reload();',
24
+ 'class' => 'save',
25
+ ), -100);
26
+
27
+ $this->setTemplate('postman/grid/container.phtml');
28
+ }
29
+
30
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic/Grid.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Statistic_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ /**
6
+ * Method to initialize the grid settings
7
+ * @access public
8
+ * @return void
9
+ */
10
+ public function __construct()
11
+ {
12
+ parent::__construct();
13
+ $this->setId('newsletterStatisticsGrid');
14
+ $this->setDefaultSort('id');
15
+ $this->setDefaultDir('DESC');
16
+ $this->setSaveParametersInSession(true);
17
+ }
18
+
19
+ /**
20
+ * Method to prepare the collection for statistics
21
+ * @access protected
22
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Statistic_Grid
23
+ */
24
+ protected function _prepareCollection()
25
+ {
26
+ $collection = Mage::getResourceModel('postman/newsletters_statistic_basic_collection');
27
+ $this->setCollection($collection);
28
+
29
+ return parent::_prepareCollection();
30
+ }
31
+
32
+ /**
33
+ * Method to prepare the grid columns
34
+ * @access protected
35
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Sent_Grid
36
+ */
37
+ protected function _prepareColumns()
38
+ {
39
+ $this->addColumn('newsletter_id', array(
40
+ 'header' => Mage::helper('postman')->__('Newsletter ID'),
41
+ 'align' => 'right',
42
+ 'width' => '30px',
43
+ 'index' => 'newsletter_id',
44
+ )
45
+ );
46
+
47
+ $this->addColumn('newsletter_code', array(
48
+ 'header' => Mage::helper('postman')->__('Tracking Code'),
49
+ 'align' => 'right',
50
+ 'width' => '30px',
51
+ 'index' => 'newsletter_code',
52
+ )
53
+ );
54
+
55
+ $this->addColumn('newsletter_name', array(
56
+ 'header' => Mage::helper('postman')->__('Subject'),
57
+ 'align' => 'left',
58
+ 'width' => '200px',
59
+ 'index' => 'newsletter_name',
60
+ )
61
+ );
62
+
63
+ $this->addColumn('open_cnt', array(
64
+ 'header' => Mage::helper('postman')->__('Open count'),
65
+ 'align' => 'right',
66
+ 'width' => '50px',
67
+ 'index' => 'open_cnt',
68
+ )
69
+ );
70
+
71
+ $this->addColumn('subscriber_cnt', array(
72
+ 'header' => Mage::helper('postman')->__('Subscriber count'),
73
+ 'align' => 'right',
74
+ 'width' => '50px',
75
+ 'index' => 'subscriber_cnt',
76
+ )
77
+ );
78
+
79
+ $this->addColumn('open_first_stamp', array(
80
+ 'header' => Mage::helper('postman')->__('Opened first'),
81
+ 'align' => 'right',
82
+ 'width' => '50px',
83
+ 'index' => 'open_first_stamp',
84
+ 'type' => 'datetime',
85
+ )
86
+ );
87
+
88
+ $this->addColumn('open_last_stamp', array(
89
+ 'header' => Mage::helper('postman')->__('Opened last'),
90
+ 'align' => 'right',
91
+ 'width' => '50px',
92
+ 'index' => 'open_last_stamp',
93
+ 'type' => 'datetime',
94
+ )
95
+ );
96
+
97
+ return parent::_prepareColumns();
98
+ }
99
+
100
+ /**
101
+ * Method to get the row edit url - no editing possible
102
+ *
103
+ * @access public
104
+ * @param object $row
105
+ * @return string edit url
106
+ */
107
+ public function getRowUrl($row)
108
+ {
109
+ return $this->getUrl('*/*/view', array('newsletter_id'=>$row->getNewsletterId()));
110
+ }
111
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Statistic/View.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * DMK Postman Block Adminhtml Newsletters Statistic View
5
+ *
6
+ * @package DMK Postman
7
+ * @subpackage Statistic
8
+ */
9
+ class DMK_Postman_Block_Adminhtml_Newsletters_Statistic_View extends Mage_Adminhtml_Block_Cms_Block
10
+ {
11
+ /**
12
+ * Method to initialize the form settings
13
+ * @access public
14
+ * @return void
15
+ */
16
+ public function __construct()
17
+ {
18
+ parent::__construct();
19
+
20
+ $this->_objectId = 'newsletter_id';
21
+ $this->_blockGroup = 'postman';
22
+ $this->_controller = 'adminhtml_newsletters_statistic';
23
+
24
+ $this->setTemplate('postman/statistic/view.phtml');
25
+ }
26
+
27
+ /**
28
+ * Set the header text of the page
29
+ * @access public
30
+ * @return string the header text
31
+ */
32
+ public function getHeaderText()
33
+ {
34
+ if(Mage::registry('newsletter_statistic_basic')) {
35
+ return Mage::helper('postman')->__('Newsletters statistic')
36
+ . ' - ' . Mage::registry('newsletter_statistic_basic')->getNewsletterName()
37
+ . ' - ID: ' . Mage::registry('newsletter_statistic_basic')->getNewsletterId();
38
+ } else {
39
+ return Mage::helper('postman')->__('Newsletters statistic');
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Get the open count
45
+ * @access public
46
+ * @return int
47
+ */
48
+ public function getOpenCnt()
49
+ {
50
+ $cnt = Mage::getSingleton('postman/newsletters_statistic_basic')->getOpenCnt();
51
+ if(is_null($cnt)) {
52
+ $cnt = 0;
53
+ }
54
+ return $cnt;
55
+ }
56
+
57
+ /**
58
+ * Get the subscriber count
59
+ * @access public
60
+ * @return int
61
+ */
62
+ public function getSubscriberCnt()
63
+ {
64
+ $cnt = Mage::getSingleton('postman/newsletters_statistic_basic')->getSubscriberCnt();
65
+ if(is_null($cnt)) {
66
+ $cnt = 0;
67
+ }
68
+ return $cnt;
69
+ }
70
+
71
+ /**
72
+ * Get the open first date
73
+ * @access public
74
+ * @return string
75
+ */
76
+ public function getOpenFirst()
77
+ {
78
+ $date = Mage::getSingleton('postman/newsletters_statistic_basic')->getOpenFirstStamp();
79
+ if(is_null($date)) {
80
+ $date = '';
81
+ } else {
82
+ $date = Mage::helper('core')->formatDate(
83
+ Mage::getSingleton('postman/newsletters_statistic_basic')->getOpenFirstStamp(),
84
+ 'medium',
85
+ true
86
+ );
87
+ }
88
+ return $date;
89
+ }
90
+
91
+ /**
92
+ * Get the open last date
93
+ * @access public
94
+ * @return string
95
+ */
96
+ public function getOpenLast()
97
+ {
98
+ $date = Mage::getSingleton('postman/newsletters_statistic_basic')->getOpenLastStamp();
99
+ if(is_null($date)) {
100
+ $date = '';
101
+ } else {
102
+ $date = Mage::helper('core')->formatDate(
103
+ Mage::getSingleton('postman/newsletters_statistic_basic')->getOpenLastStamp(),
104
+ 'medium',
105
+ true
106
+ );
107
+ }
108
+ return $date;
109
+ }
110
+
111
+ /**
112
+ * Get the sent date
113
+ * @access public
114
+ * @return string
115
+ */
116
+ public function getSentStamp()
117
+ {
118
+ $date = Mage::getSingleton('postman/newsletters_statistic_basic')->getSentStamp();
119
+ if(is_null($date)) {
120
+ $date = '';
121
+ } else {
122
+ $date = Mage::helper('core')->formatDate(
123
+ Mage::getSingleton('postman/newsletters_statistic_basic')->getSentStamp(),
124
+ 'medium',
125
+ true
126
+ );
127
+ }
128
+ return $date;
129
+ }
130
+
131
+ /**
132
+ * Get the count of unread newsletters
133
+ * @access public
134
+ * @return int
135
+ */
136
+ public function getUnreadCnt()
137
+ {
138
+ return $this->getSubscriberCnt() - $this->getOpenCnt();
139
+ }
140
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Template extends Mage_Adminhtml_Block_Widget_Grid_Container
4
+ {
5
+ /**
6
+ * Method to initialize the grid container settings
7
+ *
8
+ * @access public
9
+ * @return void
10
+ */
11
+ public function __construct()
12
+ {
13
+ $this->_controller = 'adminhtml_newsletters_template';
14
+ $this->_blockGroup = 'postman';
15
+ $this->_headerText = Mage::helper('postman')->__('Newsletter templates');
16
+
17
+ parent::__construct();
18
+ $this->setTemplate('postman/grid/container.phtml');
19
+ }
20
+
21
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Edit.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Template_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ /**
6
+ * Method to initialize the form settings
7
+ * @access public
8
+ */
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ $this->_objectId = 'id';
14
+ $this->_blockGroup = 'postman';
15
+ $this->_controller = 'adminhtml_newsletters_template';
16
+ }
17
+
18
+ /**
19
+ * Method to get the header text
20
+ *
21
+ * @access public
22
+ * @return string Header text???
23
+ */
24
+ public function getHeaderText()
25
+ {
26
+ if( Mage::registry('newsletter_template_data') && Mage::registry('newsletter_template_data')->getId() ) {
27
+ return Mage::helper('postman')->__("Edit template '%s'", $this->htmlEscape(Mage::registry('newsletter_template_data')->getName()));
28
+ } else {
29
+ return Mage::helper('postman')->__('New template');
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Method to get the delete url
35
+ *
36
+ * @access public
37
+ * @return string delete url
38
+ */
39
+ public function getDeleteUrl()
40
+ {
41
+ return $this->getUrl('*/adminhtml_newsletters_template/delete',array($this->_objectId => $this->getRequest()->getParam($this->_objectId)));
42
+ }
43
+
44
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Edit/Form.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Template_Edit_Form
4
+ extends Mage_Adminhtml_Block_Widget_Form
5
+ {
6
+ /**
7
+ * Method to prepare the layout for the wysiwyg editor
8
+ *
9
+ * @access protected
10
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Template_Edit_Form
11
+ */
12
+ protected function _prepareLayout()
13
+ {
14
+ if ($head = $this->getLayout()->getBlock('head')) {
15
+ $head
16
+ ->addItem('js_css', 'prototype/windows/themes/default.css')
17
+ ->addItem('js_css', 'prototype/windows/themes/magento.css')
18
+ // Prototype
19
+ ->addItem('js', 'prototype/prototype.js')
20
+ ->addItem('js', 'prototype/window.js')
21
+ ->addItem('js', 'prototype/validation.js')
22
+ // Scriptalous
23
+ ->addItem('js', 'scriptaculous/builder.js')
24
+ ->addItem('js', 'scriptaculous/effects.js')
25
+ ->addItem('js', 'scriptaculous/dragdrop.js')
26
+ ->addItem('js', 'scriptaculous/controls.js')
27
+ ->addItem('js', 'scriptaculous/slider.js')
28
+ // Varien
29
+ ->addItem('js', 'varien/js.js')
30
+ // Complete js/lib directory
31
+ ->addItem('js', 'lib/boxover.js')
32
+ ->addItem('js', 'lib/ccard.js')
33
+ ->addItem('js', 'lib/dropdown.js')
34
+ ->addItem('js', 'lib/ds-sleight.js')
35
+ ->addItem('js', 'lib/flex.js')
36
+ ->addItem('js', 'lib/FABridge.js')
37
+ // Mage
38
+ ->addItem('js', 'mage/translate.js')
39
+ // Complete js/mage/adminhtml directory
40
+ ->addItem('js', 'mage/adminhtml/accordion.js')
41
+ ->addItem('js', 'mage/adminhtml/browser.js')
42
+ ->addItem('js', 'mage/adminhtml/events.js')
43
+ ->addItem('js', 'mage/adminhtml/flexuploader.js')
44
+ ->addItem('js', 'mage/adminhtml/form.js')
45
+ ->addItem('js', 'mage/adminhtml/grid.js')
46
+ ->addItem('js', 'mage/adminhtml/hash.js')
47
+ ->addItem('js', 'mage/adminhtml/image.js')
48
+ ->addItem('js', 'mage/adminhtml/loader.js')
49
+ ->addItem('js', 'mage/adminhtml/scrollbar.js')
50
+ ->addItem('js', 'mage/adminhtml/tabs.js')
51
+ ->addItem('js', 'mage/adminhtml/tools.js')
52
+ ->addItem('js', 'mage/adminhtml/uploader.js')
53
+ ->addItem('js', 'mage/adminhtml/variables.js')
54
+ // WYSIWYG
55
+ ->addItem('js', 'mage/adminhtml/wysiwyg/widget.js')
56
+ ->addItem('js', 'mage/adminhtml/wysiwyg/tiny_mce/setup.js')
57
+ ->addItem('js', 'tiny_mce/plugins/fullpage/editor_plugin.js')
58
+ ->addItem('js', 'extjs/ext-tree.js')
59
+ ->addItem('js', 'extjs/ext-tree-checkbox.js');
60
+
61
+ }
62
+
63
+ parent::_prepareLayout();
64
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
65
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Method to prepare edit form
71
+ *
72
+ * @access protected
73
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Template_Edit_Form
74
+ */
75
+ protected function _prepareForm()
76
+ {
77
+ $model = Mage::getModel('postman/newsletters_template');
78
+
79
+ if($this->getRequest()->getParam('id')) {
80
+ $model->load($this->getRequest()->getParam('id'));
81
+ }
82
+
83
+ $form = new Varien_Data_Form(array(
84
+ 'id' => 'edit_form',
85
+ 'action' => $this->getUrl(
86
+ '*/*/save',
87
+ array('id' => $this->getRequest()->getParam('id'))
88
+ ),
89
+ 'method' => 'post',
90
+ )
91
+ );
92
+
93
+ $fieldset = $form->addFieldset(
94
+ 'edit_testrecipient_form',
95
+ array('legend' => Mage::helper('postman')->__('Edit template'))
96
+ );
97
+
98
+ $fieldset->addField('name', 'text', array(
99
+ 'label' => Mage::helper('postman')->__('Name'),
100
+ 'class' => 'required-entry',
101
+ 'required' => true,
102
+ 'name' => 'name',
103
+ ));
104
+
105
+ $wysiwygCfg = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
106
+ Mage::dispatchEvent('cms_wysiwyg_config_fullpage',array('config'=>$wysiwygCfg));
107
+ Mage::dispatchEvent('cms_wysiwyg_config_paths',array('config'=>$wysiwygCfg));
108
+
109
+ $fieldset->addField('content', 'editor', array(
110
+ 'label' => Mage::helper('postman')->__('Content'),
111
+ 'class' => 'required-entry',
112
+ 'required' => true,
113
+ 'name' => 'content',
114
+ 'config' => $wysiwygCfg,
115
+ 'wysiwyg' => true,
116
+ 'style' => 'height:600px;',
117
+ ));
118
+
119
+ if($model->getId()) {
120
+ $fieldset->addField(
121
+ 'id',
122
+ 'hidden',
123
+ array(
124
+ 'name' => 'id',
125
+ 'value' => $model->getId()
126
+ )
127
+ );
128
+ }
129
+
130
+ $form->setValues($model->getData());
131
+ $form->setUseContainer(true);
132
+ $this->setForm($form);
133
+ return parent::_prepareForm();
134
+ }
135
+
136
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Template/Grid.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Newsletters_Template_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+ /**
6
+ * Method to initialize the grid settings
7
+ * @access public
8
+ * @return void
9
+ */
10
+ public function __construct()
11
+ {
12
+ parent::__construct();
13
+ $this->setId('newsletterTemplateGrid');
14
+ $this->setDefaultSort('id');
15
+ $this->setDefaultDir('DESC');
16
+ $this->setSaveParametersInSession(true);
17
+ }
18
+
19
+ /**
20
+ * Method to prepare the collection
21
+ * @access protected
22
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Template_Grid
23
+ */
24
+ protected function _prepareCollection()
25
+ {
26
+ $collection = Mage::getResourceModel('postman/newsletters_template_collection');
27
+ $collection->addFieldToFilter(
28
+ 'id', array('neq'=>0)
29
+ );
30
+ $this->setCollection($collection);
31
+
32
+ return parent::_prepareCollection();
33
+ }
34
+
35
+ /**
36
+ * Method to prepare the grid columns
37
+ * @access protected
38
+ * @return DMK_Postman_Block_Adminhtml_Newsletters_Template_Grid
39
+ */
40
+ protected function _prepareColumns()
41
+ {
42
+ $this->addColumn('id', array(
43
+ 'header' => Mage::helper('postman')->__('ID'),
44
+ 'align' => 'right',
45
+ 'width' => '30px',
46
+ 'index' => 'id',
47
+ 'filter' => false,
48
+ )
49
+ );
50
+
51
+ $this->addColumn('name', array(
52
+ 'header' => Mage::helper('postman')->__('Name'),
53
+ 'align' => 'right',
54
+ 'width' => '300px',
55
+ 'index' => 'name',
56
+ 'filter' => false,
57
+ )
58
+ );
59
+
60
+ $this->addColumn('create_stamp', array(
61
+ 'header' => Mage::helper('postman')->__('Created at'),
62
+ 'align' => 'right',
63
+ 'width' => '30px',
64
+ 'index' => 'create_stamp',
65
+ 'type' => 'datetime',
66
+ 'format' => 'dd.MM.Y HH:m:s'
67
+ )
68
+ );
69
+
70
+ $this->addColumn('modify_stamp', array(
71
+ 'header' => Mage::helper('postman')->__('Last modification'),
72
+ 'align' => 'right',
73
+ 'width' => '30px',
74
+ 'index' => 'modify_stamp',
75
+ 'type' => 'datetime',
76
+ 'format' => 'dd.MM.Y HH:m:s'
77
+ )
78
+ );
79
+
80
+ return parent::_prepareColumns();
81
+ }
82
+
83
+ /**
84
+ * Method to get the row edit url - no editing possible
85
+ *
86
+ * @access public
87
+ * @param object $row
88
+ * @return string edit url
89
+ */
90
+ public function getRowUrl($row)
91
+ {
92
+ return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
93
+ }
94
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent.php CHANGED
@@ -43,11 +43,63 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Unsent extends Mage_Adminhtml_Bloc
43
  {
44
  $this->_controller = 'adminhtml_newsletters_unsent';
45
  $this->_blockGroup = 'postman';
46
- $this->_headerText = Mage::helper('postman')->__('Newsletters unsent');
47
 
48
  parent::__construct();
49
 
 
50
  $this->_updateButton('add', 'label', Mage::helper('postman')->__('Add newsletter'));
51
  }
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
43
  {
44
  $this->_controller = 'adminhtml_newsletters_unsent';
45
  $this->_blockGroup = 'postman';
46
+ $this->_headerText = Mage::helper('postman')->__('Create a new newsletter');
47
 
48
  parent::__construct();
49
 
50
+ $this->setTemplate('postman/grid/container_with_hints.phtml');
51
  $this->_updateButton('add', 'label', Mage::helper('postman')->__('Add newsletter'));
52
  }
53
 
54
+ /**
55
+ * Returns if recipients exists
56
+ * @access public
57
+ * @return string
58
+ */
59
+ public function existRecipientsHtml()
60
+ {
61
+ $eR = Mage::getResourceModel('postman/subscribers_subscribers_collection')
62
+ ->existRecipients();
63
+ $block = '';
64
+ if(!$eR) {
65
+ $block = $this->getLayout()->createBlock('core/messages')
66
+ ->addError(Mage::helper('postman')->__('There are no recipients. You cannot send any newsletter'))
67
+ ->toHtml();
68
+ }
69
+
70
+ return $block;
71
+ }
72
+
73
+ /**
74
+ * Returns if test recipients exists
75
+ * @access public
76
+ * @return string
77
+ */
78
+ public function existTestrecipientsHtml()
79
+ {
80
+ $eR = Mage::getResourceModel('postman/subscribers_testrecipients_collection')
81
+ ->existTestrecipients();
82
+ $block = '';
83
+ if(!$eR) {
84
+ $block = $this->getLayout()->createBlock('core/messages')
85
+ ->addError(Mage::helper('postman')->__('There are no testrecipients. You cannot send any test newsletter'))
86
+ ->toHtml();
87
+ }
88
+
89
+ return $block;
90
+ }
91
+
92
+ public function existMailinglistsHtml()
93
+ {
94
+ $mL = Mage::getResourceModel('postman/lists_collection')->exist();
95
+ $block = '';
96
+ if(!$mL) {
97
+ $block = $this->getLayout()->createBlock('core/messages')
98
+ ->addError(Mage::helper('postman')->__('There are no mailing lists. Please create a mailing lists'))
99
+ ->toHtml();
100
+ }
101
+
102
+ return $block;
103
+ }
104
+
105
  }
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Form.php CHANGED
@@ -43,11 +43,51 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Edit_Form extends Mage_Admi
43
  protected function _prepareLayout()
44
  {
45
  if ($head = $this->getLayout()->getBlock('head')) {
46
- $head->addItem('js', 'prototype/window.js')
47
  ->addItem('js_css', 'prototype/windows/themes/default.css')
48
  ->addItem('js_css', 'prototype/windows/themes/magento.css')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ->addItem('js', 'mage/adminhtml/variables.js')
50
- ->addItem('js', 'mage/adminhtml/wysiwyg/widget.js');
 
 
 
 
 
51
  }
52
 
53
  parent::_prepareLayout();
43
  protected function _prepareLayout()
44
  {
45
  if ($head = $this->getLayout()->getBlock('head')) {
46
+ $head
47
  ->addItem('js_css', 'prototype/windows/themes/default.css')
48
  ->addItem('js_css', 'prototype/windows/themes/magento.css')
49
+ // Prototype
50
+ ->addItem('js', 'prototype/prototype.js')
51
+ ->addItem('js', 'prototype/window.js')
52
+ ->addItem('js', 'prototype/validation.js')
53
+ // Scriptalous
54
+ ->addItem('js', 'scriptaculous/builder.js')
55
+ ->addItem('js', 'scriptaculous/effects.js')
56
+ ->addItem('js', 'scriptaculous/dragdrop.js')
57
+ ->addItem('js', 'scriptaculous/controls.js')
58
+ ->addItem('js', 'scriptaculous/slider.js')
59
+ // Varien
60
+ ->addItem('js', 'varien/js.js')
61
+ // Complete js/lib directory
62
+ ->addItem('js', 'lib/boxover.js')
63
+ ->addItem('js', 'lib/ccard.js')
64
+ ->addItem('js', 'lib/dropdown.js')
65
+ ->addItem('js', 'lib/ds-sleight.js')
66
+ ->addItem('js', 'lib/flex.js')
67
+ ->addItem('js', 'lib/FABridge.js')
68
+ // Mage
69
+ ->addItem('js', 'mage/translate.js')
70
+ // Complete js/mage/adminhtml directory
71
+ ->addItem('js', 'mage/adminhtml/accordion.js')
72
+ ->addItem('js', 'mage/adminhtml/browser.js')
73
+ ->addItem('js', 'mage/adminhtml/events.js')
74
+ ->addItem('js', 'mage/adminhtml/flexuploader.js')
75
+ ->addItem('js', 'mage/adminhtml/form.js')
76
+ ->addItem('js', 'mage/adminhtml/grid.js')
77
+ ->addItem('js', 'mage/adminhtml/hash.js')
78
+ ->addItem('js', 'mage/adminhtml/image.js')
79
+ ->addItem('js', 'mage/adminhtml/loader.js')
80
+ ->addItem('js', 'mage/adminhtml/scrollbar.js')
81
+ ->addItem('js', 'mage/adminhtml/tabs.js')
82
+ ->addItem('js', 'mage/adminhtml/tools.js')
83
+ ->addItem('js', 'mage/adminhtml/uploader.js')
84
  ->addItem('js', 'mage/adminhtml/variables.js')
85
+ // WYSIWYG
86
+ ->addItem('js', 'mage/adminhtml/wysiwyg/widget.js')
87
+ ->addItem('js', 'mage/adminhtml/wysiwyg/tiny_mce/setup.js')
88
+ ->addItem('js', 'extjs/ext-tree.js')
89
+ ->addItem('js', 'extjs/ext-tree-checkbox.js');
90
+
91
  }
92
 
93
  parent::_prepareLayout();
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Tab/General.php CHANGED
@@ -42,61 +42,75 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Edit_Tab_General extends Ma
42
  */
43
  protected function _prepareForm()
44
  {
45
-
46
- $model = Mage::registry('newsletter_unsent_data');
47
-
48
- $form = new Varien_Data_Form();
49
 
 
 
 
 
 
50
 
51
- $fieldset = $form->addFieldset('newsletters_form', array('legend'=>Mage::helper('postman')->__('Newsletter details')));
52
- /*
53
- $fieldset->addField('newsletter_sender_name', 'text', array(
54
- 'label' => Mage::helper('postman')->__('Sender name'),
55
- 'class' => 'required-entry',
56
- 'required' => true,
57
- 'name' => 'newsletter_sender_name',
58
- ));
59
-
60
- $fieldset->addField('newsletter_sender_email', 'text', array(
61
- 'label' => Mage::helper('postman')->__('Sender e-mail'),
62
- 'class' => 'required-entry',
63
- 'required' => true,
64
- 'name' => 'newsletter_sender_email',
65
- ));
66
 
67
- $fieldset->addField('newsletter_reply_email', 'text', array(
68
- 'label' => Mage::helper('postman')->__('Reply e-mail'),
69
- 'class' => 'required-entry',
70
- 'required' => true,
71
- 'name' => 'newsletter_reply_email',
72
- ));
73
- */
74
  $fieldset->addField('newsletter_subject', 'text', array(
75
  'label' => Mage::helper('postman')->__('Subject'),
 
76
  'class' => 'required-entry',
77
  'required' => true,
78
  'name' => 'newsletter_subject',
79
  ));
80
 
81
-
82
- $fieldset = $form->addFieldset('newsletters_form_lists', array('legend'=>Mage::helper('postman')->__('Mailing lists')));
83
 
84
- $fieldset->addField('store_id', 'multiselect', array(
85
- 'name' => 'lists[]',
86
- 'label' => Mage::helper('postman')->__('Mailing lists'),
87
- 'title' => Mage::helper('postman')->__('Mailing lists'),
88
- // 'required' => true,
89
- 'values' => Mage::getSingleton('postman/subscribers_subscribers')->getListValuesForForm(true),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  ));
91
 
92
- if ($model->getId()) {
93
- $fieldset->addField('newsletter_id', 'hidden', array(
94
- 'name' => 'newsletter_id',
95
- ));
96
- }
 
 
 
97
 
98
- $form->setValues($model->getData());
99
  $this->setForm($form);
100
- return parent::_prepareForm(); }
 
 
101
  }
102
 
42
  */
43
  protected function _prepareForm()
44
  {
45
+ // init model
46
+ $model = Mage::getSingleton('postman/newsletters_unsent');
 
 
47
 
48
+ // load templates
49
+ $templates = Mage::getModel('postman/newsletters_template')
50
+ ->getCollection()
51
+ ->load()
52
+ ->toOptionArray();
53
 
54
+ // load model and lists
55
+ if($this->getRequest()->getParam('newsletter_id')) {
56
+ $model->load($this->getRequest()->getParam('newsletter_id'));
57
+ $model->setLists($model->getSelectedLists($model->getNewsletterId()));
58
+ }
59
+
60
+ $form = new Varien_Data_Form();
61
+ $fieldset = $form->addFieldset('newsletters_form',
62
+ array('legend'=>Mage::helper('postman')->__('Newsletter details'))
63
+ );
 
 
 
 
 
64
 
 
 
 
 
 
 
 
65
  $fieldset->addField('newsletter_subject', 'text', array(
66
  'label' => Mage::helper('postman')->__('Subject'),
67
+ 'title' => Mage::helper('postman')->__('Subject'),
68
  'class' => 'required-entry',
69
  'required' => true,
70
  'name' => 'newsletter_subject',
71
  ));
72
 
 
 
73
 
74
+ // Choose template
75
+ $fieldset = $form->addFieldset(
76
+ 'newsletters_form_template',
77
+ array('legend'=>Mage::helper('postman')->__('Template'))
78
+ );
79
+ $fieldset->addField('newsletter_template', 'select', array(
80
+ 'label' => Mage::helper('postman')->__('Template'),
81
+ 'title' => Mage::helper('postman')->__('Template'),
82
+ 'class' => 'required-entry',
83
+ 'required' => true,
84
+ 'name' => 'newsletter_template',
85
+ 'values' => $templates,
86
+ ));
87
+
88
+ // Select lists
89
+ $fieldset = $form->addFieldset(
90
+ 'newsletters_form_lists',
91
+ array('legend'=>Mage::helper('postman')->__('Mailing lists'))
92
+ );
93
+ $fieldset->addField('lists', 'multiselect', array(
94
+ 'name' => 'lists[]',
95
+ 'label' => Mage::helper('postman')->__('Mailing lists'),
96
+ 'title' => Mage::helper('postman')->__('Mailing lists'),
97
+ 'required' => true,
98
+ 'values' => Mage::getSingleton('postman/subscribers_subscribers')->getListValuesForForm(true),
99
  ));
100
 
101
+ if($model->getId()) {
102
+ $fieldset->addField(
103
+ 'newsletter_id', 'hidden', array(
104
+ 'name' => 'newsletter_id',
105
+ 'value' => $model->getId()
106
+ )
107
+ );
108
+ }
109
 
110
+ $form->setValues($model->getData());
111
  $this->setForm($form);
112
+ return parent::_prepareForm();
113
+
114
+ }
115
  }
116
 
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Edit/Tab/Html.php CHANGED
@@ -46,8 +46,8 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Edit_Tab_Html extends Mage_
46
  $form = new Varien_Data_Form();
47
 
48
  $wysiwygCfg = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
49
- $wysiwygCfg->setData('widget_window_url', Mage::getSingleton('adminhtml/url')
50
- ->getUrl('adminhtml/widget/index'));
51
 
52
  $fieldset = $form->addFieldset('newsletters_form_html', array('legend'=>Mage::helper('postman')->__('Html version')));
53
  $fieldset->addField('newsletter_html_version','editor', array(
46
  $form = new Varien_Data_Form();
47
 
48
  $wysiwygCfg = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
49
+ Mage::dispatchEvent('cms_wysiwyg_config_fullpage',array('config'=>$wysiwygCfg));
50
+ Mage::dispatchEvent('cms_wysiwyg_config_paths',array('config'=>$wysiwygCfg));
51
 
52
  $fieldset = $form->addFieldset('newsletters_form_html', array('legend'=>Mage::helper('postman')->__('Html version')));
53
  $fieldset->addField('newsletter_html_version','editor', array(
app/code/local/DMK/Postman/Block/Adminhtml/Newsletters/Unsent/Grid.php CHANGED
@@ -34,62 +34,71 @@
34
  */
35
  class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid extends Mage_Adminhtml_Block_Widget_Grid
36
  {
 
 
 
37
  /**
38
  * Method to initialize the grid settings
39
  *
40
  * @access public
41
  */
42
- public function __construct()
43
- {
44
- parent::__construct();
45
- $this->setId('dmk_postman_list_newsletters_unsent');
46
- $this->setDefaultSort('newsletter_id');
47
- $this->setDefaultDir('ASC');
48
- $this->setSaveParametersInSession(true);
49
- }
50
-
 
 
 
 
 
 
51
  /**
52
  * Method to prepare the collection for unsent newsletters
53
  *
54
  * @access protected
55
  * @return DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid
56
  */
57
- protected function _prepareCollection()
58
- {
59
- $joinTable = Mage::getSingleton('core/resource')->getTableName('admin/user/table');
60
- $collection = Mage::getResourceModel('postman/newsletters_unsent_collection')
61
- ->addFieldToFilter('newsletter_mailing_date','0000-00-00 00:00:00');
62
-
63
- $collection->getSelect()
64
- ->joinLeft( array('au' => $joinTable),
65
- 'main_table.newsletter_author = au.user_id',
66
- array('fullname'=>'au.firstname'))
67
- ->columns(new Zend_Db_Expr("CONCAT(`au`.`firstname`, ' ',`au`.`lastname`) AS fullname"));
68
-
69
- $this->setCollection($collection);
70
- return parent::_prepareCollection();
71
- }
 
 
 
 
 
 
 
 
72
 
73
  /**
74
  * Method to prepare the grid columns
75
- *
76
  * @access protected
77
  * @return DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid
78
  */
79
- protected function _prepareColumns()
80
- {
81
- $sendingActions = array(
82
- array(
83
- 'caption' => Mage::helper('postman')->__('Send newsletter'),
84
- 'url' => array('base' => '*/*/sendNewsletter'),
85
- 'field' => 'newsletter_id',
86
- )
87
- );
88
-
89
- $existTestr = Mage::getResourceModel('postman/subscribers_testrecipients_collection')
90
- ->existTestrecipients();
91
-
92
- if($existTestr) {
93
  array_push($sendingActions,
94
  array(
95
  'caption' => Mage::helper('postman')->__('Send test newsletter'),
@@ -98,64 +107,109 @@ class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid extends Mage_Adminhtml
98
  )
99
  );
100
  }
101
-
102
- $this->addColumn('newsletter_id', array(
103
- 'header' => Mage::helper('postman')->__('ID'),
104
- 'align' => 'right',
105
- 'width' => '50px',
106
- 'index' => 'newsletter_id',
107
- )
108
- );
109
-
110
- $this->addColumn('newsletter_subject', array(
111
- 'header' => Mage::helper('postman')->__('Subject'),
112
- 'align' => 'left',
113
- 'index' => 'newsletter_subject',
114
- )
115
- );
116
-
117
- $this->addColumn('newsletter_last_modification', array(
118
- 'header' => Mage::helper('postman')->__('Last modification'),
119
- 'align' => 'left',
120
- 'width' => '200px',
121
- 'index' => 'newsletter_last_modification',
122
- 'type' => 'datetime'
123
- )
124
- );
125
-
126
- $this->addColumn('newsletter_author', array(
127
- 'header' => Mage::helper('postman')->__('Author'),
128
- 'align' => 'left',
129
- 'width' => '200px',
130
- 'filter' => false,
131
- 'sortable' => false,
132
- 'index' => 'newsletter_author',
133
- 'format' => '$fullname',
134
- )
135
- );
136
-
137
- $this->addColumn('action', array(
138
- 'header' => Mage::helper('postman')->__('Action'),
139
- 'width' => '200',
140
- 'align' => 'left',
141
- 'type' => 'action',
142
- 'getter' => 'getId',
143
- 'actions' => $sendingActions,
144
- 'filter' => false,
145
- 'sortable' => false,
146
- 'is_system' => true,
147
- )
148
- );
149
-
150
- return parent::_prepareColumns();
151
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
  /**
154
  * Method to get the row edit url
155
- *
156
- * @access public
157
- * @param ???
158
- * @return string Edit url
159
  */
160
  public function getRowUrl($row)
161
  {
34
  */
35
  class DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid extends Mage_Adminhtml_Block_Widget_Grid
36
  {
37
+ private $_existRecipients = false;
38
+ private $_existTestrecipients = false;
39
+
40
  /**
41
  * Method to initialize the grid settings
42
  *
43
  * @access public
44
  */
45
+ public function __construct()
46
+ {
47
+ parent::__construct();
48
+ $this->setId('dmk_postman_list_newsletters_unsent');
49
+ $this->setDefaultSort('newsletter_id');
50
+ $this->setDefaultDir('ASC');
51
+ $this->setSaveParametersInSession(true);
52
+
53
+ $this->_existRecipients = Mage::getResourceModel('postman/subscribers_subscribers_collection')
54
+ ->existRecipients();
55
+
56
+ $this->_existTestrecipients = Mage::getResourceModel('postman/subscribers_testrecipients_collection')
57
+ ->existTestrecipients();
58
+ }
59
+
60
  /**
61
  * Method to prepare the collection for unsent newsletters
62
  *
63
  * @access protected
64
  * @return DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid
65
  */
66
+ protected function _prepareCollection()
67
+ {
68
+ $userTbl = Mage::getSingleton('core/resource')->getTableName('admin/user/table');
69
+ $tplTbl = Mage::getSingleton('core/resource')->getTableName('postman/postman_newsletters_template');
70
+ $collection = Mage::getResourceModel('postman/newsletters_unsent_collection')
71
+ ->addFieldToFilter('newsletter_mailing_date','0000-00-00 00:00:00');
72
+
73
+ // get author name
74
+ $collection->getSelect()
75
+ ->joinLeft( array('au' => $userTbl),
76
+ 'main_table.newsletter_author = au.user_id',
77
+ array('fullname'=>'au.firstname'))
78
+ ->columns(new Zend_Db_Expr("CONCAT(`au`.`firstname`, ' ',`au`.`lastname`) AS fullname"));
79
+
80
+ // get template name
81
+ $collection->getSelect()
82
+ ->joinLeft( array('tpl' => $tplTbl),
83
+ 'main_table.newsletter_template = tpl.id',
84
+ array('templatename'=>'tpl.name'));
85
+
86
+ $this->setCollection($collection);
87
+ return parent::_prepareCollection();
88
+ }
89
 
90
  /**
91
  * Method to prepare the grid columns
 
92
  * @access protected
93
  * @return DMK_Postman_Block_Adminhtml_Newsletters_Unsent_Grid
94
  */
95
+ protected function _prepareColumns()
96
+ {
97
+ $sendingActions = array();
98
+
99
+ // Check for test recipients
100
+ // Display sending action for test recipients only, when they exist
101
+ if($this->_existTestrecipients) {
 
 
 
 
 
 
 
102
  array_push($sendingActions,
103
  array(
104
  'caption' => Mage::helper('postman')->__('Send test newsletter'),
107
  )
108
  );
109
  }
110
+
111
+ // Check for recipients
112
+ // Display sending action for recipients only, when they exist
113
+ if($this->_existRecipients) {
114
+ array_push($sendingActions,
115
+ array(
116
+ 'caption' => Mage::helper('postman')->__('Send newsletter'),
117
+ 'url' => array('base' => '*/*/sendNewsletter'),
118
+ 'field' => 'newsletter_id',
119
+ )
120
+ );
121
+ }
122
+
123
+ // Check for test recipients or normal recipients, otherwise do not display
124
+ // the enqeue option
125
+ // if($this->_existTestrecipients || $this->_existRecipients) {
126
+ // array_push($sendingActions,
127
+ // array(
128
+ // 'caption' => Mage::helper('postman')->__('Enqueue newsletter'),
129
+ // 'url' => array('base' => '*/*/addNewsletterToQueue'),
130
+ // 'field' => 'newsletter_id',
131
+ // )
132
+ // );
133
+ // }
134
+
135
+ // Fallback
136
+ if(empty($sendingActions)) {
137
+ array_push($sendingActions,
138
+ array(
139
+ 'caption' => Mage::helper('postman')->__('Please set up subscribers'),
140
+ 'type' => 'text',
141
+ 'nolink' => true,
142
+ )
143
+ );
144
+ }
145
+
146
+
147
+ $this->addColumn('newsletter_id', array(
148
+ 'header' => Mage::helper('postman')->__('ID'),
149
+ 'align' => 'right',
150
+ 'width' => '50px',
151
+ 'index' => 'newsletter_id',
152
+ 'filter' => false,
153
+ )
154
+ );
155
+
156
+ $this->addColumn('newsletter_subject', array(
157
+ 'header' => Mage::helper('postman')->__('Subject'),
158
+ 'align' => 'left',
159
+ 'index' => 'newsletter_subject',
160
+ )
161
+ );
162
+
163
+ $this->addColumn('newsletter_template', array(
164
+ 'header' => Mage::helper('postman')->__('Template'),
165
+ 'align' => 'left',
166
+ 'index' => 'newsletter_template',
167
+ 'format' => Mage::helper('postman')->__('$templatename'),
168
+ 'filter' => false,
169
+ )
170
+ );
171
+
172
+ $this->addColumn('newsletter_author', array(
173
+ 'header' => Mage::helper('postman')->__('Author'),
174
+ 'align' => 'left',
175
+ 'width' => '200px',
176
+ 'filter' => false,
177
+ 'sortable' => false,
178
+ 'index' => 'newsletter_author',
179
+ 'format' => '$fullname',
180
+ )
181
+ );
182
+
183
+ $this->addColumn('newsletter_last_modification', array(
184
+ 'header' => Mage::helper('postman')->__('Last modification'),
185
+ 'align' => 'left',
186
+ 'width' => '200px',
187
+ 'index' => 'newsletter_last_modification',
188
+ 'type' => 'datetime'
189
+ )
190
+ );
191
+
192
+ $this->addColumn('action', array(
193
+ 'header' => Mage::helper('postman')->__('Action'),
194
+ 'width' => '200',
195
+ 'align' => 'left',
196
+ 'type' => 'action',
197
+ 'getter' => 'getId',
198
+ 'actions' => $sendingActions,
199
+ 'filter' => false,
200
+ 'sortable' => false,
201
+ 'is_system' => true,
202
+ )
203
+ );
204
+
205
+ return parent::_prepareColumns();
206
+ }
207
 
208
  /**
209
  * Method to get the row edit url
210
+ * @access public
211
+ * @param object $row
212
+ * @return string Edit url
 
213
  */
214
  public function getRowUrl($row)
215
  {
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers.php CHANGED
@@ -47,6 +47,7 @@ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers extends Mage_Adminhtml
47
 
48
  parent::__construct();
49
 
 
50
  $this->updateButton('add', 'label', Mage::helper('postman')->__('Add subscriber'));
51
  }
52
 
47
 
48
  parent::__construct();
49
 
50
+ $this->setTemplate('postman/grid/container.phtml');
51
  $this->updateButton('add', 'label', Mage::helper('postman')->__('Add subscriber'));
52
  }
53
 
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit.php CHANGED
@@ -1,117 +1,117 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Block Adminhtml Subscribers Subscribers Edit
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
36
- {
37
- /**
38
- * Method to initialize the form settings
39
- *
40
- * @access public
41
- */
42
- public function __construct()
43
- {
44
- parent::__construct();
45
- $this->_objectId = 'subscriber_id';
46
- $this->_blockGroup = 'postman';
47
- $this->_controller = 'adminhtml_subscribers_subscribers';
48
-
49
- $this->_addButton('saveandcontinue', array(
50
- 'label' => Mage::helper('adminhtml')->__('Save and Continue Edit'),
51
- 'onclick' => 'saveAndContinueEdit()',
52
- 'class' => 'save',
53
- ), -100);
54
-
55
- $this->_addButton('saveandnew', array(
56
- 'label' => Mage::helper('adminhtml')->__('Save and New'),
57
- 'onclick' => 'setLocation(\'' . $this->saveAndNew() . '\')',
58
- 'class' => 'saveandnew',
59
- ), -100);
60
-
61
- $this->_formScripts[] = "
62
-
63
-
64
-
65
-
66
-
67
- function saveAndContinueEdit(){
68
- editForm.submit($('edit_form').action+'back/edit/');
69
- }
70
- ";
71
-
72
- $this->addButton('delete', array(
73
- 'label' => Mage::helper('postman')->__('Delete'),
74
- 'onclick' => 'deleteConfirm(\'' . Mage::helper('adminhtml')->__('Are you sure you want to do this?') . '\', \'' . $this->getDeleteUrl() .'\')',
75
- 'class' => 'delete'
76
- ), 1);
77
- }
78
-
79
- /**
80
- * Method to get the header text
81
- *
82
- * @access public
83
- * @return string Header text
84
- */
85
- public function getHeaderText()
86
- {
87
- if( Mage::registry('subscriber_subscriber_data') && Mage::registry('subscriber_subscriber_data')->getId() ) {
88
- return Mage::helper('postman')->__("Edit subscriber '%s'", $this->htmlEscape(Mage::registry('subscriber_subscriber_data')->getSubscriberEmail()));
89
- } else {
90
- return Mage::helper('postman')->__('New subscriber');
91
- }
92
- }
93
-
94
- /**
95
- * Method to get the delete url
96
- *
97
- * @access public
98
- * @return string delete url
99
- */
100
- public function getDeleteUrl()
101
- {
102
- return $this->getUrl('*/adminhtml_subscribers_subscribers/delete',
103
- array($this->_objectId => $this->getRequest()->getParam($this->_objectId)));
104
- }
105
-
106
- /**
107
- Method to get the saveAndNew url
108
- *
109
- * @access public
110
- * @return string saveAndNew url
111
- */
112
-
113
- public function saveAndNew()
114
- {
115
- return $this->getUrl('*/adminhtml_subscribers_subscribers/new', array());
116
- }
117
  }
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Block Adminhtml Subscribers Subscribers Edit
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
36
+ {
37
+ /**
38
+ * Method to initialize the form settings
39
+ *
40
+ * @access public
41
+ */
42
+ public function __construct()
43
+ {
44
+ parent::__construct();
45
+ $this->_objectId = 'subscriber_id';
46
+ $this->_blockGroup = 'postman';
47
+ $this->_controller = 'adminhtml_subscribers_subscribers';
48
+
49
+ $this->_addButton('saveandcontinue', array(
50
+ 'label' => Mage::helper('adminhtml')->__('Save and Continue Edit'),
51
+ 'onclick' => 'saveAndContinueEdit()',
52
+ 'class' => 'save',
53
+ ), -100);
54
+
55
+ $this->_addButton('saveandnew', array(
56
+ 'label' => Mage::helper('adminhtml')->__('Save and New'),
57
+ 'onclick' => 'setLocation(\'' . $this->saveAndNew() . '\')',
58
+ 'class' => 'saveandnew',
59
+ ), -100);
60
+
61
+ $this->_formScripts[] = "
62
+
63
+
64
+
65
+
66
+
67
+ function saveAndContinueEdit(){
68
+ editForm.submit($('edit_form').action+'back/edit/');
69
+ }
70
+ ";
71
+
72
+ $this->addButton('delete', array(
73
+ 'label' => Mage::helper('postman')->__('Delete'),
74
+ 'onclick' => 'deleteConfirm(\'' . Mage::helper('adminhtml')->__('Are you sure you want to do this?') . '\', \'' . $this->getDeleteUrl() .'\')',
75
+ 'class' => 'delete'
76
+ ), 1);
77
+ }
78
+
79
+ /**
80
+ * Method to get the header text
81
+ *
82
+ * @access public
83
+ * @return string Header text
84
+ */
85
+ public function getHeaderText()
86
+ {
87
+ if( Mage::registry('subscriber_subscriber_data') && Mage::registry('subscriber_subscriber_data')->getId() ) {
88
+ return Mage::helper('postman')->__("Edit subscriber '%s'", $this->htmlEscape(Mage::registry('subscriber_subscriber_data')->getSubscriberEmail()));
89
+ } else {
90
+ return Mage::helper('postman')->__('New subscriber');
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Method to get the delete url
96
+ *
97
+ * @access public
98
+ * @return string delete url
99
+ */
100
+ public function getDeleteUrl()
101
+ {
102
+ return $this->getUrl('*/adminhtml_subscribers_subscribers/delete',
103
+ array($this->_objectId => $this->getRequest()->getParam($this->_objectId)));
104
+ }
105
+
106
+ /**
107
+ Method to get the saveAndNew url
108
+ *
109
+ * @access public
110
+ * @return string saveAndNew url
111
+ */
112
+
113
+ public function saveAndNew()
114
+ {
115
+ return $this->getUrl('*/adminhtml_subscribers_subscribers/new', array());
116
+ }
117
  }
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Form.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Block Adminhtml Subscribers Subscribers Edit Form
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
36
- {
37
- /**
38
- * Method to prepare edit form
39
- *
40
- * @access protected
41
- * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Form
42
- */
43
- protected function _prepareForm()
44
- {
45
- $form = new Varien_Data_Form(array(
46
- 'id' => 'edit_form',
47
- 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id'))),
48
- 'method' => 'post',
49
- )
50
- );
51
- $form->setUseContainer(true);
52
- $this->setForm($form);
53
- return parent::_prepareForm();
54
- }
55
-
56
  }
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Block Adminhtml Subscribers Subscribers Edit Form
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
36
+ {
37
+ /**
38
+ * Method to prepare edit form
39
+ *
40
+ * @access protected
41
+ * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Form
42
+ */
43
+ protected function _prepareForm()
44
+ {
45
+ $form = new Varien_Data_Form(array(
46
+ 'id' => 'edit_form',
47
+ 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id'))),
48
+ 'method' => 'post',
49
+ )
50
+ );
51
+ $form->setUseContainer(true);
52
+ $this->setForm($form);
53
+ return parent::_prepareForm();
54
+ }
55
+
56
  }
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tab/Lists.php CHANGED
@@ -1,62 +1,72 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tab Lists
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Lists extends Mage_Adminhtml_Block_Widget_Form
36
- {
37
- /**
38
- * Method to prepare edit form
39
- *
40
- * @access protected
41
- * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Lists
42
- */
43
- protected function _prepareForm()
44
- {
45
- $model = Mage::registry('subscriber_subscriber_data');
46
- $form = new Varien_Data_Form();
47
- $listToCustomer = Mage::getSingleton('postman/subscribers_subscribers')->getSelectedListsForSubscriber($model->getSubscriberId());
48
-
49
-
50
- $fieldset = $form->addFieldset('subscribers_form', array('legend'=>Mage::helper('postman')->__('Mailing lists')));
51
- $fieldset->addField('store_id', 'multiselect', array(
52
- 'name' => 'lists[]',
53
- 'label' => Mage::helper('postman')->__('Mailing lists'),
54
- 'title' => Mage::helper('postman')->__('Mailing lists'),
55
- 'values' => Mage::getSingleton('postman/subscribers_subscribers')->getListValuesForForm(true),
56
- 'value' => $listToCustomer,
57
- ));
58
-
59
- $this->setForm($form);
60
- return parent::_prepareForm();
61
- }
62
- }
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tab Lists
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Lists extends Mage_Adminhtml_Block_Widget_Form
36
+ {
37
+ /**
38
+ * Method to prepare edit form
39
+ *
40
+ * @access protected
41
+ * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Lists
42
+ */
43
+ protected function _prepareForm()
44
+ {
45
+ $subscrId = $this->getRequest()->getParam('subscriber_id');
46
+ if(!$subscrId) {
47
+ $model = Mage::getSingleton('postman/subscribers_subscribers');
48
+ } else {
49
+ $model = Mage::getModel('postman/subscribers_subscribers')
50
+ ->load($subscrId);
51
+ }
52
+
53
+ $form = new Varien_Data_Form();
54
+ if($subscrId) {
55
+ $listToCustomer = Mage::getSingleton('postman/subscribers_subscribers')
56
+ ->getSelectedListsForSubscriber($model->getSubscriberId());
57
+ }
58
+
59
+ $fieldset = $form->addFieldset('subscribers_form', array('legend'=>Mage::helper('postman')->__('Mailing lists')));
60
+ $fieldset->addField('store_id', 'multiselect', array(
61
+ 'name' => 'lists[]',
62
+ 'label' => Mage::helper('postman')->__('Mailing lists'),
63
+ 'title' => Mage::helper('postman')->__('Mailing lists'),
64
+ 'required' => true,
65
+ 'values' => Mage::getSingleton('postman/subscribers_subscribers')->getListValuesForForm(true),
66
+ 'value' => $subscrId ? $listToCustomer : array(),
67
+ ));
68
+
69
+ $this->setForm($form);
70
+ return parent::_prepareForm();
71
+ }
72
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tab/Main.php CHANGED
@@ -1,113 +1,113 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tab Main
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form
36
- {
37
- /**
38
- * Method to prepare edit form
39
- *
40
- * @access protected
41
- * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Main
42
- */
43
- protected function _prepareForm()
44
- {
45
-
46
- $model = Mage::registry('subscriber_subscriber_data');
47
-
48
- $subscriberStatus = $model->getSubscriberStatus();
49
-
50
- $form = new Varien_Data_Form(array(
51
- 'id' => 'edit_form',
52
- 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id'))),
53
- 'method' => 'post',
54
- )
55
- );
56
-
57
- $fieldset = $form->addFieldset('subscribers_form', array('legend'=>Mage::helper('postman')->__('Subscriber details')));
58
-
59
- $fieldset->addField('subscriber_name', 'text', array(
60
- 'label' => Mage::helper('postman')->__('Name'),
61
- 'class' => 'entry',
62
- 'required' => false,
63
- 'name' => 'subscriber_name',
64
- ));
65
-
66
- $fieldset->addField('subscriber_email', 'text', array(
67
- 'label' => Mage::helper('postman')->__('E-mail'),
68
- 'required' => true,
69
- 'name' => 'subscriber_email',
70
- ));
71
-
72
- $fieldset->addField('subscriber_emailformat', 'select', array(
73
- 'label' => Mage::helper('postman')->__('E-mail format'),
74
- 'title' => Mage::helper('postman')->__('E-mail format'),
75
- 'name' => 'subscriber_emailformat',
76
- 'required' => true,
77
- 'options' => array(
78
- '2' => Mage::helper('postman')->__('Multipart'),
79
- '1' => Mage::helper('postman')->__('Html'),
80
- '0' => Mage::helper('postman')->__('Text'),
81
- ),
82
- ));
83
-
84
- $fieldset->addField('subscriber_status', 'checkbox', array(
85
- 'label' => Mage::helper('postman')->__('Confirmed') . '?',
86
- 'class' => 'entry',
87
- 'required' => false,
88
- 'onclick' => 'this.value = this.checked ? 1 : 0;',
89
- 'name' => 'subscriber_status',
90
- ));
91
-
92
- if($subscriberStatus == 1 || $subscriberStatus == 9) {
93
- $form->getElement('subscriber_status')->setIsChecked(true);
94
- } else {
95
- $form->getElement('subscriber_status')->setIsChecked(false);
96
- }
97
- $model->setIsEnabled(!empty($postData['subscriber_status']));
98
-
99
-
100
- if ($model->getId()) {
101
- $fieldset->addField('subscriber_id',
102
- 'hidden',
103
- array('name' => 'subscriber_id')
104
- );
105
- }
106
-
107
- $form->setValues($model);
108
- $this->setForm($form);
109
-
110
- return parent::_prepareForm();
111
-
112
- }
113
- }
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tab Main
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form
36
+ {
37
+ /**
38
+ * Method to prepare edit form
39
+ *
40
+ * @access protected
41
+ * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tab_Main
42
+ */
43
+ protected function _prepareForm()
44
+ {
45
+
46
+ $model = Mage::registry('subscriber_subscriber_data');
47
+
48
+ $subscriberStatus = $model->getSubscriberStatus();
49
+
50
+ $form = new Varien_Data_Form(array(
51
+ 'id' => 'edit_form',
52
+ 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id'))),
53
+ 'method' => 'post',
54
+ )
55
+ );
56
+
57
+ $fieldset = $form->addFieldset('subscribers_form', array('legend'=>Mage::helper('postman')->__('Subscriber details')));
58
+
59
+ $fieldset->addField('subscriber_name', 'text', array(
60
+ 'label' => Mage::helper('postman')->__('Name'),
61
+ 'class' => 'entry',
62
+ 'required' => false,
63
+ 'name' => 'subscriber_name',
64
+ ));
65
+
66
+ $fieldset->addField('subscriber_email', 'text', array(
67
+ 'label' => Mage::helper('postman')->__('E-mail'),
68
+ 'required' => true,
69
+ 'name' => 'subscriber_email',
70
+ ));
71
+
72
+ $fieldset->addField('subscriber_emailformat', 'select', array(
73
+ 'label' => Mage::helper('postman')->__('E-mail format'),
74
+ 'title' => Mage::helper('postman')->__('E-mail format'),
75
+ 'name' => 'subscriber_emailformat',
76
+ 'required' => true,
77
+ 'options' => array(
78
+ '2' => Mage::helper('postman')->__('Multipart'),
79
+ '1' => Mage::helper('postman')->__('Html'),
80
+ '0' => Mage::helper('postman')->__('Text'),
81
+ ),
82
+ ));
83
+
84
+ $fieldset->addField('subscriber_status', 'checkbox', array(
85
+ 'label' => Mage::helper('postman')->__('Confirmed') . '?',
86
+ 'class' => 'entry',
87
+ 'required' => false,
88
+ 'onclick' => 'this.value = this.checked ? 1 : 0;',
89
+ 'name' => 'subscriber_status',
90
+ ));
91
+
92
+ if($subscriberStatus == 1 || $subscriberStatus == 9) {
93
+ $form->getElement('subscriber_status')->setIsChecked(true);
94
+ } else {
95
+ $form->getElement('subscriber_status')->setIsChecked(false);
96
+ }
97
+ $model->setIsEnabled(!empty($postData['subscriber_status']));
98
+
99
+
100
+ if ($model->getId()) {
101
+ $fieldset->addField('subscriber_id',
102
+ 'hidden',
103
+ array('name' => 'subscriber_id')
104
+ );
105
+ }
106
+
107
+ $form->setValues($model);
108
+ $this->setForm($form);
109
+
110
+ return parent::_prepareForm();
111
+
112
+ }
113
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Subscribers/Edit/Tabs.php CHANGED
@@ -1,78 +1,75 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tabs
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
36
- {
37
- /**
38
- * Constructor
39
- *
40
- * @access public
41
- */
42
- public function __construct()
43
- {
44
- parent::__construct();
45
- $this->setId('subscribers_subscribers_tabs');
46
- $this->setDestElementId('edit_form');
47
- $this->setTitle(Mage::helper('postman')->__('Subscriber'));
48
- }
49
-
50
- /**
51
- * Method to set the tabs
52
- *
53
- * @access protected
54
- * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tabs
55
- */
56
- protected function _beforeToHtml()
57
- {
58
-
59
-
60
-
61
- $this->addTab('main_section', array(
62
- 'label' => Mage::helper('postman')->__('Details'),
63
- 'title' => Mage::helper('postman')->__('Details'),
64
- 'content' => $this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tab_main')->toHtml(),
65
- 'active' => ( $this->getRequest()->getParam('tab') == 'lists_section' ) ? true : false,
66
- ))
67
- ;
68
-
69
- $this->addTab('lists_section', array(
70
- 'label' => Mage::helper('postman')->__('Mailing lists'),
71
- 'title' => Mage::helper('postman')->__('Mailing lists'),
72
- 'content' => $this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tab_lists')->toHtml(),
73
- 'active' => ( $this->getRequest()->getParam('tab') == 'lists_section' ) ? true : false,
74
- ));
75
-
76
- return parent::_beforeToHtml();
77
- }
78
- }
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Block Adminhtml Subscribers Subscribers Edit Tabs
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
36
+ {
37
+ /**
38
+ * Constructor
39
+ *
40
+ * @access public
41
+ */
42
+ public function __construct()
43
+ {
44
+ parent::__construct();
45
+ $this->setId('subscribers_subscribers_tabs');
46
+ $this->setDestElementId('edit_form');
47
+ $this->setTitle(Mage::helper('postman')->__('Subscriber'));
48
+ }
49
+
50
+ /**
51
+ * Method to set the tabs
52
+ *
53
+ * @access protected
54
+ * @return DMK_Postman_Block_Adminhtml_Subscribers_Subscribers_Edit_Tabs
55
+ */
56
+ protected function _beforeToHtml()
57
+ {
58
+ $this->addTab('main_section', array(
59
+ 'label' => Mage::helper('postman')->__('Details'),
60
+ 'title' => Mage::helper('postman')->__('Details'),
61
+ 'content' => $this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tab_main')->toHtml(),
62
+ 'active' => ( $this->getRequest()->getParam('tab') == 'lists_section' ) ? true : false,
63
+ ))
64
+ ;
65
+
66
+ $this->addTab('lists_section', array(
67
+ 'label' => Mage::helper('postman')->__('Mailing lists'),
68
+ 'title' => Mage::helper('postman')->__('Mailing lists'),
69
+ 'content' => $this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tab_lists')->toHtml(),
70
+ 'active' => ( $this->getRequest()->getParam('tab') == 'lists_section' ) ? true : false,
71
+ ));
72
+
73
+ return parent::_beforeToHtml();
74
+ }
75
+ }
 
 
 
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Testrecipients.php CHANGED
@@ -47,6 +47,7 @@ class DMK_Postman_Block_Adminhtml_Subscribers_Testrecipients extends Mage_Adminh
47
 
48
  parent::__construct();
49
 
 
50
  $this->updateButton('add', 'label', Mage::helper('postman')->__('Add testrecipient'));
51
  }
52
 
47
 
48
  parent::__construct();
49
 
50
+ $this->setTemplate('postman/grid/container.phtml');
51
  $this->updateButton('add', 'label', Mage::helper('postman')->__('Add testrecipient'));
52
  }
53
 
app/code/local/DMK/Postman/Block/Adminhtml/Subscribers/Testrecipients/Edit/Form.php CHANGED
@@ -40,56 +40,75 @@ class DMK_Postman_Block_Adminhtml_Subscribers_Testrecipients_Edit_Form extends M
40
  * @access protected
41
  * @return DMK_Postman_Block_Adminhtml_Subscribers_Testrecipients_Edit_Form
42
  */
43
- protected function _prepareForm()
44
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- $model = Mage::registry('subscriber_testrecipient_data');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- $form = new Varien_Data_Form(array(
49
- 'id' => 'edit_form',
50
- 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id'))),
51
- 'method' => 'post',
52
- )
53
- );
54
-
55
- $fieldset = $form->addFieldset('edit_testrecipient_form', array('legend' => Mage::helper('postman')->__('Edit testrecipient')));
56
 
57
- $fieldset->addField('subscriber_name', 'text', array(
58
- 'label' => Mage::helper('postman')->__('Name'),
59
- 'class' => 'required-entry',
60
- 'required' => false,
61
- 'name' => 'subscriber_name',
62
- ));
 
63
 
64
- $fieldset->addField('subscriber_email', 'text', array(
65
- 'label' => Mage::helper('postman')->__('E-mail'),
66
- 'class' => 'required-entry',
67
- 'required' => true,
68
- 'name' => 'subscriber_email',
69
- ));
70
-
71
- $fieldset->addField('subscriber_emailformat', 'select', array(
72
- 'label' => Mage::helper('postman')->__('E-mail format'),
73
- 'title' => Mage::helper('postman')->__('E-mail format'),
74
- 'name' => 'subscriber_emailformat',
75
- 'required' => true,
76
- 'options' => array(
77
- '2' => Mage::helper('postman')->__('Multipart'),
78
- '1' => Mage::helper('postman')->__('Html'),
79
- '0' => Mage::helper('postman')->__('Text'),
80
- ),
81
- ));
82
 
83
- if ($model->getId()) {
84
- $fieldset->addField('subscriber_id', 'hidden', array(
85
- 'name' => 'subscriber_id',
86
- ));
87
- }
 
 
 
 
 
88
 
89
- $form->setValues($model->getData());
90
- $form->setUseContainer(true);
91
- $this->setForm($form);
92
- return parent::_prepareForm();
93
- }
94
-
95
  }
40
  * @access protected
41
  * @return DMK_Postman_Block_Adminhtml_Subscribers_Testrecipients_Edit_Form
42
  */
43
+ protected function _prepareForm()
44
+ {
45
+ $model = Mage::registry('subscriber_testrecipient_data');
46
+ $form = new Varien_Data_Form(array(
47
+ 'id' => 'edit_form',
48
+ 'action' => $this->getUrl('*/*/save', array('subscriber_id' => $model->getId())),
49
+ 'method' => 'post',
50
+ )
51
+ );
52
+
53
+ $fieldset = $form->addFieldset('edit_testrecipient_form', array('legend' => Mage::helper('postman')->__('Edit testrecipient')));
54
+ $fieldset->addField('subscriber_name', 'text', array(
55
+ 'label' => Mage::helper('postman')->__('Name'),
56
+ 'class' => 'required-entry',
57
+ 'required' => true,
58
+ 'name' => 'subscriber_name',
59
+ ));
60
 
61
+ $fieldset->addField('subscriber_email', 'text', array(
62
+ 'label' => Mage::helper('postman')->__('E-mail'),
63
+ 'class' => 'required-entry',
64
+ 'required' => true,
65
+ 'name' => 'subscriber_email',
66
+ ));
67
+
68
+ $fieldset->addField('subscriber_emailformat', 'select', array(
69
+ 'label' => Mage::helper('postman')->__('E-mail format'),
70
+ 'title' => Mage::helper('postman')->__('E-mail format'),
71
+ 'name' => 'subscriber_emailformat',
72
+ 'required' => true,
73
+ 'options' => array(
74
+ '2' => Mage::helper('postman')->__('Multipart'),
75
+ '1' => Mage::helper('postman')->__('Html'),
76
+ '0' => Mage::helper('postman')->__('Text'),
77
+ ),
78
+ ));
79
 
80
+ $form->setValues($model->getData());
 
 
 
 
 
 
 
81
 
82
+ // Show mailing lists
83
+ $fieldset = $form->addFieldset(
84
+ 'subscribers_form',
85
+ array('legend'=>Mage::helper('postman')->__('Mailing lists'))
86
+ );
87
+ $lists = Mage::getModel('postman/lists')->getListsAsOptionArray();
88
+ $selLists = $model->getListsAsOptionArray();
89
 
90
+ $fieldset->addField('lists', 'multiselect', array(
91
+ 'name' => 'lists[]',
92
+ 'label' => Mage::helper('postman')->__('Mailing lists'),
93
+ 'title' => Mage::helper('postman')->__('Mailing lists'),
94
+ 'required' => true,
95
+ 'values' => $lists,
96
+ 'value' => $selLists,
97
+ ));
 
 
 
 
 
 
 
 
 
 
98
 
99
+ if($model->getId()) {
100
+ $fieldset->addField(
101
+ 'subscriber_id',
102
+ 'hidden',
103
+ array(
104
+ 'name' => 'subscriber_id',
105
+ 'value' => $model->getId()
106
+ )
107
+ );
108
+ }
109
 
110
+ $form->setUseContainer(true);
111
+ $this->setForm($form);
112
+ return parent::_prepareForm();
113
+ }
 
 
114
  }
app/code/local/DMK/Postman/Block/Adminhtml/Widget/Grid/Column.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Adminhtml_Widget_Grid_Column extends Mage_Adminhtml_Block_Widget_Grid_Column
4
+ {
5
+
6
+ /**
7
+ * Retrieve row column field value for display
8
+ *
9
+ * @param Varien_Object $row
10
+ * @return string
11
+ */
12
+ public function getRowField(Varien_Object $row)
13
+ {
14
+ $renderedValue = Mage::helper('postman')->__($this->getRenderer()->render($row));
15
+ if ($this->getHtmlDecorators()) {
16
+ $renderedValue = $this->_applyDecorators($renderedValue, $this->getHtmlDecorators());
17
+ }
18
+
19
+ /*
20
+ * if column has determined callback for framing call
21
+ * it before give away rendered value
22
+ *
23
+ * callback_function($renderedValue, $row, $column, $isExport)
24
+ * should return new version of rendered value
25
+ */
26
+ $frameCallback = $this->getFrameCallback();
27
+ if (is_array($frameCallback)) {
28
+ $renderedValue = call_user_func($frameCallback, $renderedValue, $row, $this, false);
29
+ }
30
+
31
+ return $renderedValue;
32
+ }
33
+ }
app/code/local/DMK/Postman/Block/Adminhtml/Widget/Grid/Column/Renderer/Action.php CHANGED
@@ -64,7 +64,6 @@ class DMK_Postman_Block_Adminhtml_Widget_Grid_Column_Renderer_Action extends Mag
64
 
65
  $out .= '<option value=""></option>';
66
 
67
-
68
  $i = 0;
69
  foreach ($actions as $action){
70
  $i++;
@@ -75,4 +74,36 @@ class DMK_Postman_Block_Adminhtml_Widget_Grid_Column_Renderer_Action extends Mag
75
  $out .= '</select>';
76
  return $out;
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
64
 
65
  $out .= '<option value=""></option>';
66
 
 
67
  $i = 0;
68
  foreach ($actions as $action){
69
  $i++;
74
  $out .= '</select>';
75
  return $out;
76
  }
77
+
78
+ /**
79
+ * Render single action as link html
80
+ *
81
+ * @param array $action
82
+ * @param Varien_Object $row
83
+ * @return string
84
+ */
85
+ protected function _toLinkHtml($action, Varien_Object $row)
86
+ {
87
+ $actionAttributes = new Varien_Object();
88
+
89
+ $actionCaption = '';
90
+ $this->_transformActionData($action, $actionCaption, $row);
91
+
92
+ if(isset($action['confirm'])) {
93
+ $action['onclick'] = 'return window.confirm(\''
94
+ . addslashes($this->htmlEscape($action['confirm']))
95
+ . '\')';
96
+ unset($action['confirm']);
97
+ }
98
+
99
+ $actionAttributes->setData($action);
100
+
101
+ if(isset($action['nolink'])) {
102
+ if($action['nolink'] == true) {
103
+ return $actionCaption;
104
+ }
105
+ }
106
+
107
+ return '<a ' . $actionAttributes->serialize() . '>' . $actionCaption . '</a>';
108
+ }
109
  }
app/code/local/DMK/Postman/Block/Frontend/Customer/Account/Dashboard.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Frontend_Customer_Account_Dashboard extends Mage_Customer_Block_Account_Dashboard
4
+ {
5
+ protected $_subscription = null;
6
+
7
+ public function getSubscriptionObject()
8
+ {
9
+ if(is_null($this->_subscription)) {
10
+ $model = Mage::getModel('postman/subscribers_subscribers')
11
+ ->load(Mage::getSingleton('customer/session')->getCustomer()
12
+ ->getId(),
13
+ 'customer_id'
14
+ );
15
+ $this->_subscription = $model;
16
+ }
17
+
18
+ return $this->_subscription;
19
+ }
20
+ }
app/code/local/DMK/Postman/Block/Frontend/Customer/Account/Dashboard/Info.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Frontend_Customer_Account_Dashboard_Info
4
+ extends Mage_Customer_Block_Account_Dashboard_Info
5
+ {
6
+ /**
7
+ * Get Customer Subscription Object Information
8
+ *
9
+ * @return Mage_Newsletter_Model_Subscriber
10
+ */
11
+ public function getSubscriptionObject()
12
+ {
13
+ if(is_null($this->_subscription)) {
14
+ $model = Mage::getModel('postman/subscribers_subscribers')
15
+ ->load(Mage::getSingleton('customer/session')->getCustomer()
16
+ ->getId(),
17
+ 'customer_id'
18
+ );
19
+ $this->_subscription = $model;
20
+ }
21
+ return $this->_subscription;
22
+ }
23
+
24
+ /**
25
+ * Gets Customer subscription status
26
+ *
27
+ * @return bool
28
+ */
29
+ public function getIsSubscribed()
30
+ {
31
+ return $this->getSubscriptionObject()->getSubscriberStatus();
32
+ }
33
+
34
+ }
app/code/local/DMK/Postman/Block/Frontend/Customer/Form/Register.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Frontend_Customer_Form_Register extends Mage_Customer_Block_Form_Register
4
+ {
5
+
6
+ /**
7
+ * Newsletter module availability for both
8
+ * internal newsletter system and/or mkpostman
9
+ *
10
+ * @return boolean
11
+ */
12
+ public function isNewsletterEnabled()
13
+ {
14
+ if(!Mage::getStoreConfigFlag('advanced/modules_disable_output/Mage_Newsletter')
15
+ && !Mage::getStoreConfig('postman_general/sending_settings/enabled')
16
+ ) {
17
+ return false;
18
+ }
19
+
20
+ return true;
21
+ }
22
+
23
+ }
app/code/local/DMK/Postman/Block/Frontend/Customer/Newsletter.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Frontend_Customer_Newsletter extends DMK_Postman_Block_Frontend_Customer_Account_Dashboard // Mage_Core_Block_Template
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setTemplate('customer/form/newsletter.phtml');
10
+ }
11
+
12
+ public function getIsSubscribed()
13
+ {
14
+ return $this->getSubscriptionObject()->getSubscriberStatus();
15
+ }
16
+
17
+ public function getAction()
18
+ {
19
+ return $this->getUrl('*/*/save');
20
+ }
21
+
22
+ }
app/code/local/DMK/Postman/Block/Frontend/Newsletter/Registration.php CHANGED
@@ -4,7 +4,7 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
4
 
5
  /**
6
  * Get the disclaimer link from backend
7
- *
8
  * @return string
9
  */
10
  public function getDisclaimerLink()
@@ -15,7 +15,7 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
15
 
16
  /**
17
  * Look for setting is Disclaimer active
18
- *
19
  * @return bool
20
  */
21
  public function showDisclaimer()
@@ -26,7 +26,7 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
26
 
27
  /**
28
  * Look for setting is name obligation
29
- *
30
  * @return bool
31
  */
32
  public function isNameObligation()
@@ -37,7 +37,7 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
37
 
38
  /**
39
  * Look for setting is name active and set the Zend_Form_Element
40
- *
41
  * @return array (Zend_Form_Element)
42
  */
43
  public function getNameField()
@@ -72,24 +72,41 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
72
 
73
 
74
  public function getDisclaimerField(){
75
- return array('checkbox', 'checkbox', array(
76
- 'class' => 'validate-one-required'
77
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
80
 
81
  public function clientIP()
82
  {
83
- if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
84
- $TheIp=$_SERVER['HTTP_X_FORWARDED_FOR'];
85
- else $TheIp=$_SERVER['REMOTE_ADDR'];
86
-
87
- $TheIp = trim($TheIp);
 
88
 
89
- return array('text', 'clientip', array(
90
- 'value' => $TheIp,
91
- 'class' => 'hidden'
92
- ));
93
  }
94
 
95
 
@@ -101,7 +118,9 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
101
  */
102
  public function getFormActionUrl()
103
  {
104
- return $this->getUrl('postman/index/newslettersubscriber/new', array('_secure' => true));
 
 
105
  }
106
 
107
 
@@ -120,20 +139,17 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
120
  $view = new Zend_View;
121
  $form = new Zend_Form;
122
 
123
- $linkdecorator = array(
124
- array('Description', array('escape'=>false)),
125
- );
126
-
127
- $link= $form->createElement('hidden', 'link')
128
- ->setDescription('<a href="' . $this->getDisclaimerLink(). '">' . __('Disclaimer') . '</a>')
129
- ->setDecorators($linkdecorator);
130
  $wantNewsletter = $form->createElement('hidden', 'wantnewsletter');
131
  $wantNewsletter->setValue(1);
132
-
133
- $elements = array($this->getNameField(), $this->getEmailField(),
134
- $this->getDisclaimerField(), $link, $wantNewsletter,
135
- $this->getSubmit());
136
 
 
 
 
 
 
 
 
 
137
 
138
 
139
  $form->setAttrib('id', 'postmanForm')
@@ -324,10 +340,7 @@ class DMK_Postman_Block_Frontend_Newsletter_Registration extends Mage_Core_Block
324
  $model->save();
325
 
326
  //Send the mail
327
- Mage::helper('postman/Email')->sendEmail($clName, $clEmail,
328
- '', '',
329
- 'register', $emailformat,
330
- $subscriberActivation);
331
 
332
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
333
  'name' => 'main-msg-block',
4
 
5
  /**
6
  * Get the disclaimer link from backend
7
+ * @access public
8
  * @return string
9
  */
10
  public function getDisclaimerLink()
15
 
16
  /**
17
  * Look for setting is Disclaimer active
18
+ * @access public
19
  * @return bool
20
  */
21
  public function showDisclaimer()
26
 
27
  /**
28
  * Look for setting is name obligation
29
+ * @access public
30
  * @return bool
31
  */
32
  public function isNameObligation()
37
 
38
  /**
39
  * Look for setting is name active and set the Zend_Form_Element
40
+ * @access public
41
  * @return array (Zend_Form_Element)
42
  */
43
  public function getNameField()
72
 
73
 
74
  public function getDisclaimerField(){
75
+ $dis = new Zend_Form_Element_Checkbox('disclaimer');
76
+ $dis->setLabel('<a href="'.$this->getDisclaimerLink().'">'.__('Disclaimer').'</a>')
77
+ ->setAttrib('class', 'required-entry')
78
+ ->setValue(0)
79
+ ->setDecorators(
80
+ array(
81
+ array(
82
+ 'ViewHelper',
83
+ array('helper'=>'formCheckbox')
84
+ ),
85
+ array(
86
+ 'Label',
87
+ array('placement'=>'APPEND','escape'=>false, 'class'=>'inline')
88
+ ),
89
+ array(
90
+ 'HtmlTag',
91
+ array('tag'=> 'dd','id'=>'disclaimer-element')
92
+ ),
93
+ )
94
+ );
95
+
96
+ return $dis;
97
  }
98
 
99
 
100
  public function clientIP()
101
  {
102
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
103
+ $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
104
+ } else {
105
+ $ip=$_SERVER['REMOTE_ADDR'];
106
+ }
107
+ $ip = trim($ip);
108
 
109
+ return $ip;
 
 
 
110
  }
111
 
112
 
118
  */
119
  public function getFormActionUrl()
120
  {
121
+ return $this->getUrl('postman/index/newslettersubscriber/new',
122
+ array('_secure' => true)
123
+ );
124
  }
125
 
126
 
139
  $view = new Zend_View;
140
  $form = new Zend_Form;
141
 
 
 
 
 
 
 
 
142
  $wantNewsletter = $form->createElement('hidden', 'wantnewsletter');
143
  $wantNewsletter->setValue(1);
 
 
 
 
144
 
145
+ if($this->showDisclaimer()) {
146
+ $elements = array($this->getNameField(), $this->getEmailField(),
147
+ $this->getDisclaimerField(), $wantNewsletter,
148
+ $this->getSubmit());
149
+ } else {
150
+ $elements = array($this->getNameField(), $this->getEmailField(),
151
+ $wantNewsletter,$this->getSubmit());
152
+ }
153
 
154
 
155
  $form->setAttrib('id', 'postmanForm')
340
  $model->save();
341
 
342
  //Send the mail
343
+ Mage::dispatchEvent('send_register_email',array('model'=>$model));
 
 
 
344
 
345
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
346
  'name' => 'main-msg-block',
app/code/local/DMK/Postman/Block/Widget/Product.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Block_Widget_Product extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface {
4
+
5
+ protected function _toHtml() {
6
+
7
+ if ($this->getData('id_path')) {
8
+ return $this->getProductHtml();
9
+ }
10
+
11
+ return;
12
+ }
13
+
14
+ /**
15
+ * Holt alle Preishelfer und baut
16
+ * das HTML für die Ausgabe zusammen
17
+ * @access public
18
+ * @param mixed $params
19
+ * @return string
20
+ */
21
+ public static function getProductHtml($params = "") {
22
+
23
+ //Preis Helfer
24
+ $_taxHelper = Mage::helper('tax');
25
+ $_coreHelper = Mage::helper('core');
26
+ $_weeeHelper = Mage::helper('weee');
27
+
28
+ // Lädt alle eingestellten Werte des Widgets
29
+ if(!empty($params)) {
30
+ if(!is_array($params)) {
31
+ $showProductName = $this->getData('show_product_name');
32
+ $showProductImage = $this->getData('show_product_image');
33
+ $showProductPrice = $this->getData('show_product_price');
34
+ $showProductDescription = $this->getData('show_product_description');
35
+
36
+ //Splitet url Struktur auf
37
+ $id_path = $this->getData('id_path');
38
+
39
+ } else {
40
+ $showProductName = $params['show_product_name'];
41
+ $showProductImage = $params['show_product_image'];
42
+ $showProductPrice = $params['show_product_price'];
43
+ $showProductDescription = $params['show_product_description'];
44
+ $id_path = $params['id_path'];
45
+ }
46
+ }
47
+
48
+ preg_match('/[0-9]/', $id_path, $tmpMatch);
49
+ $productId = $tmpMatch[0];
50
+
51
+ //Lädt Produkt
52
+ $product = Mage::getModel('catalog/product')->load($productId);
53
+
54
+ $_finalPriceInclTax = $_taxHelper->getPrice($product, $product->getFinalPrice(), true);
55
+ $_weeeTaxAmount = $_weeeHelper->getAmount($product);
56
+
57
+ //HTML Aufbau
58
+ $html = '<div class="dmk-widget-product">';
59
+
60
+ //Fügt gewählte Werte dem HTML hinzu
61
+ if($showProductName == "true")
62
+ $html .= '<div class="product-name"><a href="' . Mage::app()->getDefaultStoreView()->getBaseUrl(). $product->getUrlPath() . '" title="' . $product->getName() . '">'.$product->getName() .'</a></div>';
63
+
64
+ if($product->getImage() != "no_selection" && $product->getImage() != "null") {
65
+ if($showProductImage == "true")
66
+ $html .= '<div class="product-name"><a href="' . Mage::app()->getDefaultStoreView()->getBaseUrl(). $product->getUrlPath() . '"><img src="' . Mage::helper('catalog/image')->init($product, 'small_image')->resize(163, 100) . '" /></a></div>';
67
+ }
68
+
69
+ if($showProductPrice == "true")
70
+ $html .= '<div class="product-price">' . $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) . '</div>';
71
+
72
+ if($showProductDescription == "true")
73
+ $html .= '<div class="product-description">' . $product->getDescription() . '</div>';
74
+
75
+
76
+ $html .= '</div>';
77
+
78
+ return $html;
79
+ }
80
+ }
app/code/local/DMK/Postman/Helper/Data.php CHANGED
@@ -1,36 +1,46 @@
1
  <?php
2
 
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- /**
29
- * DMK Postman Helper Data
30
- *
31
- * @package DMK Postman
32
- */
33
  class DMK_Postman_Helper_Data extends Mage_Core_Helper_Abstract
34
  {
35
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  class DMK_Postman_Helper_Data extends Mage_Core_Helper_Abstract
4
  {
5
+ /**
6
+ * Insert the poweredby at the end of the newsletter
7
+ * @access public
8
+ * @param string $content newsletter text
9
+ * @param boolean $inlineStyle set inline css
10
+ * @return string
11
+ */
12
+ public function insertPoweredBy($content, $inlineStyle=false)
13
+ {
14
+ $content = preg_replace('/<\/body>/', $this->getPoweredBy($inlineStyle).'</body>', $content);
15
+ return $content;
16
+ }
17
+
18
+ /**
19
+ * Generates the 'Powered by MKPostman' text
20
+ * @access public
21
+ * @param boolean $inlineStyle set inline css
22
+ * @return string Return the Powered by MKPostman text
23
+ */
24
+ public function getPoweredBy($inlineStyle=false)
25
+ {
26
+ $pb = '';
27
+ if($inlineStyle) {
28
+ $pb .= '<span style="font-size:10px;">'
29
+ . 'Powered by <a href="http://www.mkpostman.de">MKPostman</a>'
30
+ . '</span>';
31
+ } else {
32
+ $pb .= '<span id="pbmkp">'
33
+ . 'Powered by MKPostman '
34
+ . '(<a href="http://www.mkpostman.de">www.mkpostman.de</a>)'
35
+ . '</span>';
36
+ }
37
+
38
+ return $pb;
39
+ }
40
+
41
+ public function insertTracking($snippet, $content)
42
+ {
43
+ $content = preg_replace('/<\/body>/', $snippet.'</body>', $content);
44
+ return $content;
45
+ }
46
  }
app/code/local/DMK/Postman/Helper/Email.php CHANGED
@@ -1,45 +1,10 @@
1
  <?php
2
 
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
25
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
- */
27
-
28
- /**
29
- * DMK Postman Helper Email
30
- *
31
- * @package DMK Postman
32
- */
33
-
34
-
35
  class DMK_Postman_Helper_Email extends Mage_Core_Helper_Abstract {
36
 
37
-
38
- /*
39
- * Check: User email already saved?
40
- *
41
  * @param string $email new accountname
42
- *
43
  * @return bool
44
  */
45
  public function checkForUserEmail($email)
@@ -59,12 +24,12 @@ class DMK_Postman_Helper_Email extends Mage_Core_Helper_Abstract {
59
  }
60
  }
61
 
62
- /*
63
  * Check: User url and is check is already active?
64
  *
 
65
  * @param string $url to check, int $subscriberstatus look for current status
66
- *
67
- * @return bool
68
  */
69
  public function checkActivationUrl($url, $subscriberstatus){
70
  $filtertable = '';
@@ -82,113 +47,79 @@ class DMK_Postman_Helper_Email extends Mage_Core_Helper_Abstract {
82
  return $collection->getFirstItem();
83
  }
84
 
85
- /*
86
- * Send activation Email to customer
87
- * You can use customerName, customerEmail
88
- * and activationLink in your email template
89
- *
90
- * @param string $clName new accountname
91
- * @param string $clEmail new email
92
- * @param string $neSubject email subject
93
- * @param string $neContent whole email content
94
- * @param string $action register|sendnews|sendnewstest
95
- * @param string $format html|text|multi
96
- * @param string $subscriberActivation link to activate the account
97
- *
98
- * @return null
99
  */
100
- public function sendEmail($clName, $clEmail,
101
- $neSubject, $neContent,
102
- $action, $format,
103
- $subscriberActivationLink='')
104
  {
105
- // sending settings enabled ?
106
- $canSend = Mage::getStoreConfig('postman_general/sending_settings/enabled');
107
-
108
- if($canSend) {
109
-
110
- // Set variables that can be used in email template
111
- $vars = array(
112
- 'customerName' => $clName,
113
- 'customerEmail' => $clEmail,
114
- 'neSubject' => $neSubject,
115
- 'neContent' => $neContent,
116
- );
117
-
118
- // Decide which email template should be used
119
- // register - new user has been registered via frontend
120
- // sendnews - sending normal newsletter, f. ex. via backend "Sende Newsletter"
121
- switch($action) {
122
- case 'register':
123
- $templateId = Mage::getStoreConfig('postman_general/registration_settings/default_registration_template');
124
- $vars['activationLink'] = $subscriberActivationLink;
125
- break;
126
-
127
- case 'sendnews':
128
- $templateId = Mage::getStoreConfig('postman_general/sending_settings/sending_email_template');
129
- break;
130
-
131
- case 'sendnewstest':
132
- $templateId = Mage::getStoreConfig('postman_general/sending_settings/sending_testmail_template');
133
- break;
134
- }
135
-
136
- // Set sender information
137
- $senderName = Mage::getStoreConfig('postman_general/sending_settings/default_sender_name');
138
- $senderEmail = Mage::getStoreConfig('postman_general/sending_settings/default_sender_email');
139
- $sender = array('name' => $senderName,
140
- 'email' => $senderEmail);
141
-
142
- // Default reply email
143
- $replyEmail = Mage::getStoreConfig('postman_general/sending_settings/default_reply_email');
144
-
145
- // Return-Path
146
- $returnPath = Mage::getStoreConfig('postman_general/sending_settings/default_return_path');
147
- $tmpSplitArr = explode('@', $returnPath);
148
- $returnPath = $tmpSplitArr[0] . '@' . $tmpSplitArr[1];
149
 
150
- // Set recepient information
151
- $recepientName = $clName;
152
- $recepientEmail = $clEmail;
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
- // Get Store ID
155
- $storeId = Mage::app()->getStore()->getId();
156
-
157
- $translate = Mage::getSingleton('core/translate');
158
 
159
- // Send Transactional Email
160
- try {
161
- $model = Mage::getModel('core/email_template');
162
- $model->setEmailFormat($format);
163
- $model->setReturnPath($returnPath)
164
- ->setReplyTo($replyEmail)
165
- ->sendTransactional($templateId, $sender, $recepientEmail,
166
- $recepientName, $vars, $storeId);
167
 
168
- $translate->setTranslateInline(true);
169
- return true;
170
- } catch (Exception $e) {
171
- Mage::log($e->getMessage());
172
- return false;
173
- }
174
- } else {
175
- // Sending is disabled.
176
- Mage::log('Sending emails is not enabled');
177
- }
178
 
 
 
 
 
 
 
 
 
 
179
  }
180
 
181
  /**
182
- * Method to check if emailaddress and format already exists
183
- *
184
- * @param string $subscriber_email
185
- * @param int $subscriber_emailformat
186
  */
187
- public function checkDuplicateEmailFormat($subscriber_email, $subscriber_emailformat, $subscriber_id)
188
- {
189
- $model = Mage::getModel('postman/subscribers_subscribers');
190
- $id = $model->getIdByEmailAndFormat($subscriber_email, $subscriber_emailformat, $subscriber_id);
191
 
192
- return $id ? true : false;
 
 
 
 
 
 
 
 
 
 
 
 
193
  }
194
  }
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  class DMK_Postman_Helper_Email extends Mage_Core_Helper_Abstract {
4
 
5
+ /**
6
+ * Check: User email already saved?
 
 
7
  * @param string $email new accountname
 
8
  * @return bool
9
  */
10
  public function checkForUserEmail($email)
24
  }
25
  }
26
 
27
+ /**
28
  * Check: User url and is check is already active?
29
  *
30
+ * @access public
31
  * @param string $url to check, int $subscriberstatus look for current status
32
+ * @return object DMK_Postman_Model_Subscribers_Subscribers
 
33
  */
34
  public function checkActivationUrl($url, $subscriberstatus){
35
  $filtertable = '';
47
  return $collection->getFirstItem();
48
  }
49
 
50
+ /**
51
+ * Method to check if emailaddress and format already exists
52
+ * @access public
53
+ * @param string $subscriber_email
54
+ * @param int $subscriber_emailformat
55
+ * @return bool
 
 
 
 
 
 
 
 
56
  */
57
+ public function checkDuplicateEmailFormat($subscriber_email, $subscriber_emailformat, $subscriber_id)
 
 
 
58
  {
59
+ $model = Mage::getModel('postman/subscribers_subscribers');
60
+ $id = $model->getIdByEmailAndFormat($subscriber_email, $subscriber_emailformat, $subscriber_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
+ return $id ? true : false;
63
+ }
64
+
65
+ /**
66
+ * Get the url for unsubcribe to the newsletter and
67
+ * checks if the url is different to the shop url
68
+ * @access public
69
+ * @param string email address of the receiver
70
+ * @return string
71
+ */
72
+ public function getUnsubscribeUrl($email)
73
+ {
74
+ $url = trim(Mage::getStoreConfig('postman_general/registration_settings/default_cancelsubscription_url'));
75
+ if(empty($url)) {
76
+ $url = 'postman/index/newslettersubscriber/wantnewsletter/0';
77
+ }
78
 
79
+ // check if url is different to store url
80
+ if(!preg_match("/^(http|https)/", $url)) {
81
+ $url = trim(Mage::app()->getStore('default')->getBaseUrl()).$url;
82
+ }
83
 
84
+ $url .= '/clientemail/' . $email;
 
 
 
 
 
 
 
85
 
86
+ return $url;
87
+ }
 
 
 
 
 
 
 
 
88
 
89
+ /**
90
+ * Creates a tracking image
91
+ * @access public
92
+ * @param DMK_Postman_Model_Newsletters_Statistic_Basic $obj
93
+ * @return string returns the url for tracking
94
+ */
95
+ public function createTrackingImgCode($obj) {
96
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)
97
+ . 'track.php?tc=' . $obj->getTrackingCode();
98
  }
99
 
100
  /**
101
+ * Creates an image snippet that can be pasted into the newsletter
102
+ * @access public
103
+ * @param string $url
104
+ * @return string
105
  */
106
+ public function getTrackingImgSnippet($url) {
107
+ return '<!-- Postman Tracking - Do not remove -->'
108
+ . '<img src="' . $url . '" width="1" height="1" />';
109
+ }
110
 
111
+ /*
112
+ * Replaces the inline img tracking code when a newsletter is
113
+ * duplicated from archive
114
+ * @access public
115
+ * @param string $content content of the newsletter
116
+ * @param string $newCode new tracking code
117
+ * @param string $oldCode old tracking code
118
+ * @return string
119
+ */
120
+ public function replaceInlineTrackingCode($content, $newCode, $oldCode)
121
+ {
122
+ $content = preg_replace('/'.$oldCode.'/', $newCode, $content);
123
+ return $content;
124
  }
125
  }
app/code/local/DMK/Postman/Model/Email/Template.php CHANGED
@@ -56,6 +56,55 @@ class DMK_Postman_Model_Email_Template extends Mage_Core_Model_Email_Template
56
  $this->_format = $format;
57
  }
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  /**
60
  * Send mail to recipient
61
  *
56
  $this->_format = $format;
57
  }
58
 
59
+ /**
60
+ * Send transactional email to recipient
61
+ *
62
+ * @param int $templateId
63
+ * @param string|array $sender sender information, can be declared as part of config path
64
+ * @param string $email recipient email
65
+ * @param string $name recipient name
66
+ * @param array $vars variables which can be used in template
67
+ * @param int|null $storeId
68
+ * @param boolean $usePostmanTpl
69
+ * @return Mage_Core_Model_Email_Template
70
+ */
71
+ public function sendTransactional($templateId, $sender, $email, $name, $vars=array(), $storeId=null, $usePostmanTpl=false)
72
+ {
73
+ $this->setSentSuccess(false);
74
+ if (($storeId === null) && $this->getDesignConfig()->getStore()) {
75
+ $storeId = $this->getDesignConfig()->getStore();
76
+ }
77
+
78
+ if(!$usePostmanTpl) {
79
+ if (is_numeric($templateId)) {
80
+ $this->load($templateId);
81
+ } else {
82
+ $localeCode = Mage::getStoreConfig('general/locale/code', $storeId);
83
+ $this->loadDefault($templateId, $localeCode);
84
+ }
85
+
86
+ if (!$this->getId()) {
87
+ throw Mage::exception('Mage_Core', Mage::helper('core')->__('Invalid transactional email code: '.$templateId));
88
+ }
89
+ }
90
+
91
+ if (!is_array($sender)) {
92
+ $this->setSenderName(Mage::getStoreConfig('trans_email/ident_'.$sender.'/name', $storeId));
93
+ $this->setSenderEmail(Mage::getStoreConfig('trans_email/ident_'.$sender.'/email', $storeId));
94
+ } else {
95
+ $this->setSenderName($sender['name']);
96
+ $this->setSenderEmail($sender['email']);
97
+ }
98
+
99
+ if (!isset($vars['store'])) {
100
+ $vars['store'] = Mage::app()->getStore($storeId);
101
+ }
102
+
103
+ $this->setSentSuccess($this->send($email, $name, $vars));
104
+ return $this;
105
+ }
106
+
107
+
108
  /**
109
  * Send mail to recipient
110
  *
app/code/local/DMK/Postman/Model/Lists.php CHANGED
@@ -45,7 +45,7 @@ class DMK_Postman_Model_Lists extends Mage_Core_Model_Abstract
45
  parent::_construct();
46
  $this->_init('postman/lists');
47
  }
48
-
49
  /**
50
  * Method to get the current date and time
51
  *
@@ -145,7 +145,7 @@ class DMK_Postman_Model_Lists extends Mage_Core_Model_Abstract
145
  $this->_getResource()->loadCustomerGroupIds($this);
146
  }
147
 
148
- public function getIdByTitle($title, $storeIds)
149
  {
150
  $resource = Mage::getSingleton('core/resource');
151
  $connection = $resource->getConnection('core_read');
@@ -154,10 +154,31 @@ class DMK_Postman_Model_Lists extends Mage_Core_Model_Abstract
154
  $select = $connection->select('list_id')->from(array('li' => $table))
155
  ->join(array('licg' => $table2),
156
  'li.list_id = licg.list_id')
157
- ->where('li.list_title=?', $title)
158
- ->where('licg.customer_group_id IN (?)', $storeIds);
159
  $result = $connection->fetchOne($select);
160
 
161
  return $result;
162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
45
  parent::_construct();
46
  $this->_init('postman/lists');
47
  }
48
+
49
  /**
50
  * Method to get the current date and time
51
  *
145
  $this->_getResource()->loadCustomerGroupIds($this);
146
  }
147
 
148
+ public function getIdByTitle($title)
149
  {
150
  $resource = Mage::getSingleton('core/resource');
151
  $connection = $resource->getConnection('core_read');
154
  $select = $connection->select('list_id')->from(array('li' => $table))
155
  ->join(array('licg' => $table2),
156
  'li.list_id = licg.list_id')
157
+ ->where('li.list_title=?', $title);
158
+ //->where('licg.customer_group_id IN (?)', $storeIds);
159
  $result = $connection->fetchOne($select);
160
 
161
  return $result;
162
  }
163
+
164
+
165
+ /**
166
+ * Get the mailing lists as option array for easy use in grid view
167
+ * Workaround as the build-in-method of magento does not support
168
+ * fields other than 'name' and 'id'
169
+ * @access public
170
+ * @return array
171
+ */
172
+ public function getListsAsOptionArray()
173
+ {
174
+ $arr = array();
175
+ $obj = $this->getCollection();
176
+ foreach($obj as $li) {
177
+ $arr[] = array(
178
+ 'value' => $li->getData('list_id'),
179
+ 'label' => $li->getData('list_title'),
180
+ );
181
+ }
182
+ return $arr;
183
+ }
184
  }
app/code/local/DMK/Postman/Model/Mysql4/Lists/Collection.php CHANGED
@@ -38,12 +38,12 @@ class DMK_Postman_Model_Mysql4_Lists_Collection extends Mage_Core_Model_Mysql4_C
38
  * Method to initialize the collection
39
  *
40
  * @access public
41
- * @return DMK_Postman_Model_Mysql4_Lists_Collection???
42
  */
43
- public function _construct()
44
- {
45
- $this->_init('postman/lists');
46
- }
47
 
48
  /**
49
  * Method to redefine the default filters
@@ -139,5 +139,19 @@ class DMK_Postman_Model_Mysql4_Lists_Collection extends Mage_Core_Model_Mysql4_C
139
  $this->setSelectStores($stores);
140
 
141
  return $this;
142
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
38
  * Method to initialize the collection
39
  *
40
  * @access public
41
+ * @return DMK_Postman_Model_Mysql4_Lists_Collection
42
  */
43
+ public function _construct()
44
+ {
45
+ $this->_init('postman/lists');
46
+ }
47
 
48
  /**
49
  * Method to redefine the default filters
139
  $this->setSelectStores($stores);
140
 
141
  return $this;
142
+ }
143
+
144
+ /**
145
+ * Check if mailing lists exist
146
+ * @access public
147
+ * @return boolean
148
+ */
149
+ public function exist()
150
+ {
151
+ $select = $this->getConnection()->select()
152
+ ->from($this->getTable('postman/postman_lists'));
153
+ $result = $this->getConnection()->fetchAll($select);
154
+
155
+ return (empty($result) ? false : true);
156
+ }
157
  }
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Queuecontent.php CHANGED
@@ -49,10 +49,10 @@ class DMK_Postman_Model_Mysql4_Newsletters_Queuecontent
49
  /**
50
  * Get sendmailcontent by matching sendmailqueue entry
51
  *
52
- * @param integer $cId sendmailcontent_id
53
  * @param integer $cFormat sendmailcontent_emailformat
54
- *
55
- * @return array $result data set with newsletter content, subject
56
  */
57
  public function getContentByQueue($cId, $cFormat)
58
  {
@@ -64,7 +64,11 @@ class DMK_Postman_Model_Mysql4_Newsletters_Queuecontent
64
 
65
  $result = $this->_getReadAdapter()->fetchAll($select);
66
 
67
- return($result[0]);
 
 
 
 
68
  }
69
 
70
  }
49
  /**
50
  * Get sendmailcontent by matching sendmailqueue entry
51
  *
52
+ * @param integer $cId sendmailcontent_id
53
  * @param integer $cFormat sendmailcontent_emailformat
54
+ *
55
+ * @return array $result data set with newsletter content, subject
56
  */
57
  public function getContentByQueue($cId, $cFormat)
58
  {
64
 
65
  $result = $this->_getReadAdapter()->fetchAll($select);
66
 
67
+ if(!empty($result)) {
68
+ return($result[0]);
69
+ }
70
+
71
+ return null;
72
  }
73
 
74
  }
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Statistic/Basic.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Newsletters_Statistic_Basic extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('postman/postman_newsletters_statistic_basic', 'id');
8
+ }
9
+ }
10
+
11
+ ?>
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Statistic/Basic/Collection.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Newsletters_Statistic_Basic_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ $this->_init('postman/newsletters_statistic_basic');
8
+ }
9
+ }
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Template.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Newsletters_Template
4
+ extends Mage_Core_Model_Mysql4_Abstract
5
+ {
6
+ /**
7
+ * Method to initialize connection
8
+ * @access public
9
+ * @return DMK_Postman_Model_Mysql4_Newsletters_Template
10
+ */
11
+ public function _construct()
12
+ {
13
+ $this->_init('postman/postman_newsletters_template', 'id');
14
+ }
15
+ }
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Template/Collection.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Newsletters_Template_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ /**
6
+ * Method to initialize the collection
7
+ * @access public
8
+ * @return DMK_Postman_Model_Mysql4_Newsletters_Template_Collection
9
+ */
10
+ public function _construct()
11
+ {
12
+ $this->_init('postman/newsletters_template');
13
+ }
14
+ }
15
+ ?>
app/code/local/DMK/Postman/Model/Mysql4/Newsletters/Unsent.php CHANGED
@@ -48,21 +48,35 @@ class DMK_Postman_Model_Mysql4_Newsletters_Unsent extends Mage_Core_Model_Mysql4
48
 
49
  /**
50
  * Method to get recipients
51
- *
52
- * @access public
53
- * @param int $isTest 0|1
54
- * @return object Testrecipients
 
55
  */
56
- public function getRecipients($isTest)
57
  {
58
- $where = $isTest ? 'subscriber_status = 9' // test subscriber
59
- : 'subscriber_status = 1'; // confirmed subscriber
 
 
60
 
61
- $select = $this->_getReadAdapter()->select()
62
- ->from($this->getTable('postman/postman_subscribers'))
63
- ->where($where);
64
 
65
- $result = $this->_getReadAdapter()->fetchAll($select);
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  return($result);
68
  }
@@ -107,13 +121,53 @@ class DMK_Postman_Model_Mysql4_Newsletters_Unsent extends Mage_Core_Model_Mysql4
107
 
108
  /**
109
  * Method to store the newsletters lists
110
- *
111
- * @access public
112
- * @param array $data
 
113
  */
114
- public function saveNewslettersLists($data)
115
  {
116
- $select = $this->_getWriteAdapter()->insert($this->getTable('postman/postman_newsletters_lists'), $data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
  }
48
 
49
  /**
50
  * Method to get recipients
51
+ * @access public
52
+ * @param int $isTest 0|1
53
+ * @param int $newsletterId Id of the newsletter
54
+ * @param array $arrLists Lists of mailing lists
55
+ * @return object Recipients
56
  */
57
+ public function getRecipients($isTest, $newsletterId, $arrLists)
58
  {
59
+ $table = $this->getTable('postman/postman_subscribers') . ' AS sub';
60
+ $newsListsTbl = $this->getTable('postman/postman_newsletters_lists') . ' AS newl';
61
+ $subsListsTbl = $this->getTable('postman/postman_subscribers_lists') . ' AS subl';
62
+ $newsTbl = $this->getTable('postman/postman_newsletters') . ' AS new';
63
 
64
+ $where = $isTest ? 'sub.subscriber_status=9' // test subscriber
65
+ : 'sub.subscriber_status=1'; // confirmed subscriber
 
66
 
67
+ $findinset = implode(',',$arrLists);
68
+
69
+ $qry = 'SELECT ';
70
+ $qry .= 'sub.subscriber_id,sub.subscriber_name,sub.subscriber_email,sub.subscriber_emailformat';
71
+ $qry .= ' FROM ' . $table;
72
+ $qry .= ' JOIN ' . $subsListsTbl . ' ON subl.subscriber_id=sub.subscriber_id';
73
+ $qry .= ' JOIN ' . $newsListsTbl . ' ON newl.list_id=subl.list_id';
74
+ $qry .= ' JOIN ' . $newsTbl . ' ON new.newsletter_id=newl.newsletter_id';
75
+ $qry .= ' WHERE ' . $where;
76
+ $qry .= ' AND new.newsletter_id=' . $newsletterId;
77
+ $qry .= ' AND FIND_IN_SET(subl.list_id,\''.$findinset.'\')';
78
+
79
+ $result = $this->_getReadAdapter()->fetchAll($qry);
80
 
81
  return($result);
82
  }
121
 
122
  /**
123
  * Method to store the newsletters lists
124
+ * @access public
125
+ * @param array $data
126
+ * @param int $id the id of the newsletter
127
+ * @return void
128
  */
129
+ public function saveNewslettersLists($data,$id)
130
  {
131
+ $resource = Mage::getSingleton('core/resource');
132
+ $connection = $resource->getConnection('core_write');
133
+ $table = $resource->getTableName('postman/postman_newsletters_lists');
134
+ $oldListValues = Mage::getSingleton('postman/newsletters_unsent')->getSelectedLists($id);
135
+ $mergeValues = array_merge($oldListValues,$data);
136
+ $mergeValues = array_unique($mergeValues);
137
+ sort($mergeValues);
138
+ $count = count($mergeValues);
139
+
140
+ for($i=0; $i<$count; $i++){
141
+ if(!in_array($mergeValues[$i], $data)) {
142
+ $deleteQry = 'DELETE FROM ' . $table
143
+ . ' WHERE list_id="' . $mergeValues[$i] . '"'
144
+ . ' AND newsletter_id = "' . $id . '"';
145
+ $connection->query($deleteQry);
146
+ }else if(in_array($mergeValues[$i], $data) && !in_array($mergeValues[$i], $oldListValues)){
147
+ $insertQry = 'INSERT INTO ' . $table
148
+ . ' SET list_id="' . $mergeValues[$i] . '",'
149
+ . ' newsletter_id="' . $id . '"';
150
+ $connection->query($insertQry);
151
+ } else if(in_array($mergeValues[$i], $data) && in_array($mergeValues[$i], $oldListValues)){
152
+ continue;
153
+ }
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Method to get the newsletters lists
159
+ * @access public
160
+ * @param int $id the newsletter id
161
+ * @return array
162
+ */
163
+ public function getNewslettersLists($id)
164
+ {
165
+ $select = $this->_getReadAdapter()
166
+ ->select()
167
+ ->from($this->getTable('postman/postman_newsletters_lists'),'list_id')
168
+ ->where('newsletter_id=?', $id);
169
+ $result = $this->_getReadAdapter()->fetchAll($select);
170
+ return $result;
171
  }
172
 
173
  }
app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Import.php CHANGED
@@ -1,127 +1,127 @@
1
- <?php
2
- class DMK_Postman_Model_Mysql4_Subscribers_Import extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- /**
5
- * Count of imported subscribers
6
- *
7
- * @var int
8
- */
9
- protected $_importedRows = 0;
10
-
11
-
12
- public function _construct()
13
- {
14
- $this->_init('postman/subscribers_subscribers', 'subscriber_id');
15
- }
16
-
17
-
18
- public function uploadAndImport(Varien_Object $obj)
19
- {
20
- $data = $obj->getData();
21
- $fileName = $data['value'];
22
- $fieldName = $data['field'];
23
- $saveDir = Mage::getBaseDir('tmp');
24
- $tmpDirFile = $_FILES['groups']['tmp_name']['import_subscribers']['fields'][$fieldName]['value'];
25
-
26
- $io = new Varien_Io_File();
27
- $info = pathinfo($tmpDirFile);
28
- $io->open(array('path' => $info['dirname']));
29
- $io->streamOpen($info['basename'], 'r');
30
-
31
- while (false !== ($csvLine = $io->streamReadCsv())) {
32
- $rowNumber ++;
33
-
34
- if (empty($csvLine)) {
35
- continue;
36
- }
37
-
38
- $row = $this->_getImportRow($csvLine, $rowNumber);
39
- if ($row !== false) {
40
- $importData[] = $row;
41
- $this->_saveImportData($importData);
42
- $importData = array();
43
- }
44
- }
45
- $this->_saveImportData($importData);
46
- $io->streamClose();
47
-
48
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('%s rows have been imported',
49
- $this->_importedRows));
50
-
51
- }
52
-
53
-
54
- private function _getImportRow($row, $rowNumber)
55
- {
56
- // validate row
57
- if (count($row) < 13) {
58
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid postman import format in row #%s',
59
- $rowNumber));
60
- return false;
61
- }
62
-
63
- // validate id
64
- if($row[0] == '' || !preg_match('/[0-9]/', $row[0])) {
65
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid id \'%s\' in row #%s',
66
- $row[0], $rowNumber));
67
- return false;
68
- }
69
-
70
- // validate customer id
71
- if($row[1] == '' || !preg_match('/[0-9]/', $row[0])) {
72
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid customer id \'%s\' in row #%s',
73
- $row[1], $rowNumber));
74
- return false;
75
- }
76
-
77
- // validate subscriber email
78
- if($row[3] == '' || !Zend_Validate::is($row[3], 'EmailAddress')) {
79
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber email \'%s\' in row #%s',
80
- $row[3], $rowNumber));
81
- return false;
82
- }
83
-
84
- // validate subscriber email format
85
- if($row[4] == '' || !preg_match('/[0-9]/', $row[4]) || $row[4] > 2) {
86
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber email format \'%s\' in row #%s',
87
- $row[4], $rowNumber));
88
- return false;
89
- }
90
-
91
- // validate subscriber status
92
- if($row[5] == '' || ($row[5] != 0 && $row[5] != 1 && $row[5] != 9)) {
93
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber status \'%s\' in row #%s',
94
- $row[5], $rowNumber));
95
- return false;
96
- }
97
-
98
- return $row;
99
- }
100
-
101
-
102
- /**
103
- * Save import data batch
104
- *
105
- * @param array $data
106
- * @return DMK_Postman_Model_Mysql4_Subscribers_Import
107
- */
108
- protected function _saveImportData(array $data)
109
- {
110
- if (!empty($data)) {
111
- $columns = array('subscriber_id', 'customer_id', 'subscriber_name',
112
- 'subscriber_email', 'subscriber_emailformat',
113
- 'subscriber_status', 'subscriber_activation',
114
- 'subscriber_editlink', 'subscriber_registration_date',
115
- 'subscriber_registered_by', 'subscriber_registration_ip',
116
- 'subscriber_confirmation_date', 'subscriber_confirmed_by',
117
- );
118
- $table = Mage::getSingleton('core/resource')->getTableName('postman/postman_subscribers');
119
- $this->_getWriteAdapter()->insertArray($table, $columns, $data);
120
- $this->_importedRows += count($data);
121
- }
122
-
123
- return $this;
124
- }
125
-
126
- }
127
  ?>
1
+ <?php
2
+ class DMK_Postman_Model_Mysql4_Subscribers_Import extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ /**
5
+ * Count of imported subscribers
6
+ *
7
+ * @var int
8
+ */
9
+ protected $_importedRows = 0;
10
+
11
+
12
+ public function _construct()
13
+ {
14
+ $this->_init('postman/subscribers_subscribers', 'subscriber_id');
15
+ }
16
+
17
+
18
+ public function uploadAndImport(Varien_Object $obj)
19
+ {
20
+ $data = $obj->getData();
21
+ $fileName = $data['value'];
22
+ $fieldName = $data['field'];
23
+ $saveDir = Mage::getBaseDir('tmp');
24
+ $tmpDirFile = $_FILES['groups']['tmp_name']['import_subscribers']['fields'][$fieldName]['value'];
25
+
26
+ $io = new Varien_Io_File();
27
+ $info = pathinfo($tmpDirFile);
28
+ $io->open(array('path' => $info['dirname']));
29
+ $io->streamOpen($info['basename'], 'r');
30
+
31
+ while (false !== ($csvLine = $io->streamReadCsv())) {
32
+ $rowNumber ++;
33
+
34
+ if (empty($csvLine)) {
35
+ continue;
36
+ }
37
+
38
+ $row = $this->_getImportRow($csvLine, $rowNumber);
39
+ if ($row !== false) {
40
+ $importData[] = $row;
41
+ $this->_saveImportData($importData);
42
+ $importData = array();
43
+ }
44
+ }
45
+ $this->_saveImportData($importData);
46
+ $io->streamClose();
47
+
48
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('%s rows have been imported',
49
+ $this->_importedRows));
50
+
51
+ }
52
+
53
+
54
+ private function _getImportRow($row, $rowNumber)
55
+ {
56
+ // validate row
57
+ if (count($row) < 13) {
58
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid postman import format in row #%s',
59
+ $rowNumber));
60
+ return false;
61
+ }
62
+
63
+ // validate id
64
+ if($row[0] == '' || !preg_match('/[0-9]/', $row[0])) {
65
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid id \'%s\' in row #%s',
66
+ $row[0], $rowNumber));
67
+ return false;
68
+ }
69
+
70
+ // validate customer id
71
+ if($row[1] == '' || !preg_match('/[0-9]/', $row[0])) {
72
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid customer id \'%s\' in row #%s',
73
+ $row[1], $rowNumber));
74
+ return false;
75
+ }
76
+
77
+ // validate subscriber email
78
+ if($row[3] == '' || !Zend_Validate::is($row[3], 'EmailAddress')) {
79
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber email \'%s\' in row #%s',
80
+ $row[3], $rowNumber));
81
+ return false;
82
+ }
83
+
84
+ // validate subscriber email format
85
+ if($row[4] == '' || !preg_match('/[0-9]/', $row[4]) || $row[4] > 2) {
86
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber email format \'%s\' in row #%s',
87
+ $row[4], $rowNumber));
88
+ return false;
89
+ }
90
+
91
+ // validate subscriber status
92
+ if($row[5] == '' || ($row[5] != 0 && $row[5] != 1 && $row[5] != 9)) {
93
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')->__('Invalid subscriber status \'%s\' in row #%s',
94
+ $row[5], $rowNumber));
95
+ return false;
96
+ }
97
+
98
+ return $row;
99
+ }
100
+
101
+
102
+ /**
103
+ * Save import data batch
104
+ *
105
+ * @param array $data
106
+ * @return DMK_Postman_Model_Mysql4_Subscribers_Import
107
+ */
108
+ protected function _saveImportData(array $data)
109
+ {
110
+ if (!empty($data)) {
111
+ $columns = array('subscriber_id', 'customer_id', 'subscriber_name',
112
+ 'subscriber_email', 'subscriber_emailformat',
113
+ 'subscriber_status', 'subscriber_activation',
114
+ 'subscriber_editlink', 'subscriber_registration_date',
115
+ 'subscriber_registered_by', 'subscriber_registration_ip',
116
+ 'subscriber_confirmation_date', 'subscriber_confirmed_by',
117
+ );
118
+ $table = Mage::getSingleton('core/resource')->getTableName('postman/postman_subscribers');
119
+ $this->_getWriteAdapter()->insertArray($table, $columns, $data);
120
+ $this->_importedRows += count($data);
121
+ }
122
+
123
+ return $this;
124
+ }
125
+
126
+ }
127
  ?>
app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Lists.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Subscribers_Lists extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ /**
6
+ * Method to initialize connection
7
+ *
8
+ * @access public
9
+ * @return DMK_Postman_Model_Mysql4_Subscribers_Lists
10
+ */
11
+ public function _construct()
12
+ {
13
+ $this->_init('postman/postman_subscribers_lists', 'subscriber_id');
14
+ }
15
+ }
16
+
17
+ ?>
app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Lists/Collection.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Mysql4_Subscribers_Lists_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ /**
6
+ * Method to initialize the collection
7
+ *
8
+ * @access public
9
+ * @return DMK_Postman_Model_Mysql4_Subscribers_Lists_Collection
10
+ */
11
+ public function _construct()
12
+ {
13
+ $this->_init('postman/subscribers_lists');
14
+ }
15
+ }
app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Subscribers/Collection.php CHANGED
@@ -1,47 +1,30 @@
1
  <?php
2
 
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Model Mysql4 Subscribers Subscribers Collection
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
  class DMK_Postman_Model_Mysql4_Subscribers_Subscribers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
36
  {
37
  /**
38
  * Method to initialize the collection
39
  *
40
  * @access public
41
- * @return DMK_Postman_Model_Mysql4_Subscribers_Subscribers_Collection???
42
  */
43
- public function _construct()
44
- {
45
- $this->_init('postman/subscribers_subscribers');
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  class DMK_Postman_Model_Mysql4_Subscribers_Subscribers_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
  {
5
  /**
6
  * Method to initialize the collection
7
  *
8
  * @access public
9
+ * @return DMK_Postman_Model_Mysql4_Subscribers_Subscribers_Collection
10
  */
11
+ public function _construct()
12
+ {
13
+ $this->_init('postman/subscribers_subscribers');
14
+ }
15
+
16
+ /**
17
+ * Check if subscribers exists
18
+ * @access public
19
+ * @return boolean
20
+ */
21
+ public function existRecipients()
22
+ {
23
+ $select = $this->getConnection()->select()
24
+ ->from($this->getTable('postman/postman_subscribers'))
25
+ ->where('subscriber_status = 1');
26
+ $result = $this->getConnection()->fetchAll($select);
27
+
28
+ return (empty($result) ? false : true);
29
+ }
30
  }
app/code/local/DMK/Postman/Model/Mysql4/Subscribers/Testrecipients/Collection.php CHANGED
@@ -37,19 +37,18 @@ class DMK_Postman_Model_Mysql4_Subscribers_Testrecipients_Collection extends Mag
37
  {
38
  /**
39
  * Method to initialize the collection
40
- *
41
  * @access public
42
  * @return void
43
  */
44
- public function _construct()
45
- {
46
- $this->_init('postman/subscribers_testrecipients');
47
- }
48
 
49
 
50
  /**
51
  * Check if test subscribers exists
52
- *
53
  * @return boolean
54
  */
55
  public function existTestrecipients()
37
  {
38
  /**
39
  * Method to initialize the collection
 
40
  * @access public
41
  * @return void
42
  */
43
+ public function _construct()
44
+ {
45
+ $this->_init('postman/subscribers_testrecipients');
46
+ }
47
 
48
 
49
  /**
50
  * Check if test subscribers exists
51
+ * @access public
52
  * @return boolean
53
  */
54
  public function existTestrecipients()
app/code/local/DMK/Postman/Model/Newsletters/Statistic/Basic.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Model for the basic statistics of a newsletter
4
+ *
5
+ */
6
+ class DMK_Postman_Model_Newsletters_Statistic_Basic extends Mage_Core_Model_Abstract
7
+ {
8
+ /**
9
+ * @var string name of the tracking pixel file
10
+ */
11
+ private $_dlpxlname = 'nldwnld.gif';
12
+
13
+
14
+ /**
15
+ * @var string current tracking code
16
+ */
17
+ private $_trackingCode = '';
18
+
19
+
20
+ /**
21
+ * Model initialization
22
+ * @return Mage_Core_Model_Abstract
23
+ */
24
+ protected function _construct()
25
+ {
26
+ parent::_construct();
27
+ $this->_init('postman/newsletters_statistic_basic');
28
+ }
29
+
30
+ /**
31
+ * Get the name of the download pixel
32
+ * @access public
33
+ * @return string
34
+ */
35
+ public function getDlPxlName()
36
+ {
37
+ return $this->_dlpxlname;
38
+ }
39
+
40
+ /**
41
+ * Set the name of the download pixel
42
+ * @access public
43
+ * @return void
44
+ */
45
+ public function setDlPxlName($s)
46
+ {
47
+ $this->_dlpxlname = $s;
48
+ }
49
+
50
+ /**
51
+ * Increases the open count
52
+ * @access public
53
+ * @param int $id of the newsletter
54
+ * @param int $i optional increment
55
+ * @return void
56
+ */
57
+ public function increaseOpenCnt($id, $i=1)
58
+ {
59
+
60
+ }
61
+
62
+ /**
63
+ * Generates a unique hash for the pixel
64
+ * @access public
65
+ * @return string
66
+ */
67
+ public function getUniqueIdentifier()
68
+ {
69
+ return uniqid();
70
+ }
71
+
72
+ /**
73
+ * Get tracking code
74
+ * @return string
75
+ */
76
+ public function getTrackingCode()
77
+ {
78
+ if(empty($this->_trackingCode)) {
79
+ $this->setTrackingCode(null);
80
+ }
81
+
82
+ return $this->_trackingCode;
83
+ }
84
+
85
+ /**
86
+ * Sets/Creates a new tracking code
87
+ * @param $code optional new tracking code
88
+ * @return void
89
+ */
90
+ public function setTrackingCode($code)
91
+ {
92
+ if(empty($code)) {
93
+ $this->_trackingCode = $this->getUniqueIdentifier();
94
+ } else {
95
+ $this->_trackingCode = $code;
96
+ }
97
+ }
98
+
99
+
100
+ }
101
+ ?>
app/code/local/DMK/Postman/Model/Newsletters/Template.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Newsletters_Template extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Method to initialize resource model
7
+ * @access public
8
+ * @return DMK_Postman_Model_Newsletters_Template
9
+ */
10
+ public function _construct()
11
+ {
12
+ parent::_construct();
13
+ $this->_init('postman/newsletters_template');
14
+ }
15
+ }
app/code/local/DMK/Postman/Model/Newsletters/Unsent.php CHANGED
@@ -52,70 +52,86 @@ class DMK_Postman_Model_Newsletters_Unsent extends Mage_Core_Model_Abstract
52
  * @access public
53
  * @return timestamp (??) Current date
54
  */
55
- public function getCurrentDate()
56
- {
57
- return Mage::getSingleton('core/date')->gmtDate();
58
- }
59
-
60
- /**
61
- * Method to get the testrecipients
62
- *
63
- * @access public
64
- * @return ???
65
- */
66
- public function getRecipients($isTest)
67
- {
68
- return $this->_getResource()->getRecipients($isTest);
69
- }
70
-
71
- /**
72
- * Method to get the next free ID in the sendmailcontent-table
73
- *
74
- * @access public
75
- * @return ???
76
- */
77
- public function getNextId()
78
- {
79
- return $this->_getResource()->getNextId();
80
- }
81
-
82
- /**
83
- * Method to store the newsletter in the sendmailcontent-table
84
- *
85
- * @access public
86
- * @param array Newsletter data
87
- * @return ???
88
- */
89
- public function saveSendMailContent($data)
90
- {
91
- $this->_getResource()->saveSendMailContent($data);
92
- }
93
-
94
- /**
95
- * Method to store the recipients data (testrecipients or subscribers) in the sendmailqueue-table
96
- *
97
- * @access public
98
- * @param array Subscriber/Testrecipient data
99
- * @return ???
100
- */
101
- public function saveSendMailQueue($data)
102
- {
103
- $this->_getResource()->saveSendMailQueue($data);
104
- }
105
 
106
- /**
107
- * Saves the selected mailinglists to a newsletter
108
- * @param array $data
109
- * @return ??
110
- */
111
- public function saveNewslettersLists($id, $data)
112
- {
113
- foreach($data as $item) {
114
- $arr = array(
115
- 'newsletter_id' => $id,
116
- 'list_id' => $item[0],
117
- );
118
- $this->_getResource()->saveNewslettersLists($arr);
119
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  }
 
 
 
121
  }
52
  * @access public
53
  * @return timestamp (??) Current date
54
  */
55
+ public function getCurrentDate()
56
+ {
57
+ return Mage::getSingleton('core/date')->gmtDate();
58
+ }
59
+
60
+ /**
61
+ * Method to get the testrecipients
62
+ *
63
+ * @access public
64
+ * @param int $isTest Testnewsletter or normal newsletter
65
+ * @param int $newsletterId Id of the newsletter
66
+ * @param array $arrLists List of mailinglists
67
+ * @return ???
68
+ */
69
+ public function getRecipients($isTest, $newsletterId, $arrLists)
70
+ {
71
+ return $this->_getResource()->getRecipients($isTest, $newsletterId, $arrLists);
72
+ }
73
+
74
+ /**
75
+ * Method to get the next free ID in the sendmailcontent-table
76
+ *
77
+ * @access public
78
+ * @return ???
79
+ */
80
+ public function getNextId()
81
+ {
82
+ return $this->_getResource()->getNextId();
83
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ /**
86
+ * Method to store the newsletter in the sendmailcontent-table
87
+ *
88
+ * @access public
89
+ * @param array Newsletter data
90
+ * @return void
91
+ */
92
+ public function saveSendMailContent($data)
93
+ {
94
+ $this->_getResource()->saveSendMailContent($data);
95
+ }
96
+
97
+ /**
98
+ * Method to store the recipients data (testrecipients or subscribers) in the sendmailqueue-table
99
+ *
100
+ * @access public
101
+ * @param array Subscriber/Testrecipient data
102
+ * @return void
103
+ */
104
+ public function saveSendMailQueue($data)
105
+ {
106
+ $this->_getResource()->saveSendMailQueue($data);
107
+ }
108
+
109
+ /**
110
+ * Saves the selected mailinglists to a newsletter
111
+ * @param int $id id of the newsletter
112
+ * @param array $data list ids
113
+ * @return void
114
+ */
115
+ public function saveNewslettersLists($id,$data)
116
+ {
117
+ $this->_getResource()->saveNewslettersLists($data,$id);
118
+ }
119
+
120
+ /**
121
+ * Method to get the mailing lists that the subscriber has been subscribed
122
+ * @access public
123
+ * @param int $id the newsletter id
124
+ * @return array
125
+ */
126
+ public function getSelectedLists($id)
127
+ {
128
+ $result = $this->_getResource()->getNewslettersLists($id);
129
+ $sortedItems = array();
130
+
131
+ foreach($result as $res) {
132
+ array_push($sortedItems,$res['list_id']);
133
  }
134
+
135
+ return $sortedItems;
136
+ }
137
  }
app/code/local/DMK/Postman/Model/Observer.php CHANGED
@@ -1,12 +1,18 @@
1
  <?php
2
 
3
  class DMK_Postman_Model_Observer {
4
-
 
 
 
 
 
5
  public function checkForEmailsToSend(){
6
  $mailQueue = Mage::getModel('postman/newsletters_queue')->getCollection();
7
- $cntQueue = count($mailQueue);
8
 
9
  if($cntQueue != 0) {
 
10
  $i = 1;
11
  foreach($mailQueue as $customer) {
12
 
@@ -22,17 +28,25 @@ class DMK_Postman_Model_Observer {
22
 
23
  $neContent = $dbResult['newsletter_body'];
24
  $neSubject = $dbResult['newsletter_subject'];
25
-
 
 
 
 
 
 
 
26
  try {
27
- Mage::helper('postman/Email')->sendEmail($neSubscriberName,
28
- $neSubscriberEmail,
29
- $neSubject, $neContent,
30
- $neAction, $neFormat
31
- );
32
 
33
- $customer->delete();
 
 
 
34
  if($cntQueue == $i){
35
- $mailQueue->delete;
 
 
36
  }
37
 
38
  $i++;
@@ -49,9 +63,214 @@ class DMK_Postman_Model_Observer {
49
  Mage::getSingleton('core/date')->gmtDate()
50
  );
51
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  } else {
53
- Mage::log('Mail queue size:'.$cntQueue.'. Nothing to send.');
 
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
  }
1
  <?php
2
 
3
  class DMK_Postman_Model_Observer {
4
+
5
+ /**
6
+ * Send the newsletter that are in the queue
7
+ * @access public
8
+ * @return void
9
+ */
10
  public function checkForEmailsToSend(){
11
  $mailQueue = Mage::getModel('postman/newsletters_queue')->getCollection();
12
+ $cntQueue = count($mailQueue);
13
 
14
  if($cntQueue != 0) {
15
+ Mage::log('mkpostman: Starting sending newsletter: '.date('Y-m-d H:m:s',$_SERVER['REQUEST_TIME']));
16
  $i = 1;
17
  foreach($mailQueue as $customer) {
18
 
28
 
29
  $neContent = $dbResult['newsletter_body'];
30
  $neSubject = $dbResult['newsletter_subject'];
31
+
32
+ $model = new DMK_Postman_Model_Newsletters_Unsent();
33
+ $model->setSubscriberName($neSubscriberName);
34
+ $model->setSubscriberEmail($neSubscriberEmail);
35
+ $model->setSubject($neSubject);
36
+ $model->setContent($neContent);
37
+ $model->setSubscriberEmailformat($neFormat);
38
+
39
  try {
40
+ $isSent = Mage::dispatchEvent('send_newsletter_email',array('model'=>$model));
 
 
 
 
41
 
42
+ if($isSent) {
43
+ // sending successful, delete the customer from sending table
44
+ $customer->delete();
45
+ }
46
  if($cntQueue == $i){
47
+ // processing of mailqueue complete, then delete all newsletters
48
+ // from sending queue
49
+ $mailQueue->delete();
50
  }
51
 
52
  $i++;
63
  Mage::getSingleton('core/date')->gmtDate()
64
  );
65
  }
66
+ Mage::log('mkpostman: end sending newsletter: '.date('Y-m-d H:m:s',$_SERVER['REQUEST_TIME']));
67
+ } else {
68
+ Mage::log('mkpostman: mail queue size: '.$cntQueue.'. Nothing to send.');
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Send the register email
74
+ * @access public
75
+ * @param Varien_Event_Observer $observer
76
+ * @return bool
77
+ */
78
+ public function sendRegisterEmail($observer)
79
+ {
80
+ $event = $observer->getEvent();
81
+ $model = $event->getModel();
82
+
83
+ $sendingEnabled = Mage::getStoreConfig('postman_general/sending_settings/enabled');
84
+ if($sendingEnabled) {
85
+ // Set variables that can be used in email template
86
+ $vars = array(
87
+ 'customerName' => $model->getSubscriberName(),
88
+ 'customerEmail' => $model->getSubscriberEmail(),
89
+ 'neSubject' => '',
90
+ 'neContent' => '',
91
+ 'activationLink'=> $model->getSubscriberActivation(),
92
+ );
93
+
94
+ // Set sender information
95
+ $senderName = Mage::getStoreConfig('postman_general/sending_settings/default_sender_name');
96
+ $senderEmail = Mage::getStoreConfig('postman_general/sending_settings/default_sender_email');
97
+ $sender = array('name' => $senderName,
98
+ 'email' => $senderEmail);
99
+
100
+ // Template Id
101
+ $templateId = Mage::getStoreConfig('postman_general/registration_settings/default_registration_template');
102
+
103
+ // Default reply email
104
+ $replyEmail = Mage::getStoreConfig('postman_general/sending_settings/default_reply_email');
105
+
106
+ // Return-Path
107
+ $returnPath = Mage::getStoreConfig('postman_general/sending_settings/default_return_path');
108
+ $tmpSplitArr = explode('@', $returnPath);
109
+ $returnPath = $tmpSplitArr[0] . '@' . $tmpSplitArr[1];
110
+
111
+ // Get Store ID
112
+ $storeId = Mage::app()->getStore()->getId();
113
+
114
+ // Send Transactional Email
115
+ try {
116
+ $mail=Mage::getModel('core/email_template');
117
+ $mail->setEmailFormat($model->getSubscriberEmailformat());
118
+ $mail->setReturnPath($returnPath)
119
+ ->setReplyTo($replyEmail)
120
+ ->sendTransactional($templateId, $sender, $model->getSubscriberEmail(),
121
+ $model->getSubscriberName(), $vars, $storeId);
122
+ $translate = Mage::getSingleton('core/translate')->setTranslateInline(true);
123
+ return true;
124
+ } catch (Exception $e) {
125
+ Mage::log($e->getMessage());
126
+ }
127
+ } else {
128
+ // Sending is disabled.
129
+ Mage::log('send register email: sending emails is not enabled');
130
+ }
131
+ return false;
132
+ }
133
+
134
+ /**
135
+ * Send a testnewsletter email
136
+ * @access public
137
+ * @param Varien_Event_Observer $observer
138
+ * @return void
139
+ */
140
+ public function sendTestnewsletterEmail($observer)
141
+ {
142
+ $event = $observer->getEvent();
143
+ $model = $event->getModel();
144
+
145
+ $sendingEnabled = Mage::getStoreConfig('postman_general/sending_settings/enabled');
146
+ if($sendingEnabled) {
147
+ // Set variables that can be used in email template
148
+ $vars = array(
149
+ 'customerName' => $model->getSubscriberName(),
150
+ 'customerEmail' => $model->getSubscriberEmail(),
151
+ 'subject' => $model->getSubject(),
152
+ 'content' => $model->getContent(),
153
+ 'unsubscribeLink'=> Mage::helper('postman/Email')->getUnsubscribeUrl($model->getSubscriberEmail()),
154
+ );
155
+
156
+ // Set sender information
157
+ $senderName = Mage::getStoreConfig('postman_general/sending_settings/default_sender_name');
158
+ $senderEmail = Mage::getStoreConfig('postman_general/sending_settings/default_sender_email');
159
+ $sender = array('name' => $senderName,
160
+ 'email' => $senderEmail);
161
+
162
+ $mail = Mage::getModel('core/email_template');
163
+ $mail->setTemplateSubject($model->getSubject());
164
+
165
+ // Insert poweredby
166
+ $newsletterText = Mage::helper('postman/Data')
167
+ ->insertPoweredBy($model->getContent(), true);
168
+
169
+ $mail->setTemplateText($newsletterText);
170
+
171
+ // Default reply email
172
+ $replyEmail = Mage::getStoreConfig('postman_general/sending_settings/default_reply_email');
173
+
174
+ // Return-Path
175
+ $returnPath = Mage::getStoreConfig('postman_general/sending_settings/default_return_path');
176
+ $tmpSplitArr = explode('@', $returnPath);
177
+ $returnPath = $tmpSplitArr[0] . '@' . $tmpSplitArr[1];
178
+
179
+ // Get Store ID
180
+ $storeId = Mage::app()->getStore()->getId();
181
+
182
+ // Send Transactional Email
183
+ try {
184
+ $mail->setEmailFormat($model->getSubscriberEmailformat());
185
+ $mail->setReturnPath($returnPath)
186
+ ->setReplyTo($replyEmail)
187
+ ->sendTransactional(null, $sender, $model->getSubscriberEmail(),
188
+ $model->getSubscriberName(), $vars, $storeId, true);
189
+ $translate = Mage::getSingleton('core/translate')->setTranslateInline(true);
190
+ return true;
191
+ } catch (Exception $e) {
192
+ Mage::log($e->getMessage());
193
+ }
194
  } else {
195
+ // Sending is disabled.
196
+ Mage::log('send newsletter email: sending emails is not enabled');
197
  }
198
+ return false;
199
+ }
200
+
201
+ /**
202
+ * Send a newsletter email
203
+ * @access public
204
+ * @param Varien_Event_Observer $observer
205
+ * @return void
206
+ */
207
+ public function sendNewsletterEmail($observer)
208
+ {
209
+ $event = $observer->getEvent();
210
+ $model = $event->getModel();
211
+
212
+ $sendingEnabled = Mage::getStoreConfig('postman_general/sending_settings/enabled');
213
+ if($sendingEnabled) {
214
+ // Set variables that can be used in email template
215
+ $vars = array(
216
+ 'customerName' => $model->getSubscriberName(),
217
+ 'customerEmail' => $model->getSubscriberEmail(),
218
+ 'subject' => $model->getSubject(),
219
+ 'content' => $model->getContent(),
220
+ 'unsubscribeLink'=> Mage::helper('postman/Email')->getUnsubscribeUrl($model->getSubscriberEmail()),
221
+ );
222
 
223
+ // Set sender information
224
+ $senderName = Mage::getStoreConfig('postman_general/sending_settings/default_sender_name');
225
+ $senderEmail = Mage::getStoreConfig('postman_general/sending_settings/default_sender_email');
226
+ $sender = array('name' => $senderName,
227
+ 'email' => $senderEmail);
228
+
229
+ $mail = Mage::getModel('core/email_template');
230
+ $mail->setTemplateSubject($model->getSubject());
231
+
232
+ // Insert poweredby
233
+ $newsletterText = Mage::helper('postman/Data')
234
+ ->insertPoweredBy($model->getContent(), true);
235
+
236
+ $newsletterText = Mage::helper('postman/Data')
237
+ ->insertTracking(
238
+ Mage::helper('postman/Email')
239
+ ->getTrackingImgSnippet(
240
+ Mage::helper('postman/Email')
241
+ ->createTrackingImgCode($model)
242
+ ), $newsletterText
243
+ );
244
+
245
+ $mail->setTemplateText($newsletterText);
246
+
247
+ // Default reply email
248
+ $replyEmail = Mage::getStoreConfig('postman_general/sending_settings/default_reply_email');
249
+
250
+ // Return-Path
251
+ $returnPath = Mage::getStoreConfig('postman_general/sending_settings/default_return_path');
252
+ $tmpSplitArr = explode('@', $returnPath);
253
+ $returnPath = $tmpSplitArr[0] . '@' . $tmpSplitArr[1];
254
+
255
+ // Get Store ID
256
+ $storeId = Mage::app()->getStore()->getId();
257
+
258
+ // Send Transactional Email
259
+ try {
260
+ $mail->setEmailFormat($model->getSubscriberEmailformat());
261
+ $mail->setReturnPath($returnPath)
262
+ ->setReplyTo($replyEmail)
263
+ ->sendTransactional(null, $sender, $model->getSubscriberEmail(),
264
+ $model->getSubscriberName(), $vars, $storeId, true);
265
+ $translate = Mage::getSingleton('core/translate')->setTranslateInline(true);
266
+ return true;
267
+ } catch (Exception $e) {
268
+ Mage::log($e->getMessage());
269
+ }
270
+ } else {
271
+ // Sending is disabled.
272
+ Mage::log('send newsletter email: sending emails is not enabled');
273
+ }
274
+ return false;
275
  }
276
  }
app/code/local/DMK/Postman/Model/Subscribers/Lists.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Subscribers_Lists extends Mage_Core_Model_Abstract
4
+ {
5
+ /**
6
+ * Method to initialize model
7
+ *
8
+ * @access public
9
+ * @return DMK_Postman_Model_Subscribers_Lists
10
+ */
11
+ public function _construct()
12
+ {
13
+ parent::_construct();
14
+ $this->_init('postman/subscribers_lists');
15
+ }
16
+ }
17
+
18
+ ?>
app/code/local/DMK/Postman/Model/Subscribers/Subscribers.php CHANGED
@@ -87,6 +87,8 @@ class DMK_Postman_Model_Subscribers_Subscribers extends Mage_Core_Model_Abstract
87
 
88
  /**
89
  * Method to get the mailing lists that the subscriber has been subscribed
 
 
90
  */
91
  public function getSelectedListsForSubscriber($subscriberId)
92
  {
@@ -94,10 +96,13 @@ class DMK_Postman_Model_Subscribers_Subscribers extends Mage_Core_Model_Abstract
94
  $resource = Mage::getSingleton('core/resource');
95
  $connection = $resource->getConnection('core_read');
96
  $table = $resource->getTableName('postman/postman_subscribers_lists');
97
- $select = $connection->select()->from(array('li' => $table),
98
- array('li.list_id', 'li.subscriber_id'))
99
- ->where('li.subscriber_id=?', $subscriberId);
100
- $result = $connection->fetchAll($select);
 
 
 
101
 
102
  foreach($result as $res) {
103
  array_push($sortedItems, $res['list_id']);
@@ -122,7 +127,12 @@ class DMK_Postman_Model_Subscribers_Subscribers extends Mage_Core_Model_Abstract
122
  ->from(array('tr' => $table))
123
  ->where('email=?', $email);
124
  $id = $connection->fetchOne($select);
125
- return $id;
 
 
 
 
 
126
  }
127
 
128
  /**
@@ -151,7 +161,7 @@ class DMK_Postman_Model_Subscribers_Subscribers extends Mage_Core_Model_Abstract
151
  *
152
  * @access public
153
  * @param array $lists
154
- * @return boolean $return
155
  */
156
  public function setSelectedListsForSubscriber($newListValues, $subscriberId)
157
  {
@@ -161,9 +171,10 @@ class DMK_Postman_Model_Subscribers_Subscribers extends Mage_Core_Model_Abstract
161
  $oldListValues = $this->getSelectedListsForSubscriber($subscriberId);
162
  $mergeValues = array_merge($oldListValues,$newListValues);
163
  $mergeValues = array_unique($mergeValues);
 
164
  $count = count($mergeValues);
165
 
166
- for($i=0; $i<=$count; $i++){
167
  if(!in_array($mergeValues[$i], $newListValues)) {
168
  $deleteQry = 'DELETE FROM ' . $table
169
  . ' WHERE list_id="' . $mergeValues[$i] . '"'
87
 
88
  /**
89
  * Method to get the mailing lists that the subscriber has been subscribed
90
+ * @param int $subsciberId
91
+ * @return array
92
  */
93
  public function getSelectedListsForSubscriber($subscriberId)
94
  {
96
  $resource = Mage::getSingleton('core/resource');
97
  $connection = $resource->getConnection('core_read');
98
  $table = $resource->getTableName('postman/postman_subscribers_lists');
99
+ $select = $connection->select();
100
+ $select2 = $select->from(array('li' => $table),
101
+ array('li.list_id', 'li.subscriber_id'));
102
+ if(!empty($subscriberId)) {
103
+ $select2->where('li.subscriber_id=?', $subscriberId);
104
+ }
105
+ $result = $connection->fetchAll($select2);
106
 
107
  foreach($result as $res) {
108
  array_push($sortedItems, $res['list_id']);
127
  ->from(array('tr' => $table))
128
  ->where('email=?', $email);
129
  $id = $connection->fetchOne($select);
130
+
131
+ if($id) {
132
+ return $id;
133
+ }
134
+
135
+ return 0;
136
  }
137
 
138
  /**
161
  *
162
  * @access public
163
  * @param array $lists
164
+ * @return void
165
  */
166
  public function setSelectedListsForSubscriber($newListValues, $subscriberId)
167
  {
171
  $oldListValues = $this->getSelectedListsForSubscriber($subscriberId);
172
  $mergeValues = array_merge($oldListValues,$newListValues);
173
  $mergeValues = array_unique($mergeValues);
174
+ sort($mergeValues);
175
  $count = count($mergeValues);
176
 
177
+ for($i=0; $i<$count; $i++){
178
  if(!in_array($mergeValues[$i], $newListValues)) {
179
  $deleteQry = 'DELETE FROM ' . $table
180
  . ' WHERE list_id="' . $mergeValues[$i] . '"'
app/code/local/DMK/Postman/Model/Subscribers/Testrecipients.php CHANGED
@@ -86,14 +86,6 @@ class DMK_Postman_Model_Subscribers_Testrecipients extends Mage_Core_Model_Abstr
86
  */
87
  public function getAdminId($email)
88
  {
89
- // $resource = Mage::getSingleton('core/resource');
90
- // $connection = $resource->getConnection('core_read');
91
- // $table = $resource->getTableName('postman/postman_subscribers');
92
- // $select = $connection->select('subscriber_registered_by')->from(array('tr' => $table))
93
- // ->where('tr.subscriber_email=?', $email)
94
- // ->where('tr.subscriber_status=?', 9);
95
- // $result = $connection->fetchOne($select);
96
-
97
  $user = Mage::getSingleton('admin/session');
98
  $id = $user->getUser()->getUserId();
99
 
@@ -120,5 +112,27 @@ class DMK_Postman_Model_Subscribers_Testrecipients extends Mage_Core_Model_Abstr
120
  $result = $connection->fetchOne($select);
121
  return $result;
122
  }
123
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  }
86
  */
87
  public function getAdminId($email)
88
  {
 
 
 
 
 
 
 
 
89
  $user = Mage::getSingleton('admin/session');
90
  $id = $user->getUser()->getUserId();
91
 
112
  $result = $connection->fetchOne($select);
113
  return $result;
114
  }
115
+
116
+ /**
117
+ * Get lists by subscribers as option array
118
+ * @access public
119
+ * @param int $id Id of subscriber
120
+ * @return array
121
+ */
122
+ public function getListsAsOptionArray()
123
+ {
124
+ $arr = array();
125
+ $resource = Mage::getSingleton('core/resource');
126
+ $connection = $resource->getConnection('core_read');
127
+ $table = $resource->getTableName('postman/postman_subscribers_lists');
128
+ $select = $connection->select()->from(array('tr' => $table),
129
+ 'list_id')
130
+ ->where('tr.subscriber_id=?', $this->getId());
131
+ $result = $connection->fetchAll($select);
132
+ foreach($result as $res) {
133
+ array_push($arr, $res['list_id']);
134
+ }
135
+
136
+ return $arr;
137
+ }
138
  }
app/code/local/DMK/Postman/Model/TinyMce/Config.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Tinymce_Config
4
+ {
5
+ /**
6
+ * Prepare fullpage wysiwyg config
7
+ *
8
+ * @param Varien_Object $config
9
+ * @return array
10
+ */
11
+ public function getWysiwygPluginSettings($config)
12
+ {
13
+ $variableConfig = array();
14
+
15
+ $variableWysiwygPlugin = array(
16
+ array(
17
+ 'name' => 'fullpage',
18
+ 'src' => $this->getWysiwygJsPluginSrc(),
19
+ 'options' => array(
20
+ // 'title' => Mage::helper('adminhtml')->__('Edit'),
21
+ 'url' => $this->getVariablesWysiwygActionUrl(),
22
+ 'class' => 'fullpage plugin'
23
+
24
+ )
25
+ )
26
+ );
27
+
28
+ $configPlugins = $config->getData('plugins');
29
+ $variableConfig['plugins'] = array_merge($configPlugins, $variableWysiwygPlugin);
30
+
31
+ return $variableConfig;
32
+ }
33
+
34
+ /**
35
+ * Return url to wysiwyg plugin
36
+ *
37
+ * @return string
38
+ */
39
+ public function getWysiwygJsPluginSrc()
40
+ {
41
+ return Mage::getBaseUrl('js').'tiny_mce/plugins/fullpage/editor_plugin.js';
42
+ }
43
+
44
+ /**
45
+ * Return url of action to get variables
46
+ *
47
+ * @return string
48
+ */
49
+ public function getVariablesWysiwygActionUrl()
50
+ {
51
+ return Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/system_fullpage/wysiwygPlugin');
52
+ }
53
+ }
app/code/local/DMK/Postman/Model/TinyMce/Observer.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Model_Tinymce_Observer
4
+ {
5
+ /**
6
+ * Add fullpage wysiwyg plugin config
7
+ *
8
+ * @param Varien_Event_Observer $observer
9
+ * @return Mage_Core_Model_Variable_Observer
10
+ */
11
+ public function prepareWysiwygFullpagePluginConfig(Varien_Event_Observer $observer)
12
+ {
13
+ $config = $observer->getEvent()->getData('config');
14
+
15
+ if ($config->getData('add_variables')) {
16
+ $settings = Mage::getModel('postman/tinymce_config')->getWysiwygPluginSettings($config);
17
+ $config->addData($settings);
18
+ }
19
+ return $this;
20
+ }
21
+
22
+ public function prepareWysiwygPaths(Varien_Event_Observer $observer)
23
+ {
24
+ $config = $observer->getEvent()->getData('config');
25
+ $config->setData('use_container', false);
26
+ $config->setData('no_display', true);
27
+ $config->setData('widget_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'));
28
+ $config->setData('files_browser_window_url', Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'));
29
+ return $this;
30
+ }
31
+ }
app/code/local/DMK/Postman/Model/Variable/Config.php CHANGED
@@ -1,51 +1,45 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@magentocommerce.com so we can send you a copy immediately.
14
- *
15
- * DISCLAIMER
16
- *
17
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18
- * versions in the future. If you wish to customize Magento for your
19
- * needs please refer to http://www.magentocommerce.com for more information.
20
- *
21
- * @category Mage
22
- * @package Mage_Core
23
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- */
26
-
27
- /**
28
- * Variable Wysiwyg Plugin Config
29
- *
30
- * @category Mage
31
- * @package Mage_Core
32
- * @author Magento Core Team <core@magentocommerce.com>
33
- */
34
- class DMK_Postman_Model_Variable_Config extends Mage_Core_Model_Variable_Config
35
- {
36
- /**
37
- * Return url of action to get variables
38
- *
39
- * @return string
40
- */
41
- public function getVariablesWysiwygActionUrl()
42
- {
43
- $moduleName = Mage::app()->getRequest()->getModuleName();
44
-
45
- if($moduleName == 'postman')
46
- {
47
-
48
- return Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/system_variable/wysiwygPlugin');
49
- }
50
- }
51
- }
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Core
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Variable Wysiwyg Plugin Config
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Core
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class DMK_Postman_Model_Variable_Config extends Mage_Core_Model_Variable_Config
35
+ {
36
+ /**
37
+ * Return url of action to get variables
38
+ * @access public
39
+ * @return string
40
+ */
41
+ public function getVariablesWysiwygActionUrl()
42
+ {
43
+ return Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/system_variable/wysiwygPlugin');
44
+ }
45
+ }
 
 
 
 
 
 
app/code/local/DMK/Postman/controllers/ActivateController.php CHANGED
@@ -93,6 +93,7 @@ class DMK_Postman_ActivateController extends Mage_Core_Controller_Front_Action
93
  $user->setSubscriberStatus(1);
94
  $user->setSubscriberEmailformat($nformat);
95
  $user->setSubscriberConfirmationDate(Mage::getModel('postman/subscribers_subscribers')->getCurrentDate());
 
96
  $user->save();
97
 
98
  $block = $this->getLayout()
@@ -100,17 +101,13 @@ class DMK_Postman_ActivateController extends Mage_Core_Controller_Front_Action
100
  'main-msg-block',
101
  array('template' => 'postman/newsletter/activate/account_active.phtml'));
102
  $this->getLayout()->getBlock('content')->append($block);
103
-
104
  } else {
105
-
106
  $block = $this->getLayout()
107
  ->createBlock('Mage_Core_Block_Template',
108
  'main-msg-block',
109
  array('template' => 'postman/newsletter/activate/account_already_active.phtml'));
110
  $this->getLayout()->getBlock('content')->append($block);
111
-
112
  }
113
-
114
  $this->renderLayout();
115
  }
116
 
@@ -147,8 +144,9 @@ class DMK_Postman_ActivateController extends Mage_Core_Controller_Front_Action
147
  $token = $this->_getToken();
148
  if(!empty($token))
149
  {
150
- $baseUrl = Mage::getBaseUrl (Mage_Core_Model_Store::URL_TYPE_WEB);
151
- return $baseUrl . 'postman/activate/validate?tok=' . $token;
 
152
  }
153
 
154
  return false;
93
  $user->setSubscriberStatus(1);
94
  $user->setSubscriberEmailformat($nformat);
95
  $user->setSubscriberConfirmationDate(Mage::getModel('postman/subscribers_subscribers')->getCurrentDate());
96
+ $user->setSubscriberActivation('');
97
  $user->save();
98
 
99
  $block = $this->getLayout()
101
  'main-msg-block',
102
  array('template' => 'postman/newsletter/activate/account_active.phtml'));
103
  $this->getLayout()->getBlock('content')->append($block);
 
104
  } else {
 
105
  $block = $this->getLayout()
106
  ->createBlock('Mage_Core_Block_Template',
107
  'main-msg-block',
108
  array('template' => 'postman/newsletter/activate/account_already_active.phtml'));
109
  $this->getLayout()->getBlock('content')->append($block);
 
110
  }
 
111
  $this->renderLayout();
112
  }
113
 
144
  $token = $this->_getToken();
145
  if(!empty($token))
146
  {
147
+ return Mage::getBaseUrl()
148
+ . 'postman/activate/validate?tok='
149
+ . $token;
150
  }
151
 
152
  return false;
app/code/local/DMK/Postman/controllers/Adminhtml/CustomerController.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once 'Mage/Adminhtml/controllers/CustomerController.php';
4
+
5
+ class DMK_Postman_Adminhtml_CustomerController extends Mage_Adminhtml_CustomerController
6
+ {
7
+ /**
8
+ * Delete customer action
9
+ */
10
+ public function deleteAction()
11
+ {
12
+ $this->_initCustomer();
13
+ $customer = Mage::registry('current_customer');
14
+ if ($customer->getId()) {
15
+ try {
16
+ // Delete customer from newsletter table
17
+ $subscriber = Mage::getModel('postman/subscribers_subscribers')->load($customer->getId(),'customer_id');
18
+ if($subscriber->getSubscriberId()) {
19
+ $subscriberToList = Mage::getModel('postman/subscribers_lists')->load($subscriber->getSubscriberId(),'subscriber_id');
20
+ $subscriberToList->delete();
21
+ $subscriber->delete();
22
+ }
23
+
24
+ // Delete customer in magento
25
+ $customer->load($customer->getId());
26
+ $customer->delete();
27
+
28
+
29
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('The customer has been deleted.'));
30
+ }
31
+ catch (Exception $e){
32
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
33
+ }
34
+ }
35
+ $this->_redirect('*/customer');
36
+ }
37
+ }
app/code/local/DMK/Postman/controllers/Adminhtml/ListsController.php CHANGED
@@ -131,9 +131,7 @@ class DMK_Postman_Adminhtml_ListsController extends Mage_Adminhtml_Controller_Ac
131
  $model = Mage::getModel('postman/lists');
132
  $postData = $this->getRequest()->getPost();
133
  $listId = $this->getRequest()->getParam('list_id');
134
- $error = $this->checkDuplicateTitle($postData['list_title'],
135
- $postData['customer_group_ids']
136
- );
137
 
138
  if($error
139
  && empty($listId)
@@ -215,15 +213,14 @@ class DMK_Postman_Adminhtml_ListsController extends Mage_Adminhtml_Controller_Ac
215
 
216
  /**
217
  * Method to check if a title already exists
218
- *
219
- * @param string $title
220
- * @param type $storeIds
221
- * @return int $id
222
  */
223
- private function checkDuplicateTitle($title, $storeIds)
224
  {
225
  $model = Mage::getModel('postman/lists');
226
- $id = $model->getIdByTitle($title, $storeIds);
227
 
228
  return $id ? true : false;
229
  }
131
  $model = Mage::getModel('postman/lists');
132
  $postData = $this->getRequest()->getPost();
133
  $listId = $this->getRequest()->getParam('list_id');
134
+ $error = $this->checkDuplicateTitle($postData['list_title']);
 
 
135
 
136
  if($error
137
  && empty($listId)
213
 
214
  /**
215
  * Method to check if a title already exists
216
+ * @access private
217
+ * @param string $title Title of the newsletter
218
+ * @return boolean
 
219
  */
220
+ private function checkDuplicateTitle($title)
221
  {
222
  $model = Mage::getModel('postman/lists');
223
+ $id = $model->getIdByTitle($title);
224
 
225
  return $id ? true : false;
226
  }
app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/QueueController.php CHANGED
@@ -106,7 +106,8 @@ class DMK_Postman_Adminhtml_Newsletters_QueueController extends Mage_Adminhtml_C
106
  /**
107
  * Method to delete an unsent mailing
108
  *
109
- * @access public
 
110
  */
111
  public function deleteAction()
112
  {
@@ -129,5 +130,5 @@ class DMK_Postman_Adminhtml_Newsletters_QueueController extends Mage_Adminhtml_C
129
  }
130
 
131
  $this->_redirect('*/*');
132
- }
133
  }
106
  /**
107
  * Method to delete an unsent mailing
108
  *
109
+ * @access public
110
+ * @return void
111
  */
112
  public function deleteAction()
113
  {
130
  }
131
 
132
  $this->_redirect('*/*');
133
+ }
134
  }
app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/SentController.php CHANGED
@@ -42,7 +42,7 @@ class DMK_Postman_Adminhtml_Newsletters_SentController extends Mage_Adminhtml_Co
42
  */
43
  protected function _setTitle()
44
  {
45
- return $this->_title($this->__('DMK Postman'))->_title($this->__('Newsletters sent'));
46
  }
47
 
48
  /**
@@ -55,7 +55,7 @@ class DMK_Postman_Adminhtml_Newsletters_SentController extends Mage_Adminhtml_Co
55
  {
56
  $this->loadLayout()
57
  ->_setActiveMenu('postman/newsletters_sent')
58
- ->_addBreadcrumb(Mage::helper('postman')->__('Newsletters sent'), Mage::helper('postman')->__('Newsletters sent'));
59
  return $this;
60
  }
61
 
@@ -79,27 +79,40 @@ class DMK_Postman_Adminhtml_Newsletters_SentController extends Mage_Adminhtml_Co
79
  */
80
  public function copyAction()
81
  {
82
- $model = Mage::getModel('postman/newsletters_sent');
83
- $newsletter = $model->load($this->getRequest()->getParam('newsletter_id'));
84
 
85
- if ($model->getId()) {
 
 
86
  try {
87
- $model
88
- ->setNewsletterID()
89
- ->setNewsletterSenderName($newsletter['newsletter_sender_name'])
90
- ->setNewsletterSenderEmail($newsletter['newsletter_sender_email'])
91
- ->setNewsletterReplyEmail($newsletter['newsletter_reply_email'])
92
- ->setNewsletterSubject('Copy of '.$newsletter['newsletter_subject'])
93
- ->setNewsletterHtmlVersion($newsletter['newsletter_html_version'])
94
- ->setNewsletterTextVersion($newsletter['newsletter_text_version'])
95
- ->setNewsletterCreationDate($this->getCurrentDate())
96
- ->setNewsletterLastModification($this->getCurrentDate())
97
- ->setNewsletterMailingDate('0000-00-00 00:00:00')
98
- ->setNewsletterAuthor($newsletter['newsletter_author'])
99
- ->setIsActive(0)
100
- ->save();
101
-
102
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The newsletter was successfully copied and is now listed as unsent newsletter'));
 
 
 
 
 
 
 
 
 
 
 
103
  } catch (Mage_Core_Exception $e) {
104
  Mage::log($e->getMessage());
105
  $this->_getSession()->addError($e->getMessage());
42
  */
43
  protected function _setTitle()
44
  {
45
+ return $this->_title($this->__('DMK Postman'))->_title($this->__('Archive'));
46
  }
47
 
48
  /**
55
  {
56
  $this->loadLayout()
57
  ->_setActiveMenu('postman/newsletters_sent')
58
+ ->_addBreadcrumb(Mage::helper('postman')->__('Archive'), Mage::helper('postman')->__('Archive'));
59
  return $this;
60
  }
61
 
79
  */
80
  public function copyAction()
81
  {
82
+ $nlOld = Mage::getModel('postman/newsletters_sent')
83
+ ->load($this->getRequest()->getParam('newsletter_id'));
84
 
85
+ $nlNew = Mage::getModel('postman/newsletters_unsent');
86
+
87
+ if($nlOld->getNewsletterId()) {
88
  try {
89
+ // get old tracking code
90
+ $oldTrCode = Mage::getModel('postman/newsletters_statistic_basic')
91
+ ->load($nlOld->getNewsletterId(), 'newsletter_id')
92
+ ->getNewsletterCode();
93
+
94
+ // save new newsletter
95
+ $nlNew = $nlOld;
96
+ $nlNew->setNewsletterId()
97
+ ->setNewsletterCreationDate(Mage::getSingleton('core/date')->gmtDate())
98
+ ->setNewsletterLastModification(Mage::getSingleton('core/date')->gmtDate())
99
+ ->setNewsletterMailingDate('0000-00-00 00:00:00')
100
+ ->setNewsletterSubject('Copy of ' . $nlOld->getNewsletterSubject())
101
+ ->setIsActive(1)
102
+ ->save();
103
+
104
+ // create new statistic object
105
+ $objStats = Mage::getModel('postman/newsletters_statistic_basic');
106
+ $newTrCode = $objStats->getTrackingCode();
107
+ $objStats->setNewsletterId($nlNew->getNewsletterId())
108
+ ->setNewsletterCode($newTrCode)
109
+ ->setNewsletterName($nlNew->getNewsletterSubject())
110
+ ->save();
111
+
112
+ Mage::getSingleton('adminhtml/session')
113
+ ->addSuccess(Mage::helper('postman')
114
+ ->__('The newsletter was successfully copied and is now listed as unsent newsletter')
115
+ );
116
  } catch (Mage_Core_Exception $e) {
117
  Mage::log($e->getMessage());
118
  $this->_getSession()->addError($e->getMessage());
app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/StatisticController.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Adminhtml_Newsletters_StatisticController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ /**
6
+ * Method to set the active menu and breadcrumbs
7
+ * @access protected
8
+ * @return DMK_Postman_Adminhtml_Newsletters_StatisticController
9
+ */
10
+ protected function _initAction()
11
+ {
12
+ $this->loadLayout()
13
+ ->_setActiveMenu('postman/newsletters_statistic')
14
+ ->_addBreadcrumb(Mage::helper('postman')->__('Newsletters statistic'),
15
+ Mage::helper('postman')->__('Newsletters statistic')
16
+ );
17
+ return $this;
18
+ }
19
+
20
+ /**
21
+ * Method to set the page title for the grid
22
+ * @access protected
23
+ * @return DMK_Postman_Adminhtml_Newsletters_StatisticController
24
+ */
25
+ protected function _setTitle()
26
+ {
27
+ return $this->_title($this->__('DMK Postman'))
28
+ ->_title($this->__('Newsletters statistic'));
29
+ }
30
+
31
+ /**
32
+ * Method to prepare and display the grid for statistics
33
+ * @access public
34
+ * @return void
35
+ */
36
+ public function indexAction()
37
+ {
38
+ $this->_setTitle();
39
+ $this->_initAction();
40
+ $this->_addContent($this->getLayout()
41
+ ->createBlock('postman/adminhtml_newsletters_statistic')
42
+ );
43
+ $this->renderLayout();
44
+ }
45
+
46
+ /**
47
+ * Show a detail view of the statistics
48
+ * @access public
49
+ * @return void
50
+ */
51
+ public function viewAction()
52
+ {
53
+ $this->_setTitle();
54
+ $this->_initAction();
55
+ $model = Mage::getSingleton('postman/newsletters_statistic_basic');
56
+
57
+ if($this->getRequest()->getParam('newsletter_id')) {
58
+ $model->load($this->getRequest()->getParam('newsletter_id'),'newsletter_id');
59
+ }
60
+
61
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_statistic_view'));
62
+ $this->renderLayout();
63
+ }
64
+ }
65
+
66
+ ?>
app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/TemplateController.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class DMK_Postman_Adminhtml_Newsletters_TemplateController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ /**
6
+ * Method to set the page title for the grid
7
+ *
8
+ * @access protected
9
+ * @return DMK_Postman_Adminhtml_Newsletters_TemplateController
10
+ */
11
+ protected function _setPageTitle()
12
+ {
13
+ return $this->_title($this->__('DMK Postman'))->_title($this->__('Newsletter templates'));
14
+ }
15
+
16
+ /**
17
+ * Method to set the page title for edit form
18
+ *
19
+ * @access protected
20
+ * @return DMK_Postman_Adminhtml_Newsletters_TemplateController
21
+ */
22
+ protected function _setEditPageTitle()
23
+ {
24
+ return $this->_title($this->__('DMK Postman'))->_title($this->__('Edit template'));
25
+ }
26
+
27
+ /**
28
+ * Method to set the active menu and breadcrumbs
29
+ * @access protected
30
+ * @return DMK_Postman_Adminhtml_Newsletters_TemplateController
31
+ */
32
+ protected function _initAction()
33
+ {
34
+ $this->loadLayout()
35
+ ->_setActiveMenu('postman/newsletters_template')
36
+ ->_addBreadcrumb(Mage::helper('postman')->__('Newsletter templates'), Mage::helper('postman')->__('Newsletter templates'));
37
+ return $this;
38
+ }
39
+
40
+ /**
41
+ * Method to prepare and display the grid for templates
42
+ * @access public
43
+ * @return void
44
+ */
45
+ public function indexAction() {
46
+ $this->_setPageTitle();
47
+ $this->_initAction();
48
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_template'));
49
+ $this->renderLayout();
50
+ }
51
+
52
+ /**
53
+ * Method to create a new template (is forwarded to edit action)
54
+ * @access public
55
+ * @return void
56
+ */
57
+ public function newAction()
58
+ {
59
+ $this->_forward('edit');
60
+ }
61
+
62
+ /**
63
+ * Method to create/edit a template
64
+ * @access public
65
+ */
66
+ public function editAction()
67
+ {
68
+ $this->_setEditPageTitle();
69
+
70
+ // init model
71
+ $model = Mage::getModel('postman/newsletters_template');
72
+ if ($this->getRequest()->getParam('id')) {
73
+ $model->load($this->getRequest()->getParam('id'));
74
+ }
75
+
76
+ Mage::register('newsletter_template_data', $model);
77
+
78
+ $this->loadLayout();
79
+ $this->_setActiveMenu('postman/newsletters_template');
80
+
81
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_template_edit'));
82
+ $this->renderLayout();
83
+ }
84
+
85
+ /**
86
+ * Method to save a newsletter
87
+ * @access public
88
+ */
89
+ public function saveAction()
90
+ {
91
+ if($this->getRequest()->getPost())
92
+ {
93
+ try {
94
+ $postData = $this->getRequest()->getPost();
95
+ $model = Mage::getModel('postman/newsletters_template');
96
+
97
+ if (!$this->getRequest()->getParam('id')) {
98
+ // ADD
99
+ $model->addData($postData)
100
+ ->setCreateStamp(Mage::getSingleton('core/date')->gmtDate())
101
+ ->setModifyStamp(Mage::getSingleton('core/date')->gmtDate())
102
+ ->save();
103
+ } else {
104
+ // UPDATE
105
+ $model->addData($postData)
106
+ ->setModifyStamp(Mage::getSingleton('core/date')->gmtDate())
107
+ ->save();
108
+ }
109
+
110
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The template has successfully been saved'));
111
+ Mage::getSingleton('adminhtml/session')->setData(false);
112
+ $this->_redirect('*/*/');
113
+ } catch (Exception $e) {
114
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
115
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
116
+ }
117
+ }
118
+ $this->_redirect('*/*/');
119
+ }
120
+
121
+ /**
122
+ * Method to delete a template
123
+ * @access public
124
+ * @return void
125
+ */
126
+ public function deleteAction()
127
+ {
128
+ if($this->getRequest()->getParam('id') > 0)
129
+ {
130
+ try {
131
+ $model = Mage::getModel('postman/newsletters_template');
132
+ $model->setId($this->getRequest()->getParam('id'))
133
+ ->delete();
134
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The template has successfully been deleted'));
135
+ $this->_redirect('*/*/');
136
+ } catch (Exception $e) {
137
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
138
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
139
+ }
140
+ }
141
+ $this->_redirect('*/*/');
142
+ }
143
+
144
+ /**
145
+ * Get the content of a template
146
+ * @access public
147
+ * @return string
148
+ */
149
+ public function getTemplateContentByIdAction()
150
+ {
151
+ $content = '';
152
+ $id = $this->getRequest()->getParam('id');
153
+ if(!empty($id)) {
154
+ $model = Mage::getModel('postman/newsletters_template')->load($id);
155
+ $content = $model->getContent();
156
+ }
157
+
158
+ die($content);
159
+
160
+ print $content;
161
+ }
162
+ }
app/code/local/DMK/Postman/controllers/Adminhtml/Newsletters/UnsentController.php CHANGED
@@ -34,23 +34,23 @@
34
  */
35
  class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_Controller_Action
36
  {
37
- /**
38
- * Method to set the page title for the grid
39
- *
40
- * @access protected
41
- * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
42
- */
43
  protected function _setPageTitle()
44
  {
45
  return $this->_title($this->__('DMK Postman'))->_title($this->__('Newsletters unsent'));
46
  }
47
 
48
- /**
49
- * Method to set the page title for edit form
50
- *
51
- * @access protected
52
- * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
53
- */
54
  protected function _setEditPageTitle()
55
  {
56
  return $this->_title($this->__('DMK Postman'))->_title($this->__('Edit Newsletter'));
@@ -62,41 +62,41 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
62
  * @access protected
63
  * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
64
  */
65
- protected function _initAction()
66
- {
67
- $this->loadLayout()
68
- ->_setActiveMenu('postman/newsletters_unsent')
69
- ->_addBreadcrumb(Mage::helper('postman')->__('Newsletters unsent'), Mage::helper('postman')->__('Newsletters unsent'));
70
- return $this;
71
- }
72
 
73
- /**
74
- * Method to prepare and display the grid for unsent newsletters
75
- *
76
- * @access public
77
- */
78
- public function indexAction() {
79
- $this->_setPageTitle();
80
- $this->_initAction();
81
- $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent'));
82
-
83
- $block = $this->getLayout()->createBlock('Mage_Core_Block_Template',
84
- 'dialog-block',
85
- array('template' => 'postman/dialogbox.phtml'));
86
- $this->getLayout()->getBlock('content')->append($block);
87
-
88
- $this->renderLayout();
89
- }
90
 
91
  /**
92
  * Method to create a new newsletter (is forwarded to edit action)
93
  *
94
  * @access public
95
  */
96
- public function newAction()
97
- {
98
- $this->_forward('edit');
99
- }
100
 
101
  /**
102
  * Method to create/edit a newsletter
@@ -104,25 +104,25 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
104
  * @access public
105
  * @return ???
106
  */
107
- public function editAction()
108
- {
109
- $this->_setEditPageTitle();
110
 
111
- $model = Mage::getModel('postman/newsletters_unsent');
112
-
113
- if ($id = $this->getRequest()->getParam('newsletter_id')) {
114
- $model->load($id);
115
- }
116
-
117
- Mage::register('newsletter_unsent_data', $model);
118
 
119
- $this->loadLayout();
120
- $this->_setActiveMenu('postman/newsletters_unsent');
121
-
122
- $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent_edit'))
123
- ->_addLeft($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent_edit_tabs'));
124
- $this->renderLayout();
125
- }
 
 
126
 
127
  /**
128
  * Method to save a newsletter
@@ -136,6 +136,7 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
136
  try {
137
  $postData = $this->getRequest()->getPost();
138
  $model = Mage::getModel('postman/newsletters_unsent');
 
139
  $newsId = $this->getRequest()->getParam('newsletter_id');
140
  $user = Mage::getSingleton('admin/session');
141
  $userId = $user->getUser()->getUserId();
@@ -147,7 +148,13 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
147
  ->setNewsletterLastModification($this->_getCurrentDate())
148
  ->setNewsletterAuthor($userId)
149
  ->save();
150
- $model->saveNewslettersLists($postData['lists']);
 
 
 
 
 
 
151
  } else {
152
  // UPDATE
153
  $model->addData($postData)
@@ -202,65 +209,150 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
202
 
203
  /**
204
  * Method to send a test newsletter to testrecipients
205
- *
206
  * @access public
 
207
  */
208
- public function sendTestnewsletterAction()
209
- {
210
- $recipients = $this->_prepareNewsletterForSending(1);
211
-
212
- foreach($recipients as $r) {
213
- if(empty($r['subscriber_id'])) continue;
214
- $this->_sendNewsletter($r['subscriber_name'],
215
- $r['subscriber_email'],
216
- $recipients['newsletter']['subject'],
217
- $recipients['newsletter']['body'],
218
- $r['subscriber_emailformat'],
219
- $r['subscriber_activation'],
220
- 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
- $this->_redirect('*/*/');
223
- }
 
 
 
 
 
 
 
 
 
 
 
 
224
 
225
  /**
226
  * Method to send a newsletter to the selected mailing lists
227
- *
228
- * @access public
229
  */
230
- public function sendNewsletterAction()
231
- {
232
- $recipients = $this->_prepareNewsletterForSending();
233
-
234
- foreach($recipients as $r) {
235
- if(empty($r['subscriber_id'])) continue;
236
- $this->_sendNewsletter($r['subscriber_name'],
237
- $r['subscriber_email'],
238
- $recipients['newsletter']['subject'],
239
- $recipients['newsletter']['body'],
240
- $r['subscriber_emailformat'],
241
- $r['subscriber_activation'],
242
- 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  }
244
- $this->_redirect('*/*/');
245
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
  /**
248
  * Method to prepare newsletter data for sending and saving
249
  * in newseletter queue
250
- *
251
- * @return boolean true
252
  */
253
  private function _prepareNewsletterForSending($isTest = 0)
254
  {
255
- if( $this->getRequest()->getParam('newsletter_id') > 0 ) {
 
256
  try {
 
257
  $model = Mage::getModel('postman/newsletters_unsent');
258
 
259
- $newsletter_id = $this->getRequest()->getParam('newsletter_id');
 
 
260
  $newsletter = $model->load($newsletter_id);
261
- $recipients = $model->getRecipients($isTest);
262
- $nextId = $model->getNextId();
263
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  $textData = array();
265
  $textData['sendmailcontent_id'] = $nextId;
266
  $textData['sendmailcontent_emailformat'] = 0;
@@ -272,7 +364,7 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
272
  $textData['newsletter_reply_email'] = $newsletter['newsletter_reply_email'];
273
  $textData['newsletter_reply_name'] = $newsletter['newsletter_sender_name'];
274
 
275
- //$model->saveSendMailContent($textData);
276
 
277
  $htmlData = array();
278
  $htmlData['sendmailcontent_id'] = $nextId;
@@ -285,7 +377,7 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
285
  $htmlData['newsletter_reply_email'] = $newsletter['newsletter_reply_email'];
286
  $htmlData['newsletter_reply_name'] = $newsletter['newsletter_sender_name'];
287
 
288
- //$model->saveSendMailContent($htmlData);
289
 
290
  // Save the recipients in sendmailqueue table
291
  foreach ($recipients as $recipient) {
@@ -301,21 +393,19 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
301
  $recipientData['subscriber_name'] = $recipientData['subscriber_email'];
302
  }
303
 
 
304
 
305
- // Saving in mailqueue
306
- //$model->saveSendMailQueue($recipientData);
307
  }
308
 
309
  if(!$isTest) {
310
  $newsletter->setNewsletterMailingDate($this->_getCurrentDate());
311
  }
312
 
 
 
313
  $newsletter->save();
314
-
315
- $recipients['newsletter']['subject'] = $newsletter['newsletter_subject'];
316
- $recipients['newsletter']['body'] = $htmlData['newsletter_body'];
317
 
318
- return $recipients;
319
 
320
  } catch (Exception $e) {
321
  Mage::log($e->getMessage());
@@ -326,36 +416,27 @@ class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_
326
  }
327
  }
328
 
329
-
330
  /**
331
- * Method for sending the newsletter
332
- *
333
- * @access private
334
- * @param string $name
335
- * @param string $email
336
- * @param string $activationLink
337
  */
338
- private function _sendNewsletter($name, $email, $subject, $content, $format, $activationLink, $isTest)
339
  {
340
- $action = ($isTest ? 'sendnewstest' : 'sendnews');
341
-
342
- try {
343
- Mage::helper('postman/email')->sendEmail($name, $email,
344
- $subject, $content,
345
- $action, $format,
346
- $activationLink);
347
- Mage::getSingleton('adminhtml/session')->addSuccess(sprintf(Mage::helper('postman')
348
- ->__('The newsletter and recipient (%s) were successfully saved in the sendmail-Tables'),$name));
349
- } catch (Exception $e) {
350
- Mage::log($e->getMessage());
351
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')
352
- ->__('An error occured while sending the newsletter'));
353
- $this->_redirect('*/*/');
354
  }
355
 
 
356
  }
357
-
358
-
 
359
  /**
360
  * Method to get the current date and time
361
  *
34
  */
35
  class DMK_Postman_Adminhtml_Newsletters_UnsentController extends Mage_Adminhtml_Controller_Action
36
  {
37
+ /**
38
+ * Method to set the page title for the grid
39
+ *
40
+ * @access protected
41
+ * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
42
+ */
43
  protected function _setPageTitle()
44
  {
45
  return $this->_title($this->__('DMK Postman'))->_title($this->__('Newsletters unsent'));
46
  }
47
 
48
+ /**
49
+ * Method to set the page title for edit form
50
+ *
51
+ * @access protected
52
+ * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
53
+ */
54
  protected function _setEditPageTitle()
55
  {
56
  return $this->_title($this->__('DMK Postman'))->_title($this->__('Edit Newsletter'));
62
  * @access protected
63
  * @return DMK_Postman_Adminhtml_Newsletters_UnsentController
64
  */
65
+ protected function _initAction()
66
+ {
67
+ $this->loadLayout()
68
+ ->_setActiveMenu('postman/newsletters_unsent')
69
+ ->_addBreadcrumb(Mage::helper('postman')->__('Newsletters unsent'), Mage::helper('postman')->__('Newsletters unsent'));
70
+ return $this;
71
+ }
72
 
73
+ /**
74
+ * Method to prepare and display the grid for unsent newsletters
75
+ *
76
+ * @access public
77
+ */
78
+ public function indexAction() {
79
+ $this->_setPageTitle();
80
+ $this->_initAction();
81
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent'));
82
+
83
+ $block = $this->getLayout()->createBlock('Mage_Core_Block_Template',
84
+ 'dialog-block',
85
+ array('template' => 'postman/dialogbox.phtml'));
86
+ $this->getLayout()->getBlock('content')->append($block);
87
+
88
+ $this->renderLayout();
89
+ }
90
 
91
  /**
92
  * Method to create a new newsletter (is forwarded to edit action)
93
  *
94
  * @access public
95
  */
96
+ public function newAction()
97
+ {
98
+ $this->_forward('edit');
99
+ }
100
 
101
  /**
102
  * Method to create/edit a newsletter
104
  * @access public
105
  * @return ???
106
  */
107
+ public function editAction()
108
+ {
109
+ $this->_setEditPageTitle();
110
 
111
+ // init model
112
+ $model = Mage::getModel('postman/newsletters_unsent');
113
+ if ($this->getRequest()->getParam('newsletter_id')) {
114
+ $model->load($this->getRequest()->getParam('newsletter_id'));
115
+ }
 
 
116
 
117
+ Mage::register('newsletter_unsent_data', $model);
118
+
119
+ $this->loadLayout();
120
+ $this->_setActiveMenu('postman/newsletters_unsent');
121
+
122
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent_edit'))
123
+ ->_addLeft($this->getLayout()->createBlock('postman/adminhtml_newsletters_unsent_edit_tabs'));
124
+ $this->renderLayout();
125
+ }
126
 
127
  /**
128
  * Method to save a newsletter
136
  try {
137
  $postData = $this->getRequest()->getPost();
138
  $model = Mage::getModel('postman/newsletters_unsent');
139
+ $model_st = Mage::getModel('postman/newsletters_statistic_basic');
140
  $newsId = $this->getRequest()->getParam('newsletter_id');
141
  $user = Mage::getSingleton('admin/session');
142
  $userId = $user->getUser()->getUserId();
148
  ->setNewsletterLastModification($this->_getCurrentDate())
149
  ->setNewsletterAuthor($userId)
150
  ->save();
151
+ $model->saveNewslettersLists($model->getNewsletterId(), $postData['lists']);
152
+
153
+ // ADD statistics
154
+ $model_st->setNewsletterId($model->getNewsletterId())
155
+ ->setNewsletterName($model->getNewsletterSubject())
156
+ ->setNewsletterCode($model_st->getTrackingCode())
157
+ ->save();
158
  } else {
159
  // UPDATE
160
  $model->addData($postData)
209
 
210
  /**
211
  * Method to send a test newsletter to testrecipients
 
212
  * @access public
213
+ * @return void
214
  */
215
+ public function sendTestnewsletterAction()
216
+ {
217
+ // prepare for sending
218
+ $data = $this->_prepareNewsletterForSending(1);
219
+
220
+ // set the sending counter to 0
221
+ $cnt = 0;
222
+
223
+ // errors
224
+ $errors = array();
225
+
226
+ foreach($data['recipientData'] as $r) {
227
+ if(empty($r['subscriber_id'])) continue;
228
+
229
+ $model = Mage::getModel('postman/newsletters_unsent');
230
+
231
+ $model->setSubscriberName($r['subscriber_name']);
232
+ $model->setSubscriberEmail($r['subscriber_email']);
233
+ $model->setTemplate($data['newsletterObj']->getNewsletterTemplate());
234
+ $model->setSubject($data['textData']['newsletter_subject']);
235
+ $model->setContent($data['htmlData']['newsletter_body']);
236
+ $model->setSubscriberEmailformat($r['subscriber_emailformat']);
237
+
238
+ // send email
239
+ $ret = Mage::dispatchEvent('send_testnewsletter_email',array('model'=>$model));
240
+
241
+ // increment count
242
+ $cnt++;
243
+
244
+ // collect errors
245
+ if(!$ret) {
246
+ $errors[] = $model->getSubscriberEmail();
247
  }
248
+ }
249
+
250
+ if(empty($errors)) {
251
+ Mage::getSingleton('adminhtml/session')->addSuccess(sprintf(Mage::helper('postman')
252
+ ->__('The newsletter has successfully been sent to %s subscribers'),$cnt));
253
+ } else {
254
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')
255
+ ->__('An error occured while sending the newsletter'));
256
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')
257
+ ->__('Emails could not be sent to:').implode(', ',$errors));
258
+ }
259
+
260
+ $this->_redirect('*/*/');
261
+ }
262
 
263
  /**
264
  * Method to send a newsletter to the selected mailing lists
265
+ * @access public
266
+ * @return void
267
  */
268
+ public function sendNewsletterAction()
269
+ {
270
+ // prepare for sending
271
+ $data = $this->_prepareNewsletterForSending();
272
+
273
+ // create stats object
274
+ $stats = Mage::getModel('postman/newsletters_statistic_basic');
275
+
276
+ // set the sending counter to 0
277
+ $cnt = 0;
278
+
279
+ // errors
280
+ $errors = array();
281
+
282
+ foreach($data['recipientData'] as $r) {
283
+ if(empty($r['subscriber_id'])) continue;
284
+
285
+ $id = $data['newsletterObj']->getNewsletterId();
286
+ // load stats model
287
+ $stats->load($id, 'newsletter_id');
288
+
289
+ $model = Mage::getModel('postman/newsletters_unsent');
290
+ $model->setNewsletterId($id);
291
+ $model->setSubscriberName($r['subscriber_name']);
292
+ $model->setSubscriberEmail($r['subscriber_email']);
293
+ $model->setTemplate($data['newsletterObj']->getNewsletterTemplate());
294
+ $model->setSubject($data['textData']['newsletter_subject']);
295
+ $model->setContent($data['htmlData']['newsletter_body']);
296
+ $model->setSubscriberEmailformat($r['subscriber_emailformat']);
297
+ $model->setTrackingCode($stats->getNewsletterCode());
298
+
299
+ // send email
300
+ $ret = Mage::dispatchEvent('send_newsletter_email',array('model'=>$model));
301
+ if($ret==false) {
302
+ array_push($error, $model->getSubscriberEmail());
303
  }
304
+
305
+ // increment count
306
+ $cnt++;
307
+ }
308
+
309
+ // save of email totally send, sunscriber_cnt
310
+ $stats->setSubscriberCnt($cnt)
311
+ ->setSentStamp(Mage::getSingleton('core/date')->gmtDate())
312
+ ->save();
313
+
314
+ if(empty($errors)) {
315
+ Mage::getSingleton('adminhtml/session')->addSuccess(sprintf(Mage::helper('postman')
316
+ ->__('The newsletter has successfully been sent to %s subscribers'),$cnt));
317
+ } else {
318
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('postman')
319
+ ->__('An error occured while sending the newsletter'));
320
+ }
321
+
322
+ $this->_redirect('*/*/');
323
+ }
324
 
325
  /**
326
  * Method to prepare newsletter data for sending and saving
327
  * in newseletter queue
328
+ * @param int $isTest=0 Specifiy if this should only be a test newsletter
329
+ * @return array
330
  */
331
  private function _prepareNewsletterForSending($isTest = 0)
332
  {
333
+ $newsletter_id = $this->getRequest()->getParam('newsletter_id');
334
+ if($newsletter_id) {
335
  try {
336
+ $returnArray = array();
337
  $model = Mage::getModel('postman/newsletters_unsent');
338
 
339
+ // get mailing lists
340
+ $arrLists = $model->getSelectedLists($newsletter_id);
341
+
342
  $newsletter = $model->load($newsletter_id);
 
 
343
 
344
+ // get recipients
345
+ $recipients = $model->getRecipients($isTest, $newsletter_id, $arrLists);
346
+ if(empty($recipients)) {
347
+ Mage::getSingleton('adminhtml/session')
348
+ ->addError(Mage::helper('postman')
349
+ ->__('No recipients were found for this newsletter'));
350
+ $this->_redirect('*/*/');
351
+ }
352
+
353
+
354
+ $nextId = $model->getNextId();
355
+
356
  $textData = array();
357
  $textData['sendmailcontent_id'] = $nextId;
358
  $textData['sendmailcontent_emailformat'] = 0;
364
  $textData['newsletter_reply_email'] = $newsletter['newsletter_reply_email'];
365
  $textData['newsletter_reply_name'] = $newsletter['newsletter_sender_name'];
366
 
367
+ $returnArray['textData'] = $textData;
368
 
369
  $htmlData = array();
370
  $htmlData['sendmailcontent_id'] = $nextId;
377
  $htmlData['newsletter_reply_email'] = $newsletter['newsletter_reply_email'];
378
  $htmlData['newsletter_reply_name'] = $newsletter['newsletter_sender_name'];
379
 
380
+ $returnArray['htmlData'] = $htmlData;
381
 
382
  // Save the recipients in sendmailqueue table
383
  foreach ($recipients as $recipient) {
393
  $recipientData['subscriber_name'] = $recipientData['subscriber_email'];
394
  }
395
 
396
+ $returnArray['recipientData'][] = $recipientData;
397
 
 
 
398
  }
399
 
400
  if(!$isTest) {
401
  $newsletter->setNewsletterMailingDate($this->_getCurrentDate());
402
  }
403
 
404
+ $returnArray['newsletterObj'] = $newsletter;
405
+
406
  $newsletter->save();
 
 
 
407
 
408
+ return $returnArray;
409
 
410
  } catch (Exception $e) {
411
  Mage::log($e->getMessage());
416
  }
417
  }
418
 
 
419
  /**
420
+ * Adds a newsletter to the queue
421
+ *
422
+ * @access public
423
+ * @return void
 
 
424
  */
425
+ public function addNewsletterToQueueAction()
426
  {
427
+ $returnArray = $this->_prepareNewsletterForSending();
428
+ $model = Mage::getModel('postman/newsletters_unsent');
429
+ $model->saveSendMailContent($returnArray['textData']);
430
+ $model->saveSendMailContent($returnArray['htmlData']);
431
+ foreach($returnArray['recipientData'] as $r) {
432
+ $model->saveSendMailQueue($r);
 
 
 
 
 
 
 
 
433
  }
434
 
435
+ $this->_redirect('*/*/');
436
  }
437
+
438
+
439
+
440
  /**
441
  * Method to get the current date and time
442
  *
app/code/local/DMK/Postman/controllers/Adminhtml/Subscribers/SubscribersController.php CHANGED
@@ -1,266 +1,274 @@
1
- <?php
2
-
3
- /**
4
- * Magento
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
13
- * obtain it through the world-wide-web, please send an email
14
- * to license@magentocommerce.com so we can send you a copy immediately.
15
- *
16
- * DISCLAIMER
17
- *
18
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19
- * versions in the future. If you wish to customize Magento for your
20
- * needs please refer to http://www.magentocommerce.com for more information.
21
- *
22
- * @version 0.1.0
23
- * @package DMK Postman
24
- * @subpackage Subscribers
25
- * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
- */
28
-
29
- /**
30
- * DMK Postman Adminhtml Subscribers Subscribers Controller
31
- *
32
- * @package DMK Postman
33
- * @subpackage Subscribers
34
- */
35
- class DMK_Postman_Adminhtml_Subscribers_SubscribersController extends Mage_Adminhtml_Controller_Action
36
- {
37
- /**
38
- * Method to set the page title for the grid
39
- *
40
- * @access protected
41
- * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
42
- */
43
- protected function _setPageTitle()
44
- {
45
- return $this->_title($this->__('DMK Postman'))->_title($this->__('Subscribers (confirmed/unconfirmed)'));
46
- }
47
-
48
- /**
49
- * Method to set the page title for edit form
50
- *
51
- * @access protected
52
- * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
53
- */
54
- protected function _setEditPageTitle()
55
- {
56
- return $this->_title($this->__('DMK Postman'))->_title($this->__('Edit subscriber'));
57
- }
58
-
59
- /**
60
- * Method to set the active menu and breadcrumbs
61
- *
62
- * @access protected
63
- * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
64
- */
65
- protected function _initAction()
66
- {
67
- $this->loadLayout()
68
- ->_setActiveMenu('postman/subscribers_subscribers')
69
- ->_addBreadcrumb(Mage::helper('postman')->__('Subscribers (confirmed/unconfirmed)'), Mage::helper('postman')->__('Subscribers (confirmed/unconfirmed)'));
70
- return $this;
71
- }
72
-
73
- /**
74
- * Method to prepare and display the subscribers grid
75
- *
76
- * @access public
77
- */
78
- public function indexAction() {
79
- $this->_setPageTitle();
80
- $this->_initAction();
81
- $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers'));
82
- $this->renderLayout();
83
- }
84
-
85
- /**
86
- * Method to create a new subscriber (is forwarded to edit action)
87
- *
88
- * @access public
89
- */
90
- public function newAction()
91
- {
92
- $this->_forward('edit');
93
- }
94
-
95
- /**
96
- * Method to create/edit a subscriber
97
- *
98
- * @access public
99
- * @return ???
100
- */
101
- public function editAction()
102
- {
103
- $this->_setEditPageTitle();
104
-
105
- $model = Mage::getModel('postman/subscribers_subscribers');
106
-
107
- if ($id = $this->getRequest()->getParam('subscriber_id')) {
108
- $model->load($id);
109
- }
110
-
111
- Mage::register('subscriber_subscriber_data', $model);
112
-
113
- $this->loadLayout();
114
- $this->_setActiveMenu('postman/subscribers_subscribers');
115
-
116
- $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit'))
117
- ->_addLeft($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tabs'));
118
- $this->renderLayout();
119
- }
120
-
121
- /**
122
- * Method to save a subscriber
123
- *
124
- * @access public
125
- * @return ???
126
- */
127
- public function saveAction()
128
- {
129
- if ( $this->getRequest()->getPost() ) {
130
- try {
131
- $postData = $this->getRequest()->getPost();
132
-
133
- $session = Mage::getSingleton('adminhtml/session');
134
- $error = Mage::helper('postman/email')->checkDuplicateEmailFormat($postData['subscriber_email'],
135
- $postData['subscriber_emailformat'],
136
- $this->getRequest()->getParam('subscriber_id')
137
- );
138
- if($error) {
139
- $session->addError(Mage::helper('postman')->__('Email address with given format already exists'));
140
- $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
141
- return;
142
- }
143
-
144
- $model = Mage::getModel('postman/subscribers_subscribers');
145
- $customerId = $model->getCustomerId($postData['subscriber_email']);
146
-
147
- if(!empty($customerId)) {
148
- $postData['customer_id'] = $customerId;
149
- }
150
-
151
- if(array_key_exists('lists', $postData)) {
152
- $model->setSelectedListsForSubscriber($postData['lists'],
153
- $this->getRequest()
154
- ->getParam('subscriber_id')
155
- );
156
- unset($postData['lists']);
157
- }
158
-
159
- if (!$this->getRequest()->getParam('subscriber_id')) {
160
- $model->addData($postData);
161
-
162
- if (array_key_exists('confirm',$postData)) {
163
- $model->setSubscriberStatus(1)
164
- ->setSubscriberConfirmationDate($this->getCurrentDate());
165
- } else {
166
- $model->setSubscriberStatus(0)
167
- ->setSubscriberRegistrationDate($this->getCurrentDate());
168
- }
169
- $model->save();
170
- } else {
171
- if(!$postData['subscriber_status']) {
172
- $model->setSubscriberStatus(0);
173
- }
174
-
175
- $model->addData($postData)
176
- ->save();
177
- }
178
-
179
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The subscriber was successfully saved'));
180
- Mage::getSingleton('adminhtml/session')->setData(false);
181
-
182
- if ($this->getRequest()->getParam('back')) {
183
- $this->_redirect('*/*/edit', array('subscriber_id' => $model->getId()));
184
- return;
185
- }
186
- $this->_redirect('*/*/');
187
- return;
188
- } catch (Exception $e) {
189
- Mage::log($e->getMessage());
190
- Mage::getSingleton('adminhtml/session')->setData($this->getRequest()->getPost());
191
- $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
192
- return;
193
- }
194
- }
195
- print "dudu";
196
- die();
197
- $this->_redirect('*/*/');
198
- }
199
-
200
- /**
201
- * Method to delete a subscriber
202
- *
203
- * @access public
204
- * @return ???
205
- */
206
- public function deleteAction()
207
- {
208
- if( $this->getRequest()->getParam('subscriber_id') > 0 ) {
209
- try {
210
- $model = Mage::getModel('postman/subscribers_subscribers');
211
- $model->setId($this->getRequest()->getParam('subscriber_id'))
212
- ->delete();
213
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')
214
- ->__('The subscriber has successfully been deleted'));
215
- $this->_redirect('*/*/index');
216
- } catch (Exception $e) {
217
- Mage::log($e->getMessage());
218
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
219
- $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
220
- }
221
- }
222
- $this->_redirect('*/*/');
223
- }
224
-
225
- /**
226
- * Method to get the current date and time
227
- *
228
- * @access private
229
- * @return timestamp (??) Current date
230
- */
231
- private function getCurrentDate()
232
- {
233
- $model = Mage::getModel('postman/subscribers_subscribers');
234
- $currentDate = $model->getCurrentDate();
235
-
236
- return $currentDate;
237
- }
238
-
239
- /**
240
- * Method to get the customer ID referring to the e-mail address
241
- *
242
- * @access private
243
- * @return int Customer ID
244
- */
245
- private function getCustomerId($email)
246
- {
247
- $model = Mage::getModel('postman/subscribers_subscribers');
248
- $id = $model->getCustomerId($email);
249
-
250
- return $id;
251
- }
252
-
253
- /**
254
- * Method to get the admin ID referring to the e-mail address
255
- *
256
- * @access private
257
- * @return int Admin ID
258
- */
259
- private function getAdminId($email)
260
- {
261
- $model = Mage::getModel('postman/subscribers_subscribers');
262
- $id = $model->getAdminId($email);
263
-
264
- return $id;
265
- }
 
 
 
 
 
 
 
 
266
  }
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @version 0.1.0
23
+ * @package DMK Postman
24
+ * @subpackage Subscribers
25
+ * @copyright (C) 2011 das medienkombinat <kontakt@das-medienkombinat.de>
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ /**
30
+ * DMK Postman Adminhtml Subscribers Subscribers Controller
31
+ *
32
+ * @package DMK Postman
33
+ * @subpackage Subscribers
34
+ */
35
+ class DMK_Postman_Adminhtml_Subscribers_SubscribersController extends Mage_Adminhtml_Controller_Action
36
+ {
37
+ /**
38
+ * Method to set the page title for the grid
39
+ *
40
+ * @access protected
41
+ * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
42
+ */
43
+ protected function _setPageTitle()
44
+ {
45
+ return $this->_title($this->__('DMK Postman'))->_title($this->__('Subscribers (confirmed/unconfirmed)'));
46
+ }
47
+
48
+ /**
49
+ * Method to set the page title for edit form
50
+ *
51
+ * @access protected
52
+ * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
53
+ */
54
+ protected function _setEditPageTitle()
55
+ {
56
+ return $this->_title($this->__('DMK Postman'))->_title($this->__('Edit subscriber'));
57
+ }
58
+
59
+ /**
60
+ * Method to set the active menu and breadcrumbs
61
+ *
62
+ * @access protected
63
+ * @return DMK_Postman_Adminhtml_Subscribers_SubscribersController
64
+ */
65
+ protected function _initAction()
66
+ {
67
+ $this->loadLayout()
68
+ ->_setActiveMenu('postman/subscribers_subscribers')
69
+ ->_addBreadcrumb(Mage::helper('postman')->__('Subscribers (confirmed/unconfirmed)'), Mage::helper('postman')->__('Subscribers (confirmed/unconfirmed)'));
70
+ return $this;
71
+ }
72
+
73
+ /**
74
+ * Method to prepare and display the subscribers grid
75
+ *
76
+ * @access public
77
+ */
78
+ public function indexAction() {
79
+ $this->_setPageTitle();
80
+ $this->_initAction();
81
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers'));
82
+ $this->renderLayout();
83
+ }
84
+
85
+ /**
86
+ * Method to create a new subscriber (is forwarded to edit action)
87
+ *
88
+ * @access public
89
+ */
90
+ public function newAction()
91
+ {
92
+ $this->_forward('edit');
93
+ }
94
+
95
+ /**
96
+ * Method to create/edit a subscriber
97
+ *
98
+ * @access public
99
+ * @return ???
100
+ */
101
+ public function editAction()
102
+ {
103
+ $this->_setEditPageTitle();
104
+
105
+ $model = Mage::getModel('postman/subscribers_subscribers');
106
+
107
+ if ($id = $this->getRequest()->getParam('subscriber_id')) {
108
+ $model->load($id);
109
+ }
110
+
111
+ Mage::register('subscriber_subscriber_data', $model);
112
+
113
+ $this->loadLayout();
114
+ $this->_setActiveMenu('postman/subscribers_subscribers');
115
+
116
+ $this->_addContent($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit'))
117
+ ->_addLeft($this->getLayout()->createBlock('postman/adminhtml_subscribers_subscribers_edit_tabs'));
118
+ $this->renderLayout();
119
+ }
120
+
121
+ /**
122
+ * Method to save a subscriber
123
+ *
124
+ * @access public
125
+ * @return ???
126
+ */
127
+ public function saveAction()
128
+ {
129
+ if($this->getRequest()->getPost()) {
130
+ try {
131
+ // get user session
132
+ $session = Mage::getSingleton('admin/session')->getUser();
133
+
134
+ // init model
135
+ $model = Mage::getModel('postman/subscribers_subscribers');
136
+ if($this->getRequest()->getParam('subscriber_id')) {
137
+ $model = $model->load($this->getRequest()->getParam('subscriber_id'),
138
+ 'subscriber_id');
139
+ }
140
+
141
+ $postData = $this->getRequest()->getPost();
142
+
143
+ // check for duplicate email format
144
+ $error = Mage::helper('postman/email')->checkDuplicateEmailFormat($postData['subscriber_email'],
145
+ $postData['subscriber_emailformat'],
146
+ $this->getRequest()->getParam('subscriber_id')
147
+ );
148
+ if($error) {
149
+ $session->addError(Mage::helper('postman')->__('Email address with given format already exists'));
150
+ $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
151
+ return;
152
+ }
153
+
154
+ $postData['customer_id'] = $model->getCustomerId($postData['subscriber_email']);
155
+ $postData['subscriber_registered_by'] = $session->getId();
156
+ $postData['subscriber_confirmed_by'] = $session->getId();
157
+
158
+ if (!$this->getRequest()->getParam('subscriber_id')) {
159
+ $model->addData($postData);
160
+
161
+ if(array_key_exists('confirm',$postData)
162
+ || !empty($postData['subscriber_status'])
163
+ ) {
164
+ $model->setSubscriberStatus(1)
165
+ ->setSubscriberRegistrationDate($this->getCurrentDate())
166
+ ->setSubscriberConfirmationDate($this->getCurrentDate());
167
+ } else {
168
+ $model->setSubscriberStatus(0)
169
+ ->setSubscriberRegistrationDate($this->getCurrentDate());
170
+ }
171
+ $model->save();
172
+ } else {
173
+ if(!$postData['subscriber_status']) {
174
+ $model->setSubscriberStatus(0);
175
+ }
176
+
177
+ $model->addData($postData)
178
+ ->save();
179
+ }
180
+
181
+ if(array_key_exists('lists', $postData)) {
182
+ $model->setSelectedListsForSubscriber($postData['lists'],
183
+ $model->getSubscriberId()
184
+ );
185
+ }
186
+
187
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The subscriber was successfully saved'));
188
+ Mage::getSingleton('adminhtml/session')->setData(false);
189
+
190
+ if ($this->getRequest()->getParam('back')) {
191
+ $this->_redirect('*/*/edit', array('subscriber_id' => $model->getId()));
192
+ return;
193
+ }
194
+ $this->_redirect('*/*/');
195
+ return;
196
+ } catch (Exception $e) {
197
+ Mage::log($e->getMessage());
198
+ Mage::getSingleton('adminhtml/session')->setData($this->getRequest()->getPost());
199
+ $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
200
+ return;
201
+ }
202
+ }
203
+ print "dudu";
204
+ die();
205
+ $this->_redirect('*/*/');
206
+ }
207
+
208
+ /**
209
+ * Method to delete a subscriber
210
+ *
211
+ * @access public
212
+ * @return ???
213
+ */
214
+ public function deleteAction()
215
+ {
216
+ if( $this->getRequest()->getParam('subscriber_id') > 0 ) {
217
+ try {
218
+ $model = Mage::getModel('postman/subscribers_subscribers');
219
+ $model->setId($this->getRequest()->getParam('subscriber_id'))
220
+ ->delete();
221
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')
222
+ ->__('The subscriber has successfully been deleted'));
223
+ $this->_redirect('*/*/index');
224
+ } catch (Exception $e) {
225
+ Mage::log($e->getMessage());
226
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
227
+ $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
228
+ }
229
+ }
230
+ $this->_redirect('*/*/');
231
+ }
232
+
233
+ /**
234
+ * Method to get the current date and time
235
+ *
236
+ * @access private
237
+ * @return timestamp (??) Current date
238
+ */
239
+ private function getCurrentDate()
240
+ {
241
+ $model = Mage::getModel('postman/subscribers_subscribers');
242
+ $currentDate = $model->getCurrentDate();
243
+
244
+ return $currentDate;
245
+ }
246
+
247
+ /**
248
+ * Method to get the customer ID referring to the e-mail address
249
+ *
250
+ * @access private
251
+ * @return int Customer ID
252
+ */
253
+ private function getCustomerId($email)
254
+ {
255
+ $model = Mage::getModel('postman/subscribers_subscribers');
256
+ $id = $model->getCustomerId($email);
257
+
258
+ return $id;
259
+ }
260
+
261
+ /**
262
+ * Method to get the admin ID referring to the e-mail address
263
+ *
264
+ * @access private
265
+ * @return int Admin ID
266
+ */
267
+ private function getAdminId($email)
268
+ {
269
+ $model = Mage::getModel('postman/subscribers_subscribers');
270
+ $id = $model->getAdminId($email);
271
+
272
+ return $id;
273
+ }
274
  }
app/code/local/DMK/Postman/controllers/Adminhtml/Subscribers/TestrecipientsController.php CHANGED
@@ -129,57 +129,72 @@ class DMK_Postman_Adminhtml_Subscribers_TestrecipientsController extends Mage_Ad
129
  */
130
  public function saveAction()
131
  {
132
- if ( $this->getRequest()->getPost() ) {
133
- $postData = $this->getRequest()->getPost();
134
- $session = Mage::getSingleton('adminhtml/session');
135
- $error = Mage::helper('postman/email')->checkDuplicateEmailFormat($postData['subscriber_email'],
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  $postData['subscriber_emailformat'],
137
  $this->getRequest()->getParam('subscriber_id')
138
  );
139
- if($error) {
140
- $session->addError(Mage::helper('postman')->__('Email address with given format already exists'));
141
- $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
142
- return;
143
- }
144
 
145
- try {
146
- $customerId = 0;
147
- $adminId = 0;
148
- $model = Mage::getModel('postman/subscribers_testrecipients');
149
-
150
- $user = Mage::getSingleton('admin/session');
151
- $registeredById = $user->getUser()->getUserId();
152
-
153
- $user = Mage::getSingleton('customer/session');
154
- if (!$this->getRequest()->getParam('subscriber_id')) {
155
- $model->addData($postData)
156
- ->setSubscriberStatus(9)
157
- ->setSubscriberRegistrationDate($this->getCurrentDate())
158
- ->setSubscriberRegisteredBy($registeredById)
159
- ->setSubscriberConfirmationDate($this->getCurrentDate())
160
- ->save();
161
- } else {
162
- $model->addData($postData)
163
- ->save();
164
- }
165
-
166
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The testrecipient was successfully saved'));
167
- Mage::getSingleton('adminhtml/session')->setData(false);
168
-
169
- // check if 'Save and Continue'
170
- if ($this->getRequest()->getParam('back')) {
171
- $this->_redirect('*/*/edit', array('subscriber_id' => $model->getId()));
172
- return;
173
- }
174
 
175
- $this->_redirect('*/*/');
 
 
 
 
 
176
  return;
177
- } catch (Exception $e) {
178
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
179
- Mage::getSingleton('adminhtml/session')->setData($this->getRequest()->getPost());
180
- $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
181
- return;
182
- }
 
 
 
 
183
  }
184
 
185
  $this->_redirect('*/*/');
129
  */
130
  public function saveAction()
131
  {
132
+ if($this->getRequest()->getPost()) {
133
+ try {
134
+ // get user session
135
+ $session = Mage::getSingleton('admin/session')->getUser();
136
+
137
+ // init model
138
+ $model = Mage::getModel('postman/subscribers_testrecipients');
139
+ if($this->getRequest()->getParam('subscriber_id')) {
140
+ $model = $model->load(
141
+ $this->getRequest()->getParam('subscriber_id'),
142
+ 'subscriber_id'
143
+ );
144
+ }
145
+
146
+ $postData = $this->getRequest()->getPost();
147
+
148
+ $error = Mage::helper('postman/email')->checkDuplicateEmailFormat($postData['subscriber_email'],
149
  $postData['subscriber_emailformat'],
150
  $this->getRequest()->getParam('subscriber_id')
151
  );
152
+ if($error) {
153
+ $session->addError(Mage::helper('postman')->__('Email address with given format already exists'));
154
+ $this->_redirect('*/*/edit', array('subscriber_id' => $this->getRequest()->getParam('subscriber_id')));
155
+ return;
156
+ }
157
 
158
+ $postData['subscriber_registered_by'] = $session->getId();
159
+ $postData['subscriber_confirmed_by'] = $session->getId();
160
+
161
+ if (!$model->getSubscriberId()) {
162
+ // ADD
163
+ $model->addData($postData)
164
+ ->setSubscriberStatus(9)
165
+ ->setSubscriberRegistrationDate($this->getCurrentDate())
166
+ ->setSubscriberConfirmationDate($this->getCurrentDate());
167
+ } else {
168
+ // UPDATE
169
+ $model->addData($postData);
170
+ }
171
+
172
+ $model->save();
173
+
174
+ if(array_key_exists('lists', $postData)) {
175
+ Mage::getModel('postman/subscribers_subscribers')->setSelectedListsForSubscriber(
176
+ $postData['lists'],
177
+ $model->getSubscriberId()
178
+ );
179
+ }
 
 
 
 
 
 
 
180
 
181
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('postman')->__('The testrecipient was successfully saved'));
182
+ Mage::getSingleton('adminhtml/session')->setData(false);
183
+
184
+ // check if 'Save and Continue'
185
+ if ($this->getRequest()->getParam('back')) {
186
+ $this->_redirect('*/*/edit', array('subscriber_id' => $model->getSubscriberId()));
187
  return;
188
+ }
189
+
190
+ $this->_redirect('*/*/');
191
+ return;
192
+ } catch (Exception $e) {
193
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
194
+ Mage::getSingleton('adminhtml/session')->setData($this->getRequest()->getPost());
195
+ $this->_redirect('*/*/edit', array('subscriber_id' => $model->getSubscriberId()));
196
+ return;
197
+ }
198
  }
199
 
200
  $this->_redirect('*/*/');
app/code/local/DMK/Postman/controllers/Adminhtml/WidgetController.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Widget
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Widgets management controller
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Widget
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+
35
+ include_once("Mage/Widget/controllers/Adminhtml/WidgetController.php");
36
+ class DMK_Postman_Adminhtml_WidgetController extends Mage_Widget_Adminhtml_WidgetController
37
+ {
38
+
39
+ /**
40
+ * Format widget pseudo-code for inserting into wysiwyg editor
41
+ */
42
+ public function buildWidgetAction()
43
+ {
44
+ $type = $this->getRequest()->getPost('widget_type');
45
+ $params = $this->getRequest()->getPost('parameters', array());
46
+ $asIs = $this->getRequest()->getPost('as_is');
47
+ $html = Mage::getSingleton('widget/widget')->getWidgetDeclaration($type, $params, $asIs);
48
+
49
+ if(array_key_exists('id_path', $params) && array_key_exists('show_product_name', $params)){
50
+ $this->getResponse()->setBody(DMK_Postman_Block_Widget_Product::getProductHtml($params));
51
+ } else {
52
+ $this->getResponse()->setBody($html);
53
+ }
54
+ }
55
+ }
app/code/local/DMK/Postman/controllers/IndexController.php CHANGED
@@ -32,31 +32,61 @@
32
  */
33
  class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
34
  {
35
- /**
36
- * Method to prepare the display
37
- *
38
- * @access public
39
- */
40
- public function indexAction()
41
- {
42
- $this->loadLayout();
43
- $this->renderLayout();
44
- }
45
 
46
-
47
- /*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  * Acton when user (un)subscribes for the newsletter
49
- *
50
  * @return void
51
  */
52
- public function newslettersubscriberAction(){
 
 
 
 
53
  $isSubscribed = $this->_isSubscribed();
54
  $wantNewslett = $this->_wantNewsletter();
55
-
56
- //print "isSub:" . $isSubscribed . "<br>";
57
- //print "want:" . $wantNewslett;
58
- //die();
59
-
 
 
 
 
 
60
  if($isSubscribed != $wantNewslett) {
61
  if($wantNewslett) {
62
  $this->_wantNewsletter(true);
@@ -68,7 +98,7 @@ class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
68
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
69
  'name' => 'main-msg-block',
70
  'template' => 'postman/newsletter/register/already_registered.phtml'));
71
- }
72
  }
73
 
74
 
@@ -172,7 +202,14 @@ class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
172
  $this->_update($w);
173
  }
174
  }
175
-
 
 
 
 
 
 
 
176
 
177
  /**
178
  * Generate activate and deactivate links
@@ -244,7 +281,9 @@ class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
244
  $clEmail = strip_tags($this->getRequest()->getParam('clientemail'));
245
  }
246
 
247
- $clIp = $this->getRequest()->getParam('clientip');
 
 
248
  $clToken = $clEmail . $model->getCurrentDate();
249
 
250
  $subscriberActivation = $this->_generateLinks('activate', 'validate', array('token'=>$clToken));
@@ -265,12 +304,9 @@ class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
265
  $model->setSubscriberEditlink($subscriberDeactivation);
266
  $model->save();
267
 
268
- //Send the mail
269
- Mage::helper('postman/Email')->sendEmail($clName, $clEmail,
270
- '', '',
271
- 'register', $emailformat,
272
- $subscriberActivation);
273
-
274
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
275
  'name' => 'main-msg-block',
276
  'template' => 'postman/newsletter/subscribe/success.phtml'));
@@ -285,12 +321,10 @@ class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
285
  'template' => 'postman/newsletter/register/please_register.phtml'));
286
  }
287
  } else {
288
- if($this->_isLoggedIn() && $this->_isSubscribed()) {
289
- $this->_getPostmanSubscriber()->delete();
290
- $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
291
- 'name' => 'main-msg-block',
292
- 'template' => 'postman/newsletter/deactivate/account_deactive.phtml'));
293
- }
294
  }
295
  }
296
  }
32
  */
33
  class DMK_Postman_IndexController extends Mage_Core_Controller_Front_Action
34
  {
35
+ /**
36
+ * @var object DMK_Postman_Block_Frontend_Newsletter_Registration
37
+ */
38
+ private $_objDMKRegistration = NULL;
 
 
 
 
 
 
39
 
40
+ /**
41
+ * Method to prepare the display
42
+ * @access public
43
+ * @return void
44
+ */
45
+ public function indexAction()
46
+ {
47
+ $this->loadLayout();
48
+ $this->renderLayout();
49
+ }
50
+
51
+ /**
52
+ * Evaluate tracking code and increment the newsletter open count
53
+ * @access public
54
+ * @return void;
55
+ */
56
+ public function trackAction()
57
+ {
58
+ $tcode = $this->getRequest()->getParam('tc');
59
+ $model = Mage::getModel('postman/newsletters_statistic_basic')
60
+ ->load($tcode, 'newsletter_code');
61
+ $newCnt= $model->getOpenCnt() + 1;
62
+ $model->setOpenCnt($newCnt)
63
+ ->save();
64
+ }
65
+
66
+
67
+
68
+ /**
69
  * Acton when user (un)subscribes for the newsletter
70
+ * @access public
71
  * @return void
72
  */
73
+ public function newslettersubscriberAction(){
74
+ if($this->_objDMKRegistration === NULL) {
75
+ $this->_objDMKRegistration = new DMK_Postman_Block_Frontend_Newsletter_Registration();
76
+ }
77
+
78
  $isSubscribed = $this->_isSubscribed();
79
  $wantNewslett = $this->_wantNewsletter();
80
+
81
+ if($this->_objDMKRegistration->showDisclaimer()
82
+ && !$this->_hasDisclaimerAccepted()
83
+ && !$this->_isSubscribed()
84
+ ) {
85
+ $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
86
+ 'name' => 'main-msg-block',
87
+ 'template' => 'postman/newsletter/register/disclaimer_not_confirmed.phtml'));
88
+ }
89
+
90
  if($isSubscribed != $wantNewslett) {
91
  if($wantNewslett) {
92
  $this->_wantNewsletter(true);
98
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
99
  'name' => 'main-msg-block',
100
  'template' => 'postman/newsletter/register/already_registered.phtml'));
101
+ }
102
  }
103
 
104
 
202
  $this->_update($w);
203
  }
204
  }
205
+
206
+ /**
207
+ * Check if disclaimer/haftungsausschluss has been accepted
208
+ */
209
+ private function _hasDisclaimerAccepted()
210
+ {
211
+ return strip_tags($this->getRequest()->getParam('disclaimer'));
212
+ }
213
 
214
  /**
215
  * Generate activate and deactivate links
281
  $clEmail = strip_tags($this->getRequest()->getParam('clientemail'));
282
  }
283
 
284
+ $clIp = $this->getRequest()->getParam('clientip') == NULL
285
+ ? ''
286
+ : $this->getRequest()->getParam('clientip');
287
  $clToken = $clEmail . $model->getCurrentDate();
288
 
289
  $subscriberActivation = $this->_generateLinks('activate', 'validate', array('token'=>$clToken));
304
  $model->setSubscriberEditlink($subscriberDeactivation);
305
  $model->save();
306
 
307
+ Mage::dispatchEvent('send_register_email',array('model'=>$model));
308
+
309
+
 
 
 
310
  $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
311
  'name' => 'main-msg-block',
312
  'template' => 'postman/newsletter/subscribe/success.phtml'));
321
  'template' => 'postman/newsletter/register/please_register.phtml'));
322
  }
323
  } else {
324
+ $this->_getPostmanSubscriber()->delete();
325
+ $this->_updateLayout(array('block' => 'Mage_Core_Block_Template',
326
+ 'name' => 'main-msg-block',
327
+ 'template' => 'postman/newsletter/deactivate/account_deactive.phtml'));
 
 
328
  }
329
  }
330
  }
app/code/local/DMK/Postman/controllers/Newsletter/ManageController.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once 'Mage/Newsletter/controllers/ManageController.php';
4
+ class DMK_Postman_Newsletter_ManageController extends Mage_Newsletter_ManageController
5
+ {
6
+ public function indexAction()
7
+ {
8
+ $this->loadLayout();
9
+ $this->_initLayoutMessages('customer/session');
10
+ $this->_initLayoutMessages('catalog/session');
11
+
12
+ if ($block = $this->getLayout()->getBlock('customer_newsletter')) {
13
+ $block->setRefererUrl($this->_getRefererUrl());
14
+ }
15
+ $this->getLayout()->getBlock('head')->setTitle($this->__('Newsletter Subscription'));
16
+ $this->renderLayout();
17
+ }
18
+
19
+ public function saveAction()
20
+ {
21
+ if (!$this->_validateFormKey()) {
22
+ return $this->_redirect('customer/account/');
23
+ }
24
+ try {
25
+ $status = (boolean)$this->getRequest()->getParam('is_subscribed', false)
26
+ ? 1 : 0;
27
+ Mage::getModel('postman/subscribers_subscribers')->load(Mage::getSingleton('customer/session')->getCustomer()->getId(),'customer_id')
28
+ ->setSubscriberStatus($status)
29
+ ->save();
30
+ if ((boolean)$this->getRequest()->getParam('is_subscribed', false)) {
31
+ Mage::getSingleton('customer/session')->addSuccess($this->__('The subscription has been saved.'));
32
+ } else {
33
+ Mage::getSingleton('customer/session')->addSuccess($this->__('The subscription has been removed.'));
34
+ }
35
+ }
36
+ catch (Exception $e) {
37
+ Mage::getSingleton('customer/session')->addError($this->__('An error occurred while saving your subscription.'));
38
+ }
39
+ $this->_redirect('customer/account/');
40
+ }
41
+ }
app/code/local/DMK/Postman/etc/adminhtml.xml CHANGED
@@ -38,12 +38,12 @@
38
  <sort_order>0</sort_order>
39
  <children>
40
  <newsletter_unsent translate="title" module="postman">
41
- <title>Newsletters unsent</title>
42
  <sort_order>0</sort_order>
43
  <action>postman/adminhtml_newsletters_unsent</action>
44
  </newsletter_unsent>
45
  <newsletter_sent translate="title" module="postman">
46
- <title>Newsletters sent</title>
47
  <sort_order>1</sort_order>
48
  <action>postman/adminhtml_newsletters_sent</action>
49
  </newsletter_sent>
@@ -52,6 +52,16 @@
52
  <sort_order>2</sort_order>
53
  <action>postman/adminhtml_newsletters_queue</action>
54
  </newsletter_queue>-->
 
 
 
 
 
 
 
 
 
 
55
  </children>
56
  </newsletter>
57
  <subscriber translate="title" module="postman">
@@ -116,13 +126,21 @@
116
  <sort_order>0</sort_order>
117
  </newsletter_unsent>
118
  <newsletter_sent translate="title" module="postman">
119
- <title>Newsletters sent</title>
120
  <sort_order>1</sort_order>
121
  </newsletter_sent>
122
  <!--<newsletter_queue translate="title" module="postman">
123
  <title>Newsletters queue</title>
124
  <sort_order>2</sort_order>
125
  </newsletter_queue>-->
 
 
 
 
 
 
 
 
126
  </children>
127
  </newsletter>
128
  <subscriber translate="title" module="postman">
38
  <sort_order>0</sort_order>
39
  <children>
40
  <newsletter_unsent translate="title" module="postman">
41
+ <title>Create a new newsletter</title>
42
  <sort_order>0</sort_order>
43
  <action>postman/adminhtml_newsletters_unsent</action>
44
  </newsletter_unsent>
45
  <newsletter_sent translate="title" module="postman">
46
+ <title>Archive</title>
47
  <sort_order>1</sort_order>
48
  <action>postman/adminhtml_newsletters_sent</action>
49
  </newsletter_sent>
52
  <sort_order>2</sort_order>
53
  <action>postman/adminhtml_newsletters_queue</action>
54
  </newsletter_queue>-->
55
+ <newsletter_statistic translate="title" module="postman">
56
+ <title>Newsletters statistic</title>
57
+ <sort_order>3</sort_order>
58
+ <action>postman/adminhtml_newsletters_statistic</action>
59
+ </newsletter_statistic>
60
+ <newsletter_template translate="title" module="postman">
61
+ <title>Newsletter templates</title>
62
+ <sort_order>4</sort_order>
63
+ <action>postman/adminhtml_newsletters_template</action>
64
+ </newsletter_template>
65
  </children>
66
  </newsletter>
67
  <subscriber translate="title" module="postman">
126
  <sort_order>0</sort_order>
127
  </newsletter_unsent>
128
  <newsletter_sent translate="title" module="postman">
129
+ <title>Archive</title>
130
  <sort_order>1</sort_order>
131
  </newsletter_sent>
132
  <!--<newsletter_queue translate="title" module="postman">
133
  <title>Newsletters queue</title>
134
  <sort_order>2</sort_order>
135
  </newsletter_queue>-->
136
+ <newsletter_statistic translate="title" module="postman">
137
+ <title>Newsletters statistic</title>
138
+ <sort_order>3</sort_order>
139
+ </newsletter_statistic>
140
+ <newsletter_template translate="title" module="postman">
141
+ <title>Newsletter templates</title>
142
+ <sort_order>4</sort_order>
143
+ </newsletter_template>
144
  </children>
145
  </newsletter>
146
  <subscriber translate="title" module="postman">
app/code/local/DMK/Postman/etc/config.xml CHANGED
@@ -48,7 +48,7 @@
48
  <layout>
49
  <updates>
50
  <postman>
51
- <file>postman.xml</file>
52
  </postman>
53
  </updates>
54
  </layout>
@@ -56,7 +56,7 @@
56
  <modules>
57
  <DMK_Postman>
58
  <files>
59
- <default>DMK_Postman.csv</default>
60
  </files>
61
  </DMK_Postman>
62
  </modules>
@@ -64,6 +64,13 @@
64
  </frontend>
65
  <admin>
66
  <routers>
 
 
 
 
 
 
 
67
  <postman>
68
  <use>admin</use>
69
  <args>
@@ -78,7 +85,7 @@
78
  <modules>
79
  <DMK_Postman>
80
  <files>
81
- <default>DMK_Postman.csv</default>
82
  </files>
83
  </DMK_Postman>
84
  </modules>
@@ -92,144 +99,197 @@
92
  </layout>
93
  </adminhtml>
94
  <global>
 
 
 
 
 
 
 
95
 
96
- <template>
97
- <email>
98
- <postman_general_registration_settings_default_registration_template translate="label" module="postman">
99
- <label>New postman registration subscriber</label>
100
- <file>postman/subscriber_confirm.html</file>
101
- <type>html</type>
102
- </postman_general_registration_settings_default_registration_template>
103
-
104
- <postman_general_registration_settings_default_editlink_template translate="label" module="postman">
105
- <label>New postman editlink subscriber</label>
106
- <file>postman/subscriber_confirm.html</file>
107
- <type>html</type>
108
- </postman_general_registration_settings_default_editlink_template>
109
-
110
- <postman_general_sending_settings_sending_testmail_template translate="label" module="postman">
111
- <label>Testmail</label>
112
- <file>postman/testmail.html</file>
113
- <type>html</type>
114
- </postman_general_sending_settings_sending_testmail_template>
115
-
116
- <postman_general_sending_settings_sending_email_template translate="label" module="postman">
117
- <label>Newsletter</label>
118
- <file>postman/newsletter_template.html</file>
119
- <type>html</type>
120
- </postman_general_sending_settings_sending_email_template>
121
- </email>
122
- </template>
123
-
124
- <models>
125
- <postman>
126
- <class>DMK_Postman_Model</class>
127
- <resourceModel>postman_mysql4</resourceModel>
128
- </postman>
129
- <postman_mysql4>
130
- <class>DMK_Postman_Model_Mysql4</class>
131
- <entities>
132
- <postman_lists>
133
- <table>dmk_postman_lists</table>
134
- </postman_lists>
135
- <postman_lists_store>
136
- <table>dmk_postman_lists_store</table>
137
- </postman_lists_store>
138
- <postman_lists_customer_group>
139
- <table>dmk_postman_lists_customer_group</table>
140
- </postman_lists_customer_group>
141
- <postman_newsletters>
142
- <table>dmk_postman_newsletters</table>
143
- </postman_newsletters>
144
- <postman_newsletters_lists>
145
- <table>dmk_postman_newsletters_lists</table>
146
- </postman_newsletters_lists>
147
- <postman_sendmailcontent>
148
- <table>dmk_postman_sendmailcontent</table>
149
- </postman_sendmailcontent>
150
- <postman_sendmailqueue>
151
- <table>dmk_postman_sendmailqueue</table>
152
- </postman_sendmailqueue>
153
- <postman_subscribers>
154
- <table>dmk_postman_subscribers</table>
155
- </postman_subscribers>
156
- <postman_subscribers_lists>
157
- <table>dmk_postman_subscribers_lists</table>
158
- </postman_subscribers_lists>
159
- </entities>
160
- </postman_mysql4>
161
- <core>
162
- <rewrite>
163
- <email_template>DMK_Postman_Model_Email_Template</email_template>
164
- </rewrite>
165
- </core>
166
- </models>
167
- <resources>
168
- <postman_setup>
169
- <setup>
170
- <module>DMK_Postman</module>
171
- </setup>
172
- <connection>
173
- <use>core_setup</use>
174
- </connection>
175
- </postman_setup>
176
- <postman_write>
177
- <connection>
178
- <use>core_write</use>
179
- </connection>
180
- </postman_write>
181
- <postman_read>
182
- <connection>
183
- <use>core_read</use>
184
- </connection>
185
- </postman_read>
186
- </resources>
187
- <blocks>
188
- <postman>
189
- <class>DMK_Postman_Block</class>
190
- </postman>
191
- <adminhtml>
192
- <rewrite>
193
- <widget_grid_column_renderer_action>DMK_Postman_Block_Adminhtml_Widget_Grid_Column_Renderer_Action</widget_grid_column_renderer_action>
194
- </rewrite>
195
- </adminhtml>
196
- </blocks>
197
- <helpers>
198
- <postman>
199
- <class>DMK_Postman_Helper</class>
200
- </postman>
201
- </helpers>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  </global>
203
  <default>
 
 
 
 
 
 
 
 
 
 
 
204
 
205
- <postman_general>
206
- <registration_settings>
207
- <default_registration_template>
208
- postman_general_registration_settings_default_registration_template
209
- </default_registration_template>
210
- <default_editlink_template>
211
- postman_general_registration_settings_default_editlink_template
212
- </default_editlink_template>
213
-
214
- </registration_settings>
215
- <sending_settings>
216
- <sending_testmail_template>
217
- postman_general_sending_settings_sending_testmail_template
218
- </sending_testmail_template>
219
- <sending_email_template>
220
- postman_general_sending_settings_sending_email_template
221
- </sending_email_template>
222
- </sending_settings>
223
- </postman_general>
224
- </default>
225
-
226
  <crontab>
227
  <jobs>
228
  <dmk_postman>
229
-
230
- <run>
231
- <model>postman/observer::checkForEmailsToSend</model>
232
- </run>
233
  </dmk_postman>
234
  </jobs>
235
  </crontab>
48
  <layout>
49
  <updates>
50
  <postman>
51
+ <file>dmk/postman.xml</file>
52
  </postman>
53
  </updates>
54
  </layout>
56
  <modules>
57
  <DMK_Postman>
58
  <files>
59
+ <default>dmk/DMK_Postman.csv</default>
60
  </files>
61
  </DMK_Postman>
62
  </modules>
64
  </frontend>
65
  <admin>
66
  <routers>
67
+ <adminhtml>
68
+ <args>
69
+ <modules>
70
+ <postman before="Mage_Widget_Adminhtml">DMK_Postman_Adminhtml</postman>
71
+ </modules>
72
+ </args>
73
+ </adminhtml>
74
  <postman>
75
  <use>admin</use>
76
  <args>
85
  <modules>
86
  <DMK_Postman>
87
  <files>
88
+ <default>dmk/DMK_Postman.csv</default>
89
  </files>
90
  </DMK_Postman>
91
  </modules>
99
  </layout>
100
  </adminhtml>
101
  <global>
102
+ <template>
103
+ <email>
104
+ <postman_general_registration_settings_default_registration_template translate="label" module="postman">
105
+ <label>New postman registration subscriber</label>
106
+ <file>postman/subscriber_confirm.html</file>
107
+ <type>html</type>
108
+ </postman_general_registration_settings_default_registration_template>
109
 
110
+ <postman_general_registration_settings_default_editlink_template translate="label" module="postman">
111
+ <label>New postman editlink subscriber</label>
112
+ <file>postman/subscriber_confirm.html</file>
113
+ <type>html</type>
114
+ </postman_general_registration_settings_default_editlink_template>
115
+ </email>
116
+ </template>
117
+ <models>
118
+ <postman>
119
+ <class>DMK_Postman_Model</class>
120
+ <resourceModel>postman_mysql4</resourceModel>
121
+ </postman>
122
+ <postman_mysql4>
123
+ <class>DMK_Postman_Model_Mysql4</class>
124
+ <entities>
125
+ <postman_lists>
126
+ <table>dmk_postman_lists</table>
127
+ </postman_lists>
128
+ <postman_lists_store>
129
+ <table>dmk_postman_lists_store</table>
130
+ </postman_lists_store>
131
+ <postman_lists_customer_group>
132
+ <table>dmk_postman_lists_customer_group</table>
133
+ </postman_lists_customer_group>
134
+ <postman_newsletters>
135
+ <table>dmk_postman_newsletters</table>
136
+ </postman_newsletters>
137
+ <postman_newsletters_lists>
138
+ <table>dmk_postman_newsletters_lists</table>
139
+ </postman_newsletters_lists>
140
+ <postman_newsletters_statistic_basic>
141
+ <table>dmk_postman_newsletter_statistic</table>
142
+ </postman_newsletters_statistic_basic>
143
+ <postman_newsletters_template>
144
+ <table>dmk_postman_newsletter_template</table>
145
+ </postman_newsletters_template>
146
+ <postman_sendmailcontent>
147
+ <table>dmk_postman_sendmailcontent</table>
148
+ </postman_sendmailcontent>
149
+ <postman_sendmailqueue>
150
+ <table>dmk_postman_sendmailqueue</table>
151
+ </postman_sendmailqueue>
152
+ <postman_subscribers>
153
+ <table>dmk_postman_subscribers</table>
154
+ </postman_subscribers>
155
+ <postman_subscribers_lists>
156
+ <table>dmk_postman_subscribers_lists</table>
157
+ </postman_subscribers_lists>
158
+ </entities>
159
+ </postman_mysql4>
160
+ <core>
161
+ <rewrite>
162
+ <email_template>DMK_Postman_Model_Email_Template</email_template>
163
+ <variable_config>DMK_Postman_Model_Variable_Config</variable_config>
164
+ </rewrite>
165
+ </core>
166
+ </models>
167
+ <events>
168
+ <send_register_email>
169
+ <observers>
170
+ <dmk_postman_observer>
171
+ <type>singleton</type>
172
+ <class>DMK_Postman_Model_Observer</class>
173
+ <method>sendRegisterEmail</method>
174
+ </dmk_postman_observer>
175
+ </observers>
176
+ </send_register_email>
177
+ <send_testnewsletter_email>
178
+ <observers>
179
+ <dmk_postman_observer>
180
+ <type>singleton</type>
181
+ <class>DMK_Postman_Model_Observer</class>
182
+ <method>sendTestnewsletterEmail</method>
183
+ </dmk_postman_observer>
184
+ </observers>
185
+ </send_testnewsletter_email>
186
+ <send_newsletter_email>
187
+ <observers>
188
+ <dmk_postman_observer>
189
+ <type>singleton</type>
190
+ <class>DMK_Postman_Model_Observer</class>
191
+ <method>sendNewsletterEmail</method>
192
+ </dmk_postman_observer>
193
+ </observers>
194
+ </send_newsletter_email>
195
+ <cms_wysiwyg_config_fullpage>
196
+ <observers>
197
+ <fullpage_observer>
198
+ <class>DMK_Postman_Model_Tinymce_Observer</class>
199
+ <method>prepareWysiwygFullpagePluginConfig</method>
200
+ </fullpage_observer>
201
+ </observers>
202
+ </cms_wysiwyg_config_fullpage>
203
+ <cms_wysiwyg_config_paths>
204
+ <observers>
205
+ <fullpage_observer>
206
+ <class>DMK_Postman_Model_Tinymce_Observer</class>
207
+ <method>prepareWysiwygPaths</method>
208
+ </fullpage_observer>
209
+ </observers>
210
+ </cms_wysiwyg_config_paths>
211
+ </events>
212
+ <resources>
213
+ <postman_setup>
214
+ <setup>
215
+ <module>DMK_Postman</module>
216
+ </setup>
217
+ <connection>
218
+ <use>core_setup</use>
219
+ </connection>
220
+ </postman_setup>
221
+ <postman_write>
222
+ <connection>
223
+ <use>core_write</use>
224
+ </connection>
225
+ </postman_write>
226
+ <postman_read>
227
+ <connection>
228
+ <use>core_read</use>
229
+ </connection>
230
+ </postman_read>
231
+ </resources>
232
+ <blocks>
233
+ <postman>
234
+ <class>DMK_Postman_Block</class>
235
+ </postman>
236
+ <customer>
237
+ <rewrite>
238
+ <newsletter>DMK_Postman_Block_Frontend_Customer_Newsletter</newsletter>
239
+ <form_register>DMK_Postman_Block_Frontend_Customer_Form_Register</form_register>
240
+ <account_dashboard>DMK_Postman_Block_Frontend_Customer_Account_Dashboard</account_dashboard>
241
+ <account_dashboard_info>DMK_Postman_Block_Frontend_Customer_Account_Dashboard_Info</account_dashboard_info>
242
+ </rewrite>
243
+ </customer>
244
+ <adminhtml>
245
+ <rewrite>
246
+ <widget_grid_column_renderer_action>DMK_Postman_Block_Adminhtml_Widget_Grid_Column_Renderer_Action</widget_grid_column_renderer_action>
247
+ <widget_grid_column>DMK_Postman_Block_Adminhtml_Widget_Grid_Column</widget_grid_column>
248
+ </rewrite>
249
+ </adminhtml>
250
+ </blocks>
251
+ <rewrite>
252
+ <dmk_postman_newsletter_manage>
253
+ <from><![CDATA[#^/newsletter/manage/#]]></from>
254
+ <to>/postman/newsletter_manage/</to>
255
+ </dmk_postman_newsletter_manage>
256
+ <dmk_postman_adminhtml_customer>
257
+ <from><![CDATA[#^/adminhtml/customer/#]]></from>
258
+ <to>/postman/adminhtml_customer/</to>
259
+ </dmk_postman_adminhtml_customer>
260
+ </rewrite>
261
+ <helpers>
262
+ <postman>
263
+ <class>DMK_Postman_Helper</class>
264
+ </postman>
265
+ </helpers>
266
  </global>
267
  <default>
268
+ <postman_general>
269
+ <registration_settings>
270
+ <default_registration_template>
271
+ postman_general_registration_settings_default_registration_template
272
+ </default_registration_template>
273
+ <default_editlink_template>
274
+ postman_general_registration_settings_default_editlink_template
275
+ </default_editlink_template>
276
+ <default_cancelsubscription_url>
277
+ postman/index/newslettersubscriber/wantnewsletter/0
278
+ </default_cancelsubscription_url>
279
 
280
+ </registration_settings>
281
+ <sending_settings>
282
+ <sending_email_template>
283
+ postman_general_sending_settings_sending_email_template
284
+ </sending_email_template>
285
+ </sending_settings>
286
+ </postman_general>
287
+ </default>
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  <crontab>
289
  <jobs>
290
  <dmk_postman>
291
+ <schedule><cron_expr>* * * * * *</cron_expr></schedule>
292
+ <run><model>postman/observer::checkForEmailsToSend</model></run>
 
 
293
  </dmk_postman>
294
  </jobs>
295
  </crontab>
app/code/local/DMK/Postman/etc/system.xml CHANGED
@@ -108,18 +108,8 @@
108
  <show_in_website>1</show_in_website>
109
  <show_in_store>1</show_in_store>
110
  </sending_trials-->
111
- <sending_testmail_template translate="label">
112
- <label>Testmail Template</label>
113
- <comment><![CDATA[Choose a template for your testmail]]></comment>
114
- <frontend_type>select</frontend_type>
115
- <source_model>adminhtml/system_config_source_email_template</source_model>
116
- <sort_order>7</sort_order>
117
- <show_in_default>1</show_in_default>
118
- <show_in_website>1</show_in_website>
119
- <show_in_store>1</show_in_store>
120
- </sending_testmail_template>
121
  <sending_email_template translate="label">
122
- <label>Newsletter Template</label>
123
  <comment><![CDATA[Choose a template for your newsletter email]]></comment>
124
  <frontend_type>select</frontend_type>
125
  <source_model>adminhtml/system_config_source_email_template</source_model>
@@ -207,6 +197,15 @@
207
  <show_in_website>1</show_in_website>
208
  <show_in_store>1</show_in_store>
209
  </default_editlink_template>
 
 
 
 
 
 
 
 
 
210
  </fields>
211
  </registration_settings>
212
 
108
  <show_in_website>1</show_in_website>
109
  <show_in_store>1</show_in_store>
110
  </sending_trials-->
 
 
 
 
 
 
 
 
 
 
111
  <sending_email_template translate="label">
112
+ <label>Newsletter template</label>
113
  <comment><![CDATA[Choose a template for your newsletter email]]></comment>
114
  <frontend_type>select</frontend_type>
115
  <source_model>adminhtml/system_config_source_email_template</source_model>
197
  <show_in_website>1</show_in_website>
198
  <show_in_store>1</show_in_store>
199
  </default_editlink_template>
200
+ <default_cancelsubscription_url translate="label">
201
+ <label>Default cancel subscription url</label>
202
+ <comment><![CDATA[Please enter here the default url for canceling a subscription. You can specify one which is different from the stores base url.]]></comment>
203
+ <frontend_type>text</frontend_type>
204
+ <sort_order>8</sort_order>
205
+ <show_in_default>1</show_in_default>
206
+ <show_in_website>1</show_in_website>
207
+ <show_in_store>1</show_in_store>
208
+ </default_cancelsubscription_url>
209
  </fields>
210
  </registration_settings>
211
 
app/code/local/DMK/Postman/etc/widget.xml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <widget>
3
+ <complete_catalog_product type="postman/widget_product" translate="name description">
4
+ <name>Add product details</name>
5
+ <description type="desc">Add product details</description>
6
+ <parameters>
7
+
8
+ <id_path translate="label">
9
+ <visible>1</visible>
10
+ <required>1</required>
11
+ <label>Product</label>
12
+ <type>label</type>
13
+ <helper_block>
14
+ <type>adminhtml/catalog_product_widget_chooser</type>
15
+ <data>
16
+ <button translate="open">
17
+ <open>Select Product...</open>
18
+ </button>
19
+ </data>
20
+ </helper_block>
21
+ <sort_order>0</sort_order>
22
+ </id_path>
23
+
24
+ <show_product_name translate="label description">
25
+ <label>Show Product name</label>
26
+ <visible>1</visible>
27
+ <type>select</type>
28
+ <values>
29
+ <yes translate="label">
30
+ <value>true</value>
31
+ <label>Yes</label>
32
+ </yes>
33
+ <no translate="label">
34
+ <value>false</value>
35
+ <label>No</label>
36
+ </no>
37
+ </values>
38
+ </show_product_name>
39
+
40
+ <show_product_image>
41
+ <label>Show Product image</label>
42
+ <visible>1</visible>
43
+ <type>select</type>
44
+ <values>
45
+ <yes translate="label">
46
+ <value>true</value>
47
+ <label>Yes</label>
48
+ </yes>
49
+ <no translate="label">
50
+ <value>false</value>
51
+ <label>No</label>
52
+ </no>
53
+ </values>
54
+ </show_product_image>
55
+
56
+ <show_product_price>
57
+ <label>Show Product price</label>
58
+ <visible>1</visible>
59
+ <type>select</type>
60
+ <values>
61
+ <yes translate="label">
62
+ <value>true</value>
63
+ <label>Yes</label>
64
+ </yes>
65
+ <no translate="label">
66
+ <value>false</value>
67
+ <label>No</label>
68
+ </no>
69
+ </values>
70
+ </show_product_price>
71
+
72
+ <show_product_description>
73
+ <label>Show Product description</label>
74
+ <visible>1</visible>
75
+ <type>select</type>
76
+ <values>
77
+ <yes translate="label">
78
+ <value>true</value>
79
+ <label>Yes</label>
80
+ </yes>
81
+ <no translate="label">
82
+ <value>false</value>
83
+ <label>No</label>
84
+ </no>
85
+ </values>
86
+ </show_product_description>
87
+
88
+ </parameters>
89
+ </complete_catalog_product>
90
+ </widget>
app/code/local/DMK/Postman/sql/postman_setup/mysql4-install-0.1.0.php CHANGED
@@ -72,6 +72,7 @@ CREATE TABLE {$this->getTable('dmk_postman_lists_customer_group')} (
72
  DROP TABLE IF EXISTS {$this->getTable('dmk_postman_newsletters')};
73
  CREATE TABLE IF NOT EXISTS {$this->getTable('dmk_postman_newsletters')} (
74
  `newsletter_id` int(11) NOT NULL auto_increment,
 
75
  `newsletter_sender_name` varchar(255) NOT NULL,
76
  `newsletter_sender_email` varchar(100) NOT NULL,
77
  `newsletter_reply_email` varchar(100) NOT NULL,
@@ -157,8 +158,39 @@ CREATE TABLE IF NOT EXISTS {$this->getTable('dmk_postman_subscribers_lists')} (
157
  PRIMARY KEY (`subscriber_id`,`list_id`)
158
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  ");
161
 
162
-
163
-
164
  $installer->endSetup;
72
  DROP TABLE IF EXISTS {$this->getTable('dmk_postman_newsletters')};
73
  CREATE TABLE IF NOT EXISTS {$this->getTable('dmk_postman_newsletters')} (
74
  `newsletter_id` int(11) NOT NULL auto_increment,
75
+ `newsletter_template` int(3) NOT NULL,
76
  `newsletter_sender_name` varchar(255) NOT NULL,
77
  `newsletter_sender_email` varchar(100) NOT NULL,
78
  `newsletter_reply_email` varchar(100) NOT NULL,
158
  PRIMARY KEY (`subscriber_id`,`list_id`)
159
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
160
 
161
+ /*Table structure for table `dmk_postman_newsletter_statistic` */
162
+
163
+ DROP TABLE IF EXISTS {$this->getTable('dmk_postman_newsletters_statistic_basic')};
164
+ CREATE TABLE {$this->getTable('dmk_postman_newsletters_statistic_basic')} (
165
+ `id` int(10) NOT NULL AUTO_INCREMENT,
166
+ `newsletter_id` int(10) NOT NULL,
167
+ `newsletter_code` varchar(80) NOT NULL DEFAULT '',
168
+ `newsletter_name` varchar(50) NOT NULL DEFAULT '',
169
+ `subscriber_cnt` int(8) DEFAULT NULL,
170
+ `open_cnt` int(5) DEFAULT NULL,
171
+ `open_first_stamp` datetime DEFAULT NULL,
172
+ `open_last_stamp` datetime DEFAULT NULL,
173
+ `sent_stamp` datetime DEFAULT NULL,
174
+ PRIMARY KEY (`id`)
175
+ ) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;
176
+
177
+ /*Table structure for table `dmk_postman_newsletter_template` */
178
+
179
+ DROP TABLE IF EXISTS {$this->getTable('dmk_postman_newsletters_template')};
180
+ CREATE TABLE {$this->getTable('dmk_postman_newsletters_template')} (
181
+ `id` int(10) NOT NULL AUTO_INCREMENT,
182
+ `name` varchar(50) NOT NULL,
183
+ `content` text,
184
+ `create_stamp` datetime NOT NULL,
185
+ `modify_stamp` datetime NOT NULL,
186
+ `delete_stamp` datetime DEFAULT NULL,
187
+ PRIMARY KEY (`id`)
188
+ ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
189
+
190
+ INSERT INTO `dmk_postman_newsletter_template` VALUES ('0', 'No template', null, '2012-05-01 15:00:00', '2012-05-01 15:00:00', null);
191
+ INSERT INTO `dmk_postman_newsletter_template` VALUES ('1', 'Template with teaser', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\">\r\n body{margin:0; padding:0; font-family:Arial;}\r\n img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}\r\n table td{border-collapse:collapse;}\r\n</style>\r\n<title>Testnewsletter3</title>\r\n</head>\r\n<body style=\"font-family:Verdana,sans-serif;width:650px;margin:0;padding:0;font-size:12px;\">\r\n<table style=\"padding: 5px 20px 20px 0px; font-size: 12px; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"650px\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td width=\"50%\"><img src=\"{{skin url=images/postman}}/mkpostman_logo.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n<td>\r\n<h1 style=\"color: #0064a5; font-weight: bold;\">Demo-Shop</h1>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"padding: 15px 0px;\">\r\n<h2 style=\"color: #0064a5; font-weight: bold; line-height: 19px;\">HEADLINE</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"padding: 0px 0px 15px 0px;\">\r\n<h3 style=\"font-weight: normal; margin-bottom: 0pt;\">SUBHEADER</h3>\r\n<p style=\"margin-top: 0pt; font-size: 12px;\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Zum Shop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"padding: 0px 0px 15px 0px;\">\r\n<h2 style=\"color: #0064a5; font-weight: bold;\">HEADLINE2</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"650\">\r\n<tbody>\r\n<tr>\r\n<td style=\"border: 1px solid #0064a5; width: 650px; overflow: hidden;\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><img src=\"{{skin url=images/postman}}/platzhalter_teaser.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 11px; color: #fff; padding: 15px; font-weight: bold; background-color: #0064a5;\">\r\n<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.<br /><br /> <span style=\"font-weight: bold; color: #fff; text-align: center; text-decoration: underline;\">&raquo;&nbsp;Zum Shop</span></p>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 10px; padding: 0px 15px;\">Verantwortlich f&uuml;r diesen Newsletter ist die <a style=\"text-decoration: underline; color: #0064a5;\">Mustermann GmbH</a><br /><br />{{config path=\'general/store_information/address\'}}<br /><br /> Wenn Sie diesen Newsletter nicht mehr erhalten wollen, klicken Sie bitte <a href=\"{{var unsubscribeLink}}\">hier.</a></td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</body>\r\n</html>', '2012-05-01 15:00:00', '2012-05-01 15:00:00', null);
192
+ INSERT INTO `dmk_postman_newsletter_template` VALUES ('2', 'Template without sidebar', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\">\r\n body{margin:0; padding:0; font-family:Arial;}\r\n img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}\r\n table td{border-collapse:collapse;}\r\n</style>\r\n<title>Testnewsletter2</title>\r\n</head>\r\n<body style=\"font-family:Verdana,sans-serif;width:650px;margin:0;padding:0;font-size:12px;\">\r\n<table style=\"padding: 5px 20px 20px 0px; font-size: 12px; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"650px\">\r\n<tbody>\r\n<tr style=\"height: 150px;\">\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td width=\"50%\"><img src=\"{{skin url=images/postman}}/mkpostman_logo.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n<td width=\"50%\">\r\n<h1 style=\"color: #0064a5; font-weight: bold;\">Demo-Shop</h1>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie1</td>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie2</td>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie1</td>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie1</td>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie1</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<h2 style=\"color: #0064a5; font-weight: bold; line-height: 19px; margin-bottom: 15px; margin-top: 15px;\">HEADLINE</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<h3 style=\"font-weight: normal; margin-bottom: 0pt;\">SUBHEADER</h3>\r\n<p style=\"margin-top: 0pt; font-size: 12px;\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. <br /><br />Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Zum Shop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br />\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<h2 style=\"color: #0064a5; font-weight: bold; margin-top: 0;\">HEADLINE2</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 165px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"135px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px;\"><img src=\"{{skin url=images/postman}}/platzhalter_ohne_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 135px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Zum Shop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br />\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\">\r\n<h2 style=\"color: #0064a5; font-weight: bold;\">SIE FINDEN UNS AUCH BEI:</h2>\r\nFB | TW <br /> \r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td>Verantwortlich f&uuml;r diesen<br />Newsletter ist die<br /><a style=\"text-decoration: underline; color: #0064a5;\">Mustermann GmbH</a><br /><br /> {{config path=\'general/store_information/address\'}} <br /><br /><span style=\"font-size: 9px;\">Wenn Sie diesen Newsletter nicht mehr erhalten wollen, klicken Sie bitte <a href=\"{{var unsubscribeLink}}\">hier</a>.</span></td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</body>\r\n</html>', '2012-05-01 15:00:00', '2012-05-01 15:00:00', null);
193
+ INSERT INTO `dmk_postman_newsletter_template` VALUES ('3', 'Template with sidebar', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n<style type=\"text/css\"> \r\n body{margin:0; padding:0; font-family:Arial;}\r\n img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}\r\n table td{border-collapse:collapse;}\r\n</style>\r\n<title>Testnewsletter</title>\r\n</head>\r\n<body style=\"font-family:Verdana,sans-serif;width:650px;margin:0;padding:0;font-size:12px;\">\r\n<table style=\"padding: 5px 20px 20px 20px; font-size: 12px; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"650px\">\r\n<tbody>\r\n<tr style=\"height: 150px;\">\r\n<td width=\"120px\"><img src=\"{{skin url=images/postman}}/mkpostman_logo.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n<td>\r\n<h1 style=\"color: #0064a5; font-weight: bold;\">Demo-Shop</h1>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td valign=\"top\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"10\" width=\"120px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie1</td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie2</td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie3</td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie4</td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Kategorie5</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td colspan=\"3\">\r\n<h2 style=\"color: #0064a5; font-weight: bold; margin-top: 0pt; line-height: 19px; margin-bottom: 15px;\">HEADLINE</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td colspan=\"3\">\r\n<h3 style=\"font-weight: normal; margin-bottom: 0pt;\">SUBHEADER</h3>\r\n<p style=\"margin-top: 0pt; font-size: 12px;\">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. <br /><br />Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><br /> \r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Zum Shop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td colspan=\"3\"><br /> \r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td colspan=\"3\">\r\n<h2 style=\"color: #0064a5; font-weight: bold; margin-top: 15px;\">HEADLINE2</h2>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n<td style=\"width: 155px; padding-bottom: 20px;\">\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"125px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px;\"><img src=\"{{skin url=images/postman}}/platzhalter_mit_sidebar.jpg\" alt=\"{{var store.getFrontendName()}}\" _package=\"default\" /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 12px; border: 1px solid #0064a5; width: 125px; text-align: center; line-height: 20px; height: 20px; background-color: #3780b0; color: #ffffff;\">Preis in &euro;</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"85px\">\r\n<tbody>\r\n<tr>\r\n<td style=\"font-size: 12px; padding: 5px 15px; background-color: #0064a5; color: #fff; border-top: 1px solid #5497c2; border-left: 1px solid #5497c2; border-bottom: 1px solid #003c61; border-right: 1px solid #003c61;\">Zum Shop</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td colspan=\"3\"><br />\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n<tr>\r\n<td style=\"font-size: 10px; width: 120px;\">Verantwortlich f&uuml;r diesen<br />Newsletter ist die<br /><a style=\"text-decoration: underline; color: #0064a5;\">Mustermann GmbH</a><br /><br /> {{config path=\'general/store_information/address\'}}</td>\r\n<td align=\"center\">\r\n<h2 style=\"color: #0064a5; font-weight: bold;\">SIE FINDEN UNS AUCH BEI:</h2>\r\nFB | TW <br /> <br /> <span style=\"font-size: 9px;\">Wenn Sie diesen Newsletter nicht mehr erhalten wollen, klicken Sie bitte <a href=\"{{var unsubscribeLink}}\">hier</a>.</span></td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td colspan=\"3\"><br />\r\n<hr style=\"border: 1px dashed #0064a5;\" />\r\n<br /></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</body>\r\n</html>', '2012-05-01 15:00:00', '2012-05-01 15:00:00', null);
194
  ");
195
 
 
 
196
  $installer->endSetup;
app/code/local/Varien/Data/Form/Element/Fieldset.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Varien
22
+ * @package Varien_Data
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Form fieldset
30
+ *
31
+ * @category Varien
32
+ * @package Varien_Data
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Varien_Data_Form_Element_Fieldset extends Varien_Data_Form_Element_Abstract
36
+ {
37
+ /**
38
+ * Sort child elements by specified data key
39
+ *
40
+ * @var string
41
+ */
42
+ protected $_sortChildrenByKey = '';
43
+
44
+ /**
45
+ * Children sort direction
46
+ *
47
+ * @var int
48
+ */
49
+ protected $_sortChildrenDirection = SORT_ASC;
50
+
51
+ /**
52
+ * Enter description here...
53
+ *
54
+ * @param array $attributes
55
+ */
56
+ public function __construct($attributes=array())
57
+ {
58
+ parent::__construct($attributes);
59
+ $this->_renderer = Varien_Data_Form::getFieldsetRenderer();
60
+ $this->setType('fieldset');
61
+ }
62
+
63
+ /**
64
+ * Enter description here...
65
+ *
66
+ * @return string
67
+ */
68
+ public function getElementHtml()
69
+ {
70
+ $html = '<fieldset id="'.$this->getHtmlId().'"'.$this->serialize(array('class')).'>'."\n";
71
+ if ($this->getLegend()) {
72
+ $html.= '<legend>'.$this->getLegend().'</legend>'."\n";
73
+ }
74
+ $html.= $this->getChildrenHtml();
75
+ $html.= '</fieldset></div>'."\n";
76
+ $html.= $this->getAfterElementHtml();
77
+ return $html;
78
+ }
79
+
80
+ /**
81
+ * Enter description here...
82
+ *
83
+ * @return string
84
+ */
85
+ public function getChildrenHtml()
86
+ {
87
+ $html = '';
88
+ foreach ($this->getSortedElements() as $element) {
89
+ if ($element->getType() != 'fieldset') {
90
+ $html.= $element->toHtml();
91
+ }
92
+ }
93
+ return $html;
94
+ }
95
+
96
+ /**
97
+ * Enter description here...
98
+ *
99
+ * @return string
100
+ */
101
+ public function getSubFieldsetHtml()
102
+ {
103
+ $html = '';
104
+ foreach ($this->getSortedElements() as $element) {
105
+ if ($element->getType() == 'fieldset') {
106
+ $html.= $element->toHtml();
107
+ }
108
+ }
109
+ return $html;
110
+ }
111
+
112
+ /**
113
+ * Enter description here...
114
+ *
115
+ * @return string
116
+ */
117
+ public function getDefaultHtml()
118
+ {
119
+ $html = '<div><h4 class="icon-head head-edit-form fieldset-legend">'.$this->getLegend().'</h4>'."\n";
120
+ $html.= $this->getElementHtml();
121
+ return $html;
122
+ }
123
+
124
+ /**
125
+ * Enter description here...
126
+ *
127
+ * @param string $elementId
128
+ * @param string $type
129
+ * @param array $config
130
+ * @param boolean $after
131
+ * @return Varien_Data_Form_Element_Abstract
132
+ */
133
+ public function addField($elementId, $type, $config, $after=false)
134
+ {
135
+ if('newsletter_template' == $elementId) {
136
+ for($i=0;$i<=count($config['values']);$i++) {
137
+ $label = $config['values'][$i]['label'];
138
+ if(!empty($label)) {
139
+ $config['values'][$i]['label'] = Mage::helper('postman')->__($label);
140
+ }
141
+ }
142
+ }
143
+
144
+ $element = parent::addField($elementId, $type, $config, $after);
145
+
146
+ if ($renderer = Varien_Data_Form::getFieldsetElementRenderer()) {
147
+ $element->setRenderer($renderer);
148
+ }
149
+ return $element;
150
+ }
151
+
152
+ /**
153
+ * Commence sorting elements by values by specified data key
154
+ *
155
+ * @param string $key
156
+ * @param int $direction
157
+ * @return Varien_Data_Form_Element_Fieldset
158
+ */
159
+ public function setSortElementsByAttribute($key, $direction = SORT_ASC)
160
+ {
161
+ $this->_sortChildrenByKey = $key;
162
+ $this->_sortDirection = $direction;
163
+ return $this;
164
+ }
165
+
166
+ /**
167
+ * Get sorted elements as array
168
+ *
169
+ * @return array
170
+ */
171
+ public function getSortedElements()
172
+ {
173
+ $elements = array();
174
+ // sort children by value by specified key
175
+ if ($this->_sortChildrenByKey) {
176
+ $sortKey = $this->_sortChildrenByKey;
177
+ $uniqueIncrement = 0; // in case if there are elements with same values
178
+ foreach ($this->getElements() as $e) {
179
+ $key = '_' . $uniqueIncrement;
180
+ if ($e->hasData($sortKey)) {
181
+ $key = $e->getDataUsingMethod($sortKey) . $key;
182
+ }
183
+ $elements[$key] = $e;
184
+ $uniqueIncrement++;
185
+ }
186
+ ksort($elements, $this->_sortChildrenDirection);
187
+ $elements = array_values($elements);
188
+ }
189
+ else {
190
+ foreach ($this->getElements() as $element) {
191
+ $elements[] = $element;
192
+ }
193
+ }
194
+ return $elements;
195
+ }
196
+ }
app/design/adminhtml/default/default/layout/postman.xml CHANGED
@@ -2,10 +2,18 @@
2
 
3
  <layout version="0.1.0">
4
  <default>
 
 
 
 
5
  <reference name="head">
6
  <action method="addItem"><type>skin_css</type><name>jquery-ui-lightness/jquery-ui-1.8.16.custom.css</name></action>
 
7
  <action method="addItem"><type>skin_js</type><name>js/jquery/jquery-1.6.2.min.js</name></action>
8
  <action method="addItem"><type>skin_js</type><name>js/jquery/jquery-ui-1.8.16.custom.min.js</name></action>
 
 
 
9
  <action method="addItem"><type>skin_js</type><name>js/postman.js</name></action>
10
  </reference>
11
  </default>
2
 
3
  <layout version="0.1.0">
4
  <default>
5
+ <reference name="content">
6
+ <block type="core/template" name="magento_vars_js" template="postman/magento_vars_js.phtml" />
7
+ </reference>
8
+
9
  <reference name="head">
10
  <action method="addItem"><type>skin_css</type><name>jquery-ui-lightness/jquery-ui-1.8.16.custom.css</name></action>
11
+ <action method="addItem"><type>skin_css</type><name>jquery.jqplot/jquery.jqplot.min.css</name></action>
12
  <action method="addItem"><type>skin_js</type><name>js/jquery/jquery-1.6.2.min.js</name></action>
13
  <action method="addItem"><type>skin_js</type><name>js/jquery/jquery-ui-1.8.16.custom.min.js</name></action>
14
+ <action method="addItem"><type>skin_js</type><name>js/jquery/jquery.jqplot.min.js</name></action>
15
+ <action method="addItem"><type>skin_js</type><name>js/jquery/jqplot.pieRenderer.min.js</name></action>
16
+ <action method="addItem"><type>skin_js</type><name>js/jquery/excanvas.min.js</name></action>
17
  <action method="addItem"><type>skin_js</type><name>js/postman.js</name></action>
18
  </reference>
19
  </default>
app/design/adminhtml/default/default/template/postman/grid/container.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="content-header">
28
+ <table cellspacing="0">
29
+ <tr>
30
+ <td style="<?php echo $this->getHeaderWidth() ?>"><?php echo $this->getHeaderHtml() ?></td>
31
+ <td class="form-buttons"><?php echo $this->getButtonsHtml() ?></td>
32
+ </tr>
33
+ </table>
34
+ </div>
35
+ <div>
36
+ <?php echo $this->getGridHtml() ?>
37
+ </div>
38
+ <?php echo Mage::helper('postman/Data')->getPoweredBy(); ?>
app/design/adminhtml/default/default/template/postman/grid/container_with_hints.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="content-header">
28
+ <table cellspacing="0">
29
+ <tr>
30
+ <td style="<?php echo $this->getHeaderWidth() ?>"><?php echo $this->getHeaderHtml() ?></td>
31
+ <td class="form-buttons"><?php echo $this->getButtonsHtml() ?></td>
32
+ </tr>
33
+ </table>
34
+ </div>
35
+ <div>
36
+ <?php echo $this->existRecipientsHtml(); ?>
37
+ <?php echo $this->existTestrecipientsHtml(); ?>
38
+ <?php echo $this->existMailinglistsHtml(); ?>
39
+ <?php echo $this->getGridHtml() ?>
40
+ </div>
41
+ <?php echo Mage::helper('postman/Data')->getPoweredBy(); ?>
app/design/adminhtml/default/default/template/postman/magento_vars_js.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <script type="text/javascript">
2
+ var templateContentUrl = "<?php echo Mage::helper("adminhtml")->getUrl('*/adminhtml_newsletters_template/getTemplateContentById'); ?>";
3
+ </script>
app/design/adminhtml/default/default/template/postman/statistic/view.phtml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <?php echo $this->getHeaderHtml(); ?>
3
+ </div>
4
+ <div class="left">
5
+ <div id="chartOpenendSent" style="height:400px;width:400px;"></div>
6
+ </div>
7
+ <div class="content">
8
+ <table cellpadding="0" cellspacing="5">
9
+ <tr>
10
+ <td><?php echo $this->__('Sending date').':'; ?></td>
11
+ <td>
12
+ <?php
13
+ $stamp = $this->getSentStamp();
14
+ if(!empty($stamp)) {
15
+ echo $stamp;
16
+ } else {
17
+ echo $this->__('The newsletter has still not been sent');
18
+ }
19
+ ?>
20
+ </td>
21
+ </tr>
22
+ <tr>
23
+ <td><?php echo $this->__('Opened first').':'; ?></td>
24
+ <td>
25
+ <?php
26
+ $stamp = $this->getOpenFirst();
27
+ if(!empty($stamp)) {
28
+ echo $stamp;
29
+ } else {
30
+ echo '';
31
+ }
32
+ ?>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <td><?php echo $this->__('Opened last').':'; ?></td>
37
+ <td>
38
+ <?php
39
+ $stamp = $this->getOpenLast();
40
+ if(!empty($stamp)) {
41
+ echo $stamp;
42
+ } else {
43
+ echo '';
44
+ }
45
+ ?>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <td><?php echo $this->__('# subscribers').':'; ?></td>
50
+ <td><?php echo $this->getSubscriberCnt(); ?></td>
51
+ </tr>
52
+ <tr>
53
+ <td><?php echo $this->__('# Read newsletters').':'; ?></td>
54
+ <td><?php echo $this->getOpenCnt(); ?></td>
55
+ </tr>
56
+ <tr>
57
+ <td><?php echo $this->__('# Unread newsletters').':'; ?></td>
58
+ <td><?php echo $this->getUnreadCnt(); ?></td>
59
+ </tr>
60
+ </table>
61
+ </div>
62
+
63
+ <script type="text/javascript">
64
+ jQuery(document).ready(function(){
65
+ var data = [
66
+ ['<?php echo $this->__('read'); ?>', <?php echo $this->getOpenCnt(); ?>],
67
+ ['<?php echo $this->__('unread'); ?>', <?php echo $this->getUnreadCnt(); ?>]
68
+ ];
69
+ var plot1 = jQuery.jqplot ('chartOpenendSent', [data],
70
+ {
71
+ seriesDefaults: {
72
+ // Make this a pie chart.
73
+ renderer: jQuery.jqplot.PieRenderer,
74
+ rendererOptions: {
75
+ // Put data labels on the pie slices.
76
+ // By default, labels show the percentage of the slice.
77
+ showDataLabels: true
78
+ }
79
+ },
80
+ legend: { show:true, location: 'e' }
81
+ }
82
+ );
83
+ });
84
+ </script>
app/design/frontend/base/default/template/authorizenet/directpost/form.phtml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_Authorizenet_Block_Directpost_Form
29
+ */
30
+ ?>
31
+ <?php
32
+ $_form = $this;
33
+ $_code = $_form->getMethodCode();
34
+ $_method = $_form->getMethod();
35
+ $_controller = $this->helper('authorizenet')->getControllerName();
36
+ $_orderUrl = $this->helper('authorizenet')->getPlaceOrderFrontUrl();
37
+ ?>
38
+ <div class="buttons-set">
39
+ <!-- IFRAME for request to Authorize.net -->
40
+ <iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getJsUrl() ?>blank.html"></iframe>
41
+
42
+ <form id="co-directpost-form" action="#" method="post">
43
+ <fieldset>
44
+ <dl class="sp-methods">
45
+ <dt class="a-center"><?php echo $this->__('Credit Card Information') ?></dt>
46
+ <dd>
47
+ <ul id="payment_form_<?php echo $_code ?>" class="form-list">
48
+ <li>
49
+ <label for="<?php echo $_code ?>_cc_type" class="required"><em>*</em><?php echo $this->__('Credit Card Type') ?></label>
50
+ <div class="input-box">
51
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
52
+ <option value=""><?php echo $this->__('--Please Select--')?></option>
53
+ <?php $_ccType = $_form->getInfoData('cc_type') ?>
54
+ <?php foreach ($_form->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
55
+ <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
56
+ <?php endforeach ?>
57
+ </select>
58
+ </div>
59
+ </li>
60
+ <li>
61
+ <label for="<?php echo $_code ?>_cc_number" class="required"><em>*</em><?php echo $this->__('Credit Card Number') ?></label>
62
+ <div class="input-box">
63
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
64
+ </div>
65
+ </li>
66
+ <li id="<?php echo $_code ?>_cc_type_exp_div">
67
+ <label for="<?php echo $_code ?>_expiration" class="required"><em>*</em><?php echo $this->__('Expiration Date') ?></label>
68
+ <div class="input-box">
69
+ <div class="v-fix">
70
+ <select id="<?php echo $_code ?>_expiration" name="payment[cc_exp_month]" class="month validate-cc-exp required-entry">
71
+ <?php $_ccExpMonth = $_form->getInfoData('cc_exp_month') ?>
72
+ <?php foreach ($_form->getCcMonths() as $k=>$v): ?>
73
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
74
+ <?php endforeach ?>
75
+ </select>
76
+ </div>
77
+ <div class="v-fix">
78
+ <?php $_ccExpYear = $_form->getInfoData('cc_exp_year') ?>
79
+ <select id="<?php echo $_code ?>_expiration_yr" name="payment[cc_exp_year]" class="year required-entry">
80
+ <?php foreach ($_form->getCcYears() as $k=>$v): ?>
81
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
82
+ <?php endforeach ?>
83
+ </select>
84
+ </div>
85
+ </div>
86
+ </li>
87
+ <?php echo $_form->getChildHtml() ?>
88
+ <?php if($_form->hasVerification()): ?>
89
+ <li id="<?php echo $_code ?>_cc_type_cvv_div">
90
+ <label for="<?php echo $_code ?>_cc_cid" class="required"><em>*</em><?php echo $this->__('Card Verification Number') ?></label>
91
+ <div class="input-box">
92
+ <div class="v-fix">
93
+ <input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="input-text cvv required-entry validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" value="" />
94
+ </div>
95
+ <a href="#" id="directpost-cvv-what-is-this" style="cursor:help; margin-left:5px;"><?php echo $this->__('What is this?') ?></a>
96
+ </div>
97
+ </li>
98
+ <?php endif; ?>
99
+ </ul>
100
+ </dd>
101
+ </dl>
102
+ </fieldset>
103
+ </form>
104
+ </div>
105
+ <div class="tool-tip" id="directpost-tool-tip" style="display:none;">
106
+ <div class="btn-close"><a href="#" id="directpost-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
107
+ <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
108
+ </div>
109
+ <script type="text/javascript">
110
+ //<![CDATA[
111
+ if ($('directpost-cvv-what-is-this')) {
112
+ $('directpost-cvv-what-is-this').observe('click', toggleCvvToolTip);
113
+ }
114
+ new Validation('co-directpost-form');
115
+ function toggleCvvToolTip(event){
116
+ if($('directpost-tool-tip')){
117
+ $('directpost-tool-tip').setStyle({
118
+ top: (Event.pointerY(event)-560)+'px'
119
+ })
120
+ $('directpost-tool-tip').toggle();
121
+ }
122
+ Event.stop(event);
123
+ }
124
+ if($('directpost-tool-tip-close')){
125
+ Event.observe($('directpost-tool-tip-close'), 'click', toggleCvvToolTip);
126
+ }
127
+ directPostModel = new directPost(
128
+ '<?php echo $_code ?>',
129
+ 'directpost-iframe',
130
+ '<?php echo $_controller ?>',
131
+ '<?php echo $_orderUrl ?>',
132
+ '<?php echo $_method->getCgiUrl() ?>',
133
+ '<?php echo $this->getUrl('checkout/onepage/saveOrder', array('_secure' => $this->getRequest()->isSecure())) ?>');
134
+ //]]>
135
+ </script>
app/design/frontend/base/default/template/authorizenet/directpost/iframe.phtml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_Authorizenet_Block_Directpost_Iframe
29
+ */
30
+ ?>
31
+ <?php
32
+ $_params = $this->getParams();
33
+ $_helper = $this->helper('authorizenet');
34
+ ?>
35
+ <html>
36
+ <head>
37
+ <script type="text/javascript">
38
+ //<![CDATA[
39
+ <?php if (isset($_params['redirect'])): ?>
40
+ window.location="<?php echo $_params['redirect'] ?>";
41
+ <?php endif; ?>
42
+ <?php if (isset($_params['redirect_parent'])): ?>
43
+ window.top.location="<?php echo $_params['redirect_parent'] ?>";
44
+ <?php endif; ?>
45
+ <?php if (isset($_params['error_msg'])): ?>
46
+ window.top.directPostModel.showError("<?php echo $_params['error_msg'] ?>");
47
+ <?php if (isset($_params['x_invoice_num'])): ?>
48
+ window.top.directPostModel.successUrl="<?php echo $_helper->getSuccessOrderUrl($_params) ?>";
49
+ <?php endif; ?>
50
+ <?php endif; ?>
51
+ //]]>
52
+ </script>
53
+ </head>
54
+ <body></body>
55
+ </html>
app/design/frontend/base/default/template/authorizenet/directpost/info.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_Authorizenet_Block_Directpost_Form
29
+ */
30
+ ?>
31
+ <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
32
+ <li>
33
+ <?php echo $this->__('You will be required to enter your payment details before you place an order.') ?>
34
+ </li>
35
+ </ul>
app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($this->getItemCollection()->getSize()): ?>
28
+ <div class="box-collateral box-up-sell">
29
+ <h2><?php echo $this->__('This product is also part of bundle(s)') ?></h2>
30
+ <table class="products-grid" id="bundle-product-table">
31
+ <?php // $this->setColumnCount(4); // uncomment this line if you want to have another number of columns ?>
32
+ <?php $this->resetItemsIterator() ?>
33
+ <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
34
+ <tr>
35
+ <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
36
+ <?php if($_bundle=$this->getIterableItem()): ?>
37
+ <td>
38
+ <a href="<?php echo $_bundle->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_bundle->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_bundle, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_bundle->getName()) ?>" /></a>
39
+ <h3 class="product-name"><a href="<?php echo $_bundle->getProductUrl() ?>"><?php echo $this->htmlEscape($_bundle->getName()) ?></a></h3>
40
+ <?php echo $this->getPriceHtml($_bundle, true) ?>
41
+ <?php echo $this->getReviewsSummaryHtml($_bundle) ?>
42
+ </td>
43
+ <?php else: ?>
44
+ <td class="empty">&nbsp;</td>
45
+ <?php endif; ?>
46
+ <?php endfor; ?>
47
+ </tr>
48
+ <?php endfor; ?>
49
+ </table>
50
+ <script type="text/javascript">decorateTable('bundle-product-table')</script>
51
+ </div>
52
+ <?php endif ?>
app/design/frontend/base/default/template/bundle/catalog/product/price.phtml ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php list($_minimalPriceTax, $_maximalPriceTax) = $_product->getPriceModel()->getPrices($_product) ?>
29
+ <?php list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_product->getPriceModel()->getPricesDependingOnTax($_product, null, true) ?>
30
+ <?php $_id = $_product->getId() ?>
31
+
32
+ <?php $_weeeTaxAmount = 0; ?>
33
+
34
+ <?php
35
+ if ($_product->getPriceType() == 1) {
36
+ $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product);
37
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
38
+ $_minimalPriceTax += $_weeeTaxAmount;
39
+ $_minimalPriceInclTax += $_weeeTaxAmount;
40
+ }
41
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
42
+ $_minimalPriceInclTax += $_weeeTaxAmount;
43
+ }
44
+
45
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
46
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
47
+ }
48
+ }
49
+ ?>
50
+
51
+ <div class="price-box">
52
+ <?php if ($_product->getPriceView()): ?>
53
+ <p class="minimal-price">
54
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
55
+ <?php if ($this->displayBothPrices()): ?>
56
+ <span class="price-excluding-tax">
57
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
58
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
59
+ </span>
60
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
61
+ <span class="weee">(<small>
62
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
63
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
64
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
65
+ <?php else: ?>
66
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
67
+ <?php endif; ?>
68
+
69
+ <?php echo $_weeeSeparator; ?>
70
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
71
+ <?php $_weeeSeparator = ' + '; ?>
72
+ <?php endforeach; ?>
73
+ </small>)</span>
74
+ <?php endif; ?>
75
+ <span class="price-including-tax">
76
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
77
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
78
+ </span>
79
+ <?php else: ?>
80
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
81
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
82
+ <span class="weee">(<small>
83
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
84
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
85
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
86
+ <?php else: ?>
87
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
88
+ <?php endif; ?>
89
+
90
+ <?php echo $_weeeSeparator; ?>
91
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
92
+ <?php $_weeeSeparator = ' + '; ?>
93
+ <?php endforeach; ?>
94
+ </small>)</span>
95
+ <?php endif; ?>
96
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
97
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
98
+ <?php endif; ?>
99
+ <?php endif; ?>
100
+ </p>
101
+ <?php else: ?>
102
+ <?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
103
+ <p class="price-from">
104
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
105
+ <?php if ($this->displayBothPrices()): ?>
106
+ <span class="price-excluding-tax">
107
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
108
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
109
+ </span>
110
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
111
+ <span class="weee">(<small>
112
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
113
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
114
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
115
+ <?php else: ?>
116
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
117
+ <?php endif; ?>
118
+
119
+ <?php echo $_weeeSeparator; ?>
120
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
121
+ <?php $_weeeSeparator = ' + '; ?>
122
+ <?php endforeach; ?>
123
+ </small>)</span>
124
+ <?php endif; ?>
125
+ <span class="price-including-tax">
126
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
127
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
128
+ </span>
129
+ <?php else: ?>
130
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
131
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
132
+ <span class="weee">(<small>
133
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
134
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
135
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
136
+ <?php else: ?>
137
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
138
+ <?php endif; ?>
139
+
140
+ <?php echo $_weeeSeparator; ?>
141
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
142
+ <?php $_weeeSeparator = ' + '; ?>
143
+ <?php endforeach; ?>
144
+ </small>)</span>
145
+ <?php endif; ?>
146
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
147
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
148
+ <?php endif; ?>
149
+ <?php endif; ?>
150
+ </p>
151
+ <?php
152
+ if ($_product->getPriceType() == 1) {
153
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
154
+ $_maximalPriceTax += $_weeeTaxAmount;
155
+ $_maximalPriceInclTax += $_weeeTaxAmount;
156
+ }
157
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
158
+ $_maximalPriceInclTax += $_weeeTaxAmount;
159
+ }
160
+ }
161
+ ?>
162
+ <p class="price-to">
163
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
164
+ <?php if ($this->displayBothPrices()): ?>
165
+ <span class="price-excluding-tax">
166
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
167
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
168
+ </span>
169
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
170
+ <span class="weee">(<small>
171
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
172
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
173
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
174
+ <?php else: ?>
175
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
176
+ <?php endif; ?>
177
+
178
+ <?php echo $_weeeSeparator; ?>
179
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
180
+ <?php $_weeeSeparator = ' + '; ?>
181
+ <?php endforeach; ?>
182
+ </small>)</span>
183
+ <?php endif; ?>
184
+ <span class="price-including-tax">
185
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax') ?></span>
186
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
187
+ </span>
188
+ <?php else: ?>
189
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
190
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
191
+ <span class="weee">(<small>
192
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
193
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
194
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
195
+ <?php else: ?>
196
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
197
+ <?php endif; ?>
198
+
199
+ <?php echo $_weeeSeparator; ?>
200
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
201
+ <?php $_weeeSeparator = ' + '; ?>
202
+ <?php endforeach; ?>
203
+ </small>)</span>
204
+ <?php endif; ?>
205
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
206
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
207
+ <?php endif; ?>
208
+ <?php endif; ?>
209
+ </p>
210
+ <?php else: ?>
211
+ <?php if ($this->displayBothPrices()): ?>
212
+ <span class="price-excluding-tax">
213
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
214
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
215
+ </span>
216
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
217
+ <span class="weee">(<small>
218
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
219
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
220
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
221
+ <?php else: ?>
222
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
223
+ <?php endif; ?>
224
+
225
+ <?php echo $_weeeSeparator; ?>
226
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
227
+ <?php $_weeeSeparator = ' + '; ?>
228
+ <?php endforeach; ?>
229
+ </small>)</span>
230
+ <?php endif; ?>
231
+ <span class="price-including-tax">
232
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
233
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
234
+ </span>
235
+ <?php else: ?>
236
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
237
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
238
+ <span class="weee">(<small>
239
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
240
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
241
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
242
+ <?php else: ?>
243
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
244
+ <?php endif; ?>
245
+
246
+ <?php echo $_weeeSeparator; ?>
247
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
248
+ <?php $_weeeSeparator = ' + '; ?>
249
+ <?php endforeach; ?>
250
+ </small>)</span>
251
+ <?php endif; ?>
252
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
253
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
254
+ <?php endif; ?>
255
+ <?php endif; ?>
256
+ <?php endif; ?>
257
+ <?php endif; ?>
258
+ </div>
app/design/frontend/base/default/template/bundle/catalog/product/view/options/notice.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php $_finalPrice = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()); ?>
29
+ <?php $_finalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); ?>
30
+ <?php $_weeeTaxAmount = 0; ?>
31
+ <?php
32
+ if ($_product->getPriceType() == 1) {
33
+ $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product);
34
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
35
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
36
+ }
37
+ }
38
+ ?>
39
+
40
+ <div class="price-box">
41
+ <p class="price-as-configured">
42
+ <span class="price-label"><?php echo $this->helper('bundle')->__('Price as configured') ?>:</span>
43
+ <?php if ($this->displayBothPrices()): ?>
44
+ <span class="price-tax">
45
+ <span class="price-excluding-tax">
46
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
47
+ <span class="price" id="price-excluding-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
48
+ </span>
49
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
50
+ <span class="weee">(<small>
51
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
52
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
53
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
54
+ <?php else: ?>
55
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
56
+ <?php endif; ?>
57
+
58
+ <?php echo $_weeeSeparator; ?>
59
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
60
+ <?php $_weeeSeparator = ' + '; ?>
61
+ <?php endforeach; ?>
62
+ </small>)</span>
63
+ <?php endif; ?>
64
+ <span class="price-including-tax">
65
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
66
+ <span class="price" id="price-including-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
67
+ </span>
68
+ </span>
69
+ <?php else: ?>
70
+ <span class="price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
71
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
72
+ <span class="weee">(<small>
73
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
74
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
75
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
76
+ <?php else: ?>
77
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
78
+ <?php endif; ?>
79
+
80
+ <?php echo $_weeeSeparator; ?>
81
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
82
+ <?php $_weeeSeparator = ' + '; ?>
83
+ <?php endforeach; ?>
84
+ </small>)</span>
85
+ <?php endif; ?>
86
+ <?php endif; ?>
87
+ </p>
88
+ </div>
89
+ <?php if($_product->isSaleable()): ?>
90
+ <script type="text/javascript">
91
+ bundle.reloadPrice();
92
+ </script>
93
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * @see Mage_Catalog_Block_Product_View
31
+ */
32
+ $_product = $this->getProduct();
33
+ $_tierPrices = $this->getTierPrices();
34
+ ?>
35
+ <?php if (count($_tierPrices) > 0): ?>
36
+ <ul class="tier-prices product-pricing">
37
+ <?php foreach($_tierPrices as $_price): ?>
38
+ <li><?php echo $this->__('Buy %1$s with %2$s discount each', $_price['price_qty'], '<strong class="benefit">'.($_price['price']*1).'%</strong>') ?></li>
39
+ <?php endforeach ?>
40
+ </ul>
41
+ <?php endif;?>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+ <?php $_product = $this->getProduct() ?>
29
+
30
+ <?php if($_product->isSaleable()): ?>
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>);
34
+ //]]>
35
+ </script>
36
+ <?php endif; ?>
37
+ <?php if ($_product->isAvailable()): ?>
38
+ <p class="availability in-stock"><?php echo $this->helper('catalog')->__('Availability:') ?> <span><?php echo $this->helper('catalog')->__('In stock') ?></span></p>
39
+ <?php else: ?>
40
+ <p class="availability out-of-stock"><?php echo $this->helper('catalog')->__('Availability:') ?> <span><?php echo $this->helper('catalog')->__('Out of stock') ?></span></p>
41
+ <?php endif; ?>
42
+ <div class="price-box-bundle">
43
+ <?php echo $this->getPriceHtml($_product) ?>
44
+ </div>
45
+ <?php echo $this->getChildHtml('bundle_prices') ?>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Checkbox */ ?>
30
+ <?php $_option = $this->getOption() ?>
31
+ <?php $_selections = $_option->getSelections() ?>
32
+ <dt><label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label></dt>
33
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
34
+ <div class="input-box">
35
+ <?php if (count($_selections) == 1 && $_option->getRequired()): ?>
36
+ <?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
37
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
38
+ <?php else:?>
39
+ <ul class="options-list">
40
+ <?php foreach($_selections as $_selection): ?>
41
+ <li><input onclick="bundle.changeSelection(this)" class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>"/>
42
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection) ?></label></span>
43
+ <?php if($_option->getRequired()): ?>
44
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
45
+ <?php endif; ?>
46
+ </li>
47
+ <?php endforeach; ?>
48
+ </ul>
49
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
50
+ <?php endif; ?>
51
+ </div>
52
+ </dd>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Multi */ ?>
30
+ <?php $_option = $this->getOption() ?>
31
+ <?php $_selections = $_option->getSelections() ?>
32
+ <dt><label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label></dt>
33
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
34
+ <div class="input-box">
35
+ <?php if (count($_selections) == 1 && $_option->getRequired()): ?>
36
+ <?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
37
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
38
+ <?php else: ?>
39
+ <select onchange="bundle.changeSelection(this)" multiple="multiple" size="5" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>][]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select multiselect change-container-classname">
40
+ <?php if(!$_option->getRequired()): ?>
41
+ <option value=""><?php echo $this->__('None') ?></option>
42
+ <?php endif; ?>
43
+ <?php foreach ($_selections as $_selection): ?>
44
+ <option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>><?php echo $this->getSelectionQtyTitlePrice($_selection, false) ?></option>
45
+ <?php endforeach; ?>
46
+ </select>
47
+ <?php endif; ?>
48
+ </div>
49
+ </dd>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Radio */ ?>
30
+ <?php $_option = $this->getOption(); ?>
31
+ <?php $_selections = $_option->getSelections(); ?>
32
+ <?php $_default = $_option->getDefaultSelection(); ?>
33
+ <?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
34
+
35
+ <dt>
36
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
37
+ </dt>
38
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
39
+ <div class="input-box">
40
+ <?php if ($this->_showSingle()): ?>
41
+ <?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
42
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" />
43
+ <?php else:?>
44
+ <ul class="options-list">
45
+ <?php if (!$_option->getRequired()): ?>
46
+ <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value=""/>
47
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span>
48
+ </li>
49
+ <?php endif; ?>
50
+ <?php foreach ($_selections as $_selection): ?>
51
+ <li><input type="radio" onclick="bundle.changeSelection(this)" class="radio<?php echo $_option->getRequired()?' validate-one-required-by-name':'' ?> change-container-classname" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>"/>
52
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label></span>
53
+ <?php if ($_option->getRequired()): ?>
54
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
55
+ <?php endif; ?>
56
+ </li>
57
+ <?php endforeach; ?>
58
+ </ul>
59
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
60
+ <?php endif; ?>
61
+ </div>
62
+ <span class="qty-holder">
63
+ <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?>&nbsp;</label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
64
+ </span>
65
+ </dd>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ ?>
28
+
29
+ <?php /* @var $this Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option_Select */ ?>
30
+ <?php $_option = $this->getOption(); ?>
31
+ <?php $_selections = $_option->getSelections(); ?>
32
+ <?php $_default = $_option->getDefaultSelection(); ?>
33
+ <?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
34
+
35
+ <dt>
36
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
37
+ </dt>
38
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
39
+ <div class="input-box">
40
+ <?php if ($this->_showSingle()): ?>
41
+ <?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
42
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
43
+ <?php else:?>
44
+ <select onchange="bundle.changeSelection(this)" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select change-container-classname">
45
+ <option value=""><?php echo $this->__('Choose a selection...') ?></option>
46
+ <?php foreach ($_selections as $_selection): ?>
47
+ <option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?>><?php echo $this->getSelectionTitlePrice($_selection, false) ?></option>
48
+ <?php endforeach; ?>
49
+ </select>
50
+ <?php endif; ?>
51
+ </div>
52
+ <span class="qty-holder">
53
+ <label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?>&nbsp;</label><input onkeyup="bundle.changeOptionQty(this, event)" onblur="bundle.changeOptionQty(this, event)" <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
54
+ </span>
55
+ </dd>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_product = $this->getProduct(); ?>
29
+ <?php $_options = Mage::helper('core')->decorateArray($this->getOptions()); ?>
30
+ <?php if ($_product->isSaleable()):?>
31
+ <?php if (count($_options)): ?>
32
+ <dl>
33
+ <?php foreach ($_options as $_option): ?>
34
+ <?php if (!$_option->getSelections()): ?>
35
+ <?php continue; ?>
36
+ <?php endif; ?>
37
+ <?php echo $this->getOptionHtml($_option) ?>
38
+ <?php endforeach; ?>
39
+ </dl>
40
+ <?php else: ?>
41
+ <p><?php echo $this->__('No options of this product are available.') ?></p>
42
+ <?php endif; ?>
43
+ <?php endif;?>
app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+ <?php $_order = $this->getItem()->getOrder(); ?>
29
+
30
+ <?php $items = $this->getChilds($parentItem) ?>
31
+
32
+ <?php $_prevOptionId = '' ?>
33
+
34
+ <?php foreach ($items as $_item): ?>
35
+
36
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
37
+ <?php $_showlastRow = true ?>
38
+ <?php else: ?>
39
+ <?php $_showlastRow = false ?>
40
+ <?php endif; ?>
41
+
42
+ <?php if ($_item->getOrderItem()->getParentItem()): ?>
43
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
44
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
45
+ <tr>
46
+ <td align="left" valign="top" style="padding:3px 9px"><strong><?php echo $attributes['option_label'] ?></strong></td>
47
+ <td>&nbsp;</td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ </tr>
51
+ <?php $_prevOptionId = $attributes['option_id'] ?>
52
+ <?php endif; ?>
53
+ <?php endif; ?>
54
+ <tr id="order-item-row-<?php echo $_item->getId() ?>">
55
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
56
+ <td align="left" valign="top" style="padding:3px 9px"><strong><?php echo $this->htmlEscape($_item->getName()) ?></strong></td>
57
+ <?php else: ?>
58
+ <td align="left" valign="top" style="padding:3px 19px"><?php echo $this->getValueHtml($_item)?></td>
59
+ <?php endif; ?>
60
+ <td align="left" valign="top" style="padding:3px 9px"><?php echo $this->htmlEscape($_item->getSku()) ?></td>
61
+ <td align="center" valign="top" style="padding:3px 9px">
62
+ <?php if ($this->canShowPriceInfo($_item)): ?>
63
+ <?php echo $_item->getQty()*1 ?>
64
+ <?php else: ?>
65
+ &nbsp;
66
+ <?php endif; ?>
67
+ </td>
68
+ <td align="right" valign="top" style="padding:3px 9px">
69
+ <?php if ($this->canShowPriceInfo($_item)): ?>
70
+ <?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
71
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
72
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
73
+ <?php endif; ?>
74
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
75
+ <?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
76
+ <?php else: ?>
77
+ <?php echo $_order->formatPrice($_item->getRowTotal()) ?>
78
+ <?php endif; ?>
79
+
80
+
81
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
82
+ <br />
83
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
84
+ <small>
85
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
86
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
87
+ <?php endforeach; ?>
88
+ </small>
89
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
90
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
91
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
92
+ <?php endforeach; ?>
93
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
94
+ <small>
95
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
96
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
97
+ <?php endforeach; ?>
98
+ </small>
99
+ <?php endif; ?>
100
+
101
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
102
+ <br />
103
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
104
+ <?php endif; ?>
105
+ <?php endif; ?>
106
+ <?php endif; ?>
107
+
108
+
109
+ <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
110
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
111
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
112
+ <?php endif; ?>
113
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
114
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
115
+ <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
116
+ <?php else: ?>
117
+ <?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
118
+ <?php endif; ?>
119
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
120
+ <br />
121
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
122
+ <small>
123
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
124
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
125
+ <?php endforeach; ?>
126
+ </small>
127
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
128
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
129
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
130
+ <?php endforeach; ?>
131
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
132
+ <small>
133
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
134
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
135
+ <?php endforeach; ?>
136
+ </small>
137
+ <?php endif; ?>
138
+
139
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
140
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
141
+ <?php endif; ?>
142
+ <?php endif; ?>
143
+ <?php endif; ?>
144
+ <?php else: ?>
145
+ &nbsp;
146
+ <?php endif; ?>
147
+ </td>
148
+ </tr>
149
+ <?php endforeach; ?>
150
+
151
+ <?php if ($_showlastRow): ?>
152
+ <tr>
153
+ <td align="left" valign="top" style="padding:3px 9px">
154
+ <?php if ($this->getItemOptions()): ?>
155
+ <dl style="margin:0; padding:0;">
156
+ <?php foreach ($this->getItemOptions() as $option): ?>
157
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
158
+ <dd style="margin:0; padding:0 0 0 9px;"><?php echo $option['value'] ?></dd>
159
+ <?php endforeach; ?>
160
+ </dl>
161
+ <?php endif; ?>
162
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
163
+ </td>
164
+ <td>&nbsp;</td>
165
+ <td>&nbsp;</td>
166
+ <td>&nbsp;</td>
167
+ </tr>
168
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $parentItem = $this->getItem() ?>
29
+ <?php $items = $this->getChilds($parentItem) ?>
30
+ <?php $_index = 0 ?>
31
+ <?php $_order = $this->getItem()->getOrder(); ?>
32
+
33
+ <?php $_prevOptionId = '' ?>
34
+
35
+ <?php foreach ($items as $_item): ?>
36
+
37
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
38
+ <?php $_showlastRow = true ?>
39
+ <?php else: ?>
40
+ <?php $_showlastRow = false ?>
41
+ <?php endif; ?>
42
+
43
+ <?php if ($_item->getOrderItem()->getParentItem()): ?>
44
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
45
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
46
+ <tr>
47
+ <td align="left" valign="top" style="padding:3px 9px"><strong><em><?php echo $attributes['option_label'] ?></em></strong></td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ <td>&nbsp;</td>
51
+ </tr>
52
+ <?php $_prevOptionId = $attributes['option_id'] ?>
53
+ <?php endif; ?>
54
+ <?php endif; ?>
55
+ <tr id="order-item-row-<?php echo $_item->getId() ?>">
56
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
57
+ <td align="left" valign="top" style="padding:3px 9px"><strong><?php echo $this->htmlEscape($_item->getName()) ?></strong></td>
58
+ <?php else: ?>
59
+ <td align="left" valign="top" style="padding:3px 19px"><?php echo $this->getValueHtml($_item)?></td>
60
+ <?php endif; ?>
61
+ <td align="left" valign="top" style="padding:3px 9px"><?php echo $this->htmlEscape($_item->getSku()) ?></td>
62
+ <td align="center" valign="top" style="padding:3px 9px">
63
+ <?php if ($this->canShowPriceInfo($_item)): ?>
64
+ <?php echo $_item->getQty()*1 ?>
65
+ <?php else: ?>
66
+ &nbsp;
67
+ <?php endif; ?>
68
+ </td>
69
+ <td align="right" valign="top" style="padding:3px 9px">
70
+ <?php if ($this->canShowPriceInfo($_item)): ?>
71
+ <?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
72
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
73
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
74
+ <?php endif; ?>
75
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
76
+ <?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
77
+ <?php else: ?>
78
+ <?php echo $_order->formatPrice($_item->getRowTotal()) ?>
79
+ <?php endif; ?>
80
+
81
+
82
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
83
+ <br />
84
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
85
+ <small>
86
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
87
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
88
+ <?php endforeach; ?>
89
+ </small>
90
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
91
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
92
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
93
+ <?php endforeach; ?>
94
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
95
+ <small>
96
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
97
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
98
+ <?php endforeach; ?>
99
+ </small>
100
+ <?php endif; ?>
101
+
102
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
103
+ <br />
104
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
105
+ <?php endif; ?>
106
+ <?php endif; ?>
107
+ <?php endif; ?>
108
+
109
+
110
+ <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
111
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
112
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
113
+ <?php endif; ?>
114
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
115
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
116
+ <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
117
+ <?php else: ?>
118
+ <?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
119
+ <?php endif; ?>
120
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
121
+ <br />
122
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
123
+ <small>
124
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
125
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
126
+ <?php endforeach; ?>
127
+ </small>
128
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
129
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
130
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
131
+ <?php endforeach; ?>
132
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
133
+ <small>
134
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
135
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
136
+ <?php endforeach; ?>
137
+ </small>
138
+ <?php endif; ?>
139
+
140
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
141
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
142
+ <?php endif; ?>
143
+ <?php endif; ?>
144
+ <?php endif; ?>
145
+ <?php else: ?>
146
+ &nbsp;
147
+ <?php endif; ?>
148
+ </td>
149
+ </tr>
150
+ <?php endforeach; ?>
151
+
152
+ <?php if ($_showlastRow): ?>
153
+ <tr>
154
+ <td align="left" valign="top" style="padding:3px 9px">
155
+ <?php if ($this->getItemOptions()): ?>
156
+ <dl style="margin:0; padding:0;">
157
+ <?php foreach ($this->getItemOptions() as $option): ?>
158
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
159
+ <dd style="margin:0; padding:0 0 0 9px;"><?php echo $option['value'] ?></dd>
160
+ <?php endforeach; ?>
161
+ </dl>
162
+ <?php endif; ?>
163
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
164
+ </td>
165
+ <td>&nbsp;</td>
166
+ <td>&nbsp;</td>
167
+ <td>&nbsp;</td>
168
+ </tr>
169
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_item = $this->getItem() ?>
28
+ <?php $_order=$this->getOrder() ?>
29
+
30
+ <?php $parentItem = $this->getItem() ?>
31
+ <?php $items = array_merge(array($parentItem), $parentItem->getChildrenItems()); ?>
32
+
33
+ <?php if($this->getItemOptions() || $_item->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
34
+ <?php $_showlastRow = true ?>
35
+ <?php else: ?>
36
+ <?php $_showlastRow = false ?>
37
+ <?php endif; ?>
38
+
39
+ <?php $_prevOptionId = '' ?>
40
+
41
+ <?php foreach ($items as $_item): ?>
42
+
43
+ <?php if ($_item->getParentItem()): ?>
44
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
45
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
46
+ <tr>
47
+ <td align="left" valign="top" style="padding:3px 9px"><strong><em><?php echo $attributes['option_label'] ?></em></strong></td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ <td>&nbsp;</td>
51
+ </tr>
52
+ <?php $_prevOptionId = $attributes['option_id'] ?>
53
+ <?php endif; ?>
54
+ <?php endif; ?>
55
+ <tr id="order-item-row-<?php echo $_item->getId() ?>">
56
+ <?php if (!$_item->getParentItem()): ?>
57
+ <td align="left" valign="top" style="padding:3px 9px"><strong><?php echo $this->htmlEscape($_item->getName()) ?></strong></td>
58
+ <?php else: ?>
59
+ <td align="left" valign="top" style="padding:3px 19px"><?php echo $this->getValueHtml($_item)?></td>
60
+ <?php endif; ?>
61
+ <td align="left" valign="top" style="padding:3px 9px"><?php echo $this->htmlEscape($_item->getSku()) ?></td>
62
+ <td align="center" valign="top" style="padding:3px 9px">
63
+ <?php if (!$_item->getParentItem()): ?>
64
+ <?php echo $_item->getQtyOrdered()*1 ?>
65
+ <?php else: ?>
66
+ &nbsp;
67
+ <?php endif; ?>
68
+ </td>
69
+ <td align="right" valign="top" style="padding:3px 9px">
70
+ <?php if (!$_item->getParentItem()): ?>
71
+ <?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
72
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
73
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
74
+ <?php endif; ?>
75
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
76
+ <?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
77
+ <?php else: ?>
78
+ <?php echo $_order->formatPrice($_item->getRowTotal()) ?>
79
+ <?php endif; ?>
80
+
81
+
82
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
83
+ <br />
84
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
85
+ <small>
86
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
87
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
88
+ <?php endforeach; ?>
89
+ </small>
90
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
91
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
92
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
93
+ <?php endforeach; ?>
94
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
95
+ <small>
96
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
97
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
98
+ <?php endforeach; ?>
99
+ </small>
100
+ <?php endif; ?>
101
+
102
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
103
+ <br />
104
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
105
+ <?php endif; ?>
106
+ <?php endif; ?>
107
+ <?php endif; ?>
108
+
109
+
110
+ <?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
111
+ <?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
112
+ <br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
113
+ <?php endif; ?>
114
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
115
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
116
+ <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
117
+ <?php else: ?>
118
+ <?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
119
+ <?php endif; ?>
120
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
121
+ <br />
122
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
123
+ <small>
124
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
125
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
126
+ <?php endforeach; ?>
127
+ </small>
128
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
129
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
130
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
131
+ <?php endforeach; ?>
132
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
133
+ <small>
134
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
135
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
136
+ <?php endforeach; ?>
137
+ </small>
138
+ <?php endif; ?>
139
+
140
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
141
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
142
+ <?php endif; ?>
143
+ <?php endif; ?>
144
+ <?php endif; ?>
145
+ <?php else: ?>
146
+ &nbsp;
147
+ <?php endif; ?>
148
+ </td>
149
+ </tr>
150
+ <?php endforeach; ?>
151
+
152
+ <?php if ($_showlastRow): ?>
153
+ <tr>
154
+ <td align="left" valign="top" style="padding:3px 9px">
155
+ <?php if ($this->getItemOptions()): ?>
156
+ <dl style="margin:0; padding:0;">
157
+ <?php foreach ($this->getItemOptions() as $option): ?>
158
+ <dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
159
+ <dd style="margin:0; padding:0 0 0 9px;"><?php echo $option['value'] ?></dd>
160
+ <?php endforeach; ?>
161
+ </dl>
162
+ <?php endif; ?>
163
+ <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
164
+ <br /><strong><?php echo $this->__('Gift Message') ?></strong>
165
+ <br /><?php echo $this->__('From:'); ?> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?>
166
+ <br /><?php echo $this->__('To:'); ?> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?>
167
+ <br /><?php echo $this->__('Message:'); ?><br /> <?php echo $this->htmlEscape($_giftMessage->getMessage()) ?>
168
+ <?php endif; ?>
169
+ </td>
170
+ <td>&nbsp;</td>
171
+ <td>&nbsp;</td>
172
+ <td>&nbsp;</td>
173
+ </tr>
174
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+
29
+ <?php $items = array_merge(array($parentItem->getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?>
30
+ <?php $shipItems = $this->getChilds($parentItem) ?>
31
+
32
+ <?php $_prevOptionId = '' ?>
33
+
34
+ <?php foreach ($items as $_item): ?>
35
+
36
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
37
+ <?php $_showlastRow = true ?>
38
+ <?php else: ?>
39
+ <?php $_showlastRow = false ?>
40
+ <?php endif; ?>
41
+
42
+ <?php if ($_item->getParentItem()): ?>
43
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
44
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
45
+ <tr>
46
+ <td align="left" valign="top" style="padding:3px 9px"><strong><em><?php echo $attributes['option_label'] ?></em></strong></td>
47
+ <td>&nbsp;</td>
48
+ <td>&nbsp;</td>
49
+ </tr>
50
+ <?php $_prevOptionId = $attributes['option_id'] ?>
51
+ <?php endif; ?>
52
+ <?php endif; ?>
53
+ <tr id="order-item-row-<?php echo $_item->getId() ?>">
54
+ <?php if (!$_item->getParentItem()): ?>
55
+ <td align="left" valign="top" style="padding:3px 9px"><strong><?php echo $this->htmlEscape($_item->getName()) ?></strong></td>
56
+ <?php else: ?>
57
+ <td align="left" valign="top" style="padding:3px 19px"><?php echo $this->getValueHtml($_item) ?></td>
58
+ <?php endif; ?>
59
+ <td align="left" valign="top" style="padding:3px 9px"><?php echo $this->htmlEscape($_item->getSku()) ?></td>
60
+ <td align="center" valign="top" style="padding:3px 9px">
61
+ <?php if (($this->isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?>
62
+ <?php if (isset($shipItems[$_item->getId()])): ?>
63
+ <?php echo $shipItems[$_item->getId()]->getQty()*1 ?>
64
+ <?php elseif ($_item->getIsVirtual()): ?>
65
+ <?php echo $this->__('N/A') ?>
66
+ <?php else: ?>
67
+ 0
68
+ <?php endif; ?>
69
+ <?php else: ?>
70
+ &nbsp;
71
+ <?php endif; ?>
72
+ </td>
73
+ </tr>
74
+ <?php endforeach; ?>
75
+
76
+ <?php if ($_showlastRow): ?>
77
+ <tr>
78
+ <td align="left" valign="top" style="padding:3px 9px">
79
+ <?php if ($this->getItemOptions()): ?>
80
+ <dl style="margin:0; padding:0;">
81
+ <?php foreach ($this->getItemOptions() as $option): ?>
82
+ <dt><strong><em><?php echo $option['label'] ?></em></strong>
83
+ <dd style="margin:0; padding:0 0 0 9px;"><?php echo $option['value'] ?></dd>
84
+ <?php endforeach; ?>
85
+ </dl>
86
+ <?php endif; ?>
87
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
88
+ </td>
89
+ <td>&nbsp;</td>
90
+ <td>&nbsp;</td>
91
+ </tr>
92
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * Template for displaying bundle product price in RSS feeds
31
+ *
32
+ * @see Mage_Bundle_Block_Catalog_Product_Price
33
+ */
34
+ ?>
35
+
36
+ <?php $_product = $this->getProduct() ?>
37
+ <?php list($_minimalPrice, $_maximalPrice) = $_product->getPriceModel()->getPrices($_product) ?>
38
+ <?php $_id = $_product->getId() ?>
39
+
40
+ <?php $_weeeTaxAmount = 0; ?>
41
+
42
+ <?php $_minimalPriceTax = Mage::helper('tax')->getPrice($_product, $_minimalPrice); ?>
43
+ <?php $_minimalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_minimalPrice, true); ?>
44
+
45
+ <?php
46
+ if ($_product->getPriceType() == 1) {
47
+ $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product);
48
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
49
+ $_minimalPriceTax += $_weeeTaxAmount;
50
+ $_minimalPriceInclTax += $_weeeTaxAmount;
51
+ }
52
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
53
+ $_minimalPriceInclTax += $_weeeTaxAmount;
54
+ }
55
+
56
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
57
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
58
+ }
59
+ }
60
+ ?>
61
+
62
+ <div class="price-box">
63
+ <?php if ($_product->getPriceView()): ?>
64
+ <p class="minimal-price">
65
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
66
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
67
+ <span class="price-excluding-tax">
68
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
69
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
70
+ </span>
71
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
72
+ <span class="weee">(<small>
73
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
74
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
75
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
76
+ <?php else: ?>
77
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
78
+ <?php endif; ?>
79
+
80
+ <?php echo $_weeeSeparator; ?>
81
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
82
+ <?php $_weeeSeparator = ' + '; ?>
83
+ <?php endforeach; ?>
84
+ </small>)</span>
85
+ <?php endif; ?>
86
+ <span class="price-including-tax">
87
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
88
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
89
+ </span>
90
+ <?php else: ?>
91
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
92
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
93
+ <span class="weee">(<small>
94
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
95
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
96
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
97
+ <?php else: ?>
98
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
99
+ <?php endif; ?>
100
+
101
+ <?php echo $_weeeSeparator; ?>
102
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
103
+ <?php $_weeeSeparator = ' + '; ?>
104
+ <?php endforeach; ?>
105
+ </small>)</span>
106
+ <?php endif; ?>
107
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
108
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
109
+ <?php endif; ?>
110
+ <?php endif; ?>
111
+ </p>
112
+ <?php else: ?>
113
+ <?php if ($_minimalPrice <> $_maximalPrice): ?>
114
+ <p class="price-from">
115
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
116
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
117
+ <span class="price-excluding-tax">
118
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
119
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
120
+ </span>
121
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
122
+ <span class="weee">(<small>
123
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
124
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
125
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
126
+ <?php else: ?>
127
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
128
+ <?php endif; ?>
129
+
130
+ <?php echo $_weeeSeparator; ?>
131
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
132
+ <?php $_weeeSeparator = ' + '; ?>
133
+ <?php endforeach; ?>
134
+ </small>)</span>
135
+ <?php endif; ?>
136
+ <span class="price-including-tax">
137
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
138
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
139
+ </span>
140
+ <?php else: ?>
141
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
142
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
143
+ <span class="weee">(<small>
144
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
145
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
146
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
147
+ <?php else: ?>
148
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
149
+ <?php endif; ?>
150
+
151
+ <?php echo $_weeeSeparator; ?>
152
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
153
+ <?php $_weeeSeparator = ' + '; ?>
154
+ <?php endforeach; ?>
155
+ </small>)</span>
156
+ <?php endif; ?>
157
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
158
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
159
+ <?php endif; ?>
160
+ <?php endif; ?>
161
+ </p>
162
+ <?php $_maximalPriceTax = Mage::helper('tax')->getPrice($_product, $_maximalPrice); ?>
163
+ <?php $_maximalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_maximalPrice, true); ?>
164
+ <?php
165
+ if ($_product->getPriceType() == 1) {
166
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
167
+ $_maximalPriceTax += $_weeeTaxAmount;
168
+ $_maximalPriceInclTax += $_weeeTaxAmount;
169
+ }
170
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
171
+ $_maximalPriceInclTax += $_weeeTaxAmount;
172
+ }
173
+ }
174
+ ?>
175
+ <p class="price-to">
176
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
177
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
178
+ <span class="price-excluding-tax">
179
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
180
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
181
+ </span>
182
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
183
+ <span class="weee">(<small>
184
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
185
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
186
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
187
+ <?php else: ?>
188
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
189
+ <?php endif; ?>
190
+
191
+ <?php echo $_weeeSeparator; ?>
192
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
193
+ <?php $_weeeSeparator = ' + '; ?>
194
+ <?php endforeach; ?>
195
+ </small>)</span>
196
+ <?php endif; ?>
197
+ <span class="price-including-tax">
198
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax') ?></span>
199
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
200
+ </span>
201
+ <?php else: ?>
202
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
203
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
204
+ <span class="weee">(<small>
205
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
206
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
207
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
208
+ <?php else: ?>
209
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
210
+ <?php endif; ?>
211
+
212
+ <?php echo $_weeeSeparator; ?>
213
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
214
+ <?php $_weeeSeparator = ' + '; ?>
215
+ <?php endforeach; ?>
216
+ </small>)</span>
217
+ <?php endif; ?>
218
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
219
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
220
+ <?php endif; ?>
221
+ <?php endif; ?>
222
+ </p>
223
+ <?php else: ?>
224
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
225
+ <span class="price-excluding-tax">
226
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
227
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
228
+ </span>
229
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
230
+ <span class="weee">(<small>
231
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
232
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
233
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
234
+ <?php else: ?>
235
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
236
+ <?php endif; ?>
237
+
238
+ <?php echo $_weeeSeparator; ?>
239
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
240
+ <?php $_weeeSeparator = ' + '; ?>
241
+ <?php endforeach; ?>
242
+ </small>)</span>
243
+ <?php endif; ?>
244
+ <span class="price-including-tax">
245
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
246
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
247
+ </span>
248
+ <?php else: ?>
249
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
250
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
251
+ <span class="weee">(<small>
252
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
253
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
254
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
255
+ <?php else: ?>
256
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
257
+ <?php endif; ?>
258
+
259
+ <?php echo $_weeeSeparator; ?>
260
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
261
+ <?php $_weeeSeparator = ' + '; ?>
262
+ <?php endforeach; ?>
263
+ </small>)</span>
264
+ <?php endif; ?>
265
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
266
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
267
+ <?php endif; ?>
268
+ <?php endif; ?>
269
+ <?php endif; ?>
270
+ <?php endif; ?>
271
+ </div>
app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+
29
+ <?php $items = $this->getChilds($parentItem) ?>
30
+ <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
31
+ <?php $_count = count ($items) ?>
32
+ <?php $_index = 0 ?>
33
+
34
+ <?php $_prevOptionId = '' ?>
35
+
36
+ <?php foreach ($items as $_item): ?>
37
+
38
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
39
+ <?php $_showlastRow = true ?>
40
+ <?php else: ?>
41
+ <?php $_showlastRow = false ?>
42
+ <?php endif; ?>
43
+
44
+ <?php if ($_item->getOrderItem()->getParentItem()): ?>
45
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
46
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
47
+ <tr>
48
+ <td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
49
+ <td>&nbsp;</td>
50
+ <td>&nbsp;</td>
51
+ <td>&nbsp;</td>
52
+ <td>&nbsp;</td>
53
+ <td>&nbsp;</td>
54
+ <td>&nbsp;</td>
55
+ </tr>
56
+ <?php $_prevOptionId = $attributes['option_id'] ?>
57
+ <?php endif; ?>
58
+ <?php endif; ?>
59
+ <tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?> id="order-item-row-<?php echo $_item->getId() ?>">
60
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
61
+ <td><h4 class="product-name"><?php echo $this->htmlEscape($_item->getName()) ?></h4>
62
+ </td>
63
+ <?php else: ?>
64
+ <td><div class="option-value"><?php echo $this->getValueHtml($_item) ?></div></td>
65
+ <?php endif; ?>
66
+ <td><?php echo $this->htmlEscape($_item->getSku()) ?></td>
67
+ <td class="a-right">
68
+ <?php if ($this->canShowPriceInfo($_item)): ?>
69
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
70
+ <span class="price-excl-tax">
71
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
72
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
73
+ <span class="cart-price">
74
+ <?php endif; ?>
75
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
76
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
77
+ </span>
78
+ <?php endif; ?>
79
+ <?php endif; ?>
80
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
81
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
82
+ <?php else: ?>
83
+ <span class="cart-price">
84
+ <?php endif; ?>
85
+
86
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
87
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
88
+ <?php else: ?>
89
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
90
+ <?php endif; ?>
91
+
92
+ </span>
93
+
94
+
95
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
96
+
97
+ <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
98
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
99
+ <small>
100
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
101
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
102
+ <?php endforeach; ?>
103
+ </small>
104
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
105
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
106
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
107
+ <?php endforeach; ?>
108
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
109
+ <small>
110
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
111
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
112
+ <?php endforeach; ?>
113
+ </small>
114
+ <?php endif; ?>
115
+ </span>
116
+
117
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
118
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
119
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?></span>
120
+ </span>
121
+ <?php endif; ?>
122
+ <?php endif; ?>
123
+ </span>
124
+ <br />
125
+ <?php endif; ?>
126
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
127
+ <span class="price-incl-tax">
128
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
129
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
130
+ <span class="cart-price">
131
+ <?php endif; ?>
132
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
133
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
134
+ </span>
135
+ <?php endif; ?>
136
+ <?php endif; ?>
137
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
138
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
139
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
140
+ <?php else: ?>
141
+ <span class="cart-price">
142
+ <?php endif; ?>
143
+
144
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
145
+ <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
146
+ <?php else: ?>
147
+ <?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
148
+ <?php endif; ?>
149
+
150
+ </span>
151
+
152
+
153
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
154
+
155
+ <span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
156
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
157
+ <small>
158
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
159
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
160
+ <?php endforeach; ?>
161
+ </small>
162
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
163
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
164
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
165
+ <?php endforeach; ?>
166
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
167
+ <small>
168
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
169
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
170
+ <?php endforeach; ?>
171
+ </small>
172
+ <?php endif; ?>
173
+ </span>
174
+
175
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
176
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
177
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total Incl. Tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?></span>
178
+ </span>
179
+ <?php endif; ?>
180
+ <?php endif; ?>
181
+ </span>
182
+ <?php endif; ?>
183
+ <?php else: ?>
184
+ &nbsp;
185
+ <?php endif; ?>
186
+ </td>
187
+ <td class="a-center">
188
+ <?php if ($this->canShowPriceInfo($_item)): ?>
189
+ <?php echo $_item->getQty()*1 ?>
190
+ <?php else: ?>
191
+ &nbsp;
192
+ <?php endif; ?>
193
+ </td>
194
+ <td class="a-right">
195
+ <?php if ($this->canShowPriceInfo($_item)): ?>
196
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
197
+ <span class="price-excl-tax">
198
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
199
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
200
+ <span class="cart-price">
201
+ <?php endif; ?>
202
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
203
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
204
+ </span>
205
+ <?php endif; ?>
206
+ <?php endif; ?>
207
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
208
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
209
+ <?php else: ?>
210
+ <span class="cart-price">
211
+ <?php endif; ?>
212
+
213
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
214
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
215
+ <?php else: ?>
216
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
217
+ <?php endif; ?>
218
+
219
+ </span>
220
+
221
+
222
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
223
+
224
+ <span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
225
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
226
+ <small>
227
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
228
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
229
+ <?php endforeach; ?>
230
+ </small>
231
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
232
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
233
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
234
+ <?php endforeach; ?>
235
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
236
+ <small>
237
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
238
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
239
+ <?php endforeach; ?>
240
+ </small>
241
+ <?php endif; ?>
242
+ </span>
243
+
244
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
245
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
246
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?></span>
247
+ </span>
248
+ <?php endif; ?>
249
+ <?php endif; ?>
250
+ </span>
251
+ <br />
252
+ <?php endif; ?>
253
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
254
+ <span class="price-incl-tax">
255
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
256
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
257
+ <span class="cart-price">
258
+ <?php endif; ?>
259
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
260
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
261
+ </span>
262
+ <?php endif; ?>
263
+ <?php echo $this->getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
264
+ <?php endif; ?>
265
+ </span>
266
+ <?php else: ?>
267
+ &nbsp;
268
+ <?php endif; ?>
269
+ <?php else: ?>
270
+ &nbsp;
271
+ <?php endif; ?>
272
+ </td>
273
+ <td class="a-right">
274
+ <?php if ($this->canShowPriceInfo($_item)): ?>
275
+ <?php echo $this->getOrder()->formatPrice(-$_item->getDiscountAmount()) ?>
276
+ <?php else: ?>
277
+ &nbsp;
278
+ <?php endif; ?>
279
+ </td>
280
+ <td class="last a-right">
281
+ <?php if ($this->canShowPriceInfo($_item)): ?>
282
+ <?php echo $this->getOrder()->formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?>
283
+ <?php else: ?>
284
+ &nbsp;
285
+ <?php endif; ?>
286
+ </td>
287
+ </tr>
288
+ <?php endforeach; ?>
289
+
290
+ <?php if ($_showlastRow): ?>
291
+ <tr class="border">
292
+ <td>
293
+ <?php if($_options = $this->getItemOptions()): ?>
294
+ <dl class="item-options">
295
+ <?php foreach ($_options as $_option) : ?>
296
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
297
+ <?php if (!$this->getPrintStatus()): ?>
298
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
299
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
300
+ <?php echo $_formatedOptionValue['value'] ?>
301
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
302
+ <div class="truncated_full_value">
303
+ <dl class="item-options">
304
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
305
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
306
+ </dl>
307
+ </div>
308
+ <?php endif; ?>
309
+ </dd>
310
+ <?php else: ?>
311
+ <dd><?php echo $this->htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?></dd>
312
+ <?php endif; ?>
313
+ <?php endforeach; ?>
314
+ </dl>
315
+ <?php endif; ?>
316
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
317
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
318
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
319
+ <?php endif; ?>
320
+ </td>
321
+ <td>&nbsp;</td>
322
+ <td>&nbsp;</td>
323
+ <td>&nbsp;</td>
324
+ <td>&nbsp;</td>
325
+ <td>&nbsp;</td>
326
+ <td>&nbsp;</td>
327
+ </tr>
328
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+ <?php $_order = $this->getItem()->getOrderItem()->getOrder() ?>
29
+
30
+ <?php $items = $this->getChilds($parentItem) ?>
31
+ <?php $_count = count ($items) ?>
32
+ <?php $_index = 0 ?>
33
+
34
+ <?php $_prevOptionId = '' ?>
35
+
36
+ <?php foreach ($items as $_item): ?>
37
+
38
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
39
+ <?php $_showlastRow = true ?>
40
+ <?php else: ?>
41
+ <?php $_showlastRow = false ?>
42
+ <?php endif; ?>
43
+
44
+ <?php if ($_item->getOrderItem()->getParentItem()): ?>
45
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
46
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
47
+ <tr>
48
+ <td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
49
+ <td>&nbsp;</td>
50
+ <td>&nbsp;</td>
51
+ <td>&nbsp;</td>
52
+ <td>&nbsp;</td>
53
+ </tr>
54
+ <?php $_prevOptionId = $attributes['option_id'] ?>
55
+ <?php endif; ?>
56
+ <?php endif; ?>
57
+ <tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?> id="order-item-row-<?php echo $_item->getId() ?>">
58
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
59
+ <td><h4 class="product-name"><?php echo $this->htmlEscape($_item->getName()) ?></h4></td>
60
+ <?php else: ?>
61
+ <td><div class="option-value"><?php echo $this->getValueHtml($_item) ?></div></td>
62
+ <?php endif; ?>
63
+ <td><?php echo $this->htmlEscape($_item->getSku()) ?></td>
64
+ <td class="a-right">
65
+ <?php if ($this->canShowPriceInfo($_item)): ?>
66
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
67
+ <span class="price-excl-tax">
68
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
69
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
70
+ <span class="cart-price">
71
+ <?php endif; ?>
72
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
73
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
74
+ </span>
75
+ <?php endif; ?>
76
+ <?php endif; ?>
77
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
78
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
79
+ <?php else: ?>
80
+ <span class="cart-price">
81
+ <?php endif; ?>
82
+
83
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
84
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
85
+ <?php else: ?>
86
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
87
+ <?php endif; ?>
88
+
89
+ </span>
90
+
91
+
92
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
93
+
94
+ <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
95
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
96
+ <small>
97
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
98
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
99
+ <?php endforeach; ?>
100
+ </small>
101
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
102
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
103
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
104
+ <?php endforeach; ?>
105
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
106
+ <small>
107
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
108
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
109
+ <?php endforeach; ?>
110
+ </small>
111
+ <?php endif; ?>
112
+ </span>
113
+
114
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
115
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
116
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?></span>
117
+ </span>
118
+ <?php endif; ?>
119
+ <?php endif; ?>
120
+ </span>
121
+ <br />
122
+ <?php endif; ?>
123
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
124
+ <span class="price-incl-tax">
125
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
126
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
127
+ <span class="cart-price">
128
+ <?php endif; ?>
129
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
130
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
131
+ </span>
132
+ <?php endif; ?>
133
+ <?php endif; ?>
134
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
135
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
136
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
137
+ <?php else: ?>
138
+ <span class="cart-price">
139
+ <?php endif; ?>
140
+
141
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
142
+ <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
143
+ <?php else: ?>
144
+ <?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
145
+ <?php endif; ?>
146
+
147
+ </span>
148
+
149
+
150
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
151
+
152
+ <span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
153
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
154
+ <small>
155
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
156
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
157
+ <?php endforeach; ?>
158
+ </small>
159
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
160
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
161
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
162
+ <?php endforeach; ?>
163
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
164
+ <small>
165
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
166
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
167
+ <?php endforeach; ?>
168
+ </small>
169
+ <?php endif; ?>
170
+ </span>
171
+
172
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
173
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
174
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?></span>
175
+ </span>
176
+ <?php endif; ?>
177
+ <?php endif; ?>
178
+ </span>
179
+ <?php endif; ?>
180
+ <?php else: ?>
181
+ &nbsp;
182
+ <?php endif; ?>
183
+ </td>
184
+ <td class="a-center">
185
+ <?php if ($this->canShowPriceInfo($_item)): ?>
186
+ <?php echo $_item->getQty()*1 ?>
187
+ <?php else: ?>
188
+ &nbsp;
189
+ <?php endif; ?>
190
+ </td>
191
+ <td class="a-right">
192
+ <?php if ($this->canShowPriceInfo($_item)): ?>
193
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
194
+ <span class="price-excl-tax">
195
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
196
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
197
+ <span class="cart-price">
198
+ <?php endif; ?>
199
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
200
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
201
+ </span>
202
+ <?php endif; ?>
203
+ <?php endif; ?>
204
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
205
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
206
+ <?php else: ?>
207
+ <span class="cart-price">
208
+ <?php endif; ?>
209
+
210
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
211
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
212
+ <?php else: ?>
213
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
214
+ <?php endif; ?>
215
+
216
+ </span>
217
+
218
+
219
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
220
+
221
+ <span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
222
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
223
+ <small>
224
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
225
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
226
+ <?php endforeach; ?>
227
+ </small>
228
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
229
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
230
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
231
+ <?php endforeach; ?>
232
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
233
+ <small>
234
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
235
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
236
+ <?php endforeach; ?>
237
+ </small>
238
+ <?php endif; ?>
239
+ </span>
240
+
241
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
242
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
243
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?></span>
244
+ </span>
245
+ <?php endif; ?>
246
+ <?php endif; ?>
247
+ </span>
248
+ <br />
249
+ <?php endif; ?>
250
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
251
+ <span class="price-incl-tax">
252
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
253
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
254
+ <span class="cart-price">
255
+ <?php endif; ?>
256
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
257
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
258
+ </span>
259
+ <?php endif; ?>
260
+ <?php endif; ?>
261
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
262
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
263
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
264
+ <?php else: ?>
265
+ <span class="cart-price">
266
+ <?php endif; ?>
267
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
268
+ <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
269
+ <?php else: ?>
270
+ <?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
271
+ <?php endif; ?>
272
+
273
+ </span>
274
+
275
+
276
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
277
+
278
+ <span class="cart-tax-info" id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
279
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
280
+ <small>
281
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
282
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
283
+ <?php endforeach; ?>
284
+ </small>
285
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
286
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
287
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
288
+ <?php endforeach; ?>
289
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
290
+ <small>
291
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
292
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
293
+ <?php endforeach; ?>
294
+ </small>
295
+ <?php endif; ?>
296
+ </span>
297
+
298
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
299
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
300
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?></span>
301
+ </span>
302
+ <?php endif; ?>
303
+ <?php endif; ?>
304
+
305
+
306
+
307
+ </span>
308
+ <?php endif; ?>
309
+ <?php else: ?>
310
+ &nbsp;
311
+ <?php endif; ?>
312
+ </td>
313
+ </tr>
314
+ <?php endforeach; ?>
315
+
316
+ <?php if ($_showlastRow): ?>
317
+ <tr class="border">
318
+ <td>
319
+ <?php if($_options = $this->getItemOptions()): ?>
320
+ <dl class="item-options">
321
+ <?php foreach ($_options as $_option) : ?>
322
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
323
+ <?php if (!$this->getPrintStatus()): ?>
324
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
325
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
326
+ <?php echo $_formatedOptionValue['value'] ?>
327
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
328
+ <div class="truncated_full_value">
329
+ <dl class="item-options">
330
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
331
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
332
+ </dl>
333
+ </div>
334
+ <?php endif; ?>
335
+ </dd>
336
+ <?php else: ?>
337
+ <dd><?php echo $this->htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?></dd>
338
+ <?php endif; ?>
339
+ <?php endforeach; ?>
340
+ </dl>
341
+ <?php endif; ?>
342
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
343
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
344
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
345
+ <?php endif; ?>
346
+ </td>
347
+ <td>&nbsp;</td>
348
+ <td>&nbsp;</td>
349
+ <td>&nbsp;</td>
350
+ <td>&nbsp;</td>
351
+ </tr>
352
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml ADDED
@@ -0,0 +1,375 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+ <?php $items = array_merge(array($parentItem), $parentItem->getChildrenItems()); ?>
29
+ <?php $_count = count ($items) ?>
30
+ <?php $_index = 0 ?>
31
+
32
+ <?php $_prevOptionId = '' ?>
33
+
34
+ <?php foreach ($items as $_item): ?>
35
+
36
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
37
+ <?php $_showlastRow = true ?>
38
+ <?php else: ?>
39
+ <?php $_showlastRow = false ?>
40
+ <?php endif; ?>
41
+
42
+ <?php if ($_item->getParentItem()): ?>
43
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
44
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
45
+ <tr<?php if ($_item->getLastRow()) echo 'class="last"'; ?>>
46
+ <td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
47
+ <td>&nbsp;</td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ <td>&nbsp;</td>
51
+ </tr>
52
+ <?php $_prevOptionId = $attributes['option_id'] ?>
53
+ <?php endif; ?>
54
+ <?php endif; ?>
55
+ <tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?> id="order-item-row-<?php echo $_item->getId() ?>">
56
+
57
+ <?php if (!$_item->getParentItem()): ?>
58
+ <td><h3 class="product-name"><?php echo $this->htmlEscape($_item->getName()) ?></h3></td>
59
+ <?php else: ?>
60
+ <td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
61
+ <?php endif; ?>
62
+ <td><?php echo $this->htmlEscape(Mage::helper('core/string')->splitInjection($_item->getSku())) ?></td>
63
+ <td class="a-right">
64
+ <?php if (!$_item->getParentItem()): ?>
65
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
66
+ <span class="price-excl-tax">
67
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
68
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
69
+ <span class="cart-price">
70
+ <?php endif; ?>
71
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
72
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
73
+ </span>
74
+ <?php endif; ?>
75
+ <?php endif; ?>
76
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
77
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
78
+ <?php else: ?>
79
+ <span class="cart-price">
80
+ <?php endif; ?>
81
+
82
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
83
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
84
+ <?php else: ?>
85
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
86
+ <?php endif; ?>
87
+
88
+ </span>
89
+
90
+
91
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
92
+
93
+ <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
94
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
95
+ <small>
96
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
97
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
98
+ <?php endforeach; ?>
99
+ </small>
100
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
101
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
102
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
103
+ <?php endforeach; ?>
104
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
105
+ <small>
106
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
107
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
108
+ <?php endforeach; ?>
109
+ </small>
110
+ <?php endif; ?>
111
+ </span>
112
+
113
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
114
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
115
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?></span>
116
+ </span>
117
+ <?php endif; ?>
118
+ <?php endif; ?>
119
+ </span>
120
+ <br />
121
+ <?php endif; ?>
122
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
123
+ <span class="price-incl-tax">
124
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
125
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
126
+ <span class="cart-price">
127
+ <?php endif; ?>
128
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
129
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
130
+ </span>
131
+ <?php endif; ?>
132
+ <?php endif; ?>
133
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
134
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
135
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
136
+ <?php else: ?>
137
+ <span class="cart-price">
138
+ <?php endif; ?>
139
+
140
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
141
+ <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
142
+ <?php else: ?>
143
+ <?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
144
+ <?php endif; ?>
145
+
146
+ </span>
147
+
148
+
149
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
150
+
151
+ <span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
152
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
153
+ <small>
154
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
155
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
156
+ <?php endforeach; ?>
157
+ </small>
158
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
159
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
160
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
161
+ <?php endforeach; ?>
162
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
163
+ <small>
164
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
165
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
166
+ <?php endforeach; ?>
167
+ </small>
168
+ <?php endif; ?>
169
+ </span>
170
+
171
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
172
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
173
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?></span>
174
+ </span>
175
+ <?php endif; ?>
176
+ <?php endif; ?>
177
+ </span>
178
+ <?php endif; ?>
179
+ <?php else: ?>
180
+ &nbsp;
181
+ <?php endif; ?>
182
+ </td>
183
+ <td class="a-right">
184
+ <?php if (($_item->getParentItem() && $this->isChildCalculated()) ||
185
+ (!$_item->getParentItem() && !$this->isChildCalculated())): ?>
186
+ <span class="nobr">
187
+ <?php if ($_item->getQtyOrdered() > 0): ?>
188
+ <?php echo Mage::helper('sales')->__('Ordered'); ?>: <strong><?php echo $_item->getQtyOrdered()*1 ?></strong><br />
189
+ <?php endif; ?>
190
+ <?php if ($_item->getQtyShipped() > 0 && !$this->isShipmentSeparately()): ?>
191
+ <?php echo Mage::helper('sales')->__('Shipped'); ?>: <strong><?php echo $_item->getQtyShipped()*1 ?></strong><br />
192
+ <?php endif; ?>
193
+ <?php if ($_item->getQtyCanceled() > 0): ?>
194
+ <?php echo Mage::helper('sales')->__('Canceled'); ?>: <strong><?php echo $_item->getQtyCanceled()*1 ?></strong><br />
195
+ <?php endif; ?>
196
+ <?php if ($_item->getQtyRefunded() > 0): ?>
197
+ <?php echo Mage::helper('sales')->__('Refunded'); ?>: <strong><?php echo $_item->getQtyRefunded()*1 ?></strong>
198
+ <?php endif; ?>
199
+ </span>
200
+ <?php elseif ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $this->isShipmentSeparately()): ?>
201
+ <span class="nobr"><?php echo Mage::helper('sales')->__('Shipped'); ?>: <strong><?php echo $_item->getQtyShipped()*1 ?></strong></span>
202
+ <?php else: ?>
203
+ &nbsp;
204
+ <?php endif; ?>
205
+ </td>
206
+ <td class="a-right">
207
+ <?php if (!$_item->getParentItem()): ?>
208
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
209
+ <span class="price-excl-tax">
210
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
211
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
212
+ <span class="cart-price">
213
+ <?php endif; ?>
214
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
215
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
216
+ </span>
217
+ <?php endif; ?>
218
+ <?php endif; ?>
219
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
220
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
221
+ <?php else: ?>
222
+ <span class="cart-price">
223
+ <?php endif; ?>
224
+
225
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
226
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
227
+ <?php else: ?>
228
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
229
+ <?php endif; ?>
230
+
231
+ </span>
232
+
233
+
234
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
235
+
236
+ <span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
237
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
238
+ <small>
239
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
240
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
241
+ <?php endforeach; ?>
242
+ </small>
243
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
244
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
245
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
246
+ <?php endforeach; ?>
247
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
248
+ <small>
249
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
250
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
251
+ <?php endforeach; ?>
252
+ </small>
253
+ <?php endif; ?>
254
+ </span>
255
+
256
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
257
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
258
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?></span>
259
+ </span>
260
+ <?php endif; ?>
261
+ <?php endif; ?>
262
+ </span>
263
+ <br />
264
+ <?php endif; ?>
265
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
266
+ <span class="price-incl-tax">
267
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
268
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
269
+ <span class="cart-price">
270
+ <?php endif; ?>
271
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
272
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
273
+ </span>
274
+ <?php endif; ?>
275
+ <?php endif; ?>
276
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
277
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
278
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
279
+ <?php else: ?>
280
+ <span class="cart-price">
281
+ <?php endif; ?>
282
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
283
+ <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
284
+ <?php else: ?>
285
+ <?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
286
+ <?php endif; ?>
287
+
288
+ </span>
289
+
290
+
291
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
292
+
293
+ <span class="cart-tax-info" id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>" style="display:none;">
294
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
295
+ <small>
296
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
297
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
298
+ <?php endforeach; ?>
299
+ </small>
300
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
301
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
302
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
303
+ <?php endforeach; ?>
304
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
305
+ <small>
306
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
307
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
308
+ <?php endforeach; ?>
309
+ </small>
310
+ <?php endif; ?>
311
+ </span>
312
+
313
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
314
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
315
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total Incl. Tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?></span>
316
+ </span>
317
+ <?php endif; ?>
318
+ <?php endif; ?>
319
+
320
+
321
+
322
+ </span>
323
+ <?php endif; ?>
324
+ <?php else: ?>
325
+ &nbsp;
326
+ <?php endif; ?>
327
+ </td>
328
+ <!--
329
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
330
+ <th class="a-right"><?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?></th>
331
+ <?php endif; ?>
332
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
333
+ <th class="a-right"><?php echo $this->getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($this->getItem())); ?></th>
334
+ <?php endif; ?>
335
+ -->
336
+ </tr>
337
+ <?php endforeach; ?>
338
+
339
+ <?php if ($_showlastRow): ?>
340
+ <tr class="border">
341
+ <td>
342
+ <?php if($_options = $this->getItemOptions()): ?>
343
+ <dl class="item-options">
344
+ <?php foreach ($_options as $_option) : ?>
345
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
346
+ <?php if (!$this->getPrintStatus()): ?>
347
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
348
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
349
+ <?php echo $_formatedOptionValue['value'] ?>
350
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
351
+ <div class="truncated_full_value">
352
+ <dl class="item-options">
353
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
354
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
355
+ </dl>
356
+ </div>
357
+ <?php endif; ?>
358
+ </dd>
359
+ <?php else: ?>
360
+ <dd><?php echo $this->htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?></dd>
361
+ <?php endif; ?>
362
+ <?php endforeach; ?>
363
+ </dl>
364
+ <?php endif; ?>
365
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
366
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
367
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
368
+ <?php endif; ?>
369
+ </td>
370
+ <td>&nbsp;</td>
371
+ <td>&nbsp;</td>
372
+ <td>&nbsp;</td>
373
+ <td>&nbsp;</td>
374
+ </tr>
375
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $parentItem = $this->getItem() ?>
28
+ <?php $items = array_merge(array($parentItem->getOrderItem()), $parentItem->getOrderItem()->getChildrenItems()) ?>
29
+ <?php $shipItems = $this->getChilds($parentItem) ?>
30
+ <?php $_count = count ($items) ?>
31
+ <?php $_index = 0 ?>
32
+
33
+ <?php $_prevOptionId = '' ?>
34
+
35
+ <?php foreach ($items as $_item): ?>
36
+
37
+ <?php if($this->getItemOptions() || $parentItem->getDescription() || $this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
38
+ <?php $_showlastRow = true ?>
39
+ <?php else: ?>
40
+ <?php $_showlastRow = false ?>
41
+ <?php endif; ?>
42
+
43
+ <?php if ($_item->getParentItem()): ?>
44
+ <?php $attributes = $this->getSelectionAttributes($_item) ?>
45
+ <?php if ($_prevOptionId != $attributes['option_id']): ?>
46
+ <tr>
47
+ <td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
48
+ <td>&nbsp;</td>
49
+ <td>&nbsp;</td>
50
+ </tr>
51
+ <?php $_prevOptionId = $attributes['option_id'] ?>
52
+ <?php endif; ?>
53
+ <?php endif; ?>
54
+ <tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?> id="order-item-row-<?php echo $_item->getId() ?>">
55
+ <?php if (!$_item->getParentItem()): ?>
56
+ <td><h4 class="product-name"><?php echo $this->htmlEscape($_item->getName()) ?></h4></td>
57
+ <?php else: ?>
58
+ <td><div class="option-value"><?php echo $this->getValueHtml($_item) ?></div></td>
59
+ <?php endif; ?>
60
+ <td><?php echo $this->htmlEscape($_item->getSku()) ?></td>
61
+ <td class="a-center">
62
+ <?php if (($this->isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?>
63
+ <?php if (isset($shipItems[$_item->getId()])): ?>
64
+ <?php echo $shipItems[$_item->getId()]->getQty()*1 ?>
65
+ <?php elseif ($_item->getIsVirtual()): ?>
66
+ <?php echo $this->__('N/A') ?>
67
+ <?php else: ?>
68
+ 0
69
+ <?php endif; ?>
70
+ <?php else: ?>
71
+ &nbsp;
72
+ <?php endif; ?>
73
+ </td>
74
+ </tr>
75
+ <?php endforeach; ?>
76
+
77
+ <?php if ($_showlastRow): ?>
78
+ <tr class="border">
79
+ <td>
80
+ <?php if($_options = $this->getItemOptions()): ?>
81
+ <dl class="item-options">
82
+ <?php foreach ($_options as $_option) : ?>
83
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
84
+ <?php if (!$this->getPrintStatus()): ?>
85
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
86
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
87
+ <?php echo $_formatedOptionValue['value'] ?>
88
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
89
+ <div class="truncated_full_value">
90
+ <dl class="item-options">
91
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
92
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
93
+ </dl>
94
+ </div>
95
+ <?php endif; ?>
96
+ </dd>
97
+ <?php else: ?>
98
+ <dd><?php echo $this->htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?></dd>
99
+ <?php endif; ?>
100
+ <?php endforeach; ?>
101
+ </dl>
102
+ <?php endif; ?>
103
+ <?php echo $this->htmlEscape($_item->getDescription()) ?>
104
+ <?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
105
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
106
+ <?php endif; ?>
107
+ </td>
108
+ <td>&nbsp;</td>
109
+ <td>&nbsp;</td>
110
+ </tr>
111
+ <?php endif; ?>
app/design/frontend/base/default/template/callouts/left_col.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-banner">
28
+ <div class="block-content">
29
+ <?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
30
+ <a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
31
+ <?php elseif($this->getLinkUrl()): ?>
32
+ <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
33
+ <?php endif; ?>
34
+ <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
35
+ <?php if($this->getLinkUrl()): ?>
36
+ </a>
37
+ <?php endif ?>
38
+ </div>
39
+ </div>
app/design/frontend/base/default/template/callouts/right_col.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-banner">
28
+ <div class="block-content">
29
+ <?php if(strtolower(substr($this->getLinkUrl(),0,4))==='http'): ?>
30
+ <a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
31
+ <?php elseif($this->getLinkUrl()): ?>
32
+ <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>">
33
+ <?php endif; ?>
34
+ <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" />
35
+ <?php if($this->getLinkUrl()): ?>
36
+ </a>
37
+ <?php endif ?>
38
+ </div>
39
+ </div>
app/design/frontend/base/default/template/catalog/category/page.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <div class="page-title">
32
+ <h1><?php echo $this->getTitle() ?></h1>
33
+ </div>
34
+ <div>
35
+ <?php echo $this->getContent() ?>
36
+ </div>
app/design/frontend/base/default/template/catalog/category/view.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Category view template
30
+ *
31
+ * @see Mage_Catalog_Block_Category_View
32
+ */
33
+ ?>
34
+ <?php
35
+ $_helper = $this->helper('catalog/output');
36
+ $_category = $this->getCurrentCategory();
37
+ $_imgHtml = '';
38
+ if ($_imgUrl = $_category->getImageUrl()) {
39
+ $_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
40
+ $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
41
+ }
42
+ ?>
43
+ <div class="page-title category-title">
44
+ <?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
45
+ <a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
46
+ <?php endif; ?>
47
+ <h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
48
+ </div>
49
+
50
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
51
+
52
+ <?php if($_imgUrl): ?>
53
+ <?php echo $_imgHtml ?>
54
+ <?php endif; ?>
55
+
56
+ <?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
57
+ <div class="category-description std">
58
+ <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
59
+ </div>
60
+ <?php endif; ?>
61
+
62
+ <?php if($this->isContentMode()): ?>
63
+ <?php echo $this->getCmsBlockHtml() ?>
64
+
65
+ <?php elseif($this->isMixedMode()): ?>
66
+ <?php echo $this->getCmsBlockHtml() ?>
67
+ <?php echo $this->getProductListHtml() ?>
68
+
69
+ <?php else: ?>
70
+ <?php echo $this->getProductListHtml() ?>
71
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-category-link"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-category-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/layer/filter.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Template for filter items block
30
+ *
31
+ * @see Mage_Catalog_Block_Layer_Filter
32
+ */
33
+ ?>
34
+
35
+ <ol>
36
+ <?php foreach ($this->getItems() as $_item): ?>
37
+ <li>
38
+ <?php if ($_item->getCount() > 0): ?>
39
+ <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a>
40
+ <?php else: echo $_item->getLabel() ?>
41
+ <?php endif; ?>
42
+ (<?php echo $_item->getCount() ?>)
43
+ </li>
44
+ <?php endforeach ?>
45
+ </ol>
app/design/frontend/base/default/template/catalog/layer/state.phtml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Category layered navigation state
30
+ *
31
+ * @see Mage_Catalog_Block_Layer_State
32
+ */
33
+ ?>
34
+ <?php $_filters = $this->getActiveFilters() ?>
35
+ <?php if(!empty($_filters)): ?>
36
+ <div class="currently">
37
+ <p class="block-subtitle"><?php echo $this->__('Currently Shopping by:') ?></p>
38
+ <ol>
39
+ <?php foreach ($_filters as $_filter): ?>
40
+ <li>
41
+ <a href="<?php echo $_filter->getRemoveUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
42
+ <span class="label"><?php echo $this->__($_filter->getName()) ?>:</span> <?php echo $this->stripTags($_filter->getLabel()) ?>
43
+ </li>
44
+ <?php endforeach; ?>
45
+ </ol>
46
+ <div class="actions"><a href="<?php echo $this->getClearUrl() ?>"><?php echo $this->__('Clear All') ?></a></div>
47
+ </div>
48
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/layer/view.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Category layered navigation
30
+ *
31
+ * @see Mage_Catalog_Block_Layer_View
32
+ */
33
+ ?>
34
+ <?php if($this->canShowBlock()): ?>
35
+ <div class="block block-layered-nav">
36
+ <div class="block-title">
37
+ <strong><span><?php echo $this->__('Shop By') ?></span></strong>
38
+ </div>
39
+ <div class="block-content">
40
+ <?php echo $this->getStateHtml() ?>
41
+ <?php if($this->canShowOptions()): ?>
42
+ <p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
43
+ <dl id="narrow-by-list">
44
+ <?php $_filters = $this->getFilters() ?>
45
+ <?php foreach ($_filters as $_filter): ?>
46
+ <?php if($_filter->getItemsCount()): ?>
47
+ <dt><?php echo $this->__($_filter->getName()) ?></dt>
48
+ <dd><?php echo $_filter->getHtml() ?></dd>
49
+ <?php endif; ?>
50
+ <?php endforeach; ?>
51
+ </dl>
52
+ <script type="text/javascript">decorateDataList('narrow-by-list')</script>
53
+ <?php endif; ?>
54
+ </div>
55
+ </div>
56
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/navigation/left.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Category left navigation
29
+ *
30
+ * @see Mage_Catalog_Block_Navigation
31
+ */
32
+ ?>
33
+ <?php if (!Mage::registry('current_category')) return ?>
34
+ <?php $_categories = $this->getCurrentChildCategories() ?>
35
+ <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
36
+ <?php if($_count): ?>
37
+ <div class="block block-layered-nav">
38
+ <div class="block-title">
39
+ <strong><span><?php echo $this->__('Browse By') ?></span></strong>
40
+ </div>
41
+ <div class="block-content">
42
+ <dl id="narrow-by-list2">
43
+ <dt><?php echo $this->__('Category') ?></dt>
44
+ <dd>
45
+ <ol>
46
+ <?php foreach ($_categories as $_category): ?>
47
+ <?php if($_category->getIsActive()): ?>
48
+ <li>
49
+ <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
50
+ </li>
51
+ <?php endif; ?>
52
+ <?php endforeach ?>
53
+ </ol>
54
+ </dd>
55
+ </dl>
56
+ <script type="text/javascript">decorateDataList('narrow-by-list2')</script>
57
+ </div>
58
+ </div>
59
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/navigation/top.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Top menu for store
30
+ *
31
+ * @see Mage_Catalog_Block_Navigation
32
+ */
33
+ ?>
34
+ <?php
35
+ /**
36
+ * $this->renderCategoriesMenuHtml() supports optional arguments:
37
+ * int Level number for list item class to start from
38
+ * string Extra class of outermost list items
39
+ * string If specified wraps children list in div with this class
40
+ */
41
+ ?>
42
+ <?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
43
+ <?php if($_menu): ?>
44
+ <div class="nav-container">
45
+ <ul id="nav">
46
+ <?php echo $_menu ?>
47
+ </ul>
48
+ </div>
49
+ <?php endif ?>
app/design/frontend/base/default/template/catalog/product/compare/list.phtml ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /* @var $this Mage_Catalog_Block_Product_Compare_List */
27
+ ?>
28
+ <div class="page-title title-buttons">
29
+ <h1><?php echo $this->__('Compare Products') ?></h1>
30
+ <a href="#" onclick="window.print(); return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
31
+ </div>
32
+ <?php $_total=$this->getItems()->getSize() ?>
33
+ <?php if($_total): ?>
34
+ <table class="data-table compare-table" id="product_comparison">
35
+ <?php $_i=0 ?>
36
+ <?php foreach($this->getItems() as $_item): ?>
37
+ <?php if($_i++%10==0): ?>
38
+ <col width="1" />
39
+ <?php endif; ?>
40
+ <col width="<?php echo floor(100/$_total); ?>%" />
41
+ <?php endforeach; ?>
42
+ <?php if ($_total>2): ?>
43
+ <thead>
44
+ <tr>
45
+ <?php $_i=0 ?>
46
+ <?php foreach($this->getItems() as $_item): ?>
47
+ <?php if($_i++%10==0): ?>
48
+ <th>&nbsp;</th>
49
+ <?php endif; ?>
50
+ <td class="a-right"><a href="#" class="btn-remove" onclick="removeItem('<?php echo $this->helper('catalog/product_compare')->getRemoveUrl($_item) ?>');" title="<?php echo $this->__('Remove This Item') ?>"><?php echo $this->__('Remove This Item') ?></a></td>
51
+ <?php endforeach; ?>
52
+ </tr>
53
+ </thead>
54
+ <?php endif ?>
55
+ <tbody>
56
+ <tr class="product-shop-row">
57
+ <?php $_i=0 ?>
58
+ <?php foreach($this->getItems() as $_item): ?>
59
+ <?php if($_i++%10==0): ?>
60
+ <th>&nbsp;</th>
61
+ <?php endif; ?>
62
+ <td>
63
+ <a class="product-image" href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->stripTags($_item->getName(), null, true) ?>" /></a>
64
+ <h2 class="product-name"><a href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a></h2>
65
+ <?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
66
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
67
+ <?php if($_item->isSaleable()): ?>
68
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
69
+ <?php else: ?>
70
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
71
+ <?php endif; ?>
72
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
73
+ <ul class="add-to-links">
74
+ <li><a href="#" class="link-wishlist" onclick="setPLocation('<?php echo $this->getAddToWishlistUrl($_item) ?>', true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
75
+ </ul>
76
+ <?php endif; ?>
77
+ </td>
78
+ <?php endforeach; ?>
79
+ </tr>
80
+ </tbody>
81
+ <tbody>
82
+ <?php foreach ($this->getAttributes() as $_attribute): ?>
83
+ <tr>
84
+ <?php $_i=0 ?>
85
+ <?php foreach($this->getItems() as $_item): ?>
86
+ <?php if($_i++%10==0): ?>
87
+ <th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
88
+ <?php endif; ?>
89
+ <td>
90
+ <?php switch ($_attribute->getAttributeCode()) {
91
+ case "price": ?>
92
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
93
+ <?php break;
94
+ case "small_image": ?>
95
+ <img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" />
96
+ <?php break;
97
+ case "date":
98
+ echo substr($this->getProductAttributeValue($_item, $_attribute),0,10);
99
+ break;
100
+ default: ?>
101
+ <?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getCode()) ?>
102
+ <?php break;
103
+ } ?>
104
+ </td>
105
+ <?php endforeach; ?>
106
+ </tr>
107
+ <?php endforeach; ?>
108
+ </tbody>
109
+ <tbody>
110
+ <tr class="add-to-row">
111
+ <?php $_i=0 ?>
112
+ <?php foreach($this->getItems() as $_item): ?>
113
+ <?php if($_i++%10==0): ?>
114
+ <th>&nbsp;</th>
115
+ <?php endif; ?>
116
+ <td>
117
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
118
+ <?php if($_item->isSaleable()): ?>
119
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
120
+ <?php else: ?>
121
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
122
+ <?php endif; ?>
123
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
124
+ <ul class="add-to-links">
125
+ <li><a href="#" class="link-wishlist" onclick="setPLocation('<?php echo $this->getAddToWishlistUrl($_item) ?>', true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
126
+ </ul>
127
+ <?php endif; ?>
128
+ </td>
129
+ <?php endforeach; ?>
130
+ </tr>
131
+ </tbody>
132
+ </table>
133
+ <div class="buttons-set">
134
+ <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
135
+ <span class="please-wait" id="compare-list-please-wait" style="display:none;">
136
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Please wait...') ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?>
137
+ </span>
138
+ </div>
139
+ <script type="text/javascript">
140
+ decorateTable('product_comparison');
141
+
142
+ /**
143
+ * Send remove item request, after that reload windows
144
+ */
145
+ function removeItem(url)
146
+ {
147
+ new Ajax.Request(url, {
148
+ parameters: {isAjax: 1, method: 'POST'},
149
+ onLoading: function(){$('compare-list-please-wait').show();},
150
+ onSuccess: function(transport) {
151
+ $('compare-list-please-wait').hide();
152
+ window.location.reload();
153
+ window.opener.location.reload();
154
+ }
155
+ });
156
+ }
157
+ </script>
158
+ <?php else: ?>
159
+ <script type="text/javascript">window.close();</script>
160
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ /* @var $this Mage_Catalog_Block_Product_Compare_Sidebar */
27
+ ?>
28
+ <?php
29
+ $_helper = $this->helper('catalog/product_compare');
30
+ $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
31
+ ?>
32
+ <div class="block block-list block-compare">
33
+ <div class="block-title">
34
+ <strong><span><?php echo $this->__('Compare Products') ?>
35
+ <?php if($_helper->getItemCount() > 0): ?>
36
+ <small><?php echo $this->__('(%d)', $_helper->getItemCount()) ?></small>
37
+ <?php endif; ?>
38
+ </span></strong>
39
+ </div>
40
+ <div class="block-content">
41
+ <?php if($_helper->getItemCount() > 0): ?>
42
+ <ol id="compare-items">
43
+ <?php foreach($_items as $_index => $_item): ?>
44
+ <li class="item">
45
+ <input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>" />
46
+ <a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>');"><?php echo $this->__('Remove This Item') ?></a>
47
+ <p class="product-name"><a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a></p>
48
+ </li>
49
+ <?php endforeach; ?>
50
+ </ol>
51
+ <script type="text/javascript">decorateList('compare-items')</script>
52
+ <div class="actions">
53
+ <a href="<?php echo $_helper->getClearListUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>');"><?php echo $this->__('Clear All') ?></a>
54
+ <button type="button" title="<?php echo $this->__('Compare') ?>" class="button" onclick="popWin('<?php echo $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')"><span><span><?php echo $this->__('Compare') ?></span></span></button>
55
+ </div>
56
+ <?php else: ?>
57
+ <p class="empty"><?php echo $this->__('You have no items to compare.') ?></p>
58
+ <?php endif; ?>
59
+ </div>
60
+ </div>
app/design/frontend/base/default/template/catalog/product/gallery.phtml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_width=$this->getImageWidth() ?>
28
+ <div class="product-image-popup" style="width:<?php echo $_width; ?>px;">
29
+ <div class="buttons-set"><a href="#" onclick="window.close(); return false;" class="button"><span><?php echo $this->__('Close Window') ?></span></a></div>
30
+ <?php if($this->getPreviusImageUrl() || $this->getNextImageUrl()): ?>
31
+ <div class="nav">
32
+ <?php if($_prevUrl = $this->getPreviusImageUrl()): ?>
33
+ <a href="<?php echo $_prevUrl ?>" class="prev">&laquo; <?php echo $this->__('Prev') ?></a>
34
+ <?php endif; ?>
35
+ <?php if($_nextUrl = $this->getNextImageUrl()): ?>
36
+ <a href="<?php echo $_nextUrl ?>" class="next"><?php echo $this->__('Next') ?> &raquo;</a>
37
+ <?php endif; ?>
38
+ </div>
39
+ <?php endif; ?>
40
+ <?php if($_imageTitle = $this->htmlEscape($this->getCurrentImage()->getLabel())): ?>
41
+ <h1 class="image-label"><?php echo $_imageTitle ?></h1>
42
+ <?php endif; ?>
43
+ <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $this->getImageFile()); ?>"<?php if($_width): ?> width="<?php echo $_width ?>"<?php endif; ?> alt="<?php echo $this->htmlEscape($this->getCurrentImage()->getLabel()) ?>" title="<?php echo $this->htmlEscape($this->getCurrentImage()->getLabel()) ?>" id="product-gallery-image" class="image" />
44
+ <div class="buttons-set"><a href="#" onclick="window.close(); return false;" class="button"><span><?php echo $this->__('Close Window') ?></span></a></div>
45
+ <?php if($this->getPreviusImageUrl() || $this->getNextImageUrl()): ?>
46
+ <div class="nav">
47
+ <?php if($_prevUrl = $this->getPreviusImageUrl()): ?>
48
+ <a href="<?php echo $_prevUrl ?>" class="prev">&laquo; <?php echo $this->__('Prev') ?></a>
49
+ <?php endif; ?>
50
+ <?php if($_nextUrl = $this->getNextImageUrl()): ?>
51
+ <a href="<?php echo $_nextUrl ?>" class="next"><?php echo $this->__('Next') ?> &raquo;</a>
52
+ <?php endif; ?>
53
+ </div>
54
+ <?php endif; ?>
55
+ </div>
56
+ <script type="text/javascript">
57
+ //<![CDATA[
58
+ Event.observe(window, 'load', function(){
59
+ var demensions = $('product-gallery-image').getDimensions();
60
+ if (demensions.width < 300) {
61
+ demensions.width = 300
62
+ }
63
+ window.resizeTo(demensions.width+90, demensions.height+210);
64
+ });
65
+ //]]>
66
+ </script>
app/design/frontend/base/default/template/catalog/product/list.phtml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list template
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List
32
+ */
33
+ ?>
34
+ <?php
35
+ $_productCollection=$this->getLoadedProductCollection();
36
+ $_helper = $this->helper('catalog/output');
37
+ ?>
38
+ <?php if(!$_productCollection->count()): ?>
39
+ <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
40
+ <?php else: ?>
41
+ <div class="category-products">
42
+ <?php echo $this->getToolbarHtml() ?>
43
+ <?php // List mode ?>
44
+ <?php if($this->getMode()!='grid'): ?>
45
+ <?php $_iterator = 0; ?>
46
+ <ol class="products-list" id="products-list">
47
+ <?php foreach ($_productCollection as $_product): ?>
48
+ <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
49
+ <?php // Product Image ?>
50
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
51
+ <?php // Product description ?>
52
+ <div class="product-shop">
53
+ <div class="f-fix">
54
+ <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
55
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
56
+ <?php if($_product->getRatingSummary()): ?>
57
+ <?php echo $this->getReviewsSummaryHtml($_product) ?>
58
+ <?php endif; ?>
59
+ <?php echo $this->getPriceHtml($_product, true) ?>
60
+ <?php if($_product->isSaleable()): ?>
61
+ <p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
62
+ <?php else: ?>
63
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
64
+ <?php endif; ?>
65
+ <div class="desc std">
66
+ <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
67
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
68
+ </div>
69
+ <ul class="add-to-links">
70
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
71
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
72
+ <?php endif; ?>
73
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
74
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
75
+ <?php endif; ?>
76
+ </ul>
77
+ </div>
78
+ </div>
79
+ </li>
80
+ <?php endforeach; ?>
81
+ </ol>
82
+ <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
83
+
84
+ <?php else: ?>
85
+
86
+ <?php // Grid Mode ?>
87
+
88
+ <?php $_collectionSize = $_productCollection->count() ?>
89
+ <?php $_columnCount = $this->getColumnCount(); ?>
90
+ <?php $i=0; foreach ($_productCollection as $_product): ?>
91
+ <?php if ($i++%$_columnCount==0): ?>
92
+ <ul class="products-grid">
93
+ <?php endif ?>
94
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
95
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
96
+ <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
97
+ <?php if($_product->getRatingSummary()): ?>
98
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
99
+ <?php endif; ?>
100
+ <?php echo $this->getPriceHtml($_product, true) ?>
101
+ <div class="actions">
102
+ <?php if($_product->isSaleable()): ?>
103
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
104
+ <?php else: ?>
105
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
106
+ <?php endif; ?>
107
+ <ul class="add-to-links">
108
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
109
+ <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
110
+ <?php endif; ?>
111
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
112
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
113
+ <?php endif; ?>
114
+ </ul>
115
+ </div>
116
+ </li>
117
+ <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
118
+ </ul>
119
+ <?php endif ?>
120
+ <?php endforeach ?>
121
+ <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
122
+ <?php endif; ?>
123
+
124
+ <div class="toolbar-bottom">
125
+ <?php echo $this->getToolbarHtml() ?>
126
+ </div>
127
+ </div>
128
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/list/related.phtml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($this->getItems()->getSize()): ?>
28
+ <div class="block block-related">
29
+ <div class="block-title">
30
+ <strong><span><?php echo $this->__('Related Products') ?></span></strong>
31
+ </div>
32
+ <div class="block-content">
33
+ <p class="block-subtitle"><?php echo $this->__('Check items to add to the cart or') ?>&nbsp;<a href="#" onclick="selectAllRelated(this); return false;"><?php echo $this->__('select all') ?></a></p>
34
+ <ol class="mini-products-list" id="block-related">
35
+ <?php foreach($this->getItems() as $_item): ?>
36
+ <li class="item">
37
+ <?php if(!$_item->isComposite() && $_item->isSaleable()): ?>
38
+ <?php if (!$_item->getRequiredOptions()): ?>
39
+ <input type="checkbox" class="checkbox related-checkbox" id="related-checkbox<?php echo $_item->getId() ?>" name="related_products[]" value="<?php echo $_item->getId() ?>" />
40
+ <?php endif; ?>
41
+ <?php endif; ?>
42
+ <div class="product">
43
+ <a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(50) ?>" width="50" height="50" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
44
+ <div class="product-details">
45
+ <p class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></p>
46
+ <?php echo $this->getPriceHtml($_item, true, '-related') ?>
47
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
48
+ <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
49
+ <?php endif; ?>
50
+ </div>
51
+ </div>
52
+ </li>
53
+ <?php endforeach ?>
54
+ </ol>
55
+ <script type="text/javascript">decorateList('block-related', 'none-recursive')</script>
56
+ </div>
57
+ <script type="text/javascript">
58
+ //<![CDATA[
59
+ $$('.related-checkbox').each(function(elem){
60
+ Event.observe(elem, 'click', addRelatedToProduct)
61
+ });
62
+
63
+ var relatedProductsCheckFlag = false;
64
+ function selectAllRelated(txt){
65
+ if (relatedProductsCheckFlag == false) {
66
+ $$('.related-checkbox').each(function(elem){
67
+ elem.checked = true;
68
+ });
69
+ relatedProductsCheckFlag = true;
70
+ txt.innerHTML="<?php echo $this->__('unselect all') ?>";
71
+ } else {
72
+ $$('.related-checkbox').each(function(elem){
73
+ elem.checked = false;
74
+ });
75
+ relatedProductsCheckFlag = false;
76
+ txt.innerHTML="<?php echo $this->__('select all') ?>";
77
+ }
78
+ addRelatedToProduct();
79
+ }
80
+
81
+ function addRelatedToProduct(){
82
+ var checkboxes = $$('.related-checkbox');
83
+ var values = [];
84
+ for(var i=0;i<checkboxes.length;i++){
85
+ if(checkboxes[i].checked) values.push(checkboxes[i].value);
86
+ }
87
+ if($('related-products-field')){
88
+ $('related-products-field').value = values.join(',');
89
+ }
90
+ }
91
+ //]]>
92
+ </script>
93
+ </div>
94
+ <?php endif ?>
app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Product list toolbar
30
+ *
31
+ * @see Mage_Catalog_Block_Product_List_Toolbar
32
+ */
33
+ ?>
34
+ <?php if($this->getCollection()->getSize()): ?>
35
+ <div class="toolbar">
36
+ <div class="pager">
37
+ <p class="amount">
38
+ <?php if($this->getLastPageNum()>1): ?>
39
+ <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
40
+ <?php else: ?>
41
+ <strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
42
+ <?php endif; ?>
43
+ </p>
44
+
45
+ <div class="limiter">
46
+ <label><?php echo $this->__('Show') ?></label>
47
+ <select onchange="setLocation(this.value)">
48
+ <?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
49
+ <option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
50
+ <?php echo $_limit ?>
51
+ </option>
52
+ <?php endforeach; ?>
53
+ </select> <?php echo $this->__('per page') ?>
54
+ </div>
55
+
56
+ <?php echo $this->getPagerHtml() ?>
57
+
58
+ </div>
59
+
60
+ <?php if( $this->isExpanded() ): ?>
61
+ <div class="sorter">
62
+ <?php if( $this->isEnabledViewSwitcher() ): ?>
63
+ <p class="view-mode">
64
+ <?php $_modes = $this->getModes(); ?>
65
+ <?php if($_modes && count($_modes)>1): ?>
66
+ <label><?php echo $this->__('View as') ?>:</label>
67
+ <?php foreach ($this->getModes() as $_code=>$_label): ?>
68
+ <?php if($this->isModeActive($_code)): ?>
69
+ <strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>&nbsp;
70
+ <?php else: ?>
71
+ <a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>&nbsp;
72
+ <?php endif; ?>
73
+ <?php endforeach; ?>
74
+ <?php endif; ?>
75
+ </p>
76
+ <?php endif; ?>
77
+
78
+ <div class="sort-by">
79
+ <label><?php echo $this->__('Sort By') ?></label>
80
+ <select onchange="setLocation(this.value)">
81
+ <?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
82
+ <option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
83
+ <?php echo $this->__($_order) ?>
84
+ </option>
85
+ <?php endforeach; ?>
86
+ </select>
87
+ <?php if($this->getCurrentDirection() == 'desc'): ?>
88
+ <a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
89
+ <?php else: ?>
90
+ <a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
91
+ <?php endif; ?>
92
+ </div>
93
+ </div>
94
+ <?php endif; ?>
95
+ </div>
96
+ <?php endif ?>
app/design/frontend/base/default/template/catalog/product/list/upsell.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if(count($this->getItemCollection()->getItems())): ?>
28
+ <div class="box-collateral box-up-sell">
29
+ <h2><?php echo $this->__('You may also be interested in the following product(s)') ?></h2>
30
+ <table class="products-grid" id="upsell-product-table">
31
+ <?php // $this->setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
32
+ <?php $this->resetItemsIterator() ?>
33
+ <?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
34
+ <tr>
35
+ <?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
36
+ <?php if($_link=$this->getIterableItem()): ?>
37
+ <td>
38
+ <a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a>
39
+ <h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>"><?php echo $this->htmlEscape($_link->getName()) ?></a></h3>
40
+ <?php echo $this->getPriceHtml($_link, true, '-upsell') ?>
41
+ <?php echo $this->getReviewsSummaryHtml($_link) ?>
42
+ </td>
43
+ <?php else: ?>
44
+ <td class="empty">&nbsp;</td>
45
+ <?php endif; ?>
46
+ <?php endfor; ?>
47
+ </tr>
48
+ <?php endfor; ?>
49
+ </table>
50
+ <script type="text/javascript">decorateTable('upsell-product-table')</script>
51
+ </div>
52
+ <?php endif ?>
app/design/frontend/base/default/template/catalog/product/new.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <h2 class="subtitle"><?php echo $this->__('New Products') ?></h2>
29
+ <?php $_columnCount = $this->getColumnCount(); ?>
30
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
31
+ <?php if ($i++%$_columnCount==0): ?>
32
+ <ul class="products-grid">
33
+ <?php endif ?>
34
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
35
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135) ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a>
36
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
37
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
38
+ <?php echo $this->getPriceHtml($_product, true, '-new') ?>
39
+ <div class="actions">
40
+ <?php if($_product->isSaleable()): ?>
41
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
42
+ <?php else: ?>
43
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
44
+ <?php endif; ?>
45
+ <ul class="add-to-links">
46
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
47
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
48
+ <?php endif; ?>
49
+ <?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
50
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
51
+ <?php endif; ?>
52
+ </ul>
53
+ </div>
54
+ </li>
55
+ <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
56
+ </ul>
57
+ <?php endif ?>
58
+ <?php endforeach; ?>
59
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/price.phtml ADDED
@@ -0,0 +1,414 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * Template for displaying product price in different places (products grid, product view page etc)
31
+ *
32
+ * @see Mage_Catalog_Block_Product_Abstract
33
+ */
34
+ ?>
35
+ <?php
36
+ $_coreHelper = $this->helper('core');
37
+ $_weeeHelper = $this->helper('weee');
38
+ $_taxHelper = $this->helper('tax');
39
+ /* @var $_coreHelper Mage_Core_Helper_Data */
40
+ /* @var $_weeeHelper Mage_Weee_Helper_Data */
41
+ /* @var $_taxHelper Mage_Tax_Helper_Data */
42
+
43
+ $_product = $this->getProduct();
44
+ $_id = $_product->getId();
45
+ $_weeeSeparator = '';
46
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
47
+ $_minimalPriceValue = $_product->getMinimalPrice();
48
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
49
+ ?>
50
+
51
+ <?php if (!$_product->isGrouped()): ?>
52
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
53
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(1,2,4))): ?>
54
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
55
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
56
+ <?php endif; ?>
57
+
58
+ <div class="price-box">
59
+ <?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
60
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
61
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
62
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
63
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
64
+ <?php if ($_finalPrice == $_price): ?>
65
+ <?php if ($_taxHelper->displayBothPrices()): ?>
66
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
67
+ <span class="price-excluding-tax">
68
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
69
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
70
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
71
+ </span>
72
+ </span>
73
+ <span class="price-including-tax">
74
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
75
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
76
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
77
+ </span>
78
+ </span>
79
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
80
+ <span class="price-excluding-tax">
81
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
82
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
83
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
84
+ </span>
85
+ </span>
86
+ <span class="price-including-tax">
87
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
88
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
89
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
90
+ </span>
91
+ <span class="weee">(
92
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
93
+ <?php echo $_weeeSeparator; ?>
94
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
95
+ <?php $_weeeSeparator = ' + '; ?>
96
+ <?php endforeach; ?>
97
+ )</span>
98
+ </span>
99
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
100
+ <span class="price-excluding-tax">
101
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
102
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
103
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,false) ?>
104
+ </span>
105
+ </span>
106
+ <span class="price-including-tax">
107
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
108
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
109
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
110
+ </span>
111
+ <span class="weee">(
112
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
113
+ <?php echo $_weeeSeparator; ?>
114
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
115
+ <?php $_weeeSeparator = ' + '; ?>
116
+ <?php endforeach; ?>
117
+ )</span>
118
+ </span>
119
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
120
+ <span class="price-excluding-tax">
121
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
122
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
123
+ <?php echo $_coreHelper->currency($_price,true,false) ?>
124
+ </span>
125
+ </span>
126
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
127
+ <span class="weee">
128
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
129
+ </span>
130
+ <?php endforeach; ?>
131
+ <span class="price-including-tax">
132
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
133
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
134
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
135
+ </span>
136
+ </span>
137
+ <?php else: ?>
138
+ <span class="price-excluding-tax">
139
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
140
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
141
+ <?php echo $_coreHelper->currency($_price,true,false) ?>
142
+ </span>
143
+ </span>
144
+ <span class="price-including-tax">
145
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
146
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
147
+ <?php echo $_coreHelper->currency($_finalPriceInclTax,true,false) ?>
148
+ </span>
149
+ </span>
150
+ <?php endif; ?>
151
+ <?php else: ?>
152
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
153
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
154
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
155
+ </span>
156
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
157
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
158
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
159
+ </span>
160
+ <span class="weee">(
161
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
162
+ <?php echo $_weeeSeparator; ?>
163
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
164
+ <?php $_weeeSeparator = ' + '; ?>
165
+ <?php endforeach; ?>
166
+ )</span>
167
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
168
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
169
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
170
+ </span>
171
+ <span class="weee">(
172
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
173
+ <?php echo $_weeeSeparator; ?>
174
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
175
+ <?php $_weeeSeparator = ' + '; ?>
176
+ <?php endforeach; ?>
177
+ )</span>
178
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
179
+ <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
180
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
181
+ <span class="weee">
182
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
183
+ </span>
184
+ <?php endforeach; ?>
185
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
186
+ <?php echo $_coreHelper->currency($_price+$_weeeTaxAmount,true,true) ?>
187
+ </span>
188
+ <?php else: ?>
189
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
190
+ <?php echo $_coreHelper->currency($_price,true,true) ?>
191
+ </span>
192
+ <?php endif; ?>
193
+ <?php endif; ?>
194
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
195
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
196
+
197
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
198
+ <p class="old-price">
199
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
200
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
201
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
202
+ </span>
203
+ </p>
204
+
205
+ <?php if ($_taxHelper->displayBothPrices()): ?>
206
+ <p class="special-price">
207
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
208
+ <span class="price-excluding-tax">
209
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
210
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
211
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
212
+ </span>
213
+ </span>
214
+ <span class="price-including-tax">
215
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
216
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
217
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
218
+ </span>
219
+ </span>
220
+ </p>
221
+ <?php else: ?>
222
+ <p class="special-price">
223
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
224
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
225
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
226
+ </span>
227
+ </p>
228
+ <?php endif; ?>
229
+
230
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
231
+ <p class="old-price">
232
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
233
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
234
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
235
+ </span>
236
+ </p>
237
+
238
+ <p class="special-price">
239
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
240
+ <span class="price-excluding-tax">
241
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
242
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
243
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
244
+ </span>
245
+ </span>
246
+ <span class="weee">(
247
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
248
+ <?php echo $_weeeSeparator; ?>
249
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
250
+ <?php $_weeeSeparator = ' + '; ?>
251
+ <?php endforeach; ?>
252
+ )</span>
253
+ <span class="price-including-tax">
254
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
255
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
256
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
257
+ </span>
258
+ </span>
259
+ </p>
260
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
261
+ <p class="old-price">
262
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
263
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
264
+ <?php echo $_coreHelper->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?>
265
+ </span>
266
+ </p>
267
+
268
+ <p class="special-price">
269
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
270
+ <span class="price-excluding-tax">
271
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
272
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
273
+ <?php echo $_coreHelper->currency($_finalPrice+$_weeeTaxAmount,true,false) ?>
274
+ </span>
275
+ </span>
276
+ <span class="weee">(
277
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
278
+ <?php echo $_weeeSeparator; ?>
279
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
280
+ <?php $_weeeSeparator = ' + '; ?>
281
+ <?php endforeach; ?>
282
+ )</span>
283
+ <span class="price-including-tax">
284
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
285
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
286
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
287
+ </span>
288
+ </span>
289
+ </p>
290
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
291
+ <p class="old-price">
292
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
293
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
294
+ <?php echo $_coreHelper->currency($_regularPrice,true,false) ?>
295
+ </span>
296
+ </p>
297
+
298
+ <p class="special-price">
299
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
300
+ <span class="price-excluding-tax">
301
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
302
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
303
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
304
+ </span>
305
+ </span>
306
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
307
+ <span class="weee">
308
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
309
+ </span>
310
+ <?php endforeach; ?>
311
+ <span class="price-including-tax">
312
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
313
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
314
+ <?php echo $_coreHelper->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
315
+ </span>
316
+ </span>
317
+ </p>
318
+ <?php else: // excl. ?>
319
+ <p class="old-price">
320
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
321
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
322
+ <?php echo $_coreHelper->currency($_regularPrice,true,false) ?>
323
+ </span>
324
+ </p>
325
+
326
+ <?php if ($_taxHelper->displayBothPrices()): ?>
327
+ <p class="special-price">
328
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
329
+ <span class="price-excluding-tax">
330
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
331
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
332
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
333
+ </span>
334
+ </span>
335
+ <span class="price-including-tax">
336
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
337
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
338
+ <?php echo $_coreHelper->currency($_finalPriceInclTax,true,false) ?>
339
+ </span>
340
+ </span>
341
+ </p>
342
+ <?php else: ?>
343
+ <p class="special-price">
344
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
345
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
346
+ <?php echo $_coreHelper->currency($_finalPrice,true,false) ?>
347
+ </span>
348
+ </p>
349
+ <?php endif; ?>
350
+ <?php endif; ?>
351
+
352
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
353
+
354
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
355
+
356
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
357
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
358
+ <?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
359
+ <?php endif; ?>
360
+
361
+ <?php if ($this->getUseLinkForAsLowAs()):?>
362
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
363
+ <?php else:?>
364
+ <span class="minimal-price-link">
365
+ <?php endif?>
366
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
367
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
368
+ <?php echo $_coreHelper->currency($_minimalPriceDisplayValue,true,false) ?>
369
+ </span>
370
+ <?php if ($this->getUseLinkForAsLowAs()):?>
371
+ </a>
372
+ <?php else:?>
373
+ </span>
374
+ <?php endif?>
375
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
376
+ </div>
377
+
378
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
379
+ <?php
380
+ $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
381
+ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
382
+ ?>
383
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
384
+ <div class="price-box">
385
+ <p class="minimal-price">
386
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
387
+ <?php if ($_taxHelper->displayBothPrices()): ?>
388
+ <span class="price-excluding-tax">
389
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
390
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
391
+ <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
392
+ </span>
393
+ </span>
394
+ <span class="price-including-tax">
395
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
396
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
397
+ <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
398
+ </span>
399
+ </span>
400
+ <?php else: ?>
401
+ <?php
402
+ $_showPrice = $_inclTax;
403
+ if (!$_taxHelper->displayPriceIncludingTax()) {
404
+ $_showPrice = $_exclTax;
405
+ }
406
+ ?>
407
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
408
+ <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
409
+ </span>
410
+ <?php endif; ?>
411
+ </p>
412
+ </div>
413
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
414
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
app/design/frontend/base/default/template/catalog/product/view.phtml ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product view template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View
31
+ * @see Mage_Review_Block_Product_View
32
+ */
33
+ ?>
34
+ <?php $_helper = $this->helper('catalog/output'); ?>
35
+ <?php $_product = $this->getProduct(); ?>
36
+ <script type="text/javascript">
37
+ var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
38
+ </script>
39
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
40
+ <div class="product-view">
41
+ <div class="product-essential">
42
+ <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
43
+ <div class="no-display">
44
+ <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
45
+ <input type="hidden" name="related_product" id="related-products-field" value="" />
46
+ </div>
47
+
48
+ <div class="product-shop">
49
+ <div class="product-name">
50
+ <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
51
+ </div>
52
+
53
+ <?php if ($this->canEmailToFriend()): ?>
54
+ <p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
55
+ <?php endif; ?>
56
+
57
+ <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
58
+ <?php echo $this->getChildHtml('alert_urls') ?>
59
+ <?php echo $this->getChildHtml('product_type_data') ?>
60
+ <?php echo $this->getTierPriceHtml() ?>
61
+ <?php echo $this->getChildHtml('extrahint') ?>
62
+
63
+ <?php if (!$this->hasOptions()):?>
64
+ <div class="add-to-box">
65
+ <?php if($_product->isSaleable()): ?>
66
+ <?php echo $this->getChildHtml('addtocart') ?>
67
+ <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
68
+ <span class="or"><?php echo $this->__('OR') ?></span>
69
+ <?php endif; ?>
70
+ <?php endif; ?>
71
+ <?php echo $this->getChildHtml('addto') ?>
72
+ </div>
73
+ <?php echo $this->getChildHtml('extra_buttons') ?>
74
+ <?php endif; ?>
75
+
76
+ <?php if ($_product->getShortDescription()):?>
77
+ <div class="short-description">
78
+ <h2><?php echo $this->__('Quick Overview') ?></h2>
79
+ <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
80
+ </div>
81
+ <?php endif;?>
82
+
83
+ <?php echo $this->getChildHtml('other');?>
84
+
85
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
86
+ <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
87
+ <?php endif;?>
88
+
89
+ </div>
90
+
91
+ <div class="product-img-box">
92
+ <?php echo $this->getChildHtml('media') ?>
93
+ </div>
94
+
95
+ <div class="clearer"></div>
96
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
97
+ <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
98
+ <?php endif;?>
99
+ </form>
100
+ <script type="text/javascript">
101
+ //<![CDATA[
102
+ var productAddToCartForm = new VarienForm('product_addtocart_form');
103
+ productAddToCartForm.submit = function(button, url) {
104
+ if (this.validator.validate()) {
105
+ var form = this.form;
106
+ var oldUrl = form.action;
107
+
108
+ if (url) {
109
+ form.action = url;
110
+ }
111
+ var e = null;
112
+ try {
113
+ this.form.submit();
114
+ } catch (e) {
115
+ }
116
+ this.form.action = oldUrl;
117
+ if (e) {
118
+ throw e;
119
+ }
120
+
121
+ if (button && button != 'undefined') {
122
+ button.disabled = true;
123
+ }
124
+ }
125
+ }.bind(productAddToCartForm);
126
+
127
+ productAddToCartForm.submitLight = function(button, url){
128
+ if(this.validator) {
129
+ var nv = Validation.methods;
130
+ delete Validation.methods['required-entry'];
131
+ delete Validation.methods['validate-one-required'];
132
+ delete Validation.methods['validate-one-required-by-name'];
133
+ if (this.validator.validate()) {
134
+ if (url) {
135
+ this.form.action = url;
136
+ }
137
+ this.form.submit();
138
+ }
139
+ Object.extend(Validation.methods, nv);
140
+ }
141
+ }.bind(productAddToCartForm);
142
+ //]]>
143
+ </script>
144
+ </div>
145
+
146
+ <div class="product-collateral">
147
+ <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
148
+ <div class="box-collateral <?php echo "box-{$alias}"?>">
149
+ <?php if ($title = $this->getChildData($alias, 'title')):?>
150
+ <h2><?php echo $this->escapeHtml($title); ?></h2>
151
+ <?php endif;?>
152
+ <?php echo $html; ?>
153
+ </div>
154
+ <?php endforeach;?>
155
+ <?php echo $this->getChildHtml('upsell_products') ?>
156
+ <?php echo $this->getChildHtml('product_additional_data') ?>
157
+ </div>
158
+ </div>
app/design/frontend/base/default/template/catalog/product/view/additional.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php foreach ($this->getChildHtmlList() as $_html): ?>
28
+ <?php echo $_html ?>
29
+ <?php endforeach; ?>
app/design/frontend/base/default/template/catalog/product/view/addto.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_product = $this->getProduct(); ?>
29
+ <?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
30
+
31
+ <ul class="add-to-links">
32
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
33
+ <li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, '<?php echo $_wishlistSubmitUrl ?>'); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
34
+ <?php endif; ?>
35
+ <?php
36
+ $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
37
+ ?>
38
+ <?php if($_compareUrl) : ?>
39
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
40
+ <?php endif; ?>
41
+ </ul>
app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct(); ?>
28
+ <?php $buttonTitle = $this->__('Add to Cart'); ?>
29
+ <?php if($_product->isSaleable()): ?>
30
+ <div class="add-to-cart">
31
+ <?php if(!$_product->isGrouped()): ?>
32
+ <label for="qty"><?php echo $this->__('Qty:') ?></label>
33
+ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
34
+ <?php endif; ?>
35
+ <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
36
+ <?php echo $this->getChildHtml('', true, true) ?>
37
+ </div>
38
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/view/attributes.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product additional attributes template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Attributes
31
+ */
32
+ ?>
33
+ <?php
34
+ $_helper = $this->helper('catalog/output');
35
+ $_product = $this->getProduct()
36
+ ?>
37
+ <?php if($_additional = $this->getAdditionalData()): ?>
38
+ <h2><?php echo $this->__('Additional Information') ?></h2>
39
+ <table class="data-table" id="product-attribute-specs-table">
40
+ <col width="25%" />
41
+ <col />
42
+ <tbody>
43
+ <?php foreach ($_additional as $_data): ?>
44
+ <tr>
45
+ <th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
46
+ <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
47
+ </tr>
48
+ <?php endforeach; ?>
49
+ </tbody>
50
+ </table>
51
+ <script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
52
+ <?php endif;?>
app/design/frontend/base/default/template/catalog/product/view/description.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product description template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Description
31
+ */
32
+ ?>
33
+ <?php $_description = $this->getProduct()->getDescription(); ?>
34
+ <?php if ($_description): ?>
35
+ <h2><?php echo $this->__('Details') ?></h2>
36
+ <div class="std">
37
+ <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>
38
+ </div>
39
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/view/media.phtml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Product media data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ */
32
+ ?>
33
+ <?php
34
+ $_product = $this->getProduct();
35
+ $_helper = $this->helper('catalog/output');
36
+ ?>
37
+ <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
38
+ <p class="product-image product-image-zoom">
39
+ <?php
40
+ $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
41
+ echo $_helper->productAttribute($_product, $_img, 'image');
42
+ ?>
43
+ </p>
44
+ <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
45
+ <div class="zoom">
46
+ <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
47
+ <div id="track">
48
+ <div id="handle"></div>
49
+ </div>
50
+ <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
51
+ </div>
52
+ <script type="text/javascript">
53
+ //<![CDATA[
54
+ Event.observe(window, 'load', function() {
55
+ product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
56
+ });
57
+ //]]>
58
+ </script>
59
+ <?php else: ?>
60
+ <p class="product-image">
61
+ <?php
62
+ $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
63
+ echo $_helper->productAttribute($_product, $_img, 'image');
64
+ ?>
65
+ </p>
66
+ <?php endif; ?>
67
+ <?php if (count($this->getGalleryImages()) > 0): ?>
68
+ <div class="more-views">
69
+ <h2><?php echo $this->__('More Views') ?></h2>
70
+ <ul>
71
+ <?php foreach ($this->getGalleryImages() as $_image): ?>
72
+ <li>
73
+ <a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
74
+ </li>
75
+ <?php endforeach; ?>
76
+ </ul>
77
+ </div>
78
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/view/options.phtml ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_options = Mage::helper('core')->decorateArray($this->getOptions()) ?>
29
+ <?php if (count($_options)):?>
30
+ <script type="text/javascript">
31
+ //<![CDATA[
32
+ var optionFileUpload = {
33
+ productForm : $('product_addtocart_form'),
34
+ formAction : '',
35
+ formElements : {},
36
+ upload : function(element){
37
+ this.formElements = this.productForm.select('input', 'select', 'textarea', 'button');
38
+ this.removeRequire(element.readAttribute('id').sub('option_', ''));
39
+
40
+ template = '<iframe id="upload_target" name="upload_target" style="width:0; height:0; border:0;"><\/iframe>';
41
+
42
+ Element.insert($('option_'+element.readAttribute('id').sub('option_', '')+'_uploaded_file'), {after: template});
43
+
44
+ this.formAction = this.productForm.action;
45
+
46
+ var baseUrl = '<?php echo $this->getUrl('*/product/upload') ?>';
47
+ var urlExt = 'option_id/'+element.readAttribute('id').sub('option_', '');
48
+
49
+ this.productForm.action = parseSidUrl(baseUrl, urlExt);
50
+ this.productForm.target = 'upload_target';
51
+ this.productForm.submit();
52
+ this.productForm.target = '';
53
+ this.productForm.action = this.formAction;
54
+ },
55
+ removeRequire : function(skipElementId){
56
+ for(var i=0; i<this.formElements.length; i++){
57
+ if (this.formElements[i].readAttribute('id') != 'option_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
58
+ this.formElements[i].disabled='disabled';
59
+ }
60
+ }
61
+ },
62
+ addRequire : function(skipElementId){
63
+ for(var i=0; i<this.formElements.length; i++){
64
+ if (this.formElements[i].readAttribute('name') != 'options_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
65
+ this.formElements[i].disabled='';
66
+ }
67
+ }
68
+ },
69
+ uploadCallback : function(data){
70
+ this.addRequire(data.optionId);
71
+ $('upload_target').remove();
72
+
73
+ if (data.error) {
74
+
75
+ } else {
76
+ $('option_'+data.optionId+'_uploaded_file').value = data.fileName;
77
+ $('option_'+data.optionId+'_file').value = '';
78
+ $('option_'+data.optionId+'_file').hide();
79
+ $('option_'+data.optionId+'').hide();
80
+ template = '<div id="option_'+data.optionId+'_file_box"><a href="#"><img src="var/options/'+data.fileName+'" alt=""><\/a><a href="#" onclick="optionFileUpload.removeFile('+data.optionId+')" title="Remove file" \/>Remove file<\/a>';
81
+
82
+ Element.insert($('option_'+data.optionId+'_uploaded_file'), {after: template});
83
+ }
84
+ },
85
+ removeFile : function(optionId)
86
+ {
87
+ $('option_'+optionId+'_uploaded_file').value= '';
88
+ $('option_'+optionId+'_file').show();
89
+ $('option_'+optionId+'').show();
90
+
91
+ $('option_'+optionId+'_file_box').remove();
92
+ }
93
+ }
94
+ var optionTextCounter = {
95
+ count : function(field,cntfield,maxlimit){
96
+ if (field.value.length > maxlimit){
97
+ field.value = field.value.substring(0, maxlimit);
98
+ } else {
99
+ cntfield.innerHTML = maxlimit - field.value.length;
100
+ }
101
+ }
102
+ }
103
+
104
+ Product.Options = Class.create();
105
+ Product.Options.prototype = {
106
+ initialize : function(config){
107
+ this.config = config;
108
+ this.reloadPrice();
109
+ document.observe("dom:loaded", this.reloadPrice.bind(this));
110
+ },
111
+ reloadPrice : function(){
112
+ price = new Number();
113
+ config = this.config;
114
+ skipIds = [];
115
+ $$('.product-custom-option').each(function(element){
116
+ var optionId = 0;
117
+ element.name.sub(/[0-9]+/, function(match){
118
+ optionId = match[0];
119
+ });
120
+ if (this.config[optionId]) {
121
+ if (element.type == 'checkbox' || element.type == 'radio') {
122
+ if (element.checked) {
123
+ if (config[optionId][element.getValue()]) {
124
+ price += parseFloat(config[optionId][element.getValue()]);
125
+ }
126
+ }
127
+ } else if(element.hasClassName('datetime-picker') && !skipIds.include(optionId)) {
128
+ dateSelected = true;
129
+ $$('.product-custom-option[id^="options_' + optionId + '"]').each(function(dt){
130
+ if (dt.getValue() == '') {
131
+ dateSelected = false;
132
+ }
133
+ });
134
+ if (dateSelected) {
135
+ price += parseFloat(this.config[optionId]);
136
+ skipIds[optionId] = optionId;
137
+ }
138
+ } else if(element.type == 'select-one' || element.type == 'select-multiple') {
139
+ if (element.options) {
140
+ $A(element.options).each(function(selectOption){
141
+ if (selectOption.selected) {
142
+ if (this.config[optionId][selectOption.value]) {
143
+ price += parseFloat(this.config[optionId][selectOption.value]);
144
+ }
145
+ }
146
+ });
147
+ }
148
+ } else {
149
+ if (element.getValue().strip() != '') {
150
+ price += parseFloat(this.config[optionId]);
151
+ }
152
+ }
153
+ }
154
+ });
155
+ try {
156
+ optionsPrice.changePrice('options', price);
157
+ optionsPrice.changePrice('optionsPriceInclTax', price);
158
+ optionsPrice.reload();
159
+ } catch (e) {
160
+
161
+ }
162
+ }
163
+ }
164
+ function validateOptionsCallback(elmId, result){
165
+ var container = $(elmId).up('ul.options-list');
166
+ if (result == 'failed') {
167
+ container.removeClassName('validation-passed');
168
+ container.addClassName('validation-failed');
169
+ } else {
170
+ container.removeClassName('validation-failed');
171
+ container.addClassName('validation-passed');
172
+ }
173
+ }
174
+ var opConfig = new Product.Options(<?php echo $this->getJsonConfig() ?>);
175
+ //]]>
176
+ </script>
177
+ <dl>
178
+ <?php foreach($_options as $_option): ?>
179
+ <?php echo $this->getOptionHtml($_option) ?>
180
+ <?php endforeach; ?>
181
+ </dl>
182
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/view/options/js.phtml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <script type="text/javascript">
28
+ //<![CDATA[
29
+ var DateOption = Class.create({
30
+
31
+ getDaysInMonth: function(month, year)
32
+ {
33
+ var curDate = new Date();
34
+ if (!month) {
35
+ month = curDate.getMonth();
36
+ }
37
+ if (2 == month && !year) { // leap year assumption for unknown year
38
+ return 29;
39
+ }
40
+ if (!year) {
41
+ year = curDate.getFullYear();
42
+ }
43
+ return 32 - new Date(year, month - 1, 32).getDate();
44
+ },
45
+
46
+ reloadMonth: function(event)
47
+ {
48
+ var selectEl = event.findElement();
49
+ var idParts = selectEl.id.split("_");
50
+ if (idParts.length != 3) {
51
+ return false;
52
+ }
53
+ var optionIdPrefix = idParts[0] + "_" + idParts[1];
54
+ var month = parseInt($(optionIdPrefix + "_month").value);
55
+ var year = parseInt($(optionIdPrefix + "_year").value);
56
+ var dayEl = $(optionIdPrefix + "_day");
57
+
58
+ var days = this.getDaysInMonth(month, year);
59
+
60
+ //remove days
61
+ for (var i = dayEl.options.length - 1; i >= 0; i--) {
62
+ if (dayEl.options[i].value > days) {
63
+ dayEl.remove(dayEl.options[i].index);
64
+ }
65
+ }
66
+
67
+ // add days
68
+ var lastDay = parseInt(dayEl.options[dayEl.options.length-1].value);
69
+ for (i = lastDay + 1; i <= days; i++) {
70
+ this.addOption(dayEl, i, i);
71
+ }
72
+ },
73
+
74
+ addOption: function(select, text, value)
75
+ {
76
+ var option = document.createElement('OPTION');
77
+ option.value = value;
78
+ option.text = text;
79
+
80
+ if (select.options.add) {
81
+ select.options.add(option);
82
+ } else {
83
+ select.appendChild(option);
84
+ }
85
+ }
86
+ });
87
+ dateOption = new DateOption();
88
+ //]]>
89
+ </script>
app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption() ?>
28
+ <?php $_optionId = $_option->getId() ?>
29
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
30
+ <?php echo $this->getFormatedPrice() ?></dt>
31
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
32
+
33
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
34
+ || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?>
35
+
36
+ <?php echo $this->getDateHtml() ?>
37
+
38
+ <?php if (!$this->useCalendar()): ?>
39
+ <script type="text/javascript">
40
+ //<![CDATA[
41
+ Event.observe('options_<?php echo $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption));
42
+ Event.observe('options_<?php echo $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption));
43
+ //]]>
44
+ </script>
45
+ <?php endif; ?>
46
+
47
+ <?php endif; ?>
48
+
49
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
50
+ || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?>
51
+ <span class="time-picker"><?php echo $this->getTimeHtml() ?></span>
52
+ <?php endif; ?>
53
+
54
+ <input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" />
55
+ <script type="text/javascript">
56
+ //<![CDATA[
57
+ <?php if ($_option->getIsRequire()): ?>
58
+ Validation.addAllThese(
59
+ [
60
+ ['validate-datetime-<?php echo $_optionId ?>', '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('This is a required option') )?>', function(v) {
61
+ var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
62
+ for (var i=0; i < dateTimeParts.length; i++) {
63
+ if (dateTimeParts[i].value == "") return false;
64
+ }
65
+ return true;
66
+ }]
67
+ ]
68
+ );
69
+ <?php else: ?>
70
+ Validation.add(
71
+ 'validate-datetime-<?php echo $_optionId ?>',
72
+ '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('Field is not complete') )?>',
73
+ function(v) {
74
+ var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
75
+ var hasWithValue = false, hasWithNoValue = false;
76
+ var pattern = /day_part$/i;
77
+ for (var i=0; i < dateTimeParts.length; i++) {
78
+ if (! pattern.test(dateTimeParts[i].id)) {
79
+ if (dateTimeParts[i].value === "") {
80
+ hasWithValue = true;
81
+ } else {
82
+ hasWithNoValue = true;
83
+ }
84
+ }
85
+ }
86
+ return hasWithValue ^ hasWithNoValue;
87
+ }
88
+ );
89
+ <?php endif; ?>
90
+ //]]>
91
+ </script>
92
+ </dd>
app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption() ?>
28
+ <dt>
29
+ <label><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
30
+ </dt>
app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption(); ?>
28
+ <?php $_fileInfo = $this->getFileInfo(); ?>
29
+ <?php $_fileExists = $_fileInfo->hasData() ? true : false; ?>
30
+ <?php $_fileName = 'options_' . $_option->getId() . '_file'; ?>
31
+ <?php $_fieldNameAction = $_fileName . '_action'; ?>
32
+ <?php $_fieldValueAction = $_fileExists ? 'save_old' : 'save_new'; ?>
33
+ <?php $_fileNamed = $_fileName . '_name'; ?>
34
+ <?php $_rand = rand(); ?>
35
+
36
+ <script type="text/javascript">
37
+ //<![CDATA[
38
+ opFile<?php echo $_rand; ?> = {
39
+ initializeFile: function(inputBox) {
40
+ this.inputFile = inputBox.select('input[name="<?php echo $_fileName; ?>"]')[0];
41
+ this.inputFileAction = inputBox.select('input[name="<?php echo $_fieldNameAction; ?>"]')[0];
42
+ this.fileNameBox = inputBox.up('dd').select('.<?php echo $_fileNamed ?>')[0];
43
+ },
44
+
45
+ toggleFileChange: function(inputBox) {
46
+ this.initializeFile(inputBox);
47
+ inputBox.toggle();
48
+ this.fileChangeFlag = this.fileChangeFlag ? false : true;
49
+ if (!this.fileDeleteFlag) {
50
+ if (this.fileChangeFlag) {
51
+ this.inputFileAction.value = 'save_new';
52
+ this.inputFile.disabled = false;
53
+ } else {
54
+ this.inputFileAction.value = 'save_old';
55
+ this.inputFile.disabled = true;
56
+ }
57
+ }
58
+ },
59
+
60
+ toggleFileDelete: function(fileDeleteFlag, inputBox) {
61
+ this.initializeFile(inputBox);
62
+ this.fileDeleteFlag = fileDeleteFlag.checked ? true : false;
63
+ if (this.fileDeleteFlag) {
64
+ this.inputFileAction.value = '';
65
+ this.inputFile.disabled = true;
66
+ this.fileNameBox.setStyle({'text-decoration': 'line-through'});
67
+ } else {
68
+ this.inputFileAction.value = this.fileChangeFlag ? 'save_new' : 'save_old';
69
+ this.inputFile.disabled = (this.fileChangeFlag == 'save_old');
70
+ this.fileNameBox.setStyle({'text-decoration': 'none'});
71
+ }
72
+ }
73
+ };
74
+ //]]>
75
+ </script>
76
+
77
+ <dt><label <?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
78
+ <?php echo $this->getFormatedPrice() ?></dt>
79
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
80
+ <?php if ($_fileExists): ?>
81
+ <span class="<?php echo $_fileNamed ?>"><?php echo $_fileInfo->getTitle(); ?></span>
82
+ <a href="javascript:void(0)" class="label" onclick="opFile<?php echo $_rand; ?>.toggleFileChange($(this).next('.input-box'))">
83
+ <?php echo Mage::helper('catalog')->__('Change') ?>
84
+ </a>&nbsp;
85
+ <?php if (!$_option->getIsRequire()): ?>
86
+ <input type="checkbox" onclick="opFile<?php echo $_rand; ?>.toggleFileDelete($(this), $(this).next('.input-box'))" />
87
+ <span class="label"><?php echo Mage::helper('catalog')->__('Delete') ?></span>
88
+ <?php endif; ?>
89
+ <?php endif; ?>
90
+ <div class="input-box" <?php echo $_fileExists ? 'style="display:none"' : '' ?>>
91
+ <input type="file" name="<?php echo $_fileName; ?>" class="product-custom-option<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?>" <?php echo $_fileExists ? 'disabled="disabled"' : '' ?> onchange="opConfig.reloadPrice()" />
92
+ <input type="hidden" name="<?php echo $_fieldNameAction; ?>" value="<?php echo $_fieldValueAction; ?>" />
93
+ <?php if ($_option->getFileExtension()): ?>
94
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Allowed file extensions to upload')?>: <strong><?php echo $_option->getFileExtension() ?></strong></p>
95
+ <?php endif; ?>
96
+ <?php if ($_option->getImageSizeX() > 0): ?>
97
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image width')?>: <strong><?php echo $_option->getImageSizeX() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
98
+ <?php endif; ?>
99
+ <?php if ($_option->getImageSizeY() > 0): ?>
100
+ <p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image height')?>: <strong><?php echo $_option->getImageSizeY() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
101
+ <?php endif; ?>
102
+ </div>
103
+ </dd>
app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Select */ ?>
29
+ <?php $_option = $this->getOption() ?>
30
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label></dt>
31
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
32
+ <div class="input-box">
33
+ <?php echo $this->getValuesHtml() ?>
34
+ <?php if ($_option->getIsRequire()): ?>
35
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
36
+ <span id="options-<?php echo $_option->getId() ?>-container"></span>
37
+ <?php endif; ?>
38
+ <?php endif;?>
39
+ </div>
40
+ </dd>
app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_option = $this->getOption(); ?>
28
+ <dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
29
+ <?php echo $this->getFormatedPrice() ?></dt>
30
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
31
+ <div class="input-box">
32
+ <?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?>
33
+ <input type="text" onchange="opConfig.reloadPrice()" id="options_<?php echo $_option->getId() ?>_text" class="input-text<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" value="<?php echo $this->escapeHtml($this->getDefaultValue()) ?>" />
34
+ <?php elseif ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?>
35
+ <textarea id="options_<?php echo $_option->getId() ?>_text" onchange="opConfig.reloadPrice()" class="<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-'.$_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" rows="5" cols="25"><?php echo $this->escapeHtml($this->getDefaultValue()) ?></textarea>
36
+ <?php endif; ?>
37
+ <?php if ($_option->getMaxCharacters()): ?>
38
+ <p class="note"><?php echo Mage::helper('catalog')->__('Maximum number of characters:')?> <strong><?php echo $_option->getMaxCharacters() ?></strong></p>
39
+ <?php endif; ?>
40
+ </div>
41
+ </dd>
app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="product-options" id="product-options-wrapper">
28
+ <?php echo $this->getChildHtml('', true, true);?>
29
+ <?php if ($this->hasRequiredOptions()):?>
30
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
31
+ <?php endif;?>
32
+ </div>
33
+ <script type="text/javascript">decorateGeneric($$('#product-options-wrapper dl'), ['last']);</script>
app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="product-options-bottom">
28
+ <?php echo $this->getChildHtml('', true, true);?>
29
+ </div>
app/design/frontend/base/default/template/catalog/product/view/price.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <div class="price-box" id="product_price">
32
+ <p class="old-price"><?php echo $this->__('Old Price:') ?> <?php echo $this->getPrice() ?></p>
33
+ <p class="special-price"><?php echo $this->getPrice() ?></p>
34
+ </div>
app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_product = $this->getProduct() ?>
28
+ <?php echo $this->getPriceHtml($_product, false, '_clone') ?>
app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * @see Mage_Catalog_Block_Product_View
31
+ */
32
+ $_product = $this->getProduct();
33
+ $_tierPrices = $this->getTierPrices();
34
+ $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true);
35
+
36
+ $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
37
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
38
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
39
+ }
40
+
41
+ ?>
42
+ <?php if (count($_tierPrices) > 0): ?>
43
+ <ul class="<?php echo ($this->getInGrouped() ? 'tier-prices-grouped product-pricing-grouped' : 'tier-prices product-pricing'); ?>">
44
+ <?php if ($this->getInGrouped()): ?>
45
+ <?php $_tierPrices = $this->getTierPrices($_product); ?>
46
+ <?php endif; ?>
47
+ <?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices); ?>
48
+
49
+ <?php foreach ($_tierPrices as $_price): ?>
50
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
51
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
52
+ <li><?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?>
53
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
54
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
55
+ <?php if ($_weeeTaxAttributes): ?>
56
+ (<small>
57
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
58
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
59
+ <?php echo $separator; ?>
60
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
61
+ <?php endforeach; ?>
62
+ </small>)
63
+ <?php endif; ?>
64
+ <?php echo $this->__('each') ?>
65
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
66
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
67
+ <?php if ($_weeeTaxAttributes): ?>
68
+ (<small>
69
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
70
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
71
+ <?php echo $separator; ?>
72
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
73
+ <?php endforeach; ?>
74
+ </small>)
75
+ <?php endif; ?>
76
+ <?php echo $this->__('each') ?>
77
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
78
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
79
+ <?php if ($_weeeTaxAttributes): ?>
80
+ (<small>
81
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
82
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
83
+ <?php endforeach; ?>
84
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
85
+ </small>)
86
+ <?php endif; ?>
87
+ <?php echo $this->__('each') ?>
88
+ <?php else: ?>
89
+ <li><?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?>
90
+ <?php endif; ?>
91
+ <?php else: ?>
92
+ <?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
93
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
94
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?>
95
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
96
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
97
+ <?php if ($_weeeTaxAttributes): ?>
98
+ (</small>
99
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
100
+ <?php echo $separator; ?>
101
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
102
+ <?php $separator = ' + '; endforeach; ?>
103
+ <small>)
104
+ <?php endif; ?>
105
+ <?php echo $this->__('each') ?>
106
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
107
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
108
+ <?php if ($_weeeTaxAttributes): ?>
109
+ (</small>
110
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
111
+ <?php echo $separator; ?>
112
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
113
+ <?php $separator = ' + '; endforeach; ?>
114
+ <small>)
115
+ <?php endif; ?>
116
+ <?php echo $this->__('each') ?>
117
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
118
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?>
119
+ <?php if ($_weeeTaxAttributes): ?>
120
+ (<small>
121
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
122
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
123
+ <?php endforeach; ?>
124
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
125
+ </small>)
126
+ <?php endif; ?>
127
+ <?php echo $this->__('each') ?>
128
+ <?php else: ?>
129
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?>
130
+ <?php endif; ?>
131
+ <?php else: ?>
132
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
133
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?>
134
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
135
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
136
+ <?php if ($_weeeTaxAttributes): ?>
137
+ (<small>
138
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
139
+ <?php echo $separator; ?>
140
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
141
+ <?php $separator = ' + '; endforeach; ?>
142
+ </small>)
143
+ <?php endif; ?>
144
+ <?php echo $this->__('each') ?>
145
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
146
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
147
+ <?php if ($_weeeTaxAttributes): ?>
148
+ (<small>
149
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
150
+ <?php echo $separator; ?>
151
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
152
+ <?php $separator = ' + '; endforeach; ?>
153
+ </small>)
154
+ <?php endif; ?>
155
+ <?php echo $this->__('each') ?>
156
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
157
+ <li><?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
158
+ <?php if ($_weeeTaxAttributes): ?>
159
+ (<small>
160
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
161
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
162
+ <?php endforeach; ?>
163
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?>
164
+ </small>)
165
+ <?php endif; ?>
166
+ <?php echo $this->__('each') ?>
167
+ <?php else: ?>
168
+ <li><?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?>
169
+ <?php endif; ?>
170
+ <?php endif; ?>
171
+ <?php endif; ?>
172
+ <?php if (!$this->getInGrouped()): ?>
173
+ <?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
174
+ || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?>
175
+ <?php echo $this->__('and') ?>&nbsp;<strong class="benefit"><?php echo $this->__('save')?>&nbsp;<?php echo $_price['savePercent']?>%
176
+ <?php endif ?></strong>
177
+ <?php endif; ?>
178
+ </li>
179
+ <?php endforeach ?>
180
+ </ul>
181
+ <?php endif;?>
app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/base/default/template/catalog/product/view/type/default.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php /* @var $this Mage_Catalog_Block_Product_View_Abstract */?>
28
+ <?php $_product = $this->getProduct() ?>
29
+
30
+ <?php if ($_product->isAvailable()): ?>
31
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
32
+ <?php else: ?>
33
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
34
+ <?php endif; ?>
35
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
36
+ <?php echo $this->getPriceHtml($_product) ?>
app/design/frontend/base/default/template/catalog/product/view/type/grouped.phtml ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Grouped product data template
29
+ *
30
+ * @see Mage_Catalog_Block_Product_View_Media
31
+ * @see Mage_Catalog_Block_Product_View_Type_Grouped
32
+ */
33
+ ?>
34
+ <?php $this->setPreconfiguredValue(); ?>
35
+ <?php $_product = $this->getProduct(); ?>
36
+ <?php $_associatedProducts = $this->getAssociatedProducts(); ?>
37
+ <?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
38
+ <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
39
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
40
+ <?php else: ?>
41
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
42
+ <?php endif; ?>
43
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
44
+ <table class="data-table grouped-items-table" id="super-product-table">
45
+ <col />
46
+ <col />
47
+ <col width="1" />
48
+ <thead>
49
+ <tr>
50
+ <th><?php echo $this->__('Product Name') ?></th>
51
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
52
+ <th class="a-right"><?php echo $this->__('Price') ?></th>
53
+ <?php endif; ?>
54
+ <?php if ($_product->isSaleable()): ?>
55
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
56
+ <?php endif; ?>
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ <?php if ($_hasAssociatedProducts): ?>
61
+ <?php foreach ($_associatedProducts as $_item): ?>
62
+ <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
63
+ <tr>
64
+ <td><?php echo $this->htmlEscape($_item->getName()) ?></td>
65
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
66
+ <td class="a-right">
67
+ <?php if ($this->getCanShowProductPrice($_item)): ?>
68
+ <?php echo $this->getPriceHtml($_item, true) ?>
69
+ <?php echo $this->getTierPriceHtml($_item) ?>
70
+ <?php endif; ?>
71
+ </td>
72
+ <?php endif; ?>
73
+ <?php if ($_product->isSaleable()): ?>
74
+ <td class="a-center">
75
+ <?php if ($_item->isSaleable()) : ?>
76
+ <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
77
+ <?php else: ?>
78
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
79
+ <?php endif; ?>
80
+ </td>
81
+ <?php endif; ?>
82
+ </tr>
83
+ <?php endforeach; ?>
84
+ <?php else: ?>
85
+ <tr>
86
+ <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
87
+ </tr>
88
+ <?php endif; ?>
89
+ </tbody>
90
+ </table>
91
+ <script type="text/javascript">decorateTable('super-product-table')</script>
app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ $_product = $this->getProduct();
30
+ $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
31
+ ?>
32
+ <?php if ($_product->isSaleable() && count($_attributes)):?>
33
+ <dl>
34
+ <?php foreach($_attributes as $_attribute): ?>
35
+ <dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
36
+ <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
37
+ <div class="input-box">
38
+ <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
39
+ <option><?php echo $this->__('Choose an Option...') ?></option>
40
+ </select>
41
+ </div>
42
+ </dd>
43
+ <?php endforeach; ?>
44
+ </dl>
45
+ <script type="text/javascript">
46
+ var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
47
+ </script>
48
+ <?php endif;?>
app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/base/default/template/catalog/product/view/type/virtual.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @deprecated after 1.4.1.0 in favor of default.phtml
30
+ */
31
+ ?>
app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-product-link"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-product-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <div class="widget widget-new-products">
29
+ <div class="block block-products">
30
+ <div class="block-title">
31
+ <strong><span><?php echo $this->__('New Products') ?></span></strong>
32
+ </div>
33
+ <div class="block-content">
34
+ <?php $suffix = $this->getNameInLayout(); ?>
35
+ <ol class="mini-products-list" id="widget-new-products-<?php echo $suffix; ?>">
36
+ <?php foreach ($_products->getItems() as $_product): ?>
37
+ <li class="item">
38
+ <a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50) ?>" width="50" height="50" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
39
+ <div class="product-details">
40
+ <p class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
41
+ <?php echo $this->getPriceHtml($_product, true, '-widget-new-'.$suffix) ?>
42
+ <?php if ($_product->getIsSalable()): ?>
43
+ <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Cart') ?></a>
44
+ <?php else: ?>
45
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
46
+ <?php endif; ?>
47
+ </div>
48
+ </li>
49
+ <?php endforeach; ?>
50
+ </ol>
51
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <div class="widget widget-new-products">
29
+ <div class="block block-list">
30
+ <div class="block-title">
31
+ <strong><span><?php echo $this->__('New Products') ?></span></strong>
32
+ </div>
33
+ <div class="block-content">
34
+ <?php $suffix = $this->getNameInLayout(); ?>
35
+ <ol class="mini-products-images-list" id="widget-new-products-<?php echo $suffix; ?>">
36
+ <?php foreach ($_products->getItems() as $_product): ?>
37
+ <li class="item">
38
+ <a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(76) ?>" width="76" height="76" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
39
+ </li>
40
+ <?php endforeach; ?>
41
+ </ol>
42
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <div class="widget widget-new-products">
29
+ <div class="block block-list">
30
+ <div class="block-title">
31
+ <strong><span><?php echo $this->__('New Products') ?></span></strong>
32
+ </div>
33
+ <div class="block-content">
34
+ <?php $suffix = $this->getNameInLayout(); ?>
35
+ <ol id="widget-new-products-<?php echo $suffix; ?>">
36
+ <?php foreach ($_products->getItems() as $_product): ?>
37
+ <li class="item">
38
+ <p class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
39
+ </li>
40
+ <?php endforeach; ?>
41
+ </ol>
42
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <div class="widget widget-new-products">
29
+ <div class="widget-title">
30
+ <h2><?php echo $this->__('New Products') ?></h2>
31
+ </div>
32
+ <div class="widget-products">
33
+ <?php $_columnCount = $this->getColumnCount(); ?>
34
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
35
+ <?php if ($i++%$_columnCount==0): ?>
36
+ <ul class="products-grid">
37
+ <?php endif ?>
38
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
39
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(85) ?>" width="85" height="85" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
40
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
41
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
42
+ <?php echo $this->getPriceHtml($_product, true, '-widget-new-grid') ?>
43
+ <div class="actions">
44
+ <?php if ($_product->isSaleable()): ?>
45
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
46
+ <?php else: ?>
47
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
48
+ <?php endif; ?>
49
+ <ul class="add-to-links">
50
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
51
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
52
+ <?php endif; ?>
53
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
54
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
55
+ <?php endif; ?>
56
+ </ul>
57
+ </div>
58
+ </li>
59
+ <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
60
+ </ul>
61
+ <?php endif ?>
62
+ <?php endforeach; ?>
63
+ </div>
64
+ </div>
65
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
28
+ <div class="widget widget-new-products">
29
+ <div class="widget-title">
30
+ <h2><?php echo $this->__('New Products') ?></h2>
31
+ </div>
32
+ <div class="widget-products">
33
+ <ol class="products-list">
34
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
35
+ <li class="item<?php echo (++$i == count($_products))?' last':''; ?>">
36
+ <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(85) ?>" width="85" height="85" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
37
+ <div class="product-shop">
38
+ <div class="f-fix">
39
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
40
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
41
+ <?php echo $this->getPriceHtml($_product, true, '-widget-new-list') ?>
42
+ <?php if ($_product->isSaleable()): ?>
43
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
44
+ <?php else: ?>
45
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
46
+ <?php endif; ?>
47
+ <ul class="add-to-links">
48
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
49
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
50
+ <?php endif; ?>
51
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
52
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
53
+ <?php endif; ?>
54
+ </ul>
55
+ </div>
56
+ </div>
57
+ </li>
58
+ <?php endforeach; ?>
59
+ </ol>
60
+ </div>
61
+ </div>
62
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/rss/product/price.phtml ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php
29
+ /**
30
+ * Template for displaying product price in RSS feeds
31
+ *
32
+ * @see Mage_Catalog_Block_Product_Price
33
+ */
34
+ ?>
35
+
36
+ <?php $_product = $this->getProduct() ?>
37
+ <?php $_id = $_product->getId() ?>
38
+ <?php if ($_product->getCanShowPrice() !== false):?>
39
+
40
+ <?php $_weeeSeparator = ''; ?>
41
+
42
+ <?php $simplePricesTax = ($this->helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?>
43
+
44
+ <?php $_minimalPriceValue = $_product->getMinimalPrice() ?>
45
+ <?php $_minimalPrice = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?>
46
+
47
+ <?php if (!$_product->isGrouped()): ?>
48
+ <?php $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); ?>
49
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))): ?>
50
+ <?php $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); ?>
51
+ <?php $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); ?>
52
+ <?php endif; ?>
53
+
54
+ <div class="price-box">
55
+ <?php $_price = $this->helper('tax')->getPrice($_product, $_product->getPrice()) ?>
56
+ <?php $_regularPrice = $this->helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?>
57
+ <?php $_finalPrice = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?>
58
+ <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?>
59
+ <?php $_weeeDisplayType = Mage::helper('weee')->getPriceDisplayType(); ?>
60
+ <?php if ($_finalPrice == $_price): ?>
61
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
62
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
63
+ <span class="price-excluding-tax">
64
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
65
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
66
+ </span>
67
+ <span class="price-including-tax">
68
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
69
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
70
+ </span>
71
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
72
+ <span class="price-excluding-tax">
73
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
74
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
75
+ </span>
76
+ <span class="price-including-tax">
77
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
78
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
79
+ <br />
80
+ <span class="weee">(<small>
81
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
82
+ <?php echo $_weeeSeparator; ?>
83
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
84
+ <?php $_weeeSeparator = ' + '; ?>
85
+ <?php endforeach; ?>
86
+ </small>)</span>
87
+ </span>
88
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
89
+ <span class="price-excluding-tax">
90
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
91
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
92
+ </span>
93
+ <span class="price-including-tax">
94
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
95
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
96
+ <br />
97
+ <span class="weee">(<small>
98
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
99
+ <?php echo $_weeeSeparator; ?>
100
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
101
+ <?php $_weeeSeparator = ' + '; ?>
102
+ <?php endforeach; ?>
103
+ </small>)</span>
104
+ </span>
105
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
106
+ <span class="price-excluding-tax">
107
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
108
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,false) ?></span>
109
+ </span>
110
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
111
+ <span class="weee">
112
+ <small>
113
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
114
+ </small>
115
+ </span>
116
+ <br />
117
+ <?php endforeach; ?>
118
+ <span class="price-including-tax">
119
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
120
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
121
+ </span>
122
+ <?php else: ?>
123
+ <span class="price-excluding-tax">
124
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
125
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,false) ?></span>
126
+ </span>
127
+ <span class="price-including-tax">
128
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
129
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
130
+ </span>
131
+ <?php endif; ?>
132
+ <?php else: ?>
133
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
134
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
135
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
136
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
137
+ <br />
138
+ <span class="weee">(<small>
139
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
140
+ <?php echo $_weeeSeparator; ?>
141
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
142
+ <?php $_weeeSeparator = ' + '; ?>
143
+ <?php endforeach; ?>
144
+ </small>)</span>
145
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
146
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
147
+ <br />
148
+ <span class="weee">(<small>
149
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
150
+ <?php echo $_weeeSeparator; ?>
151
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
152
+ <?php $_weeeSeparator = ' + '; ?>
153
+ <?php endforeach; ?>
154
+ </small>)</span>
155
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
156
+ <span class="regular-price"><?php echo Mage::helper('core')->currency($_price,true,true) ?></span><br />
157
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
158
+ <span class="weee">
159
+ <small>
160
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
161
+ </small>
162
+ </span>
163
+ <br />
164
+ <?php endforeach; ?>
165
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
166
+ <?php else: ?>
167
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,true) ?></span>
168
+ <?php endif; ?>
169
+ <?php endif; ?>
170
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
171
+ <?php $_originalWeeeTaxAmount = Mage::helper('weee')->getOriginalAmount($_product); ?>
172
+
173
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
174
+ <p class="old-price">
175
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
176
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
177
+ </p>
178
+
179
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
180
+ <p class="special-price">
181
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
182
+ <span class="price-excluding-tax">
183
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
184
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
185
+ </span>
186
+ <span class="price-including-tax">
187
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
188
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
189
+ </span>
190
+ </p>
191
+ <?php else: ?>
192
+ <p class="special-price">
193
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
194
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
195
+ </p>
196
+ <?php endif; ?>
197
+
198
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
199
+ <p class="old-price">
200
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
201
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
202
+ </p>
203
+
204
+ <p class="special-price">
205
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
206
+ <span class="price-excluding-tax">
207
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
208
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
209
+ </span>
210
+ <br />
211
+ <span class="weee">(<small>
212
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
213
+ <?php echo $_weeeSeparator; ?>
214
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
215
+ <?php $_weeeSeparator = ' + '; ?>
216
+ <?php endforeach; ?>
217
+ </small>)</span>
218
+ <span class="price-including-tax">
219
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
220
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
221
+ </span>
222
+ </p>
223
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
224
+ <p class="old-price">
225
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
226
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
227
+ </p>
228
+
229
+ <p class="special-price">
230
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
231
+ <span class="price-excluding-tax">
232
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
233
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
234
+ </span>
235
+ <br />
236
+ <span class="weee">(<small>
237
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
238
+ <?php echo $_weeeSeparator; ?>
239
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
240
+ <?php $_weeeSeparator = ' + '; ?>
241
+ <?php endforeach; ?>
242
+ </small>)</span>
243
+ <span class="price-including-tax">
244
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
245
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
246
+ </span>
247
+ </p>
248
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
249
+ <p class="old-price">
250
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
251
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice,true,false) ?></span>
252
+ </p>
253
+
254
+ <p class="special-price">
255
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
256
+ <span class="price-excluding-tax">
257
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
258
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
259
+ </span>
260
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
261
+ <span class="weee">
262
+ <small>
263
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
264
+ </small>
265
+ </span>
266
+ <br />
267
+ <?php endforeach; ?>
268
+ <span class="price-including-tax">
269
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
270
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
271
+ </span>
272
+ </p>
273
+ <?php else: // excl. ?>
274
+ <p class="old-price">
275
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
276
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice,true,false) ?></span>
277
+ </p>
278
+
279
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
280
+ <p class="special-price">
281
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
282
+ <span class="price-excluding-tax">
283
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
284
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
285
+ </span>
286
+ <span class="price-including-tax">
287
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
288
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
289
+ </span>
290
+ </p>
291
+ <?php else: ?>
292
+ <p class="special-price">
293
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
294
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
295
+ </p>
296
+ <?php endif; ?>
297
+ <?php endif; ?>
298
+
299
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
300
+
301
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
302
+
303
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
304
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))): ?>
305
+ <?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
306
+ <?php endif; ?>
307
+
308
+ <?php if ($this->getUseLinkForAsLowAs()):?>
309
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
310
+ <?php else:?>
311
+ <span class="minimal-price-link">
312
+ <?php endif?>
313
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
314
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_minimalPriceDisplayValue,true,false) ?></span>
315
+ <?php if ($this->getUseLinkForAsLowAs()):?>
316
+ </a>
317
+ <?php else:?>
318
+ </span>
319
+ <?php endif?>
320
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
321
+ </div>
322
+
323
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
324
+ <?php
325
+ $_exclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null);
326
+ $_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true);
327
+ ?>
328
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
329
+ <div class="price-box">
330
+ <p class="minimal-price">
331
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
332
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
333
+ <span class="price-excluding-tax">
334
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
335
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_exclTax, true, false) ?></span>
336
+ </span>
337
+ <span class="price-including-tax">
338
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
339
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_inclTax, true, false) ?></span>
340
+ </span>
341
+ <?php else: ?>
342
+ <?php
343
+ $_showPrice = $_inclTax;
344
+ if (!$this->helper('tax')->displayPriceIncludingTax()) {
345
+ $_showPrice = $_exclTax;
346
+ }
347
+ ?>
348
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_showPrice, true, false) ?></span>
349
+ <?php endif; ?>
350
+ </p>
351
+ </div>
352
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
353
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
354
+ <?php else: ?>
355
+ <?php //echo $this->helper('catalog')->__('Price is not available');?>
356
+ <?php endif; /* if (!$_product->getCanShowPrice()): */?>
app/design/frontend/base/default/template/catalog/seo/sitemap.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Catalog_Block_Seo_Sitemap_
30
+ */
31
+ ?>
32
+ <?php $_items = $this->getCollection(); ?>
33
+ <?php if($_items->getSize()): ?>
34
+ <ul class="sitemap">
35
+ <?php foreach ($_items as $_item): ?>
36
+ <li><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $_item->name ?></a></li>
37
+ <?php endforeach; ?>
38
+ </ul>
39
+ <?php else: ?>
40
+ <p class="note-msg">
41
+ <?php echo $this->__('There are no %s available.', $this->getItemsTitle()); ?>
42
+ </p>
43
+ <script type="text/javascript">
44
+ //<![CDATA[
45
+ if ($('sitemap_top_links') != undefined) {
46
+ $('sitemap_top_links').hide();
47
+ }
48
+ //]]>
49
+ </script>
50
+ <?php endif ?>
app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-sitemap">
28
+ <div class="page-title">
29
+ <h1><?php echo $this->getTitle() ?></h1>
30
+ </div>
31
+ <div id="sitemap_top_links">
32
+ <?php echo $this->getChildHtml('links') ?>
33
+ </div>
34
+ <?php echo $this->getChildHtml('pager_top') ?>
35
+ <?php echo $this->getChildHtml('sitemap') ?>
36
+ <?php echo $this->getChildHtml('links') ?>
37
+ <?php echo $this->getChildHtml('pager_bottom') ?>
38
+ </div>
app/design/frontend/base/default/template/catalog/seo/tree.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Catalog_Block_Seo_Sitemap_
30
+ */
31
+ ?>
32
+ <?php $_items = $this->getCollection(); ?>
33
+ <?php if($_items->getSize()): ?>
34
+ <ul class="sitemap">
35
+ <?php foreach ($_items as $_item): ?>
36
+ <li class="level-<?php echo $this->getLevel($_item) ?>" <?php echo $this->getLevel($_item)?'style="padding-left:' . $this->getLevel($_item, 2) . '0px;"':'' ?>><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $_item->name ?></a></li>
37
+ <?php endforeach; ?>
38
+ </ul>
39
+ <?php else: ?>
40
+ <p class="note-msg">
41
+ <?php echo $this->__('There are no %s available.', $this->getItemsTitle()); ?>
42
+ </p>
43
+ <?php endif ?>
app/design/frontend/base/default/template/cataloginventory/qtyincrements.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_CatalogInventory_Block_Qtyincrements
29
+ */
30
+ ?>
31
+ <?php if ($this->getProductQtyIncrements()) : ?>
32
+ <div class="product-pricing">
33
+ <?php echo $this->__('%s is available for purchase in increments of %s', $this->getProductName(), $this->getProductQtyIncrements()) ?>
34
+ </div>
35
+ <?php endif ?>
app/design/frontend/base/default/template/cataloginventory/stockqty/composite.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_CatalogInventory_Block_Stockqty_Composite
29
+ */
30
+ ?>
31
+ <?php if ($this->isMsgVisible()): ?>
32
+ <a href="#" id="<?php echo $this->getPlaceholderId() ?>" class="stock-qty">
33
+ <?php echo $this->__('Only %s left', $this->getStockQty()) ?>
34
+ </a>
35
+ <table id="<?php echo $this->getDetailsPlaceholderId() ?>" class="stock-qty-details no-display">
36
+ <thead>
37
+ <tr>
38
+ <th><?php echo $this->__('Product Name') ?></th>
39
+ <th><?php echo $this->__('Qty') ?></th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <?php foreach ($this->getChildProducts() as $childProduct) : ?>
44
+ <?php $childProductStockQty = $this->getProductStockQty($childProduct); ?>
45
+ <?php if ($childProductStockQty > 0) : ?>
46
+ <tr>
47
+ <td><?php echo $childProduct->getName() ?></td>
48
+ <td><?php echo $childProductStockQty ?></td>
49
+ </tr>
50
+ <?php endif ?>
51
+ <?php endforeach ?>
52
+ </tbody>
53
+ </table>
54
+ <script type="text/javascript">
55
+ //<![CDATA[
56
+ $('<?php echo $this->getPlaceholderId() ?>').observe('click', function(event){
57
+ $('<?php echo $this->getDetailsPlaceholderId() ?>').toggleClassName('no-display');
58
+ event.stop();
59
+ });
60
+ //]]>
61
+ </script>
62
+ <?php endif; ?>
app/design/frontend/base/default/template/cataloginventory/stockqty/default.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_CatalogInventory_Block_Stockqty_Default
29
+ */
30
+ ?>
31
+ <?php if ($this->isMsgVisible()) : ?>
32
+ <span class="stock-qty">
33
+ <?php echo $this->__('Only %s left', $this->getStockQty()) ?>
34
+ </span>
35
+ <?php endif ?>
app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Catalog advanced search form
30
+ *
31
+ * @see Mage_CatalogSearch_Block_Advanced_Form
32
+ */
33
+ ?>
34
+ <div class="page-title">
35
+ <h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
36
+ </div>
37
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
38
+ <form action="<?php echo $this->getSearchPostUrl() ?>" method="get" id="form-validate">
39
+ <div class="fieldset advanced-search">
40
+ <h2 class="legend"><?php echo $this->__('Search Settings') ?></h2>
41
+ <ul class="form-list" id="advanced-search-list">
42
+ <?php foreach ($this->getSearchableAttributes() as $_attribute): ?>
43
+ <?php $_code = $_attribute->getAttributeCode() ?>
44
+ <li>
45
+ <label for="<?php echo $_code ?>"><?php echo $this->getAttributeLabel($_attribute) ?></label>
46
+ <?php switch($this->getAttributeInputType($_attribute)):
47
+ case 'number': ?>
48
+ <div class="input-range">
49
+ <input type="text" name="<?php echo $_code ?>[from]" value="<?php echo $this->htmlEscape($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->htmlEscape($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" />
50
+ <span class="separator">-</span>
51
+ <input type="text" name="<?php echo $_code ?>[to]" value="<?php echo $this->htmlEscape($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->htmlEscape($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" />
52
+ </div>
53
+ <?php break;
54
+ case 'price': ?>
55
+ <div class="input-range">
56
+ <input name="<?php echo $_code ?>[from]" value="<?php echo $this->htmlEscape($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->htmlEscape($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" />
57
+ <span class="separator">-</span>
58
+ <input name="<?php echo $_code ?>[to]" value="<?php echo $this->htmlEscape($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->htmlEscape($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" />
59
+ <small>(<?php echo $this->getCurrency($_attribute); ?>)</small>
60
+ </div>
61
+ <?php break;
62
+ case 'select': ?>
63
+ <div class="input-box">
64
+ <?php echo $this->getAttributeSelectElement($_attribute) ?>
65
+ </div>
66
+ <?php break;
67
+ case 'yesno': ?>
68
+ <?php echo $this->getAttributeYesNoElement($_attribute) ?>
69
+ <?php break;
70
+ case 'date': ?>
71
+ <div class="input-range">
72
+ <?php echo $this->getDateInput($_attribute, 'from') ?>
73
+ <span class="separator">-</span>
74
+ <?php echo $this->getDateInput($_attribute, 'to') ?>
75
+ </div>
76
+ <?php break;
77
+ default: ?>
78
+ <div class="input-box">
79
+ <input type="text" name="<?php echo $_code ?>" id="<?php echo $_code ?>" value="<?php echo $this->htmlEscape($this->getAttributeValue($_attribute)) ?>" title="<?php echo $this->htmlEscape($this->getAttributeLabel($_attribute)) ?>" class="input-text <?php echo $this->getAttributeValidationClass($_attribute) ?>" />
80
+ </div>
81
+ <?php endswitch; ?>
82
+ </li>
83
+ <?php endforeach; ?>
84
+ </ul>
85
+ <script type="text/javascript">decorateList('advanced-search-list')</script>
86
+ </div>
87
+ <div class="buttons-set">
88
+ <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
89
+ </div>
90
+ </form>
91
+ <script type="text/javascript">
92
+ //<![CDATA[
93
+ var dataForm = new VarienForm('form-validate', true);
94
+ //]]>
95
+ </script>
app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <?php if($this->getResultCount()): ?>
32
+ <p class="advanced-search-amount">
33
+ <?php echo $this->helper('catalogsearch')->__('<strong>%d item(s)</strong> were found using the following search criteria', $this->getResultCount()); ?>
34
+ </p>
35
+ <?php else: ?>
36
+ <p class="error-msg"><?php echo $this->helper('catalogsearch')->__('No items were found using the following search criteria.');?> <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a></p>
37
+ <?php endif; ?>
38
+
39
+ <div class="advanced-search-summary">
40
+ <?php $searchCriterias=$this->getSearchCriterias(); ?>
41
+ <?php foreach (array('left', 'right') as $side): ?>
42
+ <?php if(@$searchCriterias[$side]): ?>
43
+ <ul>
44
+ <?php foreach($searchCriterias[$side] as $criteria): ?>
45
+ <li><strong><?php echo $this->htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>:</strong> <?php echo $this->htmlEscape($criteria['value']); ?></li>
46
+ <?php endforeach; ?>
47
+ </ul>
48
+ <?php endif; ?>
49
+ <?php endforeach; ?>
50
+ <?php if($this->getResultCount()): ?>
51
+ <p>
52
+ <?php echo $this->helper('catalogsearch')->__("Don't see what you're looking for?"); ?>
53
+ <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a>
54
+ </p>
55
+ <?php endif; ?>
56
+ </div>
57
+ <?php if($this->getResultCount()): ?>
58
+ <?php echo $this->getProductListHtml() ?>
59
+ <?php endif; ?>
60
+ <?php $this->getSearchCriterias(); ?>
app/design/frontend/base/default/template/catalogsearch/form.mini.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="search_mini_form" action="<?php echo $this->helper('catalogsearch')->getResultUrl() ?>" method="get">
28
+ <div class="form-search">
29
+ <label for="search"><?php echo $this->__('Search:') ?></label>
30
+ <input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="input-text" />
31
+ <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
32
+ <div id="search_autocomplete" class="search-autocomplete"></div>
33
+ <script type="text/javascript">
34
+ //<![CDATA[
35
+ var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
36
+ searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
37
+ //]]>
38
+ </script>
39
+ </div>
40
+ </form>
app/design/frontend/base/default/template/catalogsearch/result.phtml ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($this->getResultCount()): ?>
28
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
29
+ <div class="page-title">
30
+ <?php if ($this->helper('rss/catalog')->getTagFeedUrl()): ?>
31
+ <a href="<?php echo $this->helper('rss/catalog')->getTagFeedUrl() ?>" class="nobr link-rss"><?php echo $this->__('Subscribe to Feed') ?></a>
32
+ <?php endif; ?>
33
+ <h1><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
34
+ </div>
35
+ <?php if ($messages = $this->getNoteMessages()):?>
36
+ <p class="note-msg">
37
+ <?php foreach ($messages as $message):?>
38
+ <?php echo $message?><br />
39
+ <?php endforeach;?>
40
+ </p>
41
+ <?php endif; ?>
42
+ <?php echo $this->getProductListHtml() ?>
43
+ <?php else: ?>
44
+ <div class="page-title">
45
+ <h1><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
46
+ </div>
47
+ <p class="note-msg">
48
+ <?php echo ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?>
49
+ <?php if ($messages = $this->getNoteMessages()):?>
50
+ <?php foreach ($messages as $message):?>
51
+ <br /><?php echo $message?>
52
+ <?php endforeach;?>
53
+ <?php endif; ?>
54
+ </p>
55
+ <?php endif; ?>
app/design/frontend/base/default/template/catalogsearch/term.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Popular Search Terms') ?></h1>
29
+ </div>
30
+ <?php if( sizeof($this->getTerms()) > 0 ): ?>
31
+ <ul class="tags-list">
32
+ <?php foreach ($this->getTerms() as $_term): ?>
33
+ <li><a href="<?php echo $this->getSearchUrl($_term) ?>" style="font-size:<?php echo $_term->getRatio()*70+75 ?>%;"><?php echo $this->htmlEscape($_term->getName()) ?></a></li>
34
+ <?php endforeach; ?>
35
+ </ul>
36
+ <?php else: ?>
37
+ <p class="note-msg"><?php echo $this->__('There are no search terms available.'); ?></p>
38
+ <?php endif; ?>
app/design/frontend/base/default/template/centinel/authentication.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getAuthenticationStart()):?>
28
+ <div class="centinel" id="centinel_authenticate_block">
29
+ <h3><?php echo $this->__('Card Verification')?></h3>
30
+ <p><?php echo $this->__('Please verify the card with the issuer bank:') ?></p>
31
+ <div class="authentication">
32
+ <iframe id="centinel_authenticate_iframe" frameborder="0" border="0" src=""></iframe>
33
+ </div>
34
+ </div>
35
+ <script type="text/javascript">
36
+ //<![CDATA[
37
+ CentinelAuthenticateController = new CentinelAuthenticate('centinel_authenticate_block', 'centinel_authenticate_iframe');
38
+ <?php foreach ($this->getRelatedBlocks() as $relatedBlockId):?>
39
+ CentinelAuthenticateController.addRelatedBlock('<?php echo $relatedBlockId ?>');
40
+ <?php endforeach;?>
41
+ <?php if ($this->getAuthenticationStartMode() == 'instant'): ?>
42
+ CentinelAuthenticateController.start('<?php echo $this->getFrameUrl() ?>');
43
+ <?php elseif ($this->getAuthenticationStartMode() == 'window'):?>
44
+ Event.observe(window, 'load', function(){CentinelAuthenticateController.start('<?php echo $this->getFrameUrl() ?>');});
45
+ <?php endif;?>
46
+ //]]>
47
+ </script>
48
+ <?php else:?>
49
+ <script type="text/javascript">
50
+ //<![CDATA[
51
+ if (typeof CentinelAuthenticateController != 'undefined') {
52
+ CentinelAuthenticateController.cancel();
53
+ }
54
+ //]]>
55
+ </script>
56
+ <?php endif;?>
app/design/frontend/base/default/template/centinel/authentication/complete.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getIsProcessed()):?>
28
+ <?php if ($this->getIsSuccess()):?>
29
+ <script type="text/javascript">
30
+ //<![CDATA[
31
+ window.parent.CentinelAuthenticateController.success();
32
+ //]]>
33
+ </script>
34
+ <?php else:?>
35
+ <h4><?php echo $this->__('Verification Failed');?></h4>
36
+ <p><?php echo $this->__('The card has failed verification with the issuer bank.')?> <strong><?php echo $this->__('Order cannot be placed.')?></strong></p>
37
+ <?php endif;?>
38
+ <?php else:?>
39
+ <h4><?php echo $this->__('Verification cannot be processed');?></h4>
40
+ <p><?php echo $this->__('There has been wrong payment information submitted or the time limit has expired. Please, try again.')?> <strong><?php echo $this->__('Order cannot be placed.')?></strong></p>
41
+ <?php endif;?>
app/design/frontend/base/default/template/centinel/authentication/start.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form name="validation_form" id="validation_form" action="<?php echo $this->getAcsUrl();?>" method="post">
28
+ <fieldset>
29
+ <input type="hidden" name="PaReq" value="<?php echo $this->getPaReq()?>" />
30
+ <input type="hidden" name="TermUrl" value="<?php echo $this->getTermUrl()?>" />
31
+ <input type="hidden" name="MD" value="<?php echo $this->getMd()?>" />
32
+ </fieldset>
33
+ </form>
34
+ <script type="text/javascript">
35
+ //<![CDATA[
36
+ window.onload = function(){
37
+ document.getElementById('validation_form').submit();
38
+ };
39
+ //]]>
40
+ </script>
app/design/frontend/base/default/template/centinel/logo.phtml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <li class="centinel-logos" id="<?php echo $this->getCode() ?>_centinel_logo">
28
+ <label><?php echo $this->__('To ensure the security of your transactions') ?></label>
29
+ <div class="input-box">
30
+ <a href="#" title="<?php echo $this->__('Verified by Visa') ?> "onclick="popWin('<?php echo $this->helper('centinel')->getVisaLearnMorePageUrl()?>', 'verifiedByVisa', 'width=815,height=600,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getSkinUrl('images/centinel/vbv_ltbg_71x57.gif'); ?>" alt="<?php echo $this->__('Verified by Visa') ?>" /></a>
31
+ <a href="#" title="<?php echo $this->__('MasterCard SecureCode'); ?>" onclick="popWin('<?php echo $this->helper('centinel')->getMastercardLearnMorePageUrl()?>', 'secureCode', 'width=600,height=403,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getSkinUrl('images/centinel/sc_learn_62x34.gif'); ?>" alt="<?php echo $this->__('MasterCard SecureCode') ?>" /></a>
32
+ </div>
33
+ </li>
app/design/frontend/base/default/template/checkout/cart.phtml ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Shopping cart template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart
32
+ */
33
+ ?>
34
+ <div class="cart">
35
+ <div class="page-title title-buttons">
36
+ <h1><?php echo $this->__('Shopping Cart') ?></h1>
37
+ <?php if(!$this->hasError()): ?>
38
+ <ul class="checkout-types">
39
+ <?php foreach ($this->getMethods('top_methods') as $method): ?>
40
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
41
+ <li><?php echo $methodHtml; ?></li>
42
+ <?php endif; ?>
43
+ <?php endforeach; ?>
44
+ </ul>
45
+ <?php endif; ?>
46
+ </div>
47
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
48
+ <?php echo $this->getChildHtml('form_before') ?>
49
+ <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
50
+ <fieldset>
51
+ <table id="shopping-cart-table" class="data-table cart-table">
52
+ <col width="1" />
53
+ <col />
54
+ <col width="1" />
55
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
56
+ <col width="1" />
57
+ <?php endif ?>
58
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
59
+ <col width="1" />
60
+ <?php endif; ?>
61
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
62
+ <col width="1" />
63
+ <?php endif; ?>
64
+ <col width="1" />
65
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
66
+ <col width="1" />
67
+ <?php endif; ?>
68
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
69
+ <col width="1" />
70
+ <?php endif; ?>
71
+ <col width="1" />
72
+
73
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
74
+ <thead>
75
+ <tr>
76
+ <th rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
77
+ <th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
78
+ <th rowspan="<?php echo $mergedCells; ?>"></th>
79
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
80
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span></th>
81
+ <?php endif ?>
82
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
83
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
84
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
85
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center">&nbsp;</th>
86
+ </tr>
87
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
88
+ <tr>
89
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
90
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
91
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
92
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
93
+ </tr>
94
+ <?php endif; ?>
95
+ </thead>
96
+ <tfoot>
97
+ <tr>
98
+ <td colspan="50" class="a-right">
99
+ <?php if($this->getContinueShoppingUrl()): ?>
100
+ <button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
101
+ <?php endif; ?>
102
+ <button type="submit" title="<?php echo $this->__('Update Shopping Cart') ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart') ?></span></span></button>
103
+ </td>
104
+ </tr>
105
+ </tfoot>
106
+ <tbody>
107
+ <?php foreach($this->getItems() as $_item): ?>
108
+ <?php echo $this->getItemHtml($_item) ?>
109
+ <?php endforeach ?>
110
+ </tbody>
111
+ </table>
112
+ <script type="text/javascript">decorateTable('shopping-cart-table')</script>
113
+ </fieldset>
114
+ </form>
115
+ <div class="cart-collaterals">
116
+ <div class="col2-set">
117
+ <div class="col-1">
118
+ <?php echo $this->getChildHtml('crosssell') ?>
119
+ </div>
120
+ <div class="col-2">
121
+ <?php echo $this->getChildHtml('coupon') ?>
122
+ <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
123
+ </div>
124
+ </div>
125
+ <div class="totals">
126
+ <?php echo $this->getChildHtml('totals'); ?>
127
+ <?php if(!$this->hasError()): ?>
128
+ <ul class="checkout-types">
129
+ <?php foreach ($this->getMethods('methods') as $method): ?>
130
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
131
+ <li><?php echo $methodHtml; ?></li>
132
+ <?php endif; ?>
133
+ <?php endforeach; ?>
134
+ </ul>
135
+ <?php endif; ?>
136
+ </div>
137
+ </div>
138
+ </div>
app/design/frontend/base/default/template/checkout/cart/coupon.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">
28
+ <div class="discount">
29
+ <h2><?php echo $this->__('Discount Codes') ?></h2>
30
+ <div class="discount-form">
31
+ <label for="coupon_code"><?php echo $this->__('Enter your coupon code if you have one.') ?></label>
32
+ <input type="hidden" name="remove" id="remove-coupone" value="0" />
33
+ <div class="input-box">
34
+ <input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->htmlEscape($this->getCouponCode()) ?>" />
35
+ </div>
36
+ <div class="buttons-set">
37
+ <button type="button" title="<?php echo $this->__('Apply Coupon') ?>" class="button" onclick="discountForm.submit(false)" value="<?php echo $this->__('Apply Coupon') ?>"><span><span><?php echo $this->__('Apply Coupon') ?></span></span></button>
38
+ <?php if(strlen($this->getCouponCode())): ?>
39
+ &nbsp; <button type="button" title="<?php echo $this->__('Cancel Coupon') ?>" class="button" onclick="discountForm.submit(true)" value="<?php echo $this->__('Cancel Coupon') ?>"><span><span><?php echo $this->__('Cancel Coupon') ?></span></span></button>
40
+ <?php endif;?>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </form>
45
+ <script type="text/javascript">
46
+ //<![CDATA[
47
+ var discountForm = new VarienForm('discount-coupon-form');
48
+ discountForm.submit = function (isRemove) {
49
+ if (isRemove) {
50
+ $('coupon_code').removeClassName('required-entry');
51
+ $('remove-coupone').value = "1";
52
+ } else {
53
+ $('coupon_code').addClassName('required-entry');
54
+ $('remove-coupone').value = "0";
55
+ }
56
+ return VarienForm.prototype.submit.bind(discountForm)();
57
+ }
58
+ //]]>
59
+ </script>
app/design/frontend/base/default/template/checkout/cart/crosssell.phtml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Cart cross sell items template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart_Crosssell
32
+ */
33
+ ?>
34
+ <?php if($this->getItemCount()): ?>
35
+ <div class="crosssell">
36
+ <h2><?php echo $this->__('Based on your selection, you may be interested in the following items:') ?></h2>
37
+ <ul id="crosssell-products-list">
38
+ <?php foreach ($this->getItems() as $_item): ?>
39
+ <li class="item">
40
+ <a class="product-image" href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
41
+ <div class="product-details">
42
+ <h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></h3>
43
+ <?php echo $this->getPriceHtml($_item, true) ?>
44
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
45
+ <ul class="add-to-links">
46
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
47
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
48
+ <?php endif; ?>
49
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
50
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
51
+ <?php endif; ?>
52
+ </ul>
53
+ </div>
54
+ </li>
55
+ <?php endforeach; ?>
56
+ </ul>
57
+ <script type="text/javascript">decorateList('crosssell-products-list', 'none-recursive')</script>
58
+ </div>
59
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/cart/item/configure/updatecart.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_product = $this->getProduct(); ?>
29
+ <?php $buttonTitle = $this->__('Update Cart'); ?>
30
+ <?php if ($_product->isSaleable()): ?>
31
+ <div class="add-to-cart">
32
+ <?php if (!$_product->isGrouped()): ?>
33
+ <label for="qty"><?php echo $this->__('Qty:') ?></label>
34
+ <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
35
+ <?php endif; ?>
36
+ <button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
37
+ <?php echo $this->getChildHtml('', true, true) ?>
38
+ </div>
39
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/cart/item/default.phtml ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $_item = $this->getItem();
29
+ $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
30
+ ?>
31
+ <tr>
32
+ <td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
33
+ <td>
34
+ <h2 class="product-name">
35
+ <?php if ($this->hasProductUrl()):?>
36
+ <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->htmlEscape($this->getProductName()) ?></a>
37
+ <?php else: ?>
38
+ <?php echo $this->htmlEscape($this->getProductName()) ?>
39
+ <?php endif; ?>
40
+ </h2>
41
+ <?php if ($_options = $this->getOptionList()):?>
42
+ <dl class="item-options">
43
+ <?php foreach ($_options as $_option) : ?>
44
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
45
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
46
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
47
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
48
+ <div class="truncated_full_value">
49
+ <dl class="item-options">
50
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
51
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
52
+ </dl>
53
+ </div>
54
+ <?php endif; ?>
55
+ </dd>
56
+ <?php endforeach; ?>
57
+ </dl>
58
+ <?php endif;?>
59
+ <?php if ($messages = $this->getMessages()): ?>
60
+ <?php foreach ($messages as $message): ?>
61
+ <p class="item-msg <?php echo $message['type'] ?>">* <?php echo $message['text'] ?></p>
62
+ <?php endforeach; ?>
63
+ <?php endif; ?>
64
+ <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
65
+ <?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
66
+ <?php endif;?>
67
+ </td>
68
+ <td class="a-center">
69
+ <?php if ($isVisibleProduct): ?>
70
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
71
+ <?php endif ?>
72
+ </td>
73
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
74
+ <td class="a-center">
75
+ <?php if ($isVisibleProduct): ?>
76
+ <input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
77
+ <?php endif ?>
78
+ </td>
79
+ <?php endif ?>
80
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
81
+ <td class="a-right">
82
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
83
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
84
+ <?php else: ?>
85
+ <span class="cart-price">
86
+ <?php endif; ?>
87
+
88
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
89
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
90
+ <?php else: ?>
91
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
92
+ <?php endif; ?>
93
+
94
+ </span>
95
+
96
+
97
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
98
+
99
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
100
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
101
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
102
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
103
+ <?php endforeach; ?>
104
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
105
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
106
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
107
+ <?php endforeach; ?>
108
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
109
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
110
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
111
+ <?php endforeach; ?>
112
+ <?php endif; ?>
113
+ </div>
114
+
115
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
116
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
117
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
118
+ </div>
119
+ <?php endif; ?>
120
+ <?php endif; ?>
121
+ </td>
122
+ <?php endif; ?>
123
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
124
+ <td>
125
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
126
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
127
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
128
+ <?php else: ?>
129
+ <span class="cart-price">
130
+ <?php endif; ?>
131
+
132
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
133
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
134
+ <?php else: ?>
135
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
136
+ <?php endif; ?>
137
+
138
+ </span>
139
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
140
+
141
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
142
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
143
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
144
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
145
+ <?php endforeach; ?>
146
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
147
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
148
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
149
+ <?php endforeach; ?>
150
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
151
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
152
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
153
+ <?php endforeach; ?>
154
+ <?php endif; ?>
155
+ </div>
156
+
157
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
158
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
159
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
160
+ </div>
161
+ <?php endif; ?>
162
+ <?php endif; ?>
163
+ </td>
164
+ <?php endif; ?>
165
+ <td class="a-center">
166
+ <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" />
167
+ </td>
168
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
169
+ <td class="a-right">
170
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
171
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
172
+ <?php else: ?>
173
+ <span class="cart-price">
174
+ <?php endif; ?>
175
+
176
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
177
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
178
+ <?php else: ?>
179
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
180
+ <?php endif; ?>
181
+
182
+ </span>
183
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
184
+
185
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
186
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
187
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
188
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
189
+ <?php endforeach; ?>
190
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
191
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
192
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
193
+ <?php endforeach; ?>
194
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
195
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
196
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
197
+ <?php endforeach; ?>
198
+ <?php endif; ?>
199
+ </div>
200
+
201
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
202
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
203
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
204
+ </div>
205
+ <?php endif; ?>
206
+ <?php endif; ?>
207
+ </td>
208
+ <?php endif; ?>
209
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
210
+ <td>
211
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
212
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
213
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
214
+ <?php else: ?>
215
+ <span class="cart-price">
216
+ <?php endif; ?>
217
+
218
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
219
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
220
+ <?php else: ?>
221
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
222
+ <?php endif; ?>
223
+
224
+ </span>
225
+
226
+
227
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
228
+
229
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
230
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
231
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
232
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
233
+ <?php endforeach; ?>
234
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
235
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
236
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
237
+ <?php endforeach; ?>
238
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
239
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
240
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
241
+ <?php endforeach; ?>
242
+ <?php endif; ?>
243
+ </div>
244
+
245
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
246
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
247
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
248
+ </div>
249
+ <?php endif; ?>
250
+ <?php endif; ?>
251
+ </td>
252
+ <?php endif; ?>
253
+ <td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item')?></a></td>
254
+ </tr>
app/design/frontend/base/default/template/checkout/cart/noItems.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
29
+ </div>
30
+ <div class="cart-empty">
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
33
+ <p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
34
+ </div>
app/design/frontend/base/default/template/checkout/cart/render/default.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <?php $_item = $this->getItem() ?>
32
+ <tr>
33
+ <td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item')?>" class="btn-remove2"><?php echo $this->__('Remove Item')?></a></td>
34
+ <td><a href="<?php echo $this->getItemUrl($_item) ?>" title="<?php echo $this->htmlEscape($this->getItemName($_item)) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($this->getItemProductForThumbnail($_item), 'thumbnail')->resize(75); ?>" width="75" alt="<?php echo $this->htmlEscape($this->getItemName($_item)) ?>" /></a></td>
35
+ <td>
36
+ <h3 class="product-name"><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->getItemName($_item) ?></a></h3>
37
+ <?php echo $this->getItemDescription($_item) ?>
38
+ <?php if($_item->getMessage()): ?>
39
+ <p class="item-msg <?php if($_item->getHasError()): ?>error<?php else: ?>notice<?php endif; ?>">* <?php echo $_item->getMessage() ?></p>
40
+ <?php endif; ?>
41
+ </td>
42
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
43
+ <td class="a-center">
44
+ <input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" class="checkbox" />
45
+ </td>
46
+ <?php endif ?>
47
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
48
+ <td class="a-right">
49
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
50
+ </td>
51
+ <?php endif; ?>
52
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
53
+ <td class="a-right">
54
+ <?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
55
+ </td>
56
+ <?php endif; ?>
57
+ <td class="a-center">
58
+ <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getItemQty($_item) ?>" size="4" class="input-text qty" maxlength="12" />
59
+ </td>
60
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
61
+ <td class="a-right">
62
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
63
+ </td>
64
+ <?php endif; ?>
65
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
66
+ <td class="a-right">
67
+ <?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
68
+ </td>
69
+ <?php endif; ?>
70
+ </tr>
app/design/frontend/base/default/template/checkout/cart/render/simple.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @deprecated after 1.4.0.0-alpha3
29
+ */
30
+ ?>
31
+ <?php $_item = $this->getItem() ?>
32
+ <tr>
33
+ <td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item')?>" class="btn-remove2"><?php echo $this->__('Remove Item')?></a></td>
34
+ <td><a href="<?php echo $this->getItemUrl($_item) ?>" title="<?php echo $this->htmlEscape($this->getItemName($_item)) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($this->getItemProductForThumbnail($_item), 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getItemName($_item)) ?>" /></a></td>
35
+ <td>
36
+ <h3 class="product-name"><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->getItemName($_item) ?></a></h3>
37
+ <?php echo $this->getItemDescription($_item) ?>
38
+ <?php if($_item->getMessage()): ?>
39
+ <p class="item-msg <?php if($_item->getHasError()): ?>error<?php else: ?>notice<?php endif; ?>">* <?php echo $_item->getMessage() ?></p>
40
+ <?php endif; ?>
41
+ </td>
42
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
43
+ <td class="a-center">
44
+ <input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" class="checkbox" />
45
+ </td>
46
+ <?php endif ?>
47
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
48
+ <td class="a-right">
49
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
50
+ </td>
51
+ <?php endif; ?>
52
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
53
+ <td class="a-right">
54
+ <?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
55
+ </td>
56
+ <?php endif; ?>
57
+ <td class="a-center">
58
+ <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getItemQty($_item) ?>" size="4" class="input-text qty" maxlength="12" />
59
+ </td>
60
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
61
+ <td class="a-right">
62
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
63
+ </td>
64
+ <?php endif; ?>
65
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
66
+ <td class="a-right">
67
+ <?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
68
+ </td>
69
+ <?php endif; ?>
70
+ </tr>
app/design/frontend/base/default/template/checkout/cart/shipping.phtml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Checkout_Block_Cart_Shipping
30
+ */
31
+ ?>
32
+ <div class="shipping">
33
+ <h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
34
+ <div class="shipping-form">
35
+ <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
36
+ <p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
37
+ <ul class="form-list">
38
+ <li>
39
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
40
+ <div class="input-box">
41
+ <?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
42
+ </div>
43
+ </li>
44
+ <?php //if($this->getStateActive()): ?>
45
+ <li>
46
+ <label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('State/Province') ?></label>
47
+ <div class="input-box">
48
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
49
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
50
+ </select>
51
+ <script type="text/javascript">
52
+ //<![CDATA[
53
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
54
+ //]]>
55
+ </script>
56
+ <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
57
+ </div>
58
+ </li>
59
+ <?php //endif; ?>
60
+ <?php if($this->getCityActive()): ?>
61
+ <li>
62
+ <label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
63
+ <div class="input-box">
64
+ <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->htmlEscape($this->getEstimateCity()) ?>" />
65
+ </div>
66
+ </li>
67
+ <?php endif; ?>
68
+ <li>
69
+ <label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
70
+ <div class="input-box">
71
+ <input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->htmlEscape($this->getEstimatePostcode()) ?>" />
72
+ </div>
73
+ </li>
74
+ </ul>
75
+ <div class="buttons-set">
76
+ <button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
77
+ </div>
78
+ </form>
79
+ <script type="text/javascript">
80
+ //<![CDATA[
81
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
82
+ //]]>
83
+ </script>
84
+
85
+ <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
86
+ <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
87
+ <dl class="sp-methods">
88
+ <?php foreach ($_shippingRateGroups as $code => $_rates): ?>
89
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
90
+ <dd>
91
+ <ul>
92
+ <?php foreach ($_rates as $_rate): ?>
93
+ <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
94
+ <?php if ($_rate->getErrorMessage()): ?>
95
+ <?php echo $_rate->getErrorMessage() ?>
96
+ <?php else: ?>
97
+ <input name="estimate_method" type="radio" value="<?php echo $this->htmlEscape($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
98
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
99
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
100
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
101
+ <?php echo $_excl; ?>
102
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
103
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
104
+ <?php endif; ?>
105
+ </label>
106
+ <?php endif ?>
107
+ </li>
108
+ <?php endforeach; ?>
109
+ </ul>
110
+ </dd>
111
+ <?php endforeach; ?>
112
+ </dl>
113
+ <div class="buttons-set">
114
+ <button type="submit" title="<?php echo $this->__('Update Total') ?>" class="button" name="do" value="<?php echo $this->__('Update Total') ?>"><span><span><?php echo $this->__('Update Total') ?></span></span></button>
115
+ </div>
116
+ </form>
117
+ <?php endif; ?>
118
+ <script type="text/javascript">
119
+ //<![CDATA[
120
+ var coShippingMethodForm = new VarienForm('shipping-zip-form');
121
+ var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
122
+
123
+ coShippingMethodForm.submit = function () {
124
+ var country = $F('country');
125
+ var optionalZip = false;
126
+
127
+ for (i=0; i < countriesWithOptionalZip.length; i++) {
128
+ if (countriesWithOptionalZip[i] == country) {
129
+ optionalZip = true;
130
+ }
131
+ }
132
+ if (optionalZip) {
133
+ $('postcode').removeClassName('required-entry');
134
+ }
135
+ else {
136
+ $('postcode').addClassName('required-entry');
137
+ }
138
+ return VarienForm.prototype.submit.bind(coShippingMethodForm)();
139
+ }
140
+ //]]>
141
+ </script>
142
+ </div>
143
+ </div>
app/design/frontend/base/default/template/checkout/cart/sidebar.phtml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Shoping cart sidebar
29
+ *
30
+ * @see Mage_Checkout_Block_Cart_Sidebar
31
+ */
32
+
33
+ ?>
34
+ <?php if ($this->getIsNeedToDisplaySideBar()):?>
35
+ <div class="block block-cart">
36
+ <?php $_cartQty = $this->getSummaryCount() ?>
37
+ <div class="block-title">
38
+ <strong><span><?php echo $this->__('My Cart') ?></span></strong>
39
+ </div>
40
+ <div class="block-content">
41
+ <?php if ($_cartQty>0): ?>
42
+ <div class="summary">
43
+ <?php if ($_cartQty==1): ?>
44
+ <p class="amount"><?php echo $this->__('There is <a href="%s">1 item</a> in your cart.', $this->getUrl('checkout/cart')) ?></p>
45
+ <?php else: ?>
46
+ <p class="amount"><?php echo $this->__('There are <a href="%s">%s items</a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?></p>
47
+ <?php endif ?>
48
+ <p class="subtotal">
49
+ <span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
50
+ <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
51
+ <br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
52
+ <?php endif; ?>
53
+ </p>
54
+ </div>
55
+ <?php endif ?>
56
+ <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
57
+ <div class="actions">
58
+ <?php echo $this->getChildHtml('extra_actions') ?>
59
+ <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
60
+ </div>
61
+ <?php endif ?>
62
+ <?php $_items = $this->getRecentItems() ?>
63
+ <?php if(count($_items)): ?>
64
+ <p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
65
+ <ol id="cart-sidebar" class="mini-products-list">
66
+ <?php foreach($_items as $_item): ?>
67
+ <?php echo $this->getItemHtml($_item) ?>
68
+ <?php endforeach; ?>
69
+ </ol>
70
+ <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
71
+ <?php else: ?>
72
+ <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
73
+ <?php endif ?>
74
+ </div>
75
+ </div>
76
+ <?php endif;?>
app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ $_item = $this->getItem();
29
+ $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
30
+ ?>
31
+ <li class="item">
32
+ <?php if ($this->hasProductUrl()): ?>
33
+ <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->htmlEscape($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /></a>
34
+ <?php else: ?>
35
+ <span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /></span>
36
+ <?php endif; ?>
37
+ <div class="product-details">
38
+ <a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
39
+ <?php if ($isVisibleProduct): ?>
40
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item') ?>" class="btn-edit"><?php echo $this->__('Edit item')?></a>
41
+ <?php endif ?>
42
+ <p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->htmlEscape($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p>
43
+ <strong><?php echo $this->getQty() ?></strong> x
44
+
45
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
46
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
47
+ <?php echo $this->__('Excl. Tax'); ?>:
48
+ <?php endif; ?>
49
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
50
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
51
+ <?php else: ?>
52
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
53
+ <?php endif; ?>
54
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
55
+ <br />
56
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
57
+ <small>
58
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
59
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
60
+ <?php endforeach; ?>
61
+ </small>
62
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
63
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
64
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
65
+ <?php endforeach; ?>
66
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
67
+ <small>
68
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
69
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
70
+ <?php endforeach; ?>
71
+ </small>
72
+ <?php endif; ?>
73
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
74
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
75
+ <?php endif; ?>
76
+ <?php endif; ?>
77
+ <?php endif; ?>
78
+
79
+
80
+
81
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
82
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
83
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
84
+ <br /><?php echo $this->__('Incl. Tax'); ?>:
85
+ <?php endif; ?>
86
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
87
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
88
+ <?php else: ?>
89
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
90
+ <?php endif; ?>
91
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
92
+ <br />
93
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
94
+ <small>
95
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
96
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
97
+ <?php endforeach; ?>
98
+ </small>
99
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
100
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
101
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
102
+ <?php endforeach; ?>
103
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
104
+ <small>
105
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
106
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
107
+ <?php endforeach; ?>
108
+ </small>
109
+ <?php endif; ?>
110
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
111
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
112
+ <?php endif; ?>
113
+ <?php endif; ?>
114
+ <?php endif; ?>
115
+ <?php if ($_options = $this->getOptionList()):?>
116
+ <div class="truncated">
117
+ <div class="truncated_full_value">
118
+ <dl class="item-options">
119
+ <?php foreach ($_options as $_option) : ?>
120
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
121
+ <dd>
122
+ <?php if (is_array($_option['value'])): ?>
123
+ <?php echo nl2br(implode("\n", $_option['value'])) ?>
124
+ <?php else: ?>
125
+ <?php echo $_option['value'] ?>
126
+ <?php endif; ?>
127
+ </dd>
128
+ <?php endforeach; ?>
129
+ </dl>
130
+ </div>
131
+ <a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
132
+ </div>
133
+ <?php endif; ?>
134
+ </div>
135
+ </li>
app/design/frontend/base/default/template/checkout/cart/totals.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Shopping cart totals template
30
+ *
31
+ * @see Mage_Checkout_Block_Cart_Totals
32
+ */
33
+ ?>
34
+ <table id="shopping-cart-totals-table">
35
+ <col />
36
+ <col width="1" />
37
+ <tfoot>
38
+ <?php echo $this->renderTotals('footer'); ?>
39
+ </tfoot>
40
+ <tbody>
41
+ <?php echo $this->renderTotals(); ?>
42
+ </tbody>
43
+ </table>
app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="multiple-checkout">
28
+ <div class="page-title title-buttons">
29
+ <h1><?php echo $this->__('Change Billing Address') ?></h1>
30
+ <button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><span><?php echo $this->__('Add New Address') ?></span></span></button>
31
+ </div>
32
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
+ <?php $_index=0 ?>
34
+ <?php foreach ($this->getAddressCollection() as $_address): ?>
35
+ <?php if($_index%3==0): ?><div class="col3-set"><?php endif; ?>
36
+ <div class="col-<?php echo ($_index%3+1) ?>">
37
+ <p class="actions">
38
+ <a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span>
39
+ <a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo $this->__('Select Address') ?></strong></a>
40
+ </p>
41
+ <address>
42
+ <?php echo $_address->format('html') ?>
43
+ </address>
44
+ <?php if($this->isAddressDefaultBilling($_address)): ?>
45
+ <strong><?php echo $this->__('Default Billing') ?></strong>
46
+ <?php endif; ?>
47
+ <?php if($this->isAddressDefaultShipping($_address)): ?>
48
+ <br /><strong><?php echo $this->__('Default Shipping') ?></strong>
49
+ <?php endif; ?>
50
+ </div>
51
+ <?php $_index++ ?>
52
+ <?php if($_index && $_index%3==0): ?></div><?php endif; ?>
53
+ <?php endforeach; ?>
54
+ <?php if(!$_index || $_index%3!=0): ?></div><?php endif; ?>
55
+ <div class="buttons-set">
56
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Billing Information') ?></a></p>
57
+ </div>
58
+ </div>
app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Ship to multiple address template
30
+ *
31
+ * @see Mage_Checkout_Block_Multishipping_Addresses
32
+ */
33
+ ?>
34
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
35
+ <form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post">
36
+ <div class="multiple-checkout">
37
+ <div class="page-title title-buttons">
38
+ <h1><?php echo $this->__('Ship to Multiple Addresses') ?></h1>
39
+ <button type="button" title="<?php echo $this->__('Enter a New Address') ?>" class="button" onclick="$('add_new_address_flag').value=1; $('checkout_multishipping_form').submit();"><span><span><?php echo $this->__('Enter a New Address') ?></span></span></button>
40
+ </div>
41
+ <input type="hidden" name="continue" value="0" id="can_continue_flag" />
42
+ <input type="hidden" name="new_address" value="0" id="add_new_address_flag" />
43
+ <h2><?php echo $this->__('Please select shipping address for applicable items') ?></h2>
44
+ <table class="data-table" id="multiship-addresses-table">
45
+ <col />
46
+ <col width="1" />
47
+ <col width="1" />
48
+ <col width="1" />
49
+ <thead>
50
+ <tr>
51
+ <th><?php echo $this->__('Product') ?></th>
52
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
53
+ <th><?php echo $this->__('Send To') ?></th>
54
+ <th>&nbsp;</th>
55
+ </tr>
56
+ </thead>
57
+ <tfoot>
58
+ <tr>
59
+ <td colspan="100" class="a-right"><button type="submit" title="<?php echo $this->__('Update Qty &amp; Addresses') ?>" class="button" onclick="$('can_continue_flag').value=0"><span><span><?php echo $this->__('Update Qty &amp; Addresses') ?></span></span></button></td>
60
+ </tr>
61
+ </tfoot>
62
+ <tbody>
63
+ <?php foreach ($this->getItems() as $_index => $_item): ?>
64
+ <?php if ($_item->getQuoteItem()) :?>
65
+ <tr>
66
+ <td><?php echo $this->getItemHtml($_item->getQuoteItem())?></td>
67
+ <td><input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->htmlEscape($_item->getQty()) ?>" size="2" class="input-text qty" /></td>
68
+ <td><?php if ($_item->getProduct()->getIsVirtual()): echo $this->__('Shipping selection is not applicable.'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?></td>
69
+ <td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item') ?>" class="btn-remove2"><?php echo $this->__('Remove Item') ?></a></td>
70
+ </tr>
71
+ <?php endif; ?>
72
+ <?php endforeach; ?>
73
+ </tbody>
74
+ </table>
75
+ <script type="text/javascript">decorateTable('multiship-addresses-table')</script>
76
+ <div class="buttons-set">
77
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Shopping Cart') ?></a></p>
78
+ <button type="submit" title="<?php echo $this->__('Continue to Shipping Information') ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" onclick="$('can_continue_flag').value=1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><span><?php echo $this->__('Continue to Shipping Information') ?></span></span></button>
79
+ </div>
80
+ </div>
81
+ </form>
app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Checkout_Block_Agreements
30
+ */
31
+ ?>
32
+
33
+ <?php if (!$this->getAgreements()) return; ?>
34
+ <ol id="checkout-agreements" class="checkout-agreements">
35
+ <?php foreach ($this->getAgreements() as $_a): ?>
36
+ <li>
37
+ <div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
38
+ <?php if ($_a->getIsHtml()):?>
39
+ <?php echo $_a->getContent() ?>
40
+ <?php else:?>
41
+ <?php echo nl2br($this->htmlEscape($_a->getContent())) ?>
42
+ <?php endif; ?>
43
+ </div>
44
+ <p class="agree">
45
+ <input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $this->htmlEscape($_a->getCheckboxText()) ?></label>
46
+ </p>
47
+ </li>
48
+ <?php endforeach ?>
49
+ </ol>
app/design/frontend/base/default/template/checkout/multishipping/billing.phtml ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Multishipping checkout billing information
30
+ *
31
+ * @see Mage_Checkout_Block_Multishipping_Billing
32
+ */
33
+ ?>
34
+ <div class="multiple-checkout">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Billing Information') ?></h1>
37
+ </div>
38
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <script src="<?php echo Mage::getBaseUrl('js') ?>varien/payment.js" type="text/javascript"></script>
40
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form">
41
+ <div class="col2-set">
42
+ <div class="col-1 col-narrow">
43
+ <div class="box">
44
+ <div class="box-title">
45
+ <h2><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getSelectAddressUrl() ?>"><?php echo $this->__('Change') ?></a></h2>
46
+ </div>
47
+ <div class="box-content">
48
+ <?php $_address=$this->getAddress() ?>
49
+ <address><?php echo $_address->format('html') ?></address>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ <div class="col-2 col-wide">
54
+ <div class="box">
55
+ <div class="box-title">
56
+ <h2><?php echo $this->__('Payment Method') ?></h2>
57
+ </div>
58
+ <div class="box-content">
59
+ <div class="tool-tip" id="payment-tool-tip" style="display:none;">
60
+ <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
61
+ <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
62
+ </div>
63
+ <!-- Payment methods forms list -->
64
+ <dl class="sp-methods">
65
+ <?php
66
+ $_methods = $this->getMethods();
67
+ $_methodsCount = count($_methods);
68
+ ?>
69
+ <?php foreach ($_methods as $_method): $_code = $_method->getCode() ?>
70
+ <dt>
71
+ <?php if ($_methodsCount > 1): ?>
72
+ <input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
73
+ <?php else :?>
74
+ <span class="no-display"><input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio" /></span>
75
+ <?php endif;?>
76
+ <label for="p_method_<?php echo $_code ?>"><?php echo $_method->getTitle() ?></label>
77
+ </dt>
78
+ <?php if($html = $this->getChildHtml('payment.method.'.$_code)) : ?>
79
+ <dd>
80
+ <?php echo $html; ?>
81
+ </dd>
82
+ <?php endif; ?>
83
+ <?php endforeach; ?>
84
+ </dl>
85
+ <?php echo $this->getChildHtml('checkout_billing_items') ?>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <div class="buttons-set">
91
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Shipping Information') ?></a></p>
92
+ <button type="submit" title="<?php echo $this->__('Continue to Review Your Order') ?>" class="button"><span><span><?php echo $this->__('Continue to Review Your Order') ?></span></span></button>
93
+ </div>
94
+ </form>
95
+ <script type="text/javascript">
96
+ //<![CDATA[
97
+ var payment = new paymentForm('multishipping-billing-form');
98
+ function toggleToolTip(event){
99
+ if($('payment-tool-tip')){
100
+ /*$('payment-tool-tip').setStyle({
101
+ top: (Event.pointerY(event)-510)+'px',
102
+ left: (Event.pointerX(event)-800)+'px'
103
+ })*/
104
+ $('payment-tool-tip').toggle();
105
+ }
106
+ Event.stop(event);
107
+ }
108
+ if($('payment-tool-tip-close')){
109
+ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
110
+ }
111
+ $$('.cvv-what-is-this').each(function(element){
112
+ Event.observe(element, 'click', toggleToolTip);
113
+ });
114
+ //]]>
115
+ </script>
116
+ </div>
app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->getQuote()->hasVirtualItems()): ?>
28
+ <div class="col2-set">
29
+ <h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
30
+ <div class="col-1 col-narrow"></div>
31
+ <div class="col-2 col-wide">
32
+ <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
33
+ <table class="data-table" id="unavailable-shipping-table">
34
+ <col />
35
+ <col width="1" />
36
+ <thead>
37
+ <tr>
38
+ <th><?php echo $this->__('Product Name') ?></th>
39
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
40
+ </tr>
41
+ </thead>
42
+ <tbody>
43
+ <?php foreach ($this->getVirtualQuoteItems() as $_item): ?>
44
+ <tr>
45
+ <td><?php echo $this->getItemHtml($_item) ?></td>
46
+ <td class="a-center"><?php echo $_item->getQty() ?></td>
47
+ </tr>
48
+ <?php endforeach; ?>
49
+ </tbody>
50
+ </table>
51
+ <script type="text/javascript">decorateTable('unavailable-shipping-table')</script>
52
+ </div>
53
+ </div>
54
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <h3 class="product-name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->htmlEscape($this->getProductName()) ?></a></h3>
28
+ <?php if ($_options = $this->getOptionList()):?>
29
+ <dl class="item-options">
30
+ <?php foreach ($_options as $_option) : ?>
31
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
32
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
33
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
34
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
35
+ <div class="truncated_full_value">
36
+ <dl class="item-options">
37
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
38
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
39
+ </dl>
40
+ </div>
41
+ <?php endif; ?>
42
+ </dd>
43
+ <?php endforeach; ?>
44
+ </dl>
45
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/multishipping/link.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <a href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo Mage::helper('checkout')->__('Checkout with Multiple Addresses');?>"><?php echo Mage::helper('checkout')->__('Checkout with Multiple Addresses');?></a>
app/design/frontend/base/default/template/checkout/multishipping/overview.phtml ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="multiple-checkout">
28
+ <div class="page-title">
29
+ <h1><?php echo $this->__('Review Order') ?></h1>
30
+ </div>
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" onsubmit="return showLoader();">
33
+ <div class="col2-set">
34
+ <h2 class="legend"><?php echo $this->__('Billing Information') ?></h2>
35
+ <div class="col-1">
36
+ <div class="box">
37
+ <?php $_address=$this->getBillingAddress() ?>
38
+ <div class="box-title">
39
+ <h3><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
40
+ </div>
41
+ <div class="box-content">
42
+ <address>
43
+ <?php echo $_address->format('html') ?>
44
+ </address>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div class="col-2">
49
+ <div class="box">
50
+ <div class="box-title">
51
+ <h3><?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo $this->__('Change') ?></a></h3>
52
+ </div>
53
+ <div class="box-content">
54
+ <input type="hidden" name="payment[cc_number]" value="<?php echo $this->htmlEscape($this->getPayment()->getCcNumber())?>" />
55
+ <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->htmlEscape($this->getPayment()->getCcCid())?>" />
56
+ <?php echo $this->getPaymentHtml() ?>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
62
+ <div class="col2-set">
63
+ <h2 class="legend"><?php echo $this->__('Shipping Information') ?></h2>
64
+ <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?>
65
+ <h3 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getShippingAddressCount()) ?></h3>
66
+ <div class="col-1 col-narrow">
67
+ <div class="box">
68
+ <div class="box-title">
69
+ <h4><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h4>
70
+ </div>
71
+ <div class="box-content">
72
+ <address>
73
+ <?php echo $_address->format('html') ?>
74
+ </address>
75
+ </div>
76
+ </div>
77
+ <div class="box">
78
+ <div class="box-title">
79
+ <h4><?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo $this->__('Change') ?></a></h4>
80
+ </div>
81
+ <div class="box-content">
82
+ <?php if($_rate=$this->getShippingAddressRate($_address)): ?>
83
+ <p>
84
+ <?php echo $_rate->getCarrierTitle() ?> - <?php echo $_rate->getMethodTitle() ?>
85
+ <?php $_excl = $this->getShippingPriceExclTax($_address); ?>
86
+ <?php $_incl = $this->getShippingPriceInclTax($_address); ?>
87
+ <?php echo $_excl; ?>
88
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
89
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
90
+ <?php endif; ?>
91
+ </p>
92
+ <?php endif; ?>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ <div class="col-2 col-wide">
97
+ <h4><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h4>
98
+ <table class="data-table" id="overview-table-<?php echo $_address->getId() ?>">
99
+ <col />
100
+ <col width="1" />
101
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
102
+ <col width="1" />
103
+ <?php endif; ?>
104
+ <col width="1" />
105
+ <col width="1" />
106
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
107
+ <col width="1" />
108
+ <?php endif; ?>
109
+ <thead>
110
+ <tr>
111
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
112
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
113
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
114
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
115
+ </tr>
116
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
117
+ <tr>
118
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
119
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
120
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
121
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
122
+ </tr>
123
+ <?php endif; ?>
124
+ </thead>
125
+ <tfoot>
126
+ <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?>
127
+ </tfoot>
128
+ <tbody>
129
+ <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?>
130
+ <?php echo $this->getRowItemHtml($_item); ?>
131
+ <?php endforeach; ?>
132
+ </tbody>
133
+ </table>
134
+ <script type="text/javascript">decorateTable('overview-table-<?php echo $_address->getId() ?>')</script>
135
+ </div>
136
+ <?php if($this->getShippingAddressCount()!=$_index+1): ?>
137
+ <div class="divider"></div>
138
+ <?php endif; ?>
139
+ <?php endforeach; ?>
140
+ </div>
141
+ <?php if ($this->getQuote()->hasVirtualItems()): ?>
142
+ <div class="col2-set">
143
+ <h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
144
+ <div class="col-1 col-narrow"></div>
145
+ <div class="col-2 col-wide">
146
+ <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
147
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
148
+ <table class="data-table" id="virtual-overview-table">
149
+ <col />
150
+ <col width="1" />
151
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
152
+ <col width="1" />
153
+ <?php endif; ?>
154
+ <col width="1" />
155
+ <col width="1" />
156
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
157
+ <col width="70" />
158
+ <?php endif; ?>
159
+ <thead>
160
+ <tr>
161
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
162
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
163
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
164
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
165
+ </tr>
166
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
167
+ <tr>
168
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
169
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
170
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
171
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
172
+ </tr>
173
+ <?php endif; ?>
174
+ </thead>
175
+ <tfoot>
176
+ <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?>
177
+ </tfoot>
178
+ <tbody>
179
+ <?php foreach ($this->getVirtualItems() as $_item): ?>
180
+ <?php echo $this->getRowItemHtml($_item); ?>
181
+ <?php endforeach; ?>
182
+ </tbody>
183
+ </table>
184
+ <script type="text/javascript">decorateTable('virtual-overview-table')</script>
185
+ </div>
186
+ </div>
187
+ <?php endif; ?>
188
+
189
+ <?php echo $this->getChildHtml('items_after'); ?>
190
+
191
+ <div id="checkout-review-submit">
192
+ <?php echo $this->getChildHtml('agreements') ?>
193
+ <div class="place-order">
194
+ <div class="grand-total">
195
+ <div class="inner">
196
+ <big><?php echo $this->__('Grand Total:') ?> <?php echo $this->helper('checkout')->formatPrice($this->getTotal()) ?></big>
197
+ <div id="review-buttons-container">
198
+ <button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" id="review-button"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ <span class="please-wait" id="review-please-wait" style="display:none;">
203
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
204
+ </span>
205
+ </div>
206
+ </div>
207
+ <div class="buttons-set">
208
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Billing Information') ?></a></p>
209
+ </div>
210
+ </form>
211
+ <script type="text/javascript">
212
+ //<![CDATA[
213
+ var submitted = false;
214
+
215
+ function showLoader()
216
+ {
217
+ if (submitted) {
218
+ return false;
219
+ }
220
+ if ($('checkout-agreements')) {
221
+ var checkboxes = $$('#checkout-agreements input');
222
+ for (var i=0, l=checkboxes.length; i<l; i++) {
223
+ if (!checkboxes[i].checked) {
224
+ alert("<?php echo $this->__('Please agree to all Terms and Conditions before placing the orders.')?>");
225
+ return false;
226
+ }
227
+ }
228
+ }
229
+
230
+ submitted = true;
231
+ var step='review';
232
+ Element.show(step+'-please-wait');
233
+ $(step+'-buttons-container').setStyle({opacity:.5});
234
+ $(step+'-buttons-container').descendants().each(function(s) {
235
+ s.disabled = true;
236
+ });
237
+ return true;
238
+ }
239
+ //]]>
240
+ </script>
241
+ </div>
app/design/frontend/base/default/template/checkout/multishipping/overview/item.phtml ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Quote Item row html
30
+ *
31
+ * @see Mage_Checkout_Block_Cart_Item_Renderer
32
+ */
33
+ ?>
34
+ <?php $_item = $this->getItem() ?>
35
+ <tr>
36
+ <td><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td>
37
+
38
+ <!--- Excluding Tax -->
39
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
40
+ <td class="a-right">
41
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
42
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
43
+ <?php else: ?>
44
+ <div class="cart-price">
45
+ <?php endif; ?>
46
+
47
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
48
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
49
+ <?php else: ?>
50
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
51
+ <?php endif; ?>
52
+
53
+ </div>
54
+
55
+
56
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
57
+
58
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
59
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
60
+ <small>
61
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
62
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
63
+ <?php endforeach; ?>
64
+ </small>
65
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
66
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
67
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
68
+ <?php endforeach; ?>
69
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
70
+ <small>
71
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
72
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
73
+ <?php endforeach; ?>
74
+ </small>
75
+ <?php endif; ?>
76
+ </div>
77
+
78
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
79
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
80
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
81
+ </div>
82
+ <?php endif; ?>
83
+ <?php endif; ?>
84
+ </td>
85
+ <?php endif; ?>
86
+ <!--- // Excluding Tax -->
87
+
88
+ <!--- Including Tax -->
89
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
90
+ <td>
91
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
92
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
93
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
94
+ <?php else: ?>
95
+ <div class="cart-price">
96
+ <?php endif; ?>
97
+
98
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
99
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
100
+ <?php else: ?>
101
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
102
+ <?php endif; ?>
103
+
104
+ </div>
105
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
106
+
107
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
108
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
109
+ <small>
110
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
111
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
112
+ <?php endforeach; ?>
113
+ </small>
114
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
115
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
116
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
117
+ <?php endforeach; ?>
118
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
119
+ <small>
120
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
121
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
122
+ <?php endforeach; ?>
123
+ </small>
124
+ <?php endif; ?>
125
+ </div>
126
+
127
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
128
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
129
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
130
+ </div>
131
+ <?php endif; ?>
132
+ <?php endif; ?>
133
+
134
+ </td>
135
+ <?php endif; ?>
136
+ <!--- // Including Tax -->
137
+
138
+ <td class="a-center"><?php echo $_item->getQty()*1 ?></td>
139
+
140
+ <!--- Excluding Tax Subtotal -->
141
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
142
+ <td class="a-right">
143
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
144
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
145
+ <?php else: ?>
146
+ <div class="cart-price">
147
+ <?php endif; ?>
148
+
149
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
150
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
151
+ <?php else: ?>
152
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
153
+ <?php endif; ?>
154
+
155
+ </div>
156
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
157
+
158
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
159
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
160
+ <small>
161
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
162
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
163
+ <?php endforeach; ?>
164
+ </small>
165
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
166
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
167
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
168
+ <?php endforeach; ?>
169
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
170
+ <small>
171
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
172
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
173
+ <?php endforeach; ?>
174
+ </small>
175
+ <?php endif; ?>
176
+ </div>
177
+
178
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
179
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
180
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
181
+ </div>
182
+ <?php endif; ?>
183
+ <?php endif; ?>
184
+ </td>
185
+ <?php endif; ?>
186
+ <!--- //Excluding Tax Subtotal -->
187
+
188
+ <!--- Including Tax Subtotal -->
189
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
190
+ <td>
191
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
192
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
193
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
194
+ <?php else: ?>
195
+ <div class="cart-price">
196
+ <?php endif; ?>
197
+
198
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
199
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
200
+ <?php else: ?>
201
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
202
+ <?php endif; ?>
203
+
204
+ </div>
205
+
206
+
207
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
208
+
209
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
210
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
211
+ <small>
212
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
213
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
214
+ <?php endforeach; ?>
215
+ </small>
216
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
217
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
218
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
219
+ <?php endforeach; ?>
220
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
221
+ <small>
222
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
223
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
224
+ <?php endforeach; ?>
225
+ </small>
226
+ <?php endif; ?>
227
+ </div>
228
+
229
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
230
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
231
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
232
+ </div>
233
+ <?php endif; ?>
234
+ <?php endif; ?>
235
+ </td>
236
+ <?php endif; ?>
237
+ <!--- //Including Tax Subtotal -->
238
+ </tr>
app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Multishipping checkout shipping template
30
+ *
31
+ * @see Mage_Checkout_Block_Multishipping_Shipping
32
+ */
33
+ ?>
34
+ <div class="multiple-checkout">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Select Shipping Method') ?></h1>
37
+ </div>
38
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form">
40
+ <?php foreach ($this->getAddresses() as $_index => $_address): ?>
41
+ <div class="col2-set">
42
+ <h2 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getAddressCount()) ?></h2>
43
+ <div class="col-1 col-narrow">
44
+ <div class="box">
45
+ <div class="box-title">
46
+ <h3><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressEditUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
47
+ </div>
48
+ <div class="box-content">
49
+ <address><?php echo $_address->format('html') ?></address>
50
+ </div>
51
+ </div>
52
+ <div class="box box-sp-methods">
53
+ <div class="pointer"></div>
54
+ <div class="box-title">
55
+ <h3><?php echo $this->__('Shipping Method') ?></h3>
56
+ </div>
57
+ <div class="box-content">
58
+ <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?>
59
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
60
+ <?php else: ?>
61
+ <dl class="sp-methods">
62
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
63
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
64
+ <dd>
65
+ <ul>
66
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
67
+ <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"' ?>>
68
+ <?php if ($_rate->getErrorMessage()): ?>
69
+ <?php echo $_rate->getCarrierTitle() ?>: <?php echo $_rate->getErrorMessage() ?>
70
+ <?php else: ?>
71
+ <?php if ($_sole) : ?>
72
+ <span class="no-display"><input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->htmlEscape($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" checked="checked"/></span>
73
+ <?php else: ?>
74
+ <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->htmlEscape($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" />
75
+ <?php endif; ?>
76
+ <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
77
+ <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
78
+ <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?>
79
+ <?php echo $_excl; ?>
80
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
81
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
82
+ <?php endif; ?>
83
+ </label>
84
+ <?php endif ?>
85
+ </li>
86
+ <?php endforeach; ?>
87
+ </ul>
88
+ </dd>
89
+ <?php endforeach; ?>
90
+ </dl>
91
+ <?php endif; ?>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <div class="col-2 col-wide">
96
+ <?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?>
97
+ <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getItemsEditUrl($_address) ?>"><?php echo $this->__('Edit Items') ?></a></h3>
98
+ <table class="data-table" id="shipping-table-<?php echo $_address->getId() ?>">
99
+ <col />
100
+ <col width="1" />
101
+ <thead>
102
+ <tr>
103
+ <th><?php echo $this->__('Product Name') ?></th>
104
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
105
+ </tr>
106
+ </thead>
107
+ <tbody>
108
+ <?php foreach ($this->getAddressItems($_address) as $_item): ?>
109
+ <tr>
110
+ <td>
111
+ <?php echo $this->getItemHtml($_item->getQuoteItem()) ?>
112
+ </td>
113
+ <td class="a-center"><?php echo $_item->getQty() ?></td>
114
+ </tr>
115
+ <?php endforeach; ?>
116
+ </tbody>
117
+ </table>
118
+ <script type="text/javascript">decorateTable('shipping-table-<?php echo $_address->getId() ?>')</script>
119
+ <?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?>
120
+ </div>
121
+ </div>
122
+ <?php endforeach; ?>
123
+ <?php echo $this->getChildHtml('checkout_billing_items') ?>
124
+ <div class="buttons-set">
125
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Select Addresses') ?></a></p>
126
+ <button type="submit" title="<?php echo $this->__('Continue to Billing Information') ?>" class="button"><span><span><?php echo $this->__('Continue to Billing Information') ?></span></span></button>
127
+ </div>
128
+ </form>
129
+ </div>
app/design/frontend/base/default/template/checkout/multishipping/state.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * Mustishipping state
30
+ *
31
+ * @see Mage_Checkout_Block_Multishipping_State
32
+ */
33
+ ?>
34
+ <ul class="checkout-progress" id="checkout-progress-state">
35
+ <?php foreach ($this->getSteps() as $_step): ?>
36
+ <li title="<?php echo $_step->getLabel() ?>"<?php if($_step->getIsActive()): ?> class="active"<?php endif; ?>><span><?php echo $_step->getLabel() ?></span></li>
37
+ <?php endforeach; ?>
38
+ </ul>
39
+ <script type="text/javascript">decorateGeneric($$('#checkout-progress-state li'), ['first','last']);</script>
app/design/frontend/base/default/template/checkout/multishipping/success.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="multiple-checkout">
28
+ <div class="page-title">
29
+ <h1><?php echo $this->__('Order Success') ?></h1>
30
+ </div>
31
+ <h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
32
+ <p><?php echo $this->__('We are processing your order and you will soon receive an email with details of the order. Once the order has shipped you will receive another email with a link to track its progress.') ?></p>
33
+ <?php if($_orderIds = $this->getOrderIds()): ?>
34
+ <p>
35
+ <?php $flag = false ?>
36
+ <?php echo $this->__('Your order number is ') ?>
37
+ <?php foreach ($_orderIds as $orderId=>$incrementId): ?>
38
+ <?php if ($flag): ?>
39
+ <?php echo ', ' ?>
40
+ <?php endif; ?>
41
+ <?php $flag = true ?>
42
+ <a href="<?php echo $this->getViewOrderUrl($orderId) ?>"><?php echo $incrementId ?></a>
43
+ <?php endforeach; ?>
44
+ </p>
45
+ <?php endif; ?>
46
+ <?php echo $this->getChildHtml() ?>
47
+ <div class="buttons-set">
48
+ <button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button" onclick="setLocation('<?php echo $this->getContinueUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
49
+ </div>
50
+ </div>
app/design/frontend/base/default/template/checkout/onepage.phtml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Checkout') ?></h1>
29
+ </div>
30
+ <script type="text/javascript" src="<?php echo $this->getJsUrl('varien/accordion.js') ?>"></script>
31
+ <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout.js') ?>"></script>
32
+ <script type="text/javascript">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
33
+ <ol class="opc" id="checkoutSteps">
34
+ <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
35
+ <?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
36
+ <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">
37
+ <div class="step-title">
38
+ <span class="number"><?php echo $i ?></span>
39
+ <h2><?php echo $_stepInfo['label'] ?></h2>
40
+ <a href="#"><?php echo $this->__('Edit') ?></a>
41
+ </div>
42
+ <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;">
43
+ <?php echo $this->getChildHtml($_stepId) ?>
44
+ </div>
45
+ </li>
46
+ <?php endforeach ?>
47
+ </ol>
48
+ <script type="text/javascript">
49
+ //<![CDATA[
50
+ var accordion = new Accordion('checkoutSteps', '.step-title', true);
51
+ <?php if($this->getActiveStep()): ?>
52
+ accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
53
+ <?php endif ?>
54
+ var checkout = new Checkout(accordion,{
55
+ progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
56
+ review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
57
+ saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
58
+ failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
59
+ );
60
+ //]]>
61
+ </script>
app/design/frontend/base/default/template/checkout/onepage/agreements.phtml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Checkout_Block_Agreements
30
+ */
31
+ ?>
32
+
33
+ <?php if (!$this->getAgreements()) return; ?>
34
+ <form action="" id="checkout-agreements" onsubmit="return false;">
35
+ <ol class="checkout-agreements">
36
+ <?php foreach ($this->getAgreements() as $_a): ?>
37
+ <li>
38
+ <div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
39
+ <?php if ($_a->getIsHtml()):?>
40
+ <?php echo $_a->getContent() ?>
41
+ <?php else:?>
42
+ <?php echo nl2br($this->htmlEscape($_a->getContent())) ?>
43
+ <?php endif; ?>
44
+ </div>
45
+ <p class="agree">
46
+ <input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->htmlEscape($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $this->htmlEscape($_a->getCheckboxText()) ?></label>
47
+ </p>
48
+ </li>
49
+ <?php endforeach ?>
50
+ </ol>
51
+ </form>
app/design/frontend/base/default/template/checkout/onepage/billing.phtml ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="co-billing-form" action="">
28
+ <fieldset>
29
+ <ul class="form-list">
30
+ <?php if ($this->customerHasAddresses()): ?>
31
+ <li class="wide">
32
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
+ <div class="input-box">
34
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
+ </div>
36
+ </li>
37
+ <?php endif; ?>
38
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
+ <fieldset>
40
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
+ <ul>
42
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
43
+ <li class="fields">
44
+ <div class="field">
45
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
+ <div class="input-box">
47
+ <input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
48
+ </div>
49
+ </div>
50
+ <?php if(!$this->isCustomerLoggedIn()): ?>
51
+ <div class="field">
52
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
+ <div class="input-box">
54
+ <input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
55
+ </div>
56
+ </div>
57
+ <?php endif ?>
58
+ </li>
59
+ <li class="wide">
60
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
61
+ <div class="input-box">
62
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
63
+ </div>
64
+ </li>
65
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
66
+ <li class="wide">
67
+ <div class="input-box">
68
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
69
+ </div>
70
+ </li>
71
+ <?php endfor ?>
72
+ <li class="fields">
73
+ <div class="field">
74
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
75
+ <div class="input-box">
76
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
77
+ </div>
78
+ </div>
79
+ <div class="field">
80
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
81
+ <div class="input-box">
82
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
83
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
84
+ </select>
85
+ <script type="text/javascript">
86
+ //<![CDATA[
87
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
88
+ //]]>
89
+ </script>
90
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
91
+ </div>
92
+ </div>
93
+ </li>
94
+ <li class="fields">
95
+ <div class="field">
96
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
97
+ <div class="input-box">
98
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
99
+ </div>
100
+ </div>
101
+ <div class="field">
102
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
103
+ <div class="input-box">
104
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
105
+ </div>
106
+ </div>
107
+ </li>
108
+ <li class="fields">
109
+ <div class="field">
110
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
111
+ <div class="input-box">
112
+ <input type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
113
+ </div>
114
+ </div>
115
+ <div class="field">
116
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
117
+ <div class="input-box">
118
+ <input type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
119
+ </div>
120
+ </div>
121
+ </li>
122
+ <?php if(!$this->isCustomerLoggedIn()): ?>
123
+
124
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
125
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
126
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
127
+ <li class="fields">
128
+ <?php if ($_dob->isEnabled()): ?>
129
+ <div class="field">
130
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
131
+ </div>
132
+ <?php endif; ?>
133
+ <?php if ($_gender->isEnabled()): ?>
134
+ <div class="field">
135
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
136
+ </div>
137
+ <?php endif ?>
138
+ </li>
139
+ <?php endif ?>
140
+
141
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
142
+ <?php if ($_taxvat->isEnabled()): ?>
143
+ <li>
144
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
145
+ </li>
146
+ <?php endif ?>
147
+
148
+ <li class="fields" id="register-customer-password">
149
+ <div class="field">
150
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
151
+ <div class="input-box">
152
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
153
+ </div>
154
+ </div>
155
+ <div class="field">
156
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
157
+ <div class="input-box">
158
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
159
+ </div>
160
+ </div>
161
+ </li>
162
+ <?php endif; ?>
163
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
164
+ <li class="control">
165
+ <input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
166
+ </li>
167
+ <?php else:?>
168
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
169
+ <?php endif; ?>
170
+ </ul>
171
+ </fieldset>
172
+ </li>
173
+ <?php if ($this->canShip()): ?>
174
+ <li class="control">
175
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
176
+ <li class="control">
177
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
178
+ </li>
179
+ <?php endif; ?>
180
+ </ul>
181
+ <?php if (!$this->canShip()): ?>
182
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
183
+ <?php endif; ?>
184
+ <div class="buttons-set" id="billing-buttons-container">
185
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
186
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
187
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
188
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
189
+ </span>
190
+ </div>
191
+ </fieldset>
192
+ </form>
193
+ <script type="text/javascript">
194
+ //<![CDATA[
195
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
196
+ var billingForm = new VarienForm('co-billing-form');
197
+
198
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
199
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
200
+
201
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
202
+ //]]>
203
+ </script>
app/design/frontend/base/default/template/checkout/onepage/failure.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('An error occurred in the process of payment') ?></h1>
29
+ </div>
30
+ <?php if ($this->getRealOrderId()) : ?><p><?php echo $this->__('Order #') . $this->getRealOrderId() ?></p><?php endif ?>
31
+ <?php if ($error = $this->getErrorMessage()) : ?><p><?php echo $error ?></p><?php endif ?>
32
+ <p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
app/design/frontend/base/default/template/checkout/onepage/link.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if ($this->isPossibleOnepageCheckout()):?>
28
+ <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
29
+ <?php endif?>
app/design/frontend/base/default/template/checkout/onepage/login.phtml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col2-set">
28
+ <?php echo $this->getChildHtml('login_before')?>
29
+ <div class="col-1">
30
+ <h3><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h3>
31
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
32
+ <p><?php echo $this->__('Register with us for future convenience:') ?></p>
33
+ <?php else: ?>
34
+ <p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
35
+ <?php echo $this->__('Register with us for future convenience:') ?></p>
36
+ <ul>
37
+ <li><?php echo $this->__('Fast and easy check out') ?></li>
38
+ <li><?php echo $this->__('Easy access to your order history and status') ?></li>
39
+ </ul>
40
+ <?php endif; ?>
41
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
42
+ <ul class="form-list">
43
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
44
+ <li class="control">
45
+ <input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
46
+ </li>
47
+ <?php endif; ?>
48
+ <li class="control">
49
+ <input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
50
+ </li>
51
+ </ul>
52
+ <h4><?php echo $this->__('Register and save time!') ?></h4>
53
+ <p><?php echo $this->__('Register with us for future convenience:') ?></p>
54
+ <ul class="ul">
55
+ <li><?php echo $this->__('Fast and easy check out') ?></li>
56
+ <li><?php echo $this->__('Easy access to your order history and status') ?></li>
57
+ </ul>
58
+ <?php else: ?>
59
+ <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
60
+ <?php endif; ?>
61
+ </div>
62
+ <div class="col-2">
63
+ <h3><?php echo $this->__('Login') ?></h3>
64
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
65
+ <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
66
+ <fieldset>
67
+ <h4><?php echo $this->__('Already registered?') ?></h4>
68
+ <p><?php echo $this->__('Please log in below:') ?></p>
69
+ <ul class="form-list">
70
+ <li>
71
+ <label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
72
+ <div class="input-box">
73
+ <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" />
74
+ </div>
75
+ </li>
76
+ <li>
77
+ <label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
78
+ <div class="input-box">
79
+ <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
80
+ </div>
81
+ </li>
82
+ </ul>
83
+ </fieldset>
84
+ </form>
85
+ </div>
86
+ </div>
87
+ <div class="col2-set">
88
+ <div class="col-1">
89
+ <div class="buttons-set">
90
+ <p class="required">&nbsp;</p>
91
+ <button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
92
+ </div>
93
+ </div>
94
+ <div class="col-2">
95
+ <div class="buttons-set">
96
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
97
+ <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
98
+ <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <script type="text/javascript">
103
+ //<![CDATA[
104
+ var loginForm = new VarienForm('login-form', true);
105
+ $('login-email').observe('keypress', bindLoginPost);
106
+ $('login-password').observe('keypress', bindLoginPost);
107
+ function bindLoginPost(evt){
108
+ if (evt.keyCode == Event.KEY_RETURN) {
109
+ loginForm.submit();
110
+ }
111
+ }
112
+ function onepageLogin(button)
113
+ {
114
+ if(loginForm.validator && loginForm.validator.validate()){
115
+ button.disabled = true;
116
+ loginForm.submit();
117
+ }
118
+ }
119
+ //]]>
120
+ </script>
app/design/frontend/base/default/template/checkout/onepage/payment.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <script type="text/javascript">
28
+ //<![CDATA[
29
+ var payment = new Payment('co-payment-form', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
30
+ //]]>
31
+ </script>
32
+ <form action="" id="co-payment-form">
33
+ <fieldset>
34
+ <?php echo $this->getChildHtml('methods') ?>
35
+ </fieldset>
36
+ </form>
37
+ <div class="tool-tip" id="payment-tool-tip" style="display:none;">
38
+ <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
39
+ <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
40
+ </div>
41
+ <div class="buttons-set" id="payment-buttons-container">
42
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
43
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
44
+ <button type="button" class="button" onclick="payment.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
45
+ <span class="please-wait" id="payment-please-wait" style="display:none;">
46
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
47
+ </span>
48
+ </div>
49
+ <script type="text/javascript">
50
+ //<![CDATA[
51
+ function toggleToolTip(event){
52
+ if($('payment-tool-tip')){
53
+ $('payment-tool-tip').setStyle({
54
+ top: (Event.pointerY(event)-560)+'px'//,
55
+ //left: (Event.pointerX(event)+100)+'px'
56
+ })
57
+ $('payment-tool-tip').toggle();
58
+ }
59
+ Event.stop(event);
60
+ }
61
+ if($('payment-tool-tip-close')){
62
+ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
63
+ }
64
+ //]]>
65
+ </script>
66
+ <script type="text/javascript">
67
+ //<![CDATA[
68
+ payment.currentMethod = "<?php echo $this->getChild('methods')->getSelectedMethodCode() ?>";
69
+ //]]>
70
+ </script>
app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * One page checkout payment methods
30
+ *
31
+ * @see Mage_Checkout_Block_Onepage_Payment_Methods
32
+ */
33
+ ?>
34
+ <dl class="sp-methods" id="checkout-payment-method-load">
35
+ <?php foreach ($this->getMethods() as $_method): $_code = $_method->getCode() ?>
36
+ <dt>
37
+ <?php if( sizeof($this->getMethods()) > 1 ): ?>
38
+ <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->htmlEscape($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
39
+ <?php else: ?>
40
+ <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
41
+ <?php endif; ?>
42
+ <label for="p_method_<?php echo $_code ?>"><?php echo $this->getMethodTitle($_method) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
43
+ </dt>
44
+ <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
45
+ <dd>
46
+ <?php echo $html; ?>
47
+ </dd>
48
+ <?php endif; ?>
49
+ <?php endforeach; ?>
50
+ </dl>
51
+ <?php echo $this->getChildChildHtml('additional'); ?>
52
+ <script type="text/javascript">
53
+ //<![CDATA[
54
+ <?php echo $this->getChildChildHtml('scripts'); ?>
55
+ payment.init();
56
+ //]]>
57
+ </script>
app/design/frontend/base/default/template/checkout/onepage/progress.phtml ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-progress opc-block-progress">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('Your Checkout Progress') ?></span></strong>
30
+ </div>
31
+ <div class="block-content">
32
+ <dl>
33
+ <?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?>
34
+ <?php if($this->getCheckout()->getStepData('billing', 'complete')): ?>
35
+ <dt class="complete">
36
+ <?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="#billing" onclick="checkout.accordion.openSection('opc-billing'); return false;"><?php echo $this->__('Change') ?></a>
37
+ </dt>
38
+ <dd class="complete">
39
+ <address><?php echo $this->getBilling()->format('html') ?></address>
40
+ </dd>
41
+ <?php else: ?>
42
+ <dt>
43
+ <?php echo $this->__('Billing Address') ?>
44
+ </dt>
45
+ <?php endif; ?>
46
+ <?php endif; ?>
47
+
48
+ <?php if ($this->getCheckout()->getStepData('shipping', 'is_show')): ?>
49
+ <?php if($this->getCheckout()->getStepData('shipping', 'complete')): ?>
50
+ <dt class="complete">
51
+ <?php echo $this->__('Shipping Address') ?> <span class="separator">|</span> <a href="#payment" onclick="checkout.accordion.openSection('opc-shipping');return false;"><?php echo $this->__('Change') ?></a>
52
+ </dt>
53
+ <dd class="complete">
54
+ <address><?php echo $this->getShipping()->format('html') ?></address>
55
+ </dd>
56
+ <?php else: ?>
57
+ <dt>
58
+ <?php echo $this->__('Shipping Address') ?>
59
+ </dt>
60
+ <?php endif; ?>
61
+ <?php endif; ?>
62
+
63
+ <?php if ($this->getCheckout()->getStepData('shipping_method', 'is_show')): ?>
64
+ <?php if($this->getCheckout()->getStepData('shipping_method', 'complete')): ?>
65
+ <dt class="complete">
66
+ <?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="#shipping_method" onclick="checkout.accordion.openSection('opc-shipping_method'); return false;"><?php echo $this->__('Change') ?></a>
67
+ </dt>
68
+ <dd class="complete">
69
+ <?php if ($this->getShippingMethod()): ?>
70
+ <?php echo $this->getShippingDescription() ?>
71
+
72
+ <?php $_excl = $this->getShippingPriceExclTax(); ?>
73
+ <?php $_incl = $this->getShippingPriceInclTax(); ?>
74
+ <?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
75
+ <?php echo $_incl; ?>
76
+ <?php else: ?>
77
+ <?php echo $_excl; ?>
78
+ <?php endif; ?>
79
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
80
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
81
+ <?php endif; ?>
82
+
83
+ <?php else: ?>
84
+ <?php echo $this->__('Shipping method has not been selected yet') ?>
85
+ <?php endif; ?>
86
+ </dd>
87
+ <?php else: ?>
88
+ <dt>
89
+ <?php echo $this->__('Shipping Method') ?>
90
+ </dt>
91
+ <?php endif; ?>
92
+ <?php endif; ?>
93
+
94
+ <?php if ($this->getCheckout()->getStepData('payment', 'is_show')): ?>
95
+ <?php if($this->getCheckout()->getStepData('payment', 'complete')): ?>
96
+ <dt class="complete">
97
+ <?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="#payment" onclick="checkout.accordion.openSection('opc-payment'); return false;"><?php echo $this->__('Change') ?></a>
98
+ </dt>
99
+ <dd class="complete">
100
+ <?php echo $this->getPaymentHtml() ?>
101
+ </dd>
102
+ <?php else: ?>
103
+ <dt>
104
+ <?php echo $this->__('Payment Method') ?>
105
+ </dt>
106
+ <?php endif; ?>
107
+ <?php endif; ?>
108
+ </dl>
109
+ </div>
110
+ </div>
app/design/frontend/base/default/template/checkout/onepage/review.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="order-review" id="checkout-review-load">
28
+ <?php echo $this->getChildHtml('info') ?>
29
+ </div>
app/design/frontend/base/default/template/checkout/onepage/review/button.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="review.save();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
app/design/frontend/base/default/template/checkout/onepage/review/info.phtml ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php echo $this->getChildHtml('items_before'); ?>
28
+ <div id="checkout-review-table-wrapper">
29
+ <table class="data-table" id="checkout-review-table">
30
+ <?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
31
+ <col />
32
+ <col width="1" />
33
+ <col width="1" />
34
+ <col width="1" />
35
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
36
+ <col width="1" />
37
+ <col width="1" />
38
+ <?php endif; ?>
39
+ <thead>
40
+ <tr>
41
+ <th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
42
+ <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
43
+ <th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
44
+ <th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
45
+ </tr>
46
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
47
+ <tr>
48
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
49
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
50
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
51
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
52
+ </tr>
53
+ <?php endif; ?>
54
+ </thead>
55
+ <?php echo $this->getChildHtml('totals'); ?>
56
+ <tbody>
57
+ <?php foreach($this->getItems() as $_item): ?>
58
+ <?php echo $this->getItemHtml($_item)?>
59
+ <?php endforeach ?>
60
+ </tbody>
61
+ </table>
62
+ </div>
63
+ <?php echo $this->getChildHtml('items_after'); ?>
64
+ <script type="text/javascript">
65
+ //<![CDATA[
66
+ decorateTable('checkout-review-table');
67
+ truncateOptions();
68
+ //]]>
69
+ </script>
70
+ <div id="checkout-review-submit">
71
+ <?php echo $this->getChildHtml('agreements') ?>
72
+ <div class="buttons-set" id="review-buttons-container">
73
+ <p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
74
+ <?php echo $this->getChildHtml('button') ?>
75
+ <span class="please-wait" id="review-please-wait" style="display:none;">
76
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
77
+ </span>
78
+ </div>
79
+ <script type="text/javascript">
80
+ //<![CDATA[
81
+ review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
82
+ //]]>
83
+ </script>
84
+ </div>
app/design/frontend/base/default/template/checkout/onepage/review/item.phtml ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php $_item = $this->getItem()?>
28
+ <tr>
29
+ <td><h3 class="product-name"><?php echo $this->htmlEscape($this->getProductName()) ?></h3>
30
+ <?php if ($_options = $this->getOptionList()):?>
31
+ <dl class="item-options">
32
+ <?php foreach ($_options as $_option) : ?>
33
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
34
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
35
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
36
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
37
+ <div class="truncated_full_value">
38
+ <dl class="item-options">
39
+ <dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
40
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
41
+ </dl>
42
+ </div>
43
+ <?php endif; ?>
44
+ </dd>
45
+ <?php endforeach; ?>
46
+ </dl>
47
+ <?php endif;?>
48
+ <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
49
+ <?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
50
+ <?php endif;?>
51
+ </td>
52
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
53
+ <td class="a-right">
54
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
55
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
56
+ <?php else: ?>
57
+ <span class="cart-price">
58
+ <?php endif; ?>
59
+
60
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
61
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
62
+ <?php else: ?>
63
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
64
+ <?php endif; ?>
65
+
66
+ </span>
67
+
68
+
69
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
70
+
71
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
72
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
73
+ <small>
74
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
75
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
76
+ <?php endforeach; ?>
77
+ </small>
78
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
79
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
80
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
81
+ <?php endforeach; ?>
82
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
83
+ <small>
84
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
85
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
86
+ <?php endforeach; ?>
87
+ </small>
88
+ <?php endif; ?>
89
+ </div>
90
+
91
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
92
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
93
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
94
+ </div>
95
+ <?php endif; ?>
96
+ <?php endif; ?>
97
+ </td>
98
+ <?php endif; ?>
99
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
100
+ <td>
101
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
102
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
103
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
104
+ <?php else: ?>
105
+ <span class="cart-price">
106
+ <?php endif; ?>
107
+
108
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
109
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
110
+ <?php else: ?>
111
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
112
+ <?php endif; ?>
113
+
114
+ </span>
115
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
116
+
117
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
118
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
119
+ <small>
120
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
121
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
122
+ <?php endforeach; ?>
123
+ </small>
124
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
125
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
126
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
127
+ <?php endforeach; ?>
128
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
129
+ <small>
130
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
131
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
132
+ <?php endforeach; ?>
133
+ </small>
134
+ <?php endif; ?>
135
+ </div>
136
+
137
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
138
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
139
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
140
+ </div>
141
+ <?php endif; ?>
142
+ <?php endif; ?>
143
+ </td>
144
+ <?php endif; ?>
145
+ <td class="a-center"><?php echo $_item->getQty() ?></td>
146
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
147
+ <td class="a-right">
148
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
149
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
150
+ <?php else: ?>
151
+ <span class="cart-price">
152
+ <?php endif; ?>
153
+
154
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
155
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
156
+ <?php else: ?>
157
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
158
+ <?php endif; ?>
159
+
160
+ </span>
161
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
162
+
163
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
164
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
165
+ <small>
166
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
167
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
168
+ <?php endforeach; ?>
169
+ </small>
170
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
171
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
172
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
173
+ <?php endforeach; ?>
174
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
175
+ <small>
176
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
177
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
178
+ <?php endforeach; ?>
179
+ </small>
180
+ <?php endif; ?>
181
+ </div>
182
+
183
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
184
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
185
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
186
+ </div>
187
+ <?php endif; ?>
188
+ <?php endif; ?>
189
+ </td>
190
+ <?php endif; ?>
191
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
192
+ <td>
193
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
194
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
195
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
196
+ <?php else: ?>
197
+ <span class="cart-price">
198
+ <?php endif; ?>
199
+
200
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
201
+ <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
202
+ <?php else: ?>
203
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
204
+ <?php endif; ?>
205
+
206
+ </span>
207
+
208
+
209
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
210
+
211
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
212
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
213
+ <small>
214
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
215
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
216
+ <?php endforeach; ?>
217
+ </small>
218
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
219
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
220
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
221
+ <?php endforeach; ?>
222
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
223
+ <small>
224
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
225
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
226
+ <?php endforeach; ?>
227
+ </small>
228
+ <?php endif; ?>
229
+ </div>
230
+
231
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
232
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
233
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
234
+ </div>
235
+ <?php endif; ?>
236
+ <?php endif; ?>
237
+ </td>
238
+ <?php endif; ?>
239
+ </tr>
app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * @see Mage_Checkout_Block_Cart_Totals
29
+ */
30
+ ?>
31
+ <?php if ($this->getTotals()): ?>
32
+ <tfoot>
33
+ <?php $_colspan = $this->helper('tax')->displayCartBothPrices() ? 5 : 3; ?>
34
+ <?php echo $this->renderTotals(null, $_colspan); ?>
35
+ <?php echo $this->renderTotals('footer', $_colspan); ?>
36
+ <?php if ($this->needDisplayBaseGrandtotal()):?>
37
+ <tr>
38
+ <td class="a-right" colspan="<?php echo $_colspan; ?>">
39
+ <small><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></small>
40
+ </td>
41
+ <td class="a-right">
42
+ <small><?php echo $this->displayBaseGrandtotal() ?></small>
43
+ </td>
44
+ </tr>
45
+ <?php endif?>
46
+ </tfoot>
47
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/onepage/shipping.phtml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form action="" id="co-shipping-form">
28
+ <ul class="form-list">
29
+ <?php if ($this->customerHasAddresses()): ?>
30
+ <li class="wide">
31
+ <label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
32
+ <div class="input-box">
33
+ <?php echo $this->getAddressesHtmlSelect('shipping') ?>
34
+ </div>
35
+ </li>
36
+ <?php endif ?>
37
+ <li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
38
+ <fieldset>
39
+ <input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
40
+ <ul>
41
+ <li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
42
+ <li class="fields">
43
+ <div class="fields">
44
+ <label for="shipping:company"><?php echo $this->__('Company') ?></label>
45
+ <div class="input-box">
46
+ <input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" onchange="shipping.setSameAsBilling(false);" />
47
+ </div>
48
+ </div>
49
+ <?php if(false): ?>
50
+ <div class="fields">
51
+ <label for="shipping:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
52
+ <div class="input-box">
53
+ <input type="text" name="shipping[email]" id="shipping:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
54
+ </div>
55
+ </div>
56
+ <?php endif ?>
57
+ </li>
58
+ <li class="wide">
59
+ <label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
60
+ <div class="input-box">
61
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" onchange="shipping.setSameAsBilling(false);" />
62
+ </div>
63
+ </li>
64
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
65
+ <li class="wide">
66
+ <div class="input-box">
67
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" onchange="shipping.setSameAsBilling(false);" />
68
+ </div>
69
+ </li>
70
+ <?php endfor ?>
71
+ <li class="fields">
72
+ <div class="field">
73
+ <label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
74
+ <div class="input-box">
75
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
76
+ </div>
77
+ </div>
78
+ <div class="field">
79
+ <label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
80
+ <div class="input-box">
81
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
82
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
83
+ </select>
84
+ <script type="text/javascript">
85
+ //<![CDATA[
86
+ $('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
87
+ //]]>
88
+ </script>
89
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
90
+ </div>
91
+ </div>
92
+ </li>
93
+ <li class="fields">
94
+ <div class="field">
95
+ <label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
96
+ <div class="input-box">
97
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" onchange="shipping.setSameAsBilling(false);" />
98
+ </div>
99
+ </div>
100
+ <div class="field">
101
+ <label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
102
+ <div class="input-box">
103
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
104
+ </div>
105
+ </div>
106
+ </li>
107
+ <li class="fields">
108
+ <div class="field">
109
+ <label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
110
+ <div class="input-box">
111
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
112
+ </div>
113
+ </div>
114
+ <div class="field">
115
+ <label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
116
+ <div class="input-box">
117
+ <input type="text" name="shipping[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
118
+ </div>
119
+ </div>
120
+ </li>
121
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
122
+ <li class="control">
123
+ <input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
124
+ <?php else:?>
125
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
126
+ <?php endif;?>
127
+ </ul>
128
+ </fieldset>
129
+ </li>
130
+ <li class="control">
131
+ <input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
132
+ </li>
133
+ </ul>
134
+ <div class="buttons-set" id="shipping-buttons-container">
135
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
136
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
137
+ <button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
138
+ <span id="shipping-please-wait" class="please-wait" style="display:none;">
139
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
140
+ </span>
141
+ </div>
142
+ </form>
143
+ <script type="text/javascript">
144
+ //<![CDATA[
145
+ var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
146
+ '<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
147
+ var shippingForm = new VarienForm('co-shipping-form');
148
+ shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
149
+ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
150
+ $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
151
+
152
+ var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
153
+ //]]>
154
+ </script>
app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <form id="co-shipping-method-form" action="">
28
+ <div id="checkout-shipping-method-load">
29
+ <?php echo $this->getChildHtml('available') ?>
30
+ </div>
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");
34
+ //]]>
35
+ </script>
36
+ <div id="onepage-checkout-shipping-method-additional-load">
37
+ <?php echo $this->getChildHtml('additional') ?>
38
+ </div>
39
+ <div class="buttons-set" id="shipping-method-buttons-container">
40
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
41
+ <button type="button" class="button" onclick="shippingMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
42
+ <span id="shipping-method-please-wait" class="please-wait" style="display:none;">
43
+ <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
44
+ </span>
45
+ </div>
46
+ </form>
app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (!$this->getQuote()->isVirtual()): ?>
28
+ <?php echo $this->helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
29
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
28
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
29
+ <?php else: ?>
30
+ <dl class="sp-methods">
31
+ <?php $shippingCodePrice = array(); ?>
32
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
33
+ <dt><?php echo $this->getCarrierName($code) ?></dt>
34
+ <dd>
35
+ <ul>
36
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
37
+ <?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
38
+ <li>
39
+ <?php if ($_rate->getErrorMessage()): ?>
40
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
41
+ <?php else: ?>
42
+ <?php if ($_sole) : ?>
43
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
44
+ <?php else: ?>
45
+ <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
46
+
47
+ <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
48
+ <script type="text/javascript">
49
+ //<![CDATA[
50
+ lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
51
+ //]]>
52
+ </script>
53
+ <?php endif; ?>
54
+
55
+ <?php endif; ?>
56
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $_rate->getMethodTitle() ?>
57
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
58
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
59
+ <?php echo $_excl; ?>
60
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
61
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
62
+ <?php endif; ?>
63
+ </label>
64
+ <?php endif ?>
65
+ </li>
66
+ <?php endforeach; ?>
67
+ </ul>
68
+ </dd>
69
+ <?php endforeach; ?>
70
+ </dl>
71
+ <script type="text/javascript">
72
+ //<![CDATA[
73
+ <?php if (!empty($shippingCodePrice)): ?>
74
+ var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
75
+ <?php endif; ?>
76
+
77
+ $$('input[type="radio"][name="shipping_method"]').each(function(el){
78
+ Event.observe(el, 'click', function(){
79
+ if (el.checked == true) {
80
+ var getShippingCode = el.getValue();
81
+ <?php if (!empty($shippingCodePrice)): ?>
82
+ var newPrice = shippingCodePrice[getShippingCode];
83
+ if (!lastPrice) {
84
+ lastPrice = newPrice;
85
+ quoteBaseGrandTotal += newPrice;
86
+ }
87
+ if (newPrice != lastPrice) {
88
+ quoteBaseGrandTotal += (newPrice-lastPrice);
89
+ lastPrice = newPrice;
90
+ }
91
+ <?php endif; ?>
92
+ checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
93
+ return false;
94
+ }
95
+ });
96
+ });
97
+ //]]>
98
+ </script>
99
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/success.phtml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
32
+
33
+ <?php if ($this->getOrderId()):?>
34
+ <?php if ($this->getCanViewOrder()) :?>
35
+ <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
36
+ <?php else :?>
37
+ <p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
38
+ <?php endif;?>
39
+ <p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
40
+ <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
41
+ <p>
42
+ <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
43
+ <?php echo $this->getChildHtml() ?>
44
+ </p>
45
+ <?php endif;?>
46
+ <?php endif;?>
47
+
48
+ <?php if ($this->getAgreementRefId()): ?>
49
+ <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
50
+ <?php endif;?>
51
+
52
+ <?php if ($profiles = $this->getRecurringProfiles()):?>
53
+ <p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
54
+ <ul class="disc">
55
+ <?php foreach($profiles as $profile):?>
56
+ <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
57
+ <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
58
+ <?php endforeach;?>
59
+ </ul>
60
+ <?php endif;?>
61
+
62
+ <div class="buttons-set">
63
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
64
+ </div>
app/design/frontend/base/default/template/checkout/total/default.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <tr>
28
+ <th colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
29
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
30
+ <?php echo $this->getTotal()->getTitle() ?>
31
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
32
+ </th>
33
+ <td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
34
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
35
+ <?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
36
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
37
+ </td>
38
+ </tr>
app/design/frontend/base/default/template/checkout/total/nominal.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Mage_Checkout_Block_Total_Nominal
30
+ */
31
+ ?>
32
+ <tr>
33
+ <th colspan="<?php echo $this->getColspan() + 1; ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right">
34
+ <?php echo sprintf(($this->getRenderingArea() == $this->getTotalArea()) ? '<strong>%s</strong>' : '%s', $this->escapeHtml($this->getTotalTitle())) ?>
35
+ </th>
36
+ </tr>
37
+ <?php foreach ($this->getTotalItems() as $i => $item): ?>
38
+ <?php foreach ($this->getTotalItemDetails($item) as $j => $row):?>
39
+ <tr class="summary-details <?php echo "summary-details-nominal-{$i}" . (0 == $j ? ' summary-details-first' : '') . ($this->getItemDetailsRowIsCompounded($row) ? '' : ' summary-details-excluded')?>" style="display:none;">
40
+ <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right">
41
+ <?php echo $this->escapeHtml($this->getItemDetailsRowLabel($row)) ?>
42
+ </td>
43
+ <td class="a-right">
44
+ <?php echo $this->formatPrice($this->getItemDetailsRowAmount($row)) ?>
45
+ </td>
46
+ </tr>
47
+ <?php endforeach; ?>
48
+ <tr class="summary-total" onclick="expandDetails(this, '<?php echo ".summary-details-nominal-{$i}"?>')">
49
+ <td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>">
50
+ <div class="summary-collapse"><?php echo $this->escapeHtml($this->getItemName($item)); ?></div>
51
+ </td>
52
+ <td class="a-right">
53
+ <?php echo $this->helper('checkout')->formatPrice($this->getItemRowTotal($item)) ?>
54
+ </td>
55
+ </tr>
56
+ <?php endforeach; ?>
app/design/frontend/base/default/template/checkout/total/tax.phtml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php global $taxIter; $taxIter++; ?>
28
+ <?php if ($this->helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?>
29
+ <?php $isTop = 1; ?>
30
+ <?php foreach ($this->getTotal()->getFullInfo() as $info): ?>
31
+ <?php if (isset($info['hidden']) && $info['hidden']) continue; ?>
32
+ <?php $percent = $info['percent']; ?>
33
+ <?php $amount = $info['amount']; ?>
34
+ <?php $rates = $info['rates']; ?>
35
+ <?php $isFirst = 1; ?>
36
+
37
+ <?php foreach ($rates as $rate): ?>
38
+ <tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;">
39
+ <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>" colspan="<?php echo $this->getColspan(); ?>">
40
+ <?php echo $rate['title']; ?>
41
+ <?php if (!is_null($rate['percent'])): ?>
42
+ (<?php echo (float)$rate['percent']; ?>%)
43
+ <?php endif; ?>
44
+ <br />
45
+ </td>
46
+ <?php if ($isFirst): ?>
47
+ <td rowspan="<?php echo count($rates); ?>" class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>">
48
+ <?php echo $this->helper('checkout')->formatPrice($amount); ?>
49
+ </td>
50
+ <?php endif; ?>
51
+ </tr>
52
+ <?php $isFirst = 0; ?>
53
+ <?php $isTop = 0; ?>
54
+ <?php endforeach; ?>
55
+ <?php endforeach; ?>
56
+ <?php endif;?>
57
+ <tr<?php if ($this->helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>>
58
+ <td class="a-right" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>">
59
+ <?php if ($this->helper('tax')->displayFullSummary()): ?>
60
+ <div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div>
61
+ <?php else: ?>
62
+ <?php echo $this->getTotal()->getTitle() ?>
63
+ <?php endif;?>
64
+ </td>
65
+ <td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>">
66
+ <strong><?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?></strong>
67
+ </td>
68
+ </tr>
app/design/frontend/base/default/template/cms/content.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php echo $pageData->getPageContent(); ?>
app/design/frontend/base/default/template/cms/content_heading.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($_heading = $this->getContentHeading()): ?>
28
+ <div class="page-title">
29
+ <h1><?php echo $_heading; ?></h1>
30
+ </div>
31
+ <?php endif; ?>
app/design/frontend/base/default/template/cms/default/home.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ There was no Home CMS page configured or found.
app/design/frontend/base/default/template/cms/default/no-route.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ There was no 404 CMS page configured or found.
app/design/frontend/base/default/template/cms/meta.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php if($pageData->getPageMetaKeywords()): ?>
28
+ <meta name="keywords" content="<?php echo $pageData->getPageMetaKeywords() ?>" />
29
+ <?php endif; ?>
30
+ <?php if($pageData->getPageMetaDescription()): ?>
31
+ <meta name="description" content="<?php echo $pageData->getPageMetaDescription() ?>" />
32
+ <?php endif; ?>
app/design/frontend/base/default/template/cms/widget/link/link_block.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-cms-link"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <span class="widget widget-cms-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/cms/widget/static_block/default.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="widget widget-static-block"><?php echo $this->getText(); ?></div>
app/design/frontend/base/default/template/contacts/form.phtml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
28
+ <div class="page-title">
29
+ <h1><?php echo Mage::helper('contacts')->__('Contact Us') ?></h1>
30
+ </div>
31
+ <form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo Mage::helper('contacts')->__('Contact Information') ?></h2>
34
+ <ul class="form-list">
35
+ <li class="fields">
36
+ <div class="field">
37
+ <label for="name" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Name') ?></label>
38
+ <div class="input-box">
39
+ <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
40
+ </div>
41
+ </div>
42
+ <div class="field">
43
+ <label for="email" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Email') ?></label>
44
+ <div class="input-box">
45
+ <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
46
+ </div>
47
+ </div>
48
+ </li>
49
+ <li>
50
+ <label for="telephone"><?php echo Mage::helper('contacts')->__('Telephone') ?></label>
51
+ <div class="input-box">
52
+ <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="input-text" type="text" />
53
+ </div>
54
+ </li>
55
+ <li class="wide">
56
+ <label for="comment" class="required"><em>*</em><?php echo Mage::helper('contacts')->__('Comment') ?></label>
57
+ <div class="input-box">
58
+ <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
59
+ </div>
60
+ </li>
61
+ </ul>
62
+ </div>
63
+ <div class="buttons-set">
64
+ <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>
65
+ <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
66
+ <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
67
+ </div>
68
+ </form>
69
+ <script type="text/javascript">
70
+ //<![CDATA[
71
+ var contactForm = new VarienForm('contactForm', true);
72
+ //]]>
73
+ </script>
app/design/frontend/base/default/template/core/formkey.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
app/design/frontend/base/default/template/core/link.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <a <?php echo $this->getLinkAttributes() ?>><?php echo $this->htmlEscape($this->getAnchorText()) ?></a>
app/design/frontend/base/default/template/core/messages.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php foreach ($types as $type) {
28
+ if ( $messages = $this->getMessages($type) ) {
29
+ if ( !$html ) {
30
+ $html .= '<ul class="messages">';
31
+ }
32
+ $html .= '<li class="' . $type . '-msg">';
33
+ $html .= '<ul>';
34
+
35
+ foreach ( $messages as $message ) {
36
+ $html.= '<li>';
37
+ $html.= $message->getText();
38
+ $html.= '</li>';
39
+ }
40
+ $html .= '</ul>';
41
+ $html .= '</li>';
42
+ }
43
+ }
44
+ if ( $html) {
45
+ $html .= '</ul>';
46
+ }
47
+ ?>
app/design/frontend/base/default/template/customer/account/dashboard.phtml ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="dashboard">
28
+ <div class="page-title">
29
+ <h1><?php echo $this->__('My Dashboard') ?></h1>
30
+ </div>
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <?php echo $this->getChildHtml('hello') ?>
33
+ <?php echo $this->getChildHtml('top') ?>
34
+ <div class="box-account box-info">
35
+ <div class="box-head">
36
+ <h2><?php echo $this->__('Account Information') ?></h2>
37
+ </div>
38
+ <?php echo $this->getChildHtml('info') ?>
39
+ <?php echo $this->getChildHtml('address') ?>
40
+ </div>
41
+ <?php echo $this->getChildHtml('info1') ?>
42
+ <?php echo $this->getChildHtml('info2') ?>
43
+ </div>
app/design/frontend/base/default/template/customer/account/dashboard/address.phtml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col2-set">
28
+ <div class="box">
29
+ <div class="box-title">
30
+ <h3><?php echo $this->__('Address Book') ?></h3>
31
+ <a href="<?php echo $this->getAddressBookUrl() ?>"><?php echo $this->__('Manage Addresses') ?></a>
32
+ </div>
33
+ <div class="box-content">
34
+ <div class="col-1">
35
+ <h4><?php echo $this->__('Default Billing Address') ?></h4>
36
+ <address>
37
+ <?php echo $this->getPrimaryBillingAddressHtml() ?><br />
38
+ <a href="<?php echo $this->getPrimaryBillingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?></a>
39
+ </address>
40
+ </div>
41
+ <div class="col-2">
42
+ <h4><?php echo $this->__('Default Shipping Address') ?></h4>
43
+ <address>
44
+ <?php echo $this->getPrimaryShippingAddressHtml() ?><br />
45
+ <a href="<?php echo $this->getPrimaryShippingAddressEditUrl() ?>"><?php echo $this->__('Edit Address') ?></a>
46
+ </address>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="welcome-msg">
28
+ <p class="hello"><strong><?php echo $this->__('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?></strong></p>
29
+ <p><?php echo $this->__('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?></p>
30
+ </div>
app/design/frontend/base/default/template/customer/account/dashboard/info.phtml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col2-set">
28
+ <div class="col-1">
29
+ <div class="box">
30
+ <div class="box-title">
31
+ <h3><?php echo $this->__('Contact Information') ?></h3>
32
+ <a href="<?php echo $this->getUrl('customer/account/edit') ?>"><?php echo $this->__('Edit') ?></a>
33
+ </div>
34
+ <div class="box-content">
35
+ <p>
36
+ <?php echo $this->htmlEscape($this->getCustomer()->getName()) ?><br />
37
+ <?php echo $this->htmlEscape($this->getCustomer()->getEmail()) ?><br />
38
+ <a href="<?php echo $this->getChangePasswordUrl() ?>"><?php echo $this->__('Change Password') ?></a>
39
+ </p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ <?php if( $this->isNewsletterEnabled() ): ?>
44
+ <div class="col-2">
45
+ <div class="box">
46
+ <div class="box-title">
47
+ <h3><?php echo $this->__('Newsletters') ?></h3>
48
+ <a href="<?php echo $this->getUrl('newsletter/manage') ?>"><?php echo $this->__('Edit') ?></a>
49
+ </div>
50
+ <div class="box-content">
51
+ <p>
52
+ <?php if( $this->getIsSubscribed() ): ?>
53
+ <?php echo $this->__("You are currently subscribed to 'General Subscription'.") ?>
54
+ <?php else: ?>
55
+ <?php echo $this->__('You are currently not subscribed to any newsletter.') ?>
56
+ <?php endif; ?>
57
+ </p>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <?php endif; ?>
62
+ </div>
app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="col-2">
28
+ <h4><?php echo $this->__('Newsletters') ?></h4>
29
+ <a href="<?php echo $this->getUrl('newsletter/manage') ?>"><?php echo $this->__('Edit Newsletters') ?></a>
30
+ <p><?php echo $this->__('You are currently subscribed to our newsletter.') ?></p>
31
+ </div>
app/design/frontend/base/default/template/customer/account/link/back.phtml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="buttons-set">
28
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
29
+ </div>
app/design/frontend/base/default/template/customer/account/navigation.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="block block-account">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('My Account'); ?></span></strong>
30
+ </div>
31
+ <div class="block-content">
32
+ <ul>
33
+ <?php $_links = $this->getLinks(); ?>
34
+ <?php $_index = 1; ?>
35
+ <?php $_count = count($_links); ?>
36
+ <?php foreach ($_links as $_link): ?>
37
+ <?php $_last = ($_index++ >= $_count); ?>
38
+ <?php if ($this->isActive($_link)): ?>
39
+ <li class="current<?php echo ($_last ? ' last' : '') ?>"><strong><?php echo $_link->getLabel() ?></strong></li>
40
+ <?php else: ?>
41
+ <li<?php echo ($_last ? ' class="last"' : '') ?>><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
42
+ <?php endif; ?>
43
+ <?php endforeach; ?>
44
+ </ul>
45
+ </div>
46
+ </div>
app/design/frontend/base/default/template/customer/address.phtml ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <div class="page-title">
28
+ <h1><?php echo $this->__('Address Books') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <table width="100%">
32
+ <tr>
33
+ <td style="width:50%;"><h3>Default</h3>
34
+ <table width="100%">
35
+ <?php if(!empty($primaryAddresses)): ?>
36
+ <?php foreach($primaryAddresses as $_address): ?>
37
+ <tr>
38
+ <td>
39
+ <address>
40
+ <?php echo $_address->format('html') ?>
41
+ </address>
42
+ <p>
43
+ <strong><a href="<?php echo $this->getUrl('customer/address/form', array('address'=>$_address->getAddressId())) ?>" class="red-link"><?php echo $this->__('Edit Address') ?></a></strong>
44
+ </p>
45
+ </td>
46
+ </tr>
47
+ <?php endforeach; ?>
48
+ <?php else: ?>
49
+ <tr>
50
+ <td>
51
+ <p><?php echo $this->__('You have no default entries in your address book.') ?></p>
52
+ </td>
53
+ </tr>
54
+ <?php endif ?>
55
+ </table>
56
+ </td>
57
+ <td style="width:50%;"><h3><?php echo $this->__('Additional Address Entries') ?></h3>
58
+ <table width="100%">
59
+ <?php if(!empty($alternativeAddresses)): ?>
60
+ <?php foreach($alternativeAddresses as $_address): ?>
61
+ <tr>
62
+ <td>
63
+ <address>
64
+ <?php echo $_address->format('html') ?>
65
+ </address>
66
+ <p>
67
+ <strong><a href="<?php echo $this->getUrl('customer/address/form', array('address'=>$_address->getAddressId())) ?>" class="red-link"><?php echo $this->__('Edit Address') ?></a></strong><span class="separator">&nbsp;|&nbsp;</span><strong><a href="#" onclick="return deleteAddress('<?php echo $_address->getAddressId() ?>');" class="red-link"><?php echo $this->__('Delete Address') ?></a></strong>
68
+ </p>
69
+ </td>
70
+ </tr>
71
+ <?php endforeach; ?>
72
+ <?php else: ?>
73
+ <tr>
74
+ <td>
75
+ <p><?php echo $this->__('You have no additional entries in your address book.') ?></p>
76
+ </td>
77
+ </tr>
78
+ <?php endif ?>
79
+ </table>
80
+ </td>
81
+ </tr>
82
+ </table>
83
+ <div class="buttons-set">
84
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account/') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
85
+ <button type="button" onclick="window.location='<?php echo $this->getUrl('customer/address/form') ?>';" class="button"><span><span><?php echo $this->__('New Address') ?></span></span></button>
86
+ </div>
87
+ <script type="text/javascript">