Yellow_Pay - Version 0.2.2

Version Notes

* Plugin logs accessible through Magento Admin panel: System > Yellow Bitcoin > View Logs
* Better support for stores without https
* Fixed compatibility issue with older versions of Internet Explorer

Download this release

Release Info

Developer Tawfek Daghistani
Extension Yellow_Pay
Version 0.2.2
Comparing to
See all releases


Code changes from version 0.2.1 to 0.2.2

Files changed (232) hide show
  1. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn.php +18 -0
  2. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit.php +42 -0
  3. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Form.php +18 -0
  4. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Tab/Form.php +139 -0
  5. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Tabs.php +23 -0
  6. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Grid.php +128 -0
  7. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log.php +18 -0
  8. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit.php +42 -0
  9. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Form.php +18 -0
  10. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Tab/Form.php +49 -0
  11. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Tabs.php +23 -0
  12. app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Grid.php +75 -0
  13. app/code/local/Yellow/Bitcoin/Block/Form/Bitcoin.php +80 -81
  14. app/code/local/Yellow/Bitcoin/Block/Fullscreen.php +0 -47
  15. app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Content.php +60 -45
  16. app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Footer.php +109 -105
  17. app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Header.php +50 -50
  18. app/code/local/Yellow/Bitcoin/Block/Info.php +23 -0
  19. app/code/local/Yellow/Bitcoin/Block/Info/Bitcoin.php +0 -4
  20. app/code/local/Yellow/Bitcoin/Block/Status.php +28 -28
  21. app/code/local/Yellow/Bitcoin/Block/Widget.php +80 -62
  22. app/code/local/Yellow/Bitcoin/Helper/Data.php +59 -32
  23. app/code/local/Yellow/Bitcoin/Model/Bitcoin.php +627 -574
  24. app/code/local/Yellow/Bitcoin/Model/Http.php +47 -47
  25. app/code/local/Yellow/Bitcoin/Model/Ipn.php +58 -58
  26. app/code/local/Yellow/Bitcoin/Model/Log.php +65 -0
  27. app/code/local/Yellow/Bitcoin/Model/Resource/Ipn.php +79 -79
  28. app/code/local/Yellow/Bitcoin/Model/Resource/Ipn/Collection.php +32 -32
  29. app/code/local/Yellow/Bitcoin/{Block/Index.php → Model/Resource/Log.php} +10 -4
  30. app/code/local/Yellow/Bitcoin/Model/Resource/Log/Collection.php +36 -0
  31. app/code/local/Yellow/Bitcoin/controllers/Adminhtml/IpnController.php +162 -0
  32. app/code/local/Yellow/Bitcoin/controllers/Adminhtml/LogController.php +160 -0
  33. app/code/local/Yellow/Bitcoin/controllers/IndexController.php +285 -267
  34. app/code/local/Yellow/Bitcoin/etc/config.xml +73 -1
  35. app/code/local/Yellow/Bitcoin/etc/system.xml +11 -1
  36. app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-install-0.1.0.php +6 -6
  37. app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-upgrade-0.1.0-0.1.1.php +3 -3
  38. app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-upgrade-0.1.2-0.1.3.php +13 -0
  39. app/design/adminhtml/default/default/layout/bitcoin.xml +13 -0
  40. app/design/adminhtml/default/default/template/bitcoin/info/invoice.phtml +5 -0
  41. app/design/frontend/base/default/layout/bitcoin.xml +20 -9
  42. app/design/frontend/base/default/template/authorizenet/directpost/form.phtml +135 -0
  43. app/design/frontend/base/default/template/authorizenet/directpost/iframe.phtml +56 -0
  44. app/design/frontend/base/default/template/authorizenet/directpost/info.phtml +35 -0
  45. app/design/frontend/base/default/template/bitcoin/form/bitcoin.phtml +3 -2
  46. app/design/frontend/base/default/template/bitcoin/form/logo.phtml +1 -1
  47. app/design/frontend/base/default/template/bitcoin/fullscreen.phtml +0 -47
  48. app/design/frontend/base/default/template/bitcoin/fullscreen/widget/content.phtml +51 -49
  49. app/design/frontend/base/default/template/bitcoin/fullscreen/widget/footer.phtml +17 -12
  50. app/design/frontend/base/default/template/bitcoin/fullscreen/widget/header.phtml +6 -5
  51. app/design/frontend/base/default/template/bitcoin/index.phtml +0 -13
  52. app/design/frontend/base/default/template/bitcoin/info/bitcoin.phtml +0 -1
  53. app/design/frontend/base/default/template/bitcoin/info/invoice.phtml +6 -0
  54. app/design/frontend/base/default/template/bitcoin/widget.phtml +51 -48
  55. app/design/frontend/base/default/template/bundle/catalog/product/list/partof.phtml +52 -0
  56. app/design/frontend/base/default/template/bundle/catalog/product/price.phtml +289 -0
  57. app/design/frontend/base/default/template/bundle/catalog/product/view/option_tierprices.phtml +234 -0
  58. app/design/frontend/base/default/template/bundle/catalog/product/view/options/notice.phtml +27 -0
  59. app/design/frontend/base/default/template/bundle/catalog/product/view/price.phtml +114 -0
  60. app/design/frontend/base/default/template/bundle/catalog/product/view/tierprices.phtml +41 -0
  61. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml +54 -0
  62. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +52 -0
  63. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +49 -0
  64. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +74 -0
  65. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml +64 -0
  66. app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/options.phtml +43 -0
  67. app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml +168 -0
  68. app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml +169 -0
  69. app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml +174 -0
  70. app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml +92 -0
  71. app/design/frontend/base/default/template/bundle/rss/catalog/product/price.phtml +313 -0
  72. app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml +412 -0
  73. app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml +390 -0
  74. app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml +375 -0
  75. app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml +111 -0
  76. app/design/frontend/base/default/template/callouts/left_col.phtml +39 -0
  77. app/design/frontend/base/default/template/callouts/right_col.phtml +39 -0
  78. app/design/frontend/base/default/template/captcha/zend.phtml +51 -0
  79. app/design/frontend/base/default/template/catalog/category/page.phtml +36 -0
  80. app/design/frontend/base/default/template/catalog/category/view.phtml +71 -0
  81. app/design/frontend/base/default/template/catalog/category/widget/link/link_block.phtml +27 -0
  82. app/design/frontend/base/default/template/catalog/category/widget/link/link_inline.phtml +27 -0
  83. app/design/frontend/base/default/template/catalog/layer/filter.phtml +47 -0
  84. app/design/frontend/base/default/template/catalog/layer/state.phtml +55 -0
  85. app/design/frontend/base/default/template/catalog/layer/view.phtml +59 -0
  86. app/design/frontend/base/default/template/catalog/msrp/popup.phtml +59 -0
  87. app/design/frontend/base/default/template/catalog/navigation/left.phtml +59 -0
  88. app/design/frontend/base/default/template/catalog/navigation/top.phtml +49 -0
  89. app/design/frontend/base/default/template/catalog/product/compare/list.phtml +162 -0
  90. app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml +60 -0
  91. app/design/frontend/base/default/template/catalog/product/gallery.phtml +66 -0
  92. app/design/frontend/base/default/template/catalog/product/list.phtml +128 -0
  93. app/design/frontend/base/default/template/catalog/product/list/related.phtml +94 -0
  94. app/design/frontend/base/default/template/catalog/product/list/toolbar.phtml +96 -0
  95. app/design/frontend/base/default/template/catalog/product/list/upsell.phtml +52 -0
  96. app/design/frontend/base/default/template/catalog/product/new.phtml +59 -0
  97. app/design/frontend/base/default/template/catalog/product/price.phtml +471 -0
  98. app/design/frontend/base/default/template/catalog/product/price_msrp.phtml +69 -0
  99. app/design/frontend/base/default/template/catalog/product/price_msrp_item.phtml +107 -0
  100. app/design/frontend/base/default/template/catalog/product/price_msrp_noform.phtml +73 -0
  101. app/design/frontend/base/default/template/catalog/product/price_msrp_rss.phtml +42 -0
  102. app/design/frontend/base/default/template/catalog/product/view.phtml +170 -0
  103. app/design/frontend/base/default/template/catalog/product/view/additional.phtml +29 -0
  104. app/design/frontend/base/default/template/catalog/product/view/addto.phtml +41 -0
  105. app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml +38 -0
  106. app/design/frontend/base/default/template/catalog/product/view/attributes.phtml +52 -0
  107. app/design/frontend/base/default/template/catalog/product/view/description.phtml +39 -0
  108. app/design/frontend/base/default/template/catalog/product/view/media.phtml +78 -0
  109. app/design/frontend/base/default/template/catalog/product/view/options.phtml +193 -0
  110. app/design/frontend/base/default/template/catalog/product/view/options/js.phtml +89 -0
  111. app/design/frontend/base/default/template/catalog/product/view/options/type/date.phtml +92 -0
  112. app/design/frontend/base/default/template/catalog/product/view/options/type/default.phtml +30 -0
  113. app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml +103 -0
  114. app/design/frontend/base/default/template/catalog/product/view/options/type/select.phtml +40 -0
  115. app/design/frontend/base/default/template/catalog/product/view/options/type/text.phtml +41 -0
  116. app/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml +33 -0
  117. app/design/frontend/base/default/template/catalog/product/view/options/wrapper/bottom.phtml +29 -0
  118. app/design/frontend/base/default/template/catalog/product/view/price.phtml +34 -0
  119. app/design/frontend/base/default/template/catalog/product/view/price_clone.phtml +28 -0
  120. app/design/frontend/base/default/template/catalog/product/view/tierprices.phtml +232 -0
  121. app/design/frontend/base/default/template/catalog/product/view/type/configurable.phtml +31 -0
  122. app/design/frontend/base/default/template/catalog/product/view/type/default.phtml +38 -0
  123. app/design/frontend/base/default/template/catalog/product/view/type/grouped.phtml +93 -0
  124. app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml +48 -0
  125. app/design/frontend/base/default/template/catalog/product/view/type/simple.phtml +31 -0
  126. app/design/frontend/base/default/template/catalog/product/view/type/virtual.phtml +31 -0
  127. app/design/frontend/base/default/template/catalog/product/widget/link/link_block.phtml +27 -0
  128. app/design/frontend/base/default/template/catalog/product/widget/link/link_inline.phtml +27 -0
  129. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.phtml +56 -0
  130. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.phtml +47 -0
  131. app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.phtml +47 -0
  132. app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.phtml +66 -0
  133. app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml +63 -0
  134. app/design/frontend/base/default/template/catalog/rss/product/price.phtml +449 -0
  135. app/design/frontend/base/default/template/catalog/seo/sitemap.phtml +50 -0
  136. app/design/frontend/base/default/template/catalog/seo/sitemap/container.phtml +38 -0
  137. app/design/frontend/base/default/template/catalog/seo/tree.phtml +43 -0
  138. app/design/frontend/base/default/template/cataloginventory/qtyincrements.phtml +35 -0
  139. app/design/frontend/base/default/template/cataloginventory/stockqty/composite.phtml +66 -0
  140. app/design/frontend/base/default/template/cataloginventory/stockqty/default.phtml +35 -0
  141. app/design/frontend/base/default/template/catalogsearch/advanced/form.phtml +96 -0
  142. app/design/frontend/base/default/template/catalogsearch/advanced/result.phtml +60 -0
  143. app/design/frontend/base/default/template/catalogsearch/form.mini.phtml +43 -0
  144. app/design/frontend/base/default/template/catalogsearch/result.phtml +55 -0
  145. app/design/frontend/base/default/template/catalogsearch/term.phtml +38 -0
  146. app/design/frontend/base/default/template/centinel/authentication.phtml +56 -0
  147. app/design/frontend/base/default/template/centinel/authentication/complete.phtml +41 -0
  148. app/design/frontend/base/default/template/centinel/authentication/start.phtml +40 -0
  149. app/design/frontend/base/default/template/centinel/logo.phtml +33 -0
  150. app/design/frontend/base/default/template/checkout/cart.phtml +164 -0
  151. app/design/frontend/base/default/template/checkout/cart/coupon.phtml +59 -0
  152. app/design/frontend/base/default/template/checkout/cart/crosssell.phtml +59 -0
  153. app/design/frontend/base/default/template/checkout/cart/item/configure/updatecart.phtml +39 -0
  154. app/design/frontend/base/default/template/checkout/cart/item/default.phtml +279 -0
  155. app/design/frontend/base/default/template/checkout/cart/noItems.phtml +36 -0
  156. app/design/frontend/base/default/template/checkout/cart/render/default.phtml +70 -0
  157. app/design/frontend/base/default/template/checkout/cart/render/simple.phtml +70 -0
  158. app/design/frontend/base/default/template/checkout/cart/shipping.phtml +139 -0
  159. app/design/frontend/base/default/template/checkout/cart/sidebar.phtml +80 -0
  160. app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml +145 -0
  161. app/design/frontend/base/default/template/checkout/cart/totals.phtml +48 -0
  162. app/design/frontend/base/default/template/checkout/multishipping/address/select.phtml +58 -0
  163. app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml +81 -0
  164. app/design/frontend/base/default/template/checkout/multishipping/agreements.phtml +49 -0
  165. app/design/frontend/base/default/template/checkout/multishipping/billing.phtml +116 -0
  166. app/design/frontend/base/default/template/checkout/multishipping/billing/items.phtml +54 -0
  167. app/design/frontend/base/default/template/checkout/multishipping/item/default.phtml +45 -0
  168. app/design/frontend/base/default/template/checkout/multishipping/link.phtml +27 -0
  169. app/design/frontend/base/default/template/checkout/multishipping/overview.phtml +243 -0
  170. app/design/frontend/base/default/template/checkout/multishipping/overview/item.phtml +238 -0
  171. app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml +130 -0
  172. app/design/frontend/base/default/template/checkout/multishipping/state.phtml +39 -0
  173. app/design/frontend/base/default/template/checkout/multishipping/success.phtml +50 -0
  174. app/design/frontend/base/default/template/checkout/onepage.phtml +60 -0
  175. app/design/frontend/base/default/template/checkout/onepage/agreements.phtml +51 -0
  176. app/design/frontend/base/default/template/checkout/onepage/billing.phtml +216 -0
  177. app/design/frontend/base/default/template/checkout/onepage/failure.phtml +32 -0
  178. app/design/frontend/base/default/template/checkout/onepage/link.phtml +29 -0
  179. app/design/frontend/base/default/template/checkout/onepage/login.phtml +124 -0
  180. app/design/frontend/base/default/template/checkout/onepage/payment.phtml +73 -0
  181. app/design/frontend/base/default/template/checkout/onepage/payment/info.phtml +29 -0
  182. app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml +73 -0
  183. app/design/frontend/base/default/template/checkout/onepage/progress.phtml +59 -0
  184. app/design/frontend/base/default/template/checkout/onepage/progress/billing.phtml +40 -0
  185. app/design/frontend/base/default/template/checkout/onepage/progress/payment.phtml +41 -0
  186. app/design/frontend/base/default/template/checkout/onepage/progress/shipping.phtml +44 -0
  187. app/design/frontend/base/default/template/checkout/onepage/progress/shipping_method.phtml +57 -0
  188. app/design/frontend/base/default/template/checkout/onepage/review.phtml +29 -0
  189. app/design/frontend/base/default/template/checkout/onepage/review/button.phtml +27 -0
  190. app/design/frontend/base/default/template/checkout/onepage/review/info.phtml +84 -0
  191. app/design/frontend/base/default/template/checkout/onepage/review/item.phtml +240 -0
  192. app/design/frontend/base/default/template/checkout/onepage/review/totals.phtml +47 -0
  193. app/design/frontend/base/default/template/checkout/onepage/shipping.phtml +156 -0
  194. app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml +46 -0
  195. app/design/frontend/base/default/template/checkout/onepage/shipping_method/additional.phtml +29 -0
  196. app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml +101 -0
  197. app/design/frontend/base/default/template/checkout/success.phtml +64 -0
  198. app/design/frontend/base/default/template/checkout/total/default.phtml +38 -0
  199. app/design/frontend/base/default/template/checkout/total/nominal.phtml +56 -0
  200. app/design/frontend/base/default/template/checkout/total/tax.phtml +68 -0
  201. app/design/frontend/base/default/template/cms/content.phtml +27 -0
  202. app/design/frontend/base/default/template/cms/content_heading.phtml +31 -0
  203. app/design/frontend/base/default/template/cms/default/home.phtml +27 -0
  204. app/design/frontend/base/default/template/cms/default/no-route.phtml +27 -0
  205. app/design/frontend/base/default/template/cms/meta.phtml +32 -0
  206. app/design/frontend/base/default/template/cms/widget/link/link_block.phtml +27 -0
  207. app/design/frontend/base/default/template/cms/widget/link/link_inline.phtml +27 -0
  208. app/design/frontend/base/default/template/cms/widget/static_block/default.phtml +27 -0
  209. app/design/frontend/base/default/template/contacts/form.phtml +73 -0
  210. app/design/frontend/base/default/template/core/formkey.phtml +27 -0
  211. app/design/frontend/base/default/template/core/link.phtml +27 -0
  212. app/design/frontend/base/default/template/core/messages.phtml +47 -0
  213. app/design/frontend/base/default/template/customer/account/dashboard.phtml +45 -0
  214. app/design/frontend/base/default/template/customer/account/dashboard/address.phtml +50 -0
  215. app/design/frontend/base/default/template/customer/account/dashboard/hello.phtml +30 -0
  216. app/design/frontend/base/default/template/customer/account/dashboard/info.phtml +64 -0
  217. app/design/frontend/base/default/template/customer/account/dashboard/newsletter.phtml +31 -0
  218. app/design/frontend/base/default/template/customer/account/link/back.phtml +29 -0
  219. app/design/frontend/base/default/template/customer/account/navigation.phtml +46 -0
  220. app/design/frontend/base/default/template/customer/address.phtml +94 -0
  221. app/design/frontend/base/default/template/customer/address/book.phtml +105 -0
  222. app/design/frontend/base/default/template/customer/address/edit.phtml +165 -0
  223. app/design/frontend/base/default/template/customer/balance.phtml +31 -0
  224. app/design/frontend/base/default/template/customer/form/address.phtml +143 -0
  225. app/design/frontend/base/default/template/customer/form/changepassword.phtml +67 -0
  226. app/design/frontend/base/default/template/customer/form/confirmation.phtml +54 -0
  227. app/design/frontend/base/default/template/customer/form/edit.phtml +117 -0
  228. app/design/frontend/base/default/template/customer/form/forgotpassword.phtml +55 -0
  229. app/design/frontend/base/default/template/customer/form/login.phtml +92 -0
  230. app/design/frontend/base/default/template/customer/form/mini.login.phtml +40 -0
  231. app/design/frontend/base/default/template/customer/form/newsletter.phtml +53 -0
  232. app/design/frontend/base/default/template/customer/form/register.phtml +36 -0
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn extends Mage_Adminhtml_Block_Widget_Grid_Container
5
+ {
6
+
7
+ public function __construct()
8
+ {
9
+
10
+ $this->_controller = "adminhtml_ipn";
11
+ $this->_blockGroup = "bitcoin";
12
+ $this->_headerText = Mage::helper("bitcoin")->__("Ipn Manager");
13
+ $this->_addButtonLabel = Mage::helper("bitcoin")->__("Add New Item");
14
+ parent::__construct();
15
+
16
+ }
17
+
18
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->_objectId = "id";
10
+ $this->_blockGroup = "bitcoin";
11
+ $this->_controller = "adminhtml_ipn";
12
+ $this->_updateButton("save", "label", Mage::helper("bitcoin")->__("Save Item"));
13
+ $this->_updateButton("delete", "label", Mage::helper("bitcoin")->__("Delete Item"));
14
+
15
+ $this->_addButton("saveandcontinue", array(
16
+ "label" => Mage::helper("bitcoin")->__("Save And Continue Edit"),
17
+ "onclick" => "saveAndContinueEdit()",
18
+ "class" => "save",
19
+ ), -100);
20
+
21
+
22
+ $this->_formScripts[] = "
23
+
24
+ function saveAndContinueEdit(){
25
+ editForm.submit($('edit_form').action+'back/edit/');
26
+ }
27
+ ";
28
+ }
29
+
30
+ public function getHeaderText()
31
+ {
32
+ if (Mage::registry("ipn_data") && Mage::registry("ipn_data")->getId()) {
33
+
34
+ return Mage::helper("bitcoin")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("ipn_data")->getId()));
35
+
36
+ } else {
37
+
38
+ return Mage::helper("bitcoin")->__("Add Item");
39
+
40
+ }
41
+ }
42
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Form.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ "id" => "edit_form",
9
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
10
+ "method" => "post",
11
+ "enctype" => "multipart/form-data",
12
+ )
13
+ );
14
+ $form->setUseContainer(true);
15
+ $this->setForm($form);
16
+ return parent::_prepareForm();
17
+ }
18
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Tab/Form.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+
8
+ $form = new Varien_Data_Form();
9
+ $this->setForm($form);
10
+ $fieldset = $form->addFieldset("bitcoin_form", array("legend" => Mage::helper("bitcoin")->__("Item information")));
11
+
12
+
13
+ $fieldset->addField("id", "text", array(
14
+ "label" => Mage::helper("bitcoin")->__("id"),
15
+ "class" => "required-entry",
16
+ "required" => true,
17
+ "name" => "id",
18
+ ));
19
+
20
+ $fieldset->addField("quote_id", "text", array(
21
+ "label" => Mage::helper("bitcoin")->__("quote_id"),
22
+ "name" => "quote_id",
23
+ ));
24
+
25
+ $fieldset->addField("order_id", "text", array(
26
+ "label" => Mage::helper("bitcoin")->__("order_id"),
27
+ "name" => "order_id",
28
+ ));
29
+
30
+ $fieldset->addField("invoice_id", "text", array(
31
+ "label" => Mage::helper("bitcoin")->__("invoice_id"),
32
+ "name" => "invoice_id",
33
+ ));
34
+
35
+ $fieldset->addField("url", "text", array(
36
+ "label" => Mage::helper("bitcoin")->__("url"),
37
+ "name" => "url",
38
+ ));
39
+
40
+ $fieldset->addField("raw_body", "textarea", array(
41
+ "label" => Mage::helper("bitcoin")->__("raw_body"),
42
+ "name" => "raw_body",
43
+ ));
44
+
45
+ $fieldset->addField("status", "text", array(
46
+ "label" => Mage::helper("bitcoin")->__("status"),
47
+ "name" => "status",
48
+ ));
49
+
50
+ $fieldset->addField("address", "text", array(
51
+ "label" => Mage::helper("bitcoin")->__("address"),
52
+ "name" => "address",
53
+ ));
54
+
55
+ $fieldset->addField("invoice_price", "text", array(
56
+ "label" => Mage::helper("bitcoin")->__("invoice_price"),
57
+ "name" => "invoice_price",
58
+ ));
59
+
60
+ $fieldset->addField("invoice_ccy", "text", array(
61
+ "label" => Mage::helper("bitcoin")->__("invoice_ccy"),
62
+ "name" => "invoice_ccy",
63
+ ));
64
+
65
+ $fieldset->addField("base_price", "text", array(
66
+ "label" => Mage::helper("bitcoin")->__("base_price"),
67
+ "name" => "base_price",
68
+ ));
69
+
70
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
71
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
72
+ );
73
+
74
+ $fieldset->addField('base_ccy', 'date', array(
75
+ 'label' => Mage::helper('bitcoin')->__('base_ccy'),
76
+ 'name' => 'base_ccy',
77
+ 'time' => true,
78
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
79
+ 'format' => $dateFormatIso
80
+ ));
81
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
82
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
83
+ );
84
+
85
+ $fieldset->addField('server_time', 'date', array(
86
+ 'label' => Mage::helper('bitcoin')->__('server_time'),
87
+ 'name' => 'server_time',
88
+ 'time' => true,
89
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
90
+ 'format' => $dateFormatIso
91
+ ));
92
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
93
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
94
+ );
95
+
96
+ $fieldset->addField('expiration_time', 'date', array(
97
+ 'label' => Mage::helper('bitcoin')->__('expiration_time'),
98
+ 'name' => 'expiration_time',
99
+ 'time' => true,
100
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
101
+ 'format' => $dateFormatIso
102
+ ));
103
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
104
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
105
+ );
106
+
107
+ $fieldset->addField('created_at', 'date', array(
108
+ 'label' => Mage::helper('bitcoin')->__('created_at'),
109
+ 'name' => 'created_at',
110
+ 'time' => true,
111
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
112
+ 'format' => $dateFormatIso
113
+ ));
114
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
115
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
116
+ );
117
+
118
+ $fieldset->addField('updated_at', 'date', array(
119
+ 'label' => Mage::helper('bitcoin')->__('updated_at'),
120
+ 'name' => 'updated_at',
121
+ 'time' => true,
122
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
123
+ 'format' => $dateFormatIso
124
+ ));
125
+ $fieldset->addField("hash", "text", array(
126
+ "label" => Mage::helper("bitcoin")->__("hash"),
127
+ "name" => "hash",
128
+ ));
129
+
130
+
131
+ if (Mage::getSingleton("adminhtml/session")->getIpnData()) {
132
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getIpnData());
133
+ Mage::getSingleton("adminhtml/session")->setIpnData(null);
134
+ } elseif (Mage::registry("ipn_data")) {
135
+ $form->setValues(Mage::registry("ipn_data")->getData());
136
+ }
137
+ return parent::_prepareForm();
138
+ }
139
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Edit/Tabs.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId("ipn_tabs");
9
+ $this->setDestElementId("edit_form");
10
+ $this->setTitle(Mage::helper("bitcoin")->__("Item Information"));
11
+ }
12
+
13
+ protected function _beforeToHtml()
14
+ {
15
+ $this->addTab("form_section", array(
16
+ "label" => Mage::helper("bitcoin")->__("Item Information"),
17
+ "title" => Mage::helper("bitcoin")->__("Item Information"),
18
+ "content" => $this->getLayout()->createBlock("bitcoin/adminhtml_ipn_edit_tab_form")->toHtml(),
19
+ ));
20
+ return parent::_beforeToHtml();
21
+ }
22
+
23
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Ipn/Grid.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Ipn_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("ipnGrid");
10
+ $this->setDefaultSort("id");
11
+ $this->setDefaultDir("DESC");
12
+ $this->setSaveParametersInSession(true);
13
+
14
+ }
15
+
16
+ protected function _prepareCollection()
17
+ {
18
+ $collection = Mage::getModel("bitcoin/ipn")->getCollection();
19
+ $this->setCollection($collection);
20
+ return parent::_prepareCollection();
21
+ }
22
+
23
+ protected function _prepareColumns()
24
+ {
25
+ $this->addColumn("id", array(
26
+ "header" => Mage::helper("bitcoin")->__("ID"),
27
+ "align" => "right",
28
+ "width" => "50px",
29
+ "type" => "number",
30
+ "index" => "id",
31
+ ));
32
+
33
+ $this->addColumn("quote_id", array(
34
+ "header" => Mage::helper("bitcoin")->__("quote_id"),
35
+ "index" => "quote_id",
36
+ ));
37
+ $this->addColumn("order_id", array(
38
+ "header" => Mage::helper("bitcoin")->__("order_id"),
39
+ "index" => "order_id",
40
+ ));
41
+ $this->addColumn("invoice_id", array(
42
+ "header" => Mage::helper("bitcoin")->__("invoice_id"),
43
+ "index" => "invoice_id",
44
+ ));
45
+ $this->addColumn("url", array(
46
+ "header" => Mage::helper("bitcoin")->__("url"),
47
+ "index" => "url",
48
+ ));
49
+ $this->addColumn("status", array(
50
+ "header" => Mage::helper("bitcoin")->__("status"),
51
+ "index" => "status",
52
+ ));
53
+ $this->addColumn("address", array(
54
+ "header" => Mage::helper("bitcoin")->__("address"),
55
+ "index" => "address",
56
+ ));
57
+ $this->addColumn("invoice_price", array(
58
+ "header" => Mage::helper("bitcoin")->__("invoice_price"),
59
+ "index" => "invoice_price",
60
+ ));
61
+ $this->addColumn("invoice_ccy", array(
62
+ "header" => Mage::helper("bitcoin")->__("invoice_ccy"),
63
+ "index" => "invoice_ccy",
64
+ ));
65
+ $this->addColumn("base_price", array(
66
+ "header" => Mage::helper("bitcoin")->__("base_price"),
67
+ "index" => "base_price",
68
+ ));
69
+ $this->addColumn('base_ccy', array(
70
+ 'header' => Mage::helper('bitcoin')->__('base_ccy'),
71
+ 'index' => 'base_ccy'
72
+ ));
73
+ $this->addColumn('server_time', array(
74
+ 'header' => Mage::helper('bitcoin')->__('server_time'),
75
+ 'index' => 'server_time',
76
+ 'type' => 'datetime',
77
+ ));
78
+ $this->addColumn('expiration_time', array(
79
+ 'header' => Mage::helper('bitcoin')->__('expiration_time'),
80
+ 'index' => 'expiration_time',
81
+ 'type' => 'datetime',
82
+ ));
83
+ $this->addColumn('created_at', array(
84
+ 'header' => Mage::helper('bitcoin')->__('created_at'),
85
+ 'index' => 'created_at',
86
+ 'type' => 'datetime',
87
+ ));
88
+ $this->addColumn('updated_at', array(
89
+ 'header' => Mage::helper('bitcoin')->__('updated_at'),
90
+ 'index' => 'updated_at',
91
+ 'type' => 'datetime',
92
+ ));
93
+ $this->addColumn("hash", array(
94
+ "header" => Mage::helper("bitcoin")->__("hash"),
95
+ "index" => "hash",
96
+ ));
97
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
98
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
99
+
100
+ return parent::_prepareColumns();
101
+ }
102
+
103
+ public function getRowUrl($row)
104
+ {
105
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
106
+ }
107
+
108
+
109
+ protected function _prepareMassaction()
110
+ {
111
+ /// we don't need mass actions
112
+ return $this;
113
+ $this->setMassactionIdField('id');
114
+ $this->getMassactionBlock()->setFormFieldName('ids');
115
+ $this->getMassactionBlock()->setUseSelectAll(true);
116
+
117
+ return $this;
118
+
119
+ $this->getMassactionBlock()->addItem('remove_ipn', array(
120
+ 'label' => Mage::helper('bitcoin')->__('Remove Ipn'),
121
+ 'url' => $this->getUrl('*/adminhtml_ipn/massRemove'),
122
+ 'confirm' => Mage::helper('bitcoin')->__('Are you sure?')
123
+ ));
124
+ return $this;
125
+ }
126
+
127
+
128
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class Yellow_Bitcoin_Block_Adminhtml_Log extends Mage_Adminhtml_Block_Widget_Grid_Container
5
+ {
6
+
7
+ public function __construct()
8
+ {
9
+
10
+ $this->_controller = "adminhtml_log";
11
+ $this->_blockGroup = "bitcoin";
12
+ $this->_headerText = Mage::helper("bitcoin")->__("Log Manager");
13
+ $this->_addButtonLabel = Mage::helper("bitcoin")->__("Add New Item");
14
+ parent::__construct();
15
+
16
+ }
17
+
18
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Log_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
4
+ {
5
+ public function __construct()
6
+ {
7
+
8
+ parent::__construct();
9
+ $this->_objectId = "id";
10
+ $this->_blockGroup = "bitcoin";
11
+ $this->_controller = "adminhtml_log";
12
+ $this->_updateButton("save", "label", Mage::helper("bitcoin")->__("Save Item"));
13
+ $this->_updateButton("delete", "label", Mage::helper("bitcoin")->__("Delete Item"));
14
+
15
+ $this->_addButton("saveandcontinue", array(
16
+ "label" => Mage::helper("bitcoin")->__("Save And Continue Edit"),
17
+ "onclick" => "saveAndContinueEdit()",
18
+ "class" => "save",
19
+ ), -100);
20
+
21
+
22
+ $this->_formScripts[] = "
23
+
24
+ function saveAndContinueEdit(){
25
+ editForm.submit($('edit_form').action+'back/edit/');
26
+ }
27
+ ";
28
+ }
29
+
30
+ public function getHeaderText()
31
+ {
32
+ if (Mage::registry("log_data") && Mage::registry("log_data")->getId()) {
33
+
34
+ return Mage::helper("bitcoin")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("log_data")->getId()));
35
+
36
+ } else {
37
+
38
+ return Mage::helper("bitcoin")->__("Add Item");
39
+
40
+ }
41
+ }
42
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Form.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Log_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ "id" => "edit_form",
9
+ "action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
10
+ "method" => "post",
11
+ "enctype" => "multipart/form-data",
12
+ )
13
+ );
14
+ $form->setUseContainer(true);
15
+ $this->setForm($form);
16
+ return parent::_prepareForm();
17
+ }
18
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Tab/Form.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Log_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+
8
+ $form = new Varien_Data_Form();
9
+ $this->setForm($form);
10
+ $fieldset = $form->addFieldset("bitcoin_form", array("legend" => Mage::helper("bitcoin")->__("Item information")));
11
+
12
+
13
+ $fieldset->addField("message", "textarea", array(
14
+ "label" => Mage::helper("bitcoin")->__("message"),
15
+ "class" => "required-entry",
16
+ "required" => true,
17
+ "name" => "message",
18
+ ));
19
+
20
+ $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(
21
+ Mage_Core_Model_Locale::FORMAT_TYPE_SHORT
22
+ );
23
+
24
+ $fieldset->addField('created_at', 'date', array(
25
+ 'label' => Mage::helper('bitcoin')->__('created_at'),
26
+ 'name' => 'created_at',
27
+ "class" => "required-entry",
28
+ "required" => true,
29
+ 'time' => true,
30
+ 'image' => $this->getSkinUrl('images/grid-cal.gif'),
31
+ 'format' => $dateFormatIso
32
+ ));
33
+ $fieldset->addField("invoice_id", "text", array(
34
+ "label" => Mage::helper("bitcoin")->__("invoice_id"),
35
+ "class" => "required-entry",
36
+ "required" => true,
37
+ "name" => "invoice_id",
38
+ ));
39
+
40
+
41
+ if (Mage::getSingleton("adminhtml/session")->getLogData()) {
42
+ $form->setValues(Mage::getSingleton("adminhtml/session")->getLogData());
43
+ Mage::getSingleton("adminhtml/session")->setLogData(null);
44
+ } elseif (Mage::registry("log_data")) {
45
+ $form->setValues(Mage::registry("log_data")->getData());
46
+ }
47
+ return parent::_prepareForm();
48
+ }
49
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Edit/Tabs.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Log_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ $this->setId("log_tabs");
9
+ $this->setDestElementId("edit_form");
10
+ $this->setTitle(Mage::helper("bitcoin")->__("Item Information"));
11
+ }
12
+
13
+ protected function _beforeToHtml()
14
+ {
15
+ $this->addTab("form_section", array(
16
+ "label" => Mage::helper("bitcoin")->__("Item Information"),
17
+ "title" => Mage::helper("bitcoin")->__("Item Information"),
18
+ "content" => $this->getLayout()->createBlock("bitcoin/adminhtml_log_edit_tab_form")->toHtml(),
19
+ ));
20
+ return parent::_beforeToHtml();
21
+ }
22
+
23
+ }
app/code/local/Yellow/Bitcoin/Block/Adminhtml/Log/Grid.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Block_Adminhtml_Log_Grid extends Mage_Adminhtml_Block_Widget_Grid
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId("logGrid");
10
+ $this->setDefaultSort("id");
11
+ $this->setDefaultDir("DESC");
12
+ $this->setSaveParametersInSession(true);
13
+ }
14
+
15
+ protected function _prepareCollection()
16
+ {
17
+ $collection = Mage::getModel("bitcoin/log")->getCollection();
18
+ $this->setCollection($collection);
19
+ return parent::_prepareCollection();
20
+ }
21
+
22
+ protected function _prepareColumns()
23
+ {
24
+ $this->addColumn("id", array(
25
+ "header" => Mage::helper("bitcoin")->__("ID"),
26
+ "align" => "right",
27
+ "width" => "50px",
28
+ "type" => "number",
29
+ "index" => "id",
30
+ ));
31
+
32
+ $this->addColumn("message", array(
33
+ "header" => Mage::helper("bitcoin")->__("Message"),
34
+ "index" => "message",
35
+ ));
36
+
37
+ $this->addColumn('created_at', array(
38
+ 'header' => Mage::helper('bitcoin')->__('created_at'),
39
+ 'index' => 'created_at',
40
+ 'type' => 'datetime',
41
+ ));
42
+ $this->addColumn("invoice_id", array(
43
+ "header" => Mage::helper("bitcoin")->__("invoice_id"),
44
+ "index" => "invoice_id",
45
+ ));
46
+
47
+ $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
48
+ $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
49
+
50
+ return parent::_prepareColumns();
51
+ }
52
+
53
+ public function getRowUrl($row)
54
+ {
55
+ return $this->getUrl("*/*/edit", array("id" => $row->getId()));
56
+ }
57
+
58
+
59
+ protected function _prepareMassaction()
60
+ {
61
+ /// we don't need mass actions
62
+ return $this;
63
+ $this->setMassactionIdField('id');
64
+ $this->getMassactionBlock()->setFormFieldName('ids');
65
+ $this->getMassactionBlock()->setUseSelectAll(true);
66
+ $this->getMassactionBlock()->addItem('remove_log', array(
67
+ 'label' => Mage::helper('bitcoin')->__('Remove Log'),
68
+ 'url' => $this->getUrl('*/adminhtml_log/massRemove'),
69
+ 'confirm' => Mage::helper('bitcoin')->__('Are you sure?')
70
+ ));
71
+ return $this;
72
+ }
73
+
74
+
75
+ }
app/code/local/Yellow/Bitcoin/Block/Form/Bitcoin.php CHANGED
@@ -1,99 +1,98 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
 
3
  *
4
- * The MIT License (MIT)
5
- *
6
- * Copyright (c) 2014 YellowPay.co
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in all
16
- * copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- * SOFTWARE.
25
- *
26
- **/
27
 
28
  /**
29
- * Block for Yellow Bitcoin payment method form
30
  */
31
- class Yellow_Bitcoin_Block_Form_Bitcoin extends Mage_Payment_Block_Form
32
  {
 
33
 
34
- /**
35
- * Instructions text
36
- *
37
- * @var string
38
- */
39
- protected $_instructions;
40
-
41
- const CSS_BLOCK_ID = "yellow-checkout-custom-css";
42
 
43
- /**
44
- * Block construction. Set block template.
45
- */
46
- protected function _construct()
47
- {
48
- $class = Mage::getConfig()->getBlockClassName('core/template');
49
-
50
- $guide = "";
51
-
52
- if(Mage::helper("bitcoin")->isFullScreen()){
53
- $guide = new $class;
54
- $guide->setTemplate("bitcoin/form/bitcoin.phtml");
55
- $guide = $guide->toHtml();
56
- }
57
 
58
- try {
59
- $css_block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load(self::CSS_BLOCK_ID);
60
- if($css_block->getData("is_active") == 1 ){
61
- $css_output = $css_block->getData("content");
62
- }else{
63
- $css_output = "";
64
- }
65
- }catch ( \Exception $e){
66
  $css_output = "";
67
- Mage::log($e->getMessage() . __LINE__ . " on " . __FILE__ , null , "yellow.log");
68
- Mage::log($e->getTraceAsString() . __LINE__ . " on " . __FILE__ , null , "yellow.log");
69
  }
 
 
 
 
 
70
 
71
 
 
 
 
 
 
 
 
 
72
 
73
- $logo = new $class;
74
- $logo->setTemplate('bitcoin/form/logo.phtml');
75
- $this->setTemplate('bitcoin/form/bitcoin.phtml')
76
- ->setRedirectMessage(
77
- Mage::helper('bitcoin')->__('You will be paid via Yellow')
78
- )
79
- ->setMethodTitle('')
80
- ->setMethodLabelAfterHtml($css_output . $logo->toHtml() . $guide);
81
-
82
- return parent::_construct();
83
- }
84
 
85
- /**
86
- * Get instructions text from config
87
- *
88
- * @return string
89
- */
90
- public function getInstructions()
91
- {
92
- return;
93
- if (is_null($this->_instructions)) {
94
- $this->_instructions = $this->getMethod()->getInstructions();
95
- }
96
- return $this->_instructions;
97
  }
98
-
99
  }
 
 
1
  <?php
2
+ /**
3
+ *
4
+ * The MIT License (MIT)
5
+ *
6
+ * Copyright (c) 2014 YellowPay.co
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ *
26
+ **/
27
+
28
+ /**
29
+ * Block for Yellow Bitcoin payment method form
30
+ */
31
+ class Yellow_Bitcoin_Block_Form_Bitcoin extends Mage_Payment_Block_Form
32
+ {
33
+
34
  /**
35
+ * Instructions text
36
  *
37
+ * @var string
38
+ */
39
+ protected $_instructions;
40
+
41
+ const CSS_BLOCK_ID = "yellow-checkout-custom-css";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  /**
44
+ * Block construction. Set block template.
45
  */
46
+ protected function _construct()
47
  {
48
+ $class = Mage::getConfig()->getBlockClassName('core/template');
49
 
50
+ $guide = "";
 
 
 
 
 
 
 
51
 
52
+ if (Mage::helper("bitcoin")->isFullScreen()) {
53
+ $guide = new $class;
54
+ $guide->setTemplate("bitcoin/form/bitcoin.phtml");
55
+ $guide = $guide->toHtml();
56
+ }
 
 
 
 
 
 
 
 
 
57
 
58
+ try {
59
+ $css_block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load(self::CSS_BLOCK_ID);
60
+ if ($css_block->getData("is_active") == 1) {
61
+ $css_output = $css_block->getData("content");
62
+ } else {
 
 
 
63
  $css_output = "";
 
 
64
  }
65
+ } catch (\Exception $e) {
66
+ $css_output = "";
67
+ Mage::log($e->getMessage() . __LINE__ . " on " . __FILE__, null, "yellow.log");
68
+ Mage::log($e->getTraceAsString() . __LINE__ . " on " . __FILE__, null, "yellow.log");
69
+ }
70
 
71
 
72
+ $logo = new $class;
73
+ $logo->setTemplate('bitcoin/form/logo.phtml');
74
+ $this->setTemplate('bitcoin/form/bitcoin.phtml')
75
+ ->setRedirectMessage(
76
+ Mage::helper('bitcoin')->__('You will be paid via Yellow')
77
+ )
78
+ ->setMethodTitle('')
79
+ ->setMethodLabelAfterHtml($css_output . $logo->toHtml() . $guide);
80
 
81
+ return parent::_construct();
82
+ }
 
 
 
 
 
 
 
 
 
83
 
84
+ /**
85
+ * Get instructions text from config
86
+ *
87
+ * @return string
88
+ */
89
+ public function getInstructions()
90
+ {
91
+ return;
92
+ if (is_null($this->_instructions)) {
93
+ $this->_instructions = $this->getMethod()->getInstructions();
 
 
94
  }
95
+ return $this->_instructions;
96
  }
97
+
98
+ }
app/code/local/Yellow/Bitcoin/Block/Fullscreen.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
-
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- class Yellow_Bitcoin_Block_Fullscreen extends Yellow_Bitcoin_Block_Widget
29
- {
30
- public function GetWidgetUrl()
31
- {
32
- $order_id = Mage::getSingleton('checkout/session') ->getLastRealOrderId();
33
- $order = Mage::getModel("sales/order")->loadBYIncrementId($order_id);
34
- if (!($order)
35
- or !($payment = $order->getPayment())
36
- or !($instance = $payment->getMethodInstance())
37
- or ($instance->getCode() != 'bitcoin')
38
- ) {
39
- return 'no payment';
40
- }
41
- if (Mage::getStoreConfig('payment/bitcoin/fullscreen') != 1 ) {
42
- return 'disabled';
43
- }
44
- $invoice = $instance->getInvoiceData();
45
- return $invoice['url'];
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Content.php CHANGED
@@ -1,51 +1,66 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- class Yellow_Bitcoin_Block_Fullscreen_Widget_Content extends Yellow_Bitcoin_Block_Widget
29
  {
30
- /**
31
- * create an invoice & return the url of it
32
- * @return string
33
- */
34
- public function GetWidgetUrl()
35
- {
36
- $order_id = Mage::getSingleton('checkout/session') ->getLastRealOrderId();
37
- $order = Mage::getModel("sales/order")->loadByIncrementId($order_id);
38
- if (!($order)
39
- or !($payment = $order->getPayment())
40
- or !($instance = $payment->getMethodInstance())
41
- or ($instance->getCode() != 'bitcoin')
42
- ) {
43
- return 'no payment';
44
- }
45
- if (Mage::getStoreConfig('payment/bitcoin/fullscreen') != 1 ) {
46
- return 'disabled';
47
- }
48
- $invoice = $instance->getInvoiceData();
49
- return $invoice['url'];
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Block_Fullscreen_Widget_Content extends Yellow_Bitcoin_Block_Widget
29
+ {
30
  /**
31
+ * a copy value from server root from bitcoin.php model
32
+ * just as read only
33
+ * @var
34
+ */
35
+ protected $server_root ;
36
+
37
+ /**
38
+ * create an invoice & return the url of it
39
+ * @return string
40
+ */
41
+ public function GetWidgetUrl()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  {
43
+ $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
44
+ $order = Mage::getModel("sales/order")->loadByIncrementId($order_id);
45
+ if (!($order)
46
+ or !($payment = $order->getPayment())
47
+ or !($instance = $payment->getMethodInstance())
48
+ or ($instance->getCode() != 'bitcoin')
49
+ ) {
50
+ return 'no payment';
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
+ if (Mage::getStoreConfig('payment/bitcoin/fullscreen') != 1) {
53
+ return 'disabled';
54
+ }
55
+ $invoice = $instance->getInvoiceData();
56
+ $this->server_root = $instance->getConfiguredServerRoot();
57
+
58
+ return $invoice['url'];
59
+ }
60
+
61
+
62
+ public function getConfiguredServerRoot()
63
+ {
64
+ return $this->server_root ;
65
  }
66
+ }
app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Footer.php CHANGED
@@ -1,122 +1,126 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
 
29
- Class Yellow_Bitcoin_Block_Fullscreen_Widget_Footer extends Yellow_Bitcoin_Block_Fullscreen_Widget_Header
 
 
 
30
  {
31
- /**
32
- * @var Mage_Sales_Model_Order
33
- */
34
- public $order;
35
- /**
36
- * @return sales email address
37
- */
38
- public function getContactEmail(){
39
- return Mage::getStoreConfig('trans_email/ident_sales/email');
40
- }
41
 
42
- /**
43
- * get customer email
44
- * @return string
45
- */
46
- public function getCustomerEmail(){
47
- if($this->order instanceof Mage_Sales_Model_Order){
48
- $email = $this->order->getCustomerEmail();
49
- }else{
50
- $email = "";
51
- }
52
- return $email;
53
  }
 
 
54
 
55
- /**
56
- * get customer email
57
- * @return string
58
- */
59
- public function getCustomerName()
60
- {
61
- if($this->order instanceof Mage_Sales_Model_Order){
62
- $name = Mage::getModel("customer/customer")->load($this->order->getCustomerId())->getName();
63
- }else{
64
- $name= "";
65
- }
66
- return $name;
67
  }
 
 
68
 
69
- /**
70
- * return billing address
71
- * @return mixed
72
- */
73
- public function getBillingAddress(){
74
- $order = $this->getLastOrder();
75
- $htmlAddress = $order->getBillingAddress()->format("html");
76
- return $htmlAddress;
77
- }
 
78
 
79
- /**
80
- * return yellow invoice data
81
- * @return array
82
- */
83
- public function getInvoiceData()
84
- {
85
- $order = $this->getLastOrder();
86
 
87
- if (!($order)
88
- or !($payment = $order->getPayment())
89
- or !($instance = $payment->getMethodInstance())
90
- or ($instance->getCode() != 'bitcoin')
91
- ) {
92
- return 'no payment';
93
- }
94
- if (Mage::getStoreConfig('payment/bitcoin/fullscreen') != 1 ) {
95
- return 'disabled';
96
- }
97
- $invoice = $instance->getInvoiceData();
98
- return $invoice;
99
  }
100
-
101
- /**
102
- * return last order object
103
- * @return Mage_Sales_Model_Order $order
104
- */
105
- public function getLastOrder()
106
- {
107
- $order_id = Mage::getSingleton('checkout/session') ->getLastRealOrderId();
108
- $order = Mage::getModel("sales/order")->loadByIncrementId($order_id);
109
- $this->order = $order;
110
- return $this->order;
111
  }
 
 
 
112
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
- /**
115
- * this was made for future use
116
- *
117
- * @param $order
118
- */
119
- public function setLastOrder($order){
120
- $this->order = $order;
121
- }
 
122
  }
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ Class Yellow_Bitcoin_Block_Fullscreen_Widget_Footer extends Yellow_Bitcoin_Block_Fullscreen_Widget_Header
29
+ {
30
  /**
31
+ * @var Mage_Sales_Model_Order
32
+ */
33
+ public $order;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
+ /**
36
+ * @return sales email address
37
+ */
38
+ public function getContactEmail()
39
  {
40
+ return Mage::getStoreConfig('trans_email/ident_sales/email');
41
+ }
 
 
 
 
 
 
 
 
42
 
43
+ /**
44
+ * get customer email
45
+ * @return string
46
+ */
47
+ public function getCustomerEmail()
48
+ {
49
+ if ($this->order instanceof Mage_Sales_Model_Order) {
50
+ $email = $this->order->getCustomerEmail();
51
+ } else {
52
+ $email = "";
 
53
  }
54
+ return $email;
55
+ }
56
 
57
+ /**
58
+ * get customer email
59
+ * @return string
60
+ */
61
+ public function getCustomerName()
62
+ {
63
+ if ($this->order instanceof Mage_Sales_Model_Order) {
64
+ $name = Mage::getModel("customer/customer")->load($this->order->getCustomerId())->getName();
65
+ } else {
66
+ $name = "";
 
 
67
  }
68
+ return $name;
69
+ }
70
 
71
+ /**
72
+ * return billing address
73
+ * @return mixed
74
+ */
75
+ public function getBillingAddress()
76
+ {
77
+ $order = $this->getLastOrder();
78
+ $htmlAddress = $order->getBillingAddress()->format("html");
79
+ return $htmlAddress;
80
+ }
81
 
82
+ /**
83
+ * return yellow invoice data
84
+ * @return array
85
+ */
86
+ public function getInvoiceData()
87
+ {
88
+ $order = $this->getLastOrder();
89
 
90
+ if (!($order)
91
+ or !($payment = $order->getPayment())
92
+ or !($instance = $payment->getMethodInstance())
93
+ or ($instance->getCode() != 'bitcoin')
94
+ ) {
95
+ return 'no payment';
 
 
 
 
 
 
96
  }
97
+ if (Mage::getStoreConfig('payment/bitcoin/fullscreen') != 1) {
98
+ return 'disabled';
 
 
 
 
 
 
 
 
 
99
  }
100
+ $invoice = $instance->getInvoiceData();
101
+ return $invoice;
102
+ }
103
 
104
+ /**
105
+ * return last order object
106
+ * @return Mage_Sales_Model_Order $order
107
+ */
108
+ public function getLastOrder()
109
+ {
110
+ $order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
111
+ $order = Mage::getModel("sales/order")->loadByIncrementId($order_id);
112
+ $this->order = $order;
113
+ return $this->order;
114
+ }
115
 
116
+
117
+ /**
118
+ * this was made for future use
119
+ *
120
+ * @param $order
121
+ */
122
+ public function setLastOrder($order)
123
+ {
124
+ $this->order = $order;
125
  }
126
+ }
app/code/local/Yellow/Bitcoin/Block/Fullscreen/Widget/Header.php CHANGED
@@ -1,56 +1,56 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
-
29
- Class Yellow_Bitcoin_Block_Fullscreen_Widget_Header extends Mage_Core_Block_Template
30
  {
31
- /**
32
- * return store name
33
- * @return null|string
34
- */
35
- public function getStoreName(){
36
- return Mage::app()->getStore()->getName();
37
- }
38
 
39
- /**
40
- * return store's logo src
41
- * @return string
42
- */
43
- public function getLogoSrc()
44
- {
45
- return $this->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'));
46
- }
47
 
48
- /**
49
- * return alt text for store's logo
50
- * @return mixed
51
- */
52
- public function getLogoAlt()
53
- {
54
- return Mage::getStoreConfig('design/header/logo_alt');
55
- }
56
- }
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ Class Yellow_Bitcoin_Block_Fullscreen_Widget_Header extends Mage_Core_Block_Template
29
+ {
30
  /**
31
+ * return store name
32
+ * @return null|string
33
+ */
34
+ public function getStoreName()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  {
36
+ return Mage::app()->getStore()->getName();
37
+ }
 
 
 
 
 
38
 
39
+ /**
40
+ * return store's logo src
41
+ * @return string
42
+ */
43
+ public function getLogoSrc()
44
+ {
45
+ return $this->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'));
46
+ }
47
 
48
+ /**
49
+ * return alt text for store's logo
50
+ * @return mixed
51
+ */
52
+ public function getLogoAlt()
53
+ {
54
+ return Mage::getStoreConfig('design/header/logo_alt');
55
+ }
56
+ }
app/code/local/Yellow/Bitcoin/Block/Info.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Yellow_Bitcoin_Block_Info extends Mage_Payment_Block_Info
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->setTemplate('bitcoin/info/invoice.phtml');
8
+ }
9
+ public function getInvoiceUrl()
10
+ {
11
+ $order = $this->getInfo()->getOrder();
12
+ if (false === isset($order) || true === empty($order)) {
13
+ return false;
14
+ }
15
+ $id = $order->getId();
16
+ $invoice_url = Mage::getModel("bitcoin/ipn")->load($id , "order_id")->getData("url");
17
+ if($invoice_url){
18
+ return $invoice_url ;
19
+ }else{
20
+ return false;
21
+ }
22
+ }
23
+ }
app/code/local/Yellow/Bitcoin/Block/Info/Bitcoin.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- class Yellow_Bitcoin_Block_Info_Bitcoin {
3
-
4
- }
 
 
 
 
app/code/local/Yellow/Bitcoin/Block/Status.php CHANGED
@@ -1,31 +1,31 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- class Yellow_Bitcoin_Block_Status extends Mage_Core_Block_Template
29
- {
30
 
31
- }
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Block_Status extends Mage_Core_Block_Template
29
+ {
30
 
31
+ }
app/code/local/Yellow/Bitcoin/Block/Widget.php CHANGED
@@ -1,73 +1,91 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
  **/
28
- class Yellow_Bitcoin_Block_Widget extends Mage_Checkout_Block_Onepage_Payment
29
  {
 
 
 
30
 
31
- /**
32
- *
33
- **/
34
- protected function _construct()
35
- {
36
- $this->setTemplate('bitcoin/widget.phtml');
37
- parent::_construct();
38
- }
39
 
40
- /**
41
- * @return string
42
- */
43
- public function GetQuoteId()
44
- {
45
- $quote = $this->getQuote();
46
- $quoteId = $quote->getId();
47
 
48
- return $quoteId;
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
-
51
- /**
52
- * create an invoice and return the url so that widget.phtml can display it
53
- *
54
- * @return string
55
- */
56
- public function GetWidgetUrl()
57
- {
58
- if (!($quote = Mage::getSingleton('checkout/session')->getQuote())
59
- or !($payment = $quote->getPayment())
60
- or !($instance = $payment->getMethodInstance())
61
- or ($instance->getCode() != 'bitcoin')
62
- ) {
63
- return 'no payment';
64
- }
65
- if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
66
- return 'disabled';
67
- }
68
- $quote = $this->getQuote();
69
- $payment = $quote->getPayment()->getMethodInstance();
70
- $invoice = $payment->createInvoice($quote, false);
71
- return $invoice['url'];
72
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  }
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Block_Widget extends Mage_Checkout_Block_Onepage_Payment
29
+ {
30
+
31
  /**
32
+ * a copy value from server root from bitcoin.php model
33
+ * just as read only
34
+ * @var
35
+ */
36
+ protected $server_root ;
37
+
38
+
39
+ /**
40
+ * constructor method
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  **/
42
+ protected function _construct()
43
  {
44
+ $this->setTemplate('bitcoin/widget.phtml');
45
+ parent::_construct();
46
+ }
47
 
48
+ /**
49
+ * @return string
50
+ */
51
+ public function GetQuoteId()
52
+ {
53
+ $quote = $this->getQuote();
54
+ $quoteId = $quote->getId();
 
55
 
56
+ return $quoteId;
57
+ }
 
 
 
 
 
58
 
59
+ /**
60
+ * create an invoice and return the url so that widget.phtml can display it
61
+ *
62
+ * @return string
63
+ */
64
+ public function GetWidgetUrl()
65
+ {
66
+ if (!($quote = Mage::getSingleton('checkout/session')->getQuote())
67
+ or !($payment = $quote->getPayment())
68
+ or !($instance = $payment->getMethodInstance())
69
+ or ($instance->getCode() != 'bitcoin')
70
+ ) {
71
+ return 'no payment';
72
  }
73
+ if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
74
+ return 'disabled';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
+ $quote = $this->getQuote();
77
+ $payment = $quote->getPayment()->getMethodInstance();
78
+ $invoice = $payment->createInvoice($quote, false);
79
+ $this->server_root = $instance->getConfiguredServerRoot();
80
+ return $invoice['url'];
81
+ }
82
+
83
+ /***
84
+ * return the configured server root
85
+ * @return string
86
+ */
87
+ public function getConfiguredServerRoot()
88
+ {
89
+ return $this->server_root;
90
  }
91
+ }
app/code/local/Yellow/Bitcoin/Helper/Data.php CHANGED
@@ -1,39 +1,66 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- class Yellow_Bitcoin_Helper_Data extends Mage_Core_Helper_Abstract
29
  {
30
- /**
31
- * check if the fullscreen setting is set to yes / no
32
- * @return bool
33
- */
34
- public function isFullScreen()
35
- {
36
- return ( Mage::getStoreConfig('payment/bitcoin/fullscreen') == 1 );
 
 
 
 
 
 
 
 
37
  }
 
 
38
 
 
 
 
 
 
 
 
 
 
39
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Helper_Data extends Mage_Core_Helper_Abstract
29
+ {
30
  /**
31
+ * check if the fullScreen setting is set to yes / no
32
+ * @return bool
33
+ */
34
+ public function isFullScreen()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  {
36
+ return (Mage::getStoreConfig('payment/bitcoin/fullscreen') == 1);
37
+ }
38
+
39
+ /***
40
+ * does the secured url has https
41
+ * in another words : does the store has ssl certificate
42
+ * @return bool
43
+ */
44
+ public function doesTheStoreHasSSL()
45
+ {
46
+ $store_id = Mage::app()->getStore()->getId();
47
+ $secured_url = Mage::getStoreConfig("web/secure/base_url" , $store_id);
48
+ preg_match("/^https:\/\//" , $secured_url , $matches);
49
+ if(count($matches) == 1 ){
50
+ return true;
51
  }
52
+ return false;
53
+ }
54
 
55
+
56
+ /**
57
+ * replace https with http in case the store doesn't have ssl certificate
58
+ * @param $url
59
+ * @return mixed
60
+ */
61
+ public function replaceHttps($url)
62
+ {
63
+ return str_replace("https://" , "http://" , $url);
64
  }
65
+
66
+ }
app/code/local/Yellow/Bitcoin/Model/Bitcoin.php CHANGED
@@ -1,639 +1,692 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
 
4
  *
5
- * The MIT License (MIT)
 
 
 
 
 
6
  *
7
- * Copyright (c) 2014 YellowPay.co
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
 
 
15
  *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
 
 
 
 
18
  *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
  *
27
- * */
28
- Class Yellow_Bitcoin_Model_Bitcoin extends Mage_Payment_Model_Method_Abstract
29
- {
30
 
31
- /**
32
- * Payment method code
33
- *
34
- * @var string
35
- */
36
- protected $_code = 'bitcoin';
37
-
38
- /**
39
- * Payment Method features
40
- *
41
- * @var bool
42
- */
43
- protected $_isGateway = true;
44
- protected $_canOrder = true;
45
- protected $_canAuthorize = true;
46
- protected $_canCapture = true;
47
- protected $_canCapturePartial = false;
48
- protected $_canCaptureOnce = false;
49
- protected $_canRefund = false;
50
- protected $_canRefundInvoicePartial = false;
51
- protected $_canVoid = false;
52
- protected $_canUseInternal = false;
53
- protected $_canUseCheckout = true;
54
- protected $_canUseForMultishipping = true;
55
- protected $_isInitializeNeeded = false;
56
- protected $_canFetchTransactionInfo = false;
57
- protected $_canReviewPayment = false;
58
- protected $_canCreateBillingAgreement = false;
59
- protected $_canManageRecurringProfiles = true;
60
-
61
- /**
62
- * Cash On Delivery payment block paths
63
- *
64
- * @var string
65
- */
66
- protected $_formBlockType = 'bitcoin/form_bitcoin';
67
-
68
- /**
69
- * Server Root for Yellow API
70
- *
71
- * @var String
72
- */
73
- private $server_root = "https://api.yellowpay.co/v1/";
74
-
75
- /**
76
- * create invoice URI
77
- *
78
- * @var String
79
- */
80
- private $api_uri_create_invoice = "invoice/";
81
-
82
- /**
83
- * check invoice status URI
84
- *
85
- * @var String
86
- */
87
- private $api_uri_check_payment = "invoice/[id]/";
88
-
89
- /**
90
- * @type Mage_Sales_Model_Order
91
- **/
92
- private $order;
93
-
94
- /**
95
- * Check whether payment method can be used
96
- *
97
- * @param Mage_Sales_Model_Quote|null $quote
98
- *
99
- * @return bool
100
- */
101
- public function isAvailable($quote = null)
102
- {
103
- parent::isAvailable($quote);
104
- $quoteCurrency = $quote->getData("quote_currency_code");
105
- $currencies = array_map('trim', explode(',', Mage::getStoreConfig('payment/bitcoin/currencies')));
106
- return array_search($quoteCurrency, $currencies) !== false;
107
  }
 
 
108
 
109
- /**
110
- * Get instructions text from config
111
- *
112
- * @return string
113
- */
114
- public function getInstructions()
115
- {
116
- return trim($this->getConfigData('instructions'));
117
- }
 
 
 
 
 
118
 
119
- /**
120
- * can be used in regular checkout
121
- *
122
- * @return bool
123
- */
124
- public function canUseCheckout()
125
- {
126
- if (!$this->isApiKeyConfigured()) {
127
- return false;
128
- }
129
- return $this->_canUseCheckout;
 
 
 
 
 
 
 
 
130
  }
 
 
131
 
132
- /**
133
- * Returns true if the merchant has set their api key
134
- *
135
- * @return boolean
136
- */
137
- public function isApiKeyConfigured()
138
- {
139
- $public_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/public_key'));
140
- $private_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/private_key'));
141
- return (!empty($private_key) && !empty($public_key));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  }
 
143
 
144
- /**
145
- * Authorize payment abstract method
146
- *
147
- * @param Varien_Object $payment
148
- * @param float $amount
149
- *
150
- * @return Mage_Payment_Model_Abstract | direct redirect to Yellow fullscreen payment page
151
- */
152
- public function authorize(Varien_Object $payment, $amount)
153
- {
154
- if (!Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
155
- $data = $this->CheckForPayment($payment);
156
- return $data;
157
- } else {
158
- return $this->CreateInvoiceAndRedirect($payment);
159
- }
 
 
 
 
 
 
 
 
160
  }
 
161
 
162
- /**
163
- *
164
- * create a yellow invoice
165
- *
166
- * @param $payment
167
- * @param $amount
168
- *
169
- * @return Yellow_Bitcoin_Model_Bitcoin
170
- */
171
- public function CreateInvoiceAndRedirect($payment)
172
- {
173
- $order = $payment->getOrder();
174
- if (is_array($this->createInvoice($order))) {
175
- $payment->setIsTransactionPending(true); // status will be PAYMENT_REVIEW instead of PROCESSING
176
- //$orderId = $order->getIncrementId();
177
- //$invoiceId = Mage::getModel('sales/order_invoice_api')->create($orderId, array());
178
- return $this;
179
- } else {
180
- $this->log("An error occurred during invoice creation: " . __LINE__);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  Mage::throwException(
182
  Mage::helper('bitcoin')->__(
183
- "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
184
  )
185
  );
186
- }
187
- }
188
-
189
- /**
190
- * @param Varien_Object $payment
191
- *
192
- * @return Yellow_Bitcoin_Model_Bitcoin
193
- */
194
- public function CheckForPayment($payment)
195
- {
196
- $order = $payment->getOrder();
197
- $order->setCanSendNewEmailFlag(false);
198
- $quoteId = $order->getQuoteId();
199
- $ipn = Mage::getModel('bitcoin/ipn');
200
- $invoice = Mage::getSingleton('core/session')->getData("invoice");
201
- $invoice_status = $this->checkInvoice($invoice["id"]);
202
- if (!is_array($invoice_status)) {
203
  Mage::throwException(
204
  Mage::helper('bitcoin')->__(
205
  "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
206
  )
207
  );
208
- }
209
- switch ($invoice_status["status"]) {
210
- case "new":
211
- // This is the error that is displayed to the customer during checkout.
212
- Mage::throwException("Order has not been paid. Please pay first and then place your order.");
213
- Mage::log(
214
- 'Order has not been paid. Please pay first and then place your order.',
215
- Zend_Log::CRIT,
216
- 'yellow.log'
217
- );
218
- break;
219
- case "partial":
220
- // This is the error that is displayed to the customer during checkout.
221
- Mage::getResourceModel("bitcoin/ipn")->MarkAsPartial($invoice["id"]);
222
- Mage::throwException("Order has been partially paid. We don't support partial payment yet.");
223
- Mage::log(
224
- 'Order has been partially paid. We don\'t support partial payment yet.',
225
- Zend_Log::CRIT,
226
- 'yellow.log'
227
- );
228
- break;
229
-
230
- case "authorizing":
231
- Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($invoice["id"]);
232
- $payment->setIsTransactionPending(true);
233
- $order = $payment->getOrder();
234
- $status_message = "Yellow invoice created. Invoice Id: " . $invoice['id'];
235
- $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, $status_message);
236
-
237
- /* start to invoice the order */
238
- /*$order = $payment->getOrder();
239
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
240
- if (!count($order->getInvoiceCollection())) {
241
- $invoice = $order->prepareInvoice()
242
- ->setTransactionId(1)
243
- ->addComment('Invoiced automatically from widget payment')
244
- ->register()
245
- ->pay();
246
- $transactionSave = Mage::getModel('core/resource_transaction')
247
- ->addObject($invoice)
248
- ->addObject($invoice->getOrder());
249
- $transactionSave->save();
250
- }*/
251
- /* end invoice the order */
252
- break;
253
- case "paid":
254
- $invoiceModel = Mage::getModel('sales/order_invoice_api');
255
- $invoice_id = $invoiceModel->create($payment->getOrder()->getIncrementId(), array());
256
- $invoiceModel->capture($invoice_id);
257
- break;
258
- case "expired":
259
- Mage::throwException(
260
- Mage::helper('bitcoin')->__(
261
- "I'm sorry the invoice has {$invoice_status["status"]}, please refresh the shopping cart."
262
- )
263
- );
264
- break;
265
- case "refund_owed":
266
- Mage::throwException(
267
- Mage::helper('bitcoin')->__("Incorrect payment received, please request a refund.")
268
- );
269
- break;
270
- case "refund_requested":
271
- Mage::throwException(
272
- Mage::helper('bitcoin')->__(
273
- "Refund requested! To place a new order, please refresh shopping cart."
274
- )
275
- );
276
- break;
277
- default:
278
- $this->log("EXCEPTION - UNKNOW STATUS: " . $invoice_status["status"]);
279
- Mage::throwException(
280
- Mage::helper('bitcoin')->__(
281
- "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
282
- )
283
- );
284
- break;
285
- }
286
- return $this;
287
  }
 
 
288
 
289
- /**
290
- * read the invoice url from session and redirect to it
291
- *
292
- * @return string
293
- */
294
- public function getOrderPlaceRedirectUrl()
295
- {
296
- if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
297
- $target_url = Mage::getUrl("bitcoin/index/pay");
298
- return $target_url;
299
- } else {
300
- return '';
301
  }
 
 
 
302
  }
 
 
 
 
 
 
 
 
 
 
303
 
304
- public function getInvoiceData()
305
- {
306
- return Mage::getSingleton('core/session')->getData("invoice");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
 
309
- /**
310
- *
311
- * @param Mage_Sales_Model_Quote $quote
312
- * @param boolean $redirect
313
- * @return boolean
314
- */
315
- public function createInvoice($quote, $redirect = true)
316
- {
317
- $this->clearSessionData();
318
- if (get_class($quote) == "Mage_Sales_Model_Quote") {
319
- $array_key = "quoteId";
320
- $currency_code_key = "quote_currency_code";
321
  } else {
322
- $array_key = "orderId";
323
- $currency_code_key = "order_currency_code";
 
 
324
  }
325
- $base_price = $quote->getData("grand_total");
326
- $base_ccy = $quote->getData($currency_code_key);
327
- $quote_id = $quote->getData("entity_id");
328
- $ipnUrl = Mage::getUrl("bitcoin/index/ipn", array( "_secure" => true , "id" => base64_encode($quote_id)));
329
- $redirectUrl = "";
330
- /*if ($redirect) {
331
- $redirectUrl = Mage::getUrl("bitcoin/index/status");
332
- }*/
333
- $http_client = $this->getHTTPClient();
334
- $yellow_payment_data = array(
335
- "base_price" => $base_price, /// Set to 0.30 for testing
336
- "base_ccy" => $base_ccy, /// Set to "USD" for testing
337
- "callback" => $ipnUrl,
338
- "redirect" => $redirectUrl
339
  );
340
- $post_body = json_encode($yellow_payment_data);
341
- $nonce = round(microtime(true) * 1000);
342
- $url = $this->server_root . $this->api_uri_create_invoice;
343
- $message = $nonce . $url . $post_body;
344
- $private_key = Mage::helper('core')->decrypt($this->getConfiguration("private_key"));
345
- $hash = hash_hmac("sha256", $message, $private_key, false);
346
-
347
- $http_client->setHeaders($this->getHeaders($nonce, $hash));
348
- $http_client->setMethod("POST")
349
- ->setUri($url);
350
- $http_client->setRawData($post_body);
351
- try {
352
- $response = $http_client->request();
353
- if ($response->getStatus() == "200") {
354
- $this->log("Response: " . $response);
355
- $body = $response->getBody();
356
- $data = json_decode($body, true);
357
- /* save the invoice in the database */
358
- $invoice_data = array(
359
- $array_key => $quote_id,
360
- "invoice_id" => $data["id"],
361
- "url" => $data["url"],
362
- "status" => $data["status"],
363
- "address" => $data["address"],
364
- "invoice_price" => $data["invoice_price"],
365
- "invoice_ccy" => $data["invoice_ccy"],
366
- "server_time" => $data["server_time"],
367
- "expiration_time" => $data["expiration"],
368
- "raw_body" => $yellow_payment_data,
369
- "base_price" => $yellow_payment_data["base_price"],
370
- "base_ccy" => $yellow_payment_data["base_ccy"],
371
- "hash" => $hash
372
- );
373
- Mage::getModel("bitcoin/ipn")->saveInvoice($invoice_data);
374
- /* end saving invoice */
375
- Mage::getSingleton('core/session')->setData('invoice', $data);
376
- Mage::getSingleton('core/session')->setData('has_invoice', true);
377
- return $data;
378
- } else {
379
- Mage::throwException($response->getBody());
380
- $this->log("Error code response received: {$response->getStatus()}");
381
- $this->log("Response body:" . json_encode($response->getBody()));
382
- return false;
383
- }
384
- } catch (Exception $exc) {
385
- $this->log($exc->getMessage());
386
- $this->log("EXCEPTION: " . json_encode($exc));
387
- Mage::throwException(
388
- Mage::helper('bitcoin')->__(
389
- "{$exc->getMessage()}\n We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
390
- )
391
- );
392
- }
393
  }
 
394
 
395
- /**
396
- * check yellow invoice status over Yellow API
397
- *
398
- * @param integer $id
399
- * @return boolean
400
- *
401
- */
402
- public function checkInvoice($id)
403
- {
404
- $url = $this->server_root . str_replace("[id]", $id, $this->api_uri_check_payment);
405
- $nonce = round(microtime(true) * 1000);
406
- $message = $nonce . $url;
407
- $private_key = Mage::helper('core')->decrypt($this->getConfiguration("private_key"));
408
- $hash = hash_hmac("sha256", $message, $private_key, false);
409
- $http_client = $this->getHTTPClient();
410
- $http_client->setHeaders($this->getHeaders($nonce, $hash));
411
- $http_client->setMethod("GET")->setUri($url);
412
- try {
413
- $body = $http_client->request()->getBody();
414
- $data = json_decode($body, true);
415
- Mage::getSingleton('core/session')->setData('check_invoice', $data);
416
- return $data;
417
- } catch (Exception $exc) {
418
- $this->log($exc->getMessage());
419
- $this->log("EXCEPTION:" . json_encode($exc));
420
- Mage::throwException(
421
- Mage::helper('bitcoin')->__(
422
- "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co\n" . $exc->getMessage(
423
- )
424
- )
425
- );
426
- }
427
- return false;
428
  }
 
 
429
 
430
- /**
431
- * check yellow invoice status over Yellow API
432
- *
433
- * @param integer $id
434
- * @return boolean
435
- *
436
- */
437
-
438
- public function checkInvoiceStatus($id)
439
- {
440
- $data = $this->checkInvoice($id);
441
- if (!is_array($data)) {
442
- Mage::throwException(
443
- Mage::helper('bitcoin')->__(
444
- "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co\nline: " . __LINE__
445
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
446
  );
447
- }
448
- $order = $this->getOrder();
449
- switch ($data["status"]){
450
- case $data["status"] == "new":
451
- $this->log("Status page accessed for a new invoice.");
452
- $this->log("Nothing to do. Redirecting back to the payment page.");
453
- break;
454
- case $data["status"] == "paid" :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  $order->addStatusToHistory(
456
- $this->getSuccessStatus(),
457
- "Payment confirmed. Invoice Id: " . $data["id"],
458
  true
459
  );
460
- $order->sendNewOrderEmail();
461
  $order->save();
462
- Mage::getResourceModel("bitcoin/ipn")->MarkAsPaid($id);
463
- /* create an invoice */
464
- $invoiceModel = Mage::getModel('sales/order_invoice_api');
465
- $invoice_id = $invoiceModel->create($order->getIncrementId(), array());
466
- $invoiceModel->capture($invoice_id);
467
- break;
468
- case $data["status"] == "authorizing":
 
 
 
 
469
  $order->addStatusToHistory(
470
- Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW,
471
- "Authorizing payment. This typically takes 10 minutes. Invoice Id: {$data['id']}"
 
472
  );
 
473
  $order->save();
474
- Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($id);
475
- break;
476
- case $data["status"] == "refund_requested" :
477
- $order->setState(Mage_Sales_Model_Order::STATE_NEW);
478
- if(!$order->canCancel()){
479
- $this->log("Unable to cancel order. Order #" . $order->getIncrementId());
480
- }else{
481
- $this->log("refund_requested order");
482
- Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundRequested($id);
483
- $order->addStatusToHistory(
484
- $this->getFailedStatus(),
485
- "refund_requested. Invoice #{$id} ",
486
- true
487
- );
488
- $order->cancel();
489
- $order->save();
490
- $this->log("Order cancelled. Order #" . $order->getIncrementId());
491
- }
492
- break;
493
- case $data["status"] === "failed":
494
- case $data["status"] === "expired":
495
- $order->setState(Mage_Sales_Model_Order::STATE_NEW);
496
- if(!$order->canCancel()){
497
- $this->log("Unable to cancel order. Order #" . $order->getIncrementId());
498
- }else{
499
- $this->log("Order expired");
500
- Mage::getResourceModel("bitcoin/ipn")->MarkAsExpired($id);
501
- $order->addStatusToHistory(
502
- $this->getFailedStatus(),
503
- "Invoice expired. Invoice #{$id}",
504
- true
505
- );
506
- $order->cancel();
507
- $order->save();
508
- $this->log("Order cancelled. Order #" . $order->getIncrementId());
509
- }
510
- break;
511
- default:
512
- return false;
513
- break;
514
- }
515
- return $data["status"];
516
  }
 
 
517
 
518
- /**
519
- *
520
- * @param Mage_Sales_Model_Order $order
521
- */
522
- public function setOrder($order)
523
- {
524
- $this->order = $order;
525
- }
526
 
527
- /**
528
- *
529
- * @return Mage_Sales_Model_Order
530
- * @throws \Exception
531
- */
532
- public function getOrder()
533
- {
534
- if (!$this->order) {
535
- $session = Mage::getSingleton('checkout/session');
536
- if (!$session->getLastRealOrderId()) {
537
- throw new \Exception("Order id can't be null ", 500);
538
- }
539
- $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
540
- $this->order = $order;
541
  }
542
- return $this->order;
 
543
  }
 
 
544
 
545
- /**
546
- * read from magento configuration
547
- *
548
- * @param string $param
549
- * @return type
550
- */
551
- public function getConfiguration($param)
552
- {
553
- return $this->getConfigData($param);
554
- }
555
 
556
- /**
557
- * get HTTP client
558
- *
559
- * @return \Yellow_Bitcoin_Model_Http
560
- */
561
- private function getHTTPClient()
562
- {
563
- return new Yellow_Bitcoin_Model_Http();
564
- }
565
 
566
- /**
567
- * prepare HTTP Headers
568
- *
569
- * @param String $nonce
570
- * @param String $signature
571
- * @return string
572
- */
573
- private function getHeaders($nonce, $signature)
574
- {
575
- $headers = array(
576
- "Content-type:application/json",
577
- "API-Key:" . Mage::helper('core')->decrypt($this->getConfiguration('public_key')),
578
- "API-Nonce:$nonce",
579
- "API-Sign:$signature"
580
- );
581
- return $headers;
582
- }
583
 
584
- /**
585
- * returns success status
586
- *
587
- * @return String
588
- */
589
- public function getSuccessStatus()
590
- {
591
- return Mage_Sales_Model_Order::STATE_PROCESSING;
592
- }
593
 
594
- /**
595
- * returns failed status
596
- *
597
- * @return String
598
- */
599
- public function getFailedStatus()
600
- {
601
- return Mage_Sales_Model_Order::STATE_CANCELED;
602
- }
603
 
604
- /**
605
- *
606
- * @param string $invoiceIncrementId
607
- * @return boolean
608
- */
609
- public function captureInvoice($invoiceIncrementId)
610
- {
611
- return Mage::getModel("sales/order_invoice_api")->capture($invoiceIncrementId);
612
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
 
614
- /**
615
- *
616
- * clear session data
617
- *
618
- * @return boolean
619
- */
620
- public function clearSessionData()
621
- {
622
- Mage::getSingleton('core/session')->unsetData("invoice");
623
- Mage::getSingleton('core/session')->unsetData("has_invoice");
624
- Mage::getSingleton('core/session')->unsetData("check_invoice");
625
- return true;
626
  }
 
 
 
627
 
628
- /**
629
- * log message to file
630
- *
631
- * @param string $message
632
- * @return boolean
633
- */
634
- private function log($message)
635
- {
636
- Mage::log($message, Zend_Log::ERR, "yellow.log");
637
- return true;
638
- }
639
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ * */
28
+ Class Yellow_Bitcoin_Model_Bitcoin extends Mage_Payment_Model_Method_Abstract
29
+ {
30
+
31
  /**
32
+ * Payment method code
33
  *
34
+ * @var string
35
+ */
36
+ protected $_code = 'bitcoin';
37
+
38
+ /**
39
+ * Payment Method features
40
  *
41
+ * @var bool
42
+ */
43
+ protected $_isGateway = true;
44
+ protected $_canOrder = true;
45
+ protected $_canAuthorize = true;
46
+ protected $_canCapture = true;
47
+ protected $_canCapturePartial = false;
48
+ protected $_canCaptureOnce = false;
49
+ protected $_canRefund = false;
50
+ protected $_canRefundInvoicePartial = false;
51
+ protected $_canVoid = false;
52
+ protected $_canUseInternal = false;
53
+ protected $_canUseCheckout = true;
54
+ protected $_canUseForMultishipping = true;
55
+ protected $_isInitializeNeeded = false;
56
+ protected $_canFetchTransactionInfo = false;
57
+ protected $_canReviewPayment = false;
58
+ protected $_canCreateBillingAgreement = false;
59
+ protected $_canManageRecurringProfiles = true;
60
+
61
+ /**
62
+ * Cash On Delivery payment block paths
63
  *
64
+ * @var string
65
+ */
66
+ protected $_formBlockType = 'bitcoin/form_bitcoin';
67
+
68
+ protected $_infoBlockType = 'bitcoin/info';
69
+
70
+ /**
71
+ * Server Root for Yellow API
72
  *
73
+ * @var String
74
+ */
75
+ private $server_root = "https://api.yellowpay.co/v1/";
76
+
77
+ /**
78
+ * create invoice URI
79
  *
80
+ * @var String
81
+ */
82
+ private $api_uri_create_invoice = "invoice/";
83
+
84
+ /**
85
+ * check invoice status URI
 
86
  *
87
+ * @var String
88
+ */
89
+ private $api_uri_check_payment = "invoice/[id]/";
90
 
91
+ /**
92
+ * @type Mage_Sales_Model_Order
93
+ **/
94
+ private $order;
95
+
96
+
97
+ /**
98
+ * constructor method , it also allow to set custom API server
99
+ * MADE FOR DEVELOPERS Only
100
+ */
101
+ public function __construct()
102
+ {
103
+ $custom_server_root = getenv("YELLOW_SERVER");
104
+ if($custom_server_root){
105
+ $this->server_root = $custom_server_root;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
+ return parent::__construct();
108
+ }
109
 
110
+ /**
111
+ * Check whether payment method can be used
112
+ *
113
+ * @param Mage_Sales_Model_Quote|null $quote
114
+ *
115
+ * @return bool
116
+ */
117
+ public function isAvailable($quote = null)
118
+ {
119
+ parent::isAvailable($quote);
120
+ $quoteCurrency = $quote->getData("quote_currency_code");
121
+ $currencies = array_map('trim', explode(',', Mage::getStoreConfig('payment/bitcoin/currencies')));
122
+ return array_search($quoteCurrency, $currencies) !== false;
123
+ }
124
 
125
+ /**
126
+ * Get instructions text from config
127
+ *
128
+ * @return string
129
+ */
130
+ public function getInstructions()
131
+ {
132
+ return trim($this->getConfigData('instructions'));
133
+ }
134
+
135
+ /**
136
+ * can be used in regular checkout
137
+ *
138
+ * @return bool
139
+ */
140
+ public function canUseCheckout()
141
+ {
142
+ if (!$this->isApiKeyConfigured()) {
143
+ return false;
144
  }
145
+ return $this->_canUseCheckout;
146
+ }
147
 
148
+ /**
149
+ * Returns true if the merchant has set their api key
150
+ *
151
+ * @return boolean
152
+ */
153
+ public function isApiKeyConfigured()
154
+ {
155
+ $public_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/public_key'));
156
+ $private_key = Mage::helper('core')->decrypt(Mage::getStoreConfig('payment/bitcoin/private_key'));
157
+ return (!empty($private_key) && !empty($public_key));
158
+ }
159
+
160
+ /**
161
+ * Authorize payment abstract method
162
+ *
163
+ * @param Varien_Object $payment
164
+ * @param float $amount
165
+ *
166
+ * @return Mage_Payment_Model_Abstract | direct redirect to Yellow fullscreen payment page
167
+ */
168
+ public function authorize(Varien_Object $payment, $amount)
169
+ {
170
+ if (!Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
171
+ $data = $this->CheckForPayment($payment);
172
+ return $data;
173
+ } else {
174
+ return $this->CreateInvoiceAndRedirect($payment);
175
  }
176
+ }
177
 
178
+ /**
179
+ *
180
+ * create a yellow invoice
181
+ *
182
+ * @param $payment
183
+ * @param $amount
184
+ *
185
+ * @return Yellow_Bitcoin_Model_Bitcoin
186
+ */
187
+ public function CreateInvoiceAndRedirect($payment)
188
+ {
189
+ $order = $payment->getOrder();
190
+ if (is_array($this->createInvoice($order))) {
191
+ $payment->setIsTransactionPending(true); // status will be PAYMENT_REVIEW instead of PROCESSING
192
+ //$orderId = $order->getIncrementId();
193
+ //$invoiceId = Mage::getModel('sales/order_invoice_api')->create($orderId, array());
194
+ return $this;
195
+ } else {
196
+ $this->log("An error occurred during invoice creation: " . __LINE__);
197
+ Mage::throwException(
198
+ Mage::helper('bitcoin')->__(
199
+ "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
200
+ )
201
+ );
202
  }
203
+ }
204
 
205
+ /**
206
+ * @param Varien_Object $payment
207
+ *
208
+ * @return Yellow_Bitcoin_Model_Bitcoin
209
+ */
210
+ public function CheckForPayment($payment)
211
+ {
212
+ $order = $payment->getOrder();
213
+ $order->setCanSendNewEmailFlag(false);
214
+ $quoteId = $order->getQuoteId();
215
+ $ipn = Mage::getModel('bitcoin/ipn');
216
+ $invoice = Mage::getSingleton('core/session')->getData("invoice");
217
+ $invoice_status = $this->checkInvoice($invoice["id"]);
218
+ if (!is_array($invoice_status)) {
219
+ Mage::throwException(
220
+ Mage::helper('bitcoin')->__(
221
+ "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
222
+ )
223
+ );
224
+ }
225
+ switch ($invoice_status["status"]) {
226
+ case "new":
227
+ // This is the error that is displayed to the customer during checkout.
228
+ Mage::throwException("Order has not been paid. Please pay first and then place your order.");
229
+ Mage::log(
230
+ 'Order has not been paid. Please pay first and then place your order.',
231
+ Zend_Log::CRIT,
232
+ 'yellow.log'
233
+ );
234
+ break;
235
+ case "partial":
236
+ // This is the error that is displayed to the customer during checkout.
237
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsPartial($invoice["id"]);
238
+ Mage::throwException("Order has been partially paid. We don't support partial payment yet.");
239
+ Mage::log(
240
+ 'Order has been partially paid. We don\'t support partial payment yet.',
241
+ Zend_Log::CRIT,
242
+ 'yellow.log'
243
+ );
244
+ break;
245
+
246
+ case "authorizing":
247
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($invoice["id"]);
248
+ $payment->setIsTransactionPending(true);
249
+ $order = $payment->getOrder();
250
+ $status_message = "Yellow invoice created. Invoice Id: " . $invoice['id'];
251
+ $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, $status_message);
252
+
253
+ /* start to invoice the order */
254
+ /*$order = $payment->getOrder();
255
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true)->save();
256
+ if (!count($order->getInvoiceCollection())) {
257
+ $invoice = $order->prepareInvoice()
258
+ ->setTransactionId(1)
259
+ ->addComment('Invoiced automatically from widget payment')
260
+ ->register()
261
+ ->pay();
262
+ $transactionSave = Mage::getModel('core/resource_transaction')
263
+ ->addObject($invoice)
264
+ ->addObject($invoice->getOrder());
265
+ $transactionSave->save();
266
+ }*/
267
+ /* end invoice the order */
268
+ break;
269
+ case "paid":
270
+ $invoiceModel = Mage::getModel('sales/order_invoice_api');
271
+ $invoice_id = $invoiceModel->create($payment->getOrder()->getIncrementId(), array());
272
+ $invoiceModel->capture($invoice_id);
273
+ break;
274
+ case "expired":
275
  Mage::throwException(
276
  Mage::helper('bitcoin')->__(
277
+ "I'm sorry the invoice has {$invoice_status["status"]}, please refresh the shopping cart."
278
  )
279
  );
280
+ break;
281
+ case "refund_owed":
282
+ Mage::throwException(
283
+ Mage::helper('bitcoin')->__("Incorrect payment received, please request a refund.")
284
+ );
285
+ break;
286
+ case "refund_requested":
287
+ Mage::throwException(
288
+ Mage::helper('bitcoin')->__(
289
+ "Refund requested! To place a new order, please refresh shopping cart."
290
+ )
291
+ );
292
+ break;
293
+ default:
294
+ $this->log("EXCEPTION - UNKNOW STATUS: " . $invoice_status["status"], $invoice_status["id"]);
 
 
295
  Mage::throwException(
296
  Mage::helper('bitcoin')->__(
297
  "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
298
  )
299
  );
300
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  }
302
+ return $this;
303
+ }
304
 
305
+ /**
306
+ * read the invoice url from session and redirect to it
307
+ *
308
+ * @return string
309
+ */
310
+ public function getOrderPlaceRedirectUrl()
311
+ {
312
+ if (Mage::getStoreConfig('payment/bitcoin/fullscreen')) {
313
+ if(Mage::helper("bitcoin")->doesTheStoreHasSSL()){
314
+ $target_url = Mage::getUrl("bitcoin/index/pay" , array("_secure" => true));
315
+ }else{
316
+ $target_url = Mage::getUrl("bitcoin/index/pay" , array("_secure" => false));
317
  }
318
+ return $target_url;
319
+ } else {
320
+ return '';
321
  }
322
+ }
323
+
324
+ /**
325
+ * return invoice data from session
326
+ * @return mixed
327
+ */
328
+ public function getInvoiceData()
329
+ {
330
+ return Mage::getSingleton('core/session')->getData("invoice");
331
+ }
332
 
333
+ /**
334
+ *
335
+ * @param Mage_Sales_Model_Quote $quote
336
+ * @param boolean $redirect
337
+ * @return boolean
338
+ */
339
+ public function createInvoice($quote, $redirect = true)
340
+ {
341
+ $this->clearSessionData();
342
+ if (get_class($quote) == "Mage_Sales_Model_Quote") {
343
+ $array_key = "quoteId";
344
+ $currency_code_key = "quote_currency_code";
345
+ } else {
346
+ $array_key = "orderId";
347
+ $currency_code_key = "order_currency_code";
348
+ }
349
+ $base_price = $quote->getData("grand_total");
350
+ $base_ccy = $quote->getData($currency_code_key);
351
+ $quote_id = $quote->getData("entity_id");
352
+
353
+ /// create the ipn url based on the site configuration
354
+ if(Mage::helper("bitcoin")->doesTheStoreHasSSL()){
355
+ $ipnUrl = Mage::getUrl("bitcoin/index/ipn", array("_secure" => true, "id" => base64_encode($quote_id)));
356
+ }else{
357
+ $ipnUrl = Mage::getUrl("bitcoin/index/ipn", array("_secure" => false, "id" => base64_encode($quote_id)));
358
  }
359
+ $this->log( "GENERATED IPN URL : " . $ipnUrl);
360
+ $redirectUrl = "";
361
+ /*if ($redirect) {
362
+ $redirectUrl = Mage::getUrl("bitcoin/index/status");
363
+ }*/
364
+ $http_client = $this->getHTTPClient();
365
+ $yellow_payment_data = array(
366
+ "base_price" => $base_price, /// Set to 0.30 for testing
367
+ "base_ccy" => $base_ccy, /// Set to "USD" for testing
368
+ "callback" => $ipnUrl,
369
+ "redirect" => $redirectUrl
370
+ );
371
+ $post_body = json_encode($yellow_payment_data);
372
+ $nonce = round(microtime(true) * 1000);
373
+ $url = $this->server_root . $this->api_uri_create_invoice;
374
+ $message = $nonce . $url . $post_body;
375
+ $private_key = Mage::helper('core')->decrypt($this->getConfiguration("private_key"));
376
+ $hash = hash_hmac("sha256", $message, $private_key, false);
377
+
378
+ $http_client->setHeaders($this->getHeaders($nonce, $hash));
379
+ $http_client->setMethod("POST")
380
+ ->setUri($url);
381
+ $http_client->setRawData($post_body);
382
+ try {
383
+ $response = $http_client->request();
384
+ if ($response->getStatus() == "200") {
385
+ $body = $response->getBody();
386
+ $data = json_decode($body, true);
387
+ $this->log("Response: " . $response, $data["id"]);
388
+ /* save the invoice in the database */
389
+ $invoice_data = array(
390
+ $array_key => $quote_id,
391
+ "invoice_id" => $data["id"],
392
+ "url" => $data["url"],
393
+ "status" => $data["status"],
394
+ "address" => $data["address"],
395
+ "invoice_price" => $data["invoice_price"],
396
+ "invoice_ccy" => $data["invoice_ccy"],
397
+ "server_time" => $data["server_time"],
398
+ "expiration_time" => $data["expiration"],
399
+ "raw_body" => $yellow_payment_data,
400
+ "base_price" => $yellow_payment_data["base_price"],
401
+ "base_ccy" => $yellow_payment_data["base_ccy"],
402
+ "hash" => $hash
403
+ );
404
+ /// replace https with http on the invoice url in case the store doesn't have ssl certificate
405
+ $helper = Mage::helper("bitcoin");
406
+ if(!$helper->doesTheStoreHasSSL())
407
+ {
408
+ $invoice_data["url"] = $helper->replaceHttps($data["url"]);
409
+ $data["url"] = $helper->replaceHttps($data["url"]);
410
+ }
411
 
412
+ Mage::getModel("bitcoin/ipn")->saveInvoice($invoice_data);
413
+ /* end saving invoice */
414
+ Mage::getSingleton('core/session')->setData('invoice', $data);
415
+ Mage::getSingleton('core/session')->setData('has_invoice', true);
416
+ return $data;
 
 
 
 
 
 
 
417
  } else {
418
+ Mage::throwException($response->getBody());
419
+ $this->log("Error code response received: {$response->getStatus()}", $array_key . ":" . $quote_id);
420
+ $this->log("Response body:" . json_encode($response->getBody()), $array_key . ":" . $quote_id);
421
+ return false;
422
  }
423
+ } catch (Exception $exc) {
424
+ $this->log($exc->getMessage(), $array_key . ":" . $quote_id);
425
+ $this->log("EXCEPTION: " . json_encode($exc), $array_key . ":" . $quote_id);
426
+ Mage::throwException(
427
+ Mage::helper('bitcoin')->__(
428
+ "{$exc->getMessage()}\n We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co"
429
+ )
 
 
 
 
 
 
 
430
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  }
432
+ }
433
 
434
+ /**
435
+ * check yellow invoice status over Yellow API
436
+ *
437
+ * @param integer $id
438
+ * @return boolean
439
+ *
440
+ */
441
+ public function checkInvoice($id)
442
+ {
443
+ $url = $this->server_root . str_replace("[id]", $id, $this->api_uri_check_payment);
444
+ $nonce = round(microtime(true) * 1000);
445
+ $message = $nonce . $url;
446
+ $private_key = Mage::helper('core')->decrypt($this->getConfiguration("private_key"));
447
+ $hash = hash_hmac("sha256", $message, $private_key, false);
448
+ $http_client = $this->getHTTPClient();
449
+ $http_client->setHeaders($this->getHeaders($nonce, $hash));
450
+ $http_client->setMethod("GET")->setUri($url);
451
+ try {
452
+ $body = $http_client->request()->getBody();
453
+ $data = json_decode($body, true);
454
+ Mage::getSingleton('core/session')->setData('check_invoice', $data);
455
+ return $data;
456
+ } catch (Exception $exc) {
457
+ $this->log($exc->getMessage(), $id);
458
+ $this->log("EXCEPTION:" . json_encode($exc), $id);
459
+ Mage::throwException(
460
+ Mage::helper('bitcoin')->__(
461
+ "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co\n" . $exc->getMessage()
462
+ )
463
+ );
 
 
 
464
  }
465
+ return false;
466
+ }
467
 
468
+ /**
469
+ * check yellow invoice status over Yellow API
470
+ *
471
+ * @param integer $id
472
+ * @return boolean
473
+ *
474
+ */
475
+
476
+ public function checkInvoiceStatus($id)
477
+ {
478
+ $data = $this->checkInvoice($id);
479
+ if (!is_array($data)) {
480
+ Mage::throwException(
481
+ Mage::helper('bitcoin')->__(
482
+ "We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at support@yellowpay.co\n line: " . __LINE__
483
+ )
484
+ );
485
+ }
486
+ $order = $this->getOrder();
487
+ switch ($data["status"]) {
488
+ case $data["status"] == "new":
489
+ $this->log("Status page accessed for a new invoice.", $id);
490
+ $this->log("Nothing to do. Redirecting back to the payment page.", $id);
491
+ break;
492
+ case $data["status"] == "paid" :
493
+ $order->addStatusToHistory(
494
+ $this->getSuccessStatus(),
495
+ "Payment confirmed. Invoice Id: " . $data["id"],
496
+ true
497
  );
498
+ $order->sendNewOrderEmail();
499
+ $order->save();
500
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsPaid($id);
501
+ /* create an invoice */
502
+ $invoiceModel = Mage::getModel('sales/order_invoice_api');
503
+ $invoice_id = $invoiceModel->create($order->getIncrementId(), array());
504
+ $invoiceModel->capture($invoice_id);
505
+ break;
506
+ case $data["status"] == "authorizing":
507
+ $order->addStatusToHistory(
508
+ Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW,
509
+ "Authorizing payment. This typically takes 10 minutes. Invoice Id: {$data['id']}"
510
+ );
511
+ $order->save();
512
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($id);
513
+ break;
514
+ case $data["status"] == "refund_requested" :
515
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW);
516
+ if (!$order->canCancel()) {
517
+ $this->log("Unable to cancel order. Order #" . $order->getIncrementId(), $id);
518
+ } else {
519
+ $this->log("refund_requested order", $id);
520
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundRequested($id);
521
  $order->addStatusToHistory(
522
+ $this->getFailedStatus(),
523
+ "refund_requested. Invoice #{$id} ",
524
  true
525
  );
526
+ $order->cancel();
527
  $order->save();
528
+ $this->log("Order cancelled. Order #" . $order->getIncrementId(), $id);
529
+ }
530
+ break;
531
+ case $data["status"] === "failed":
532
+ case $data["status"] === "expired":
533
+ $order->setState(Mage_Sales_Model_Order::STATE_NEW);
534
+ if (!$order->canCancel()) {
535
+ $this->log("Unable to cancel order. Order #" . $order->getIncrementId(), $id);
536
+ } else {
537
+ $this->log("Order expired : " . $order->getIncrementId(), $id);
538
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsExpired($id);
539
  $order->addStatusToHistory(
540
+ $this->getFailedStatus(),
541
+ "Invoice expired. Invoice #{$id}",
542
+ true
543
  );
544
+ $order->cancel();
545
  $order->save();
546
+ $this->log("Order cancelled. Order #" . $order->getIncrementId(), $id);
547
+ }
548
+ break;
549
+ default:
550
+ return false;
551
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
552
  }
553
+ return $data["status"];
554
+ }
555
 
556
+ /**
557
+ *
558
+ * @param Mage_Sales_Model_Order $order
559
+ */
560
+ public function setOrder($order)
561
+ {
562
+ $this->order = $order;
563
+ }
564
 
565
+ /**
566
+ *
567
+ * @return Mage_Sales_Model_Order
568
+ * @throws \Exception
569
+ */
570
+ public function getOrder()
571
+ {
572
+ if (!$this->order) {
573
+ $session = Mage::getSingleton('checkout/session');
574
+ if (!$session->getLastRealOrderId()) {
575
+ throw new \Exception("Order id can't be null ", 500);
 
 
 
576
  }
577
+ $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
578
+ $this->order = $order;
579
  }
580
+ return $this->order;
581
+ }
582
 
583
+ /**
584
+ * read from magento configuration
585
+ *
586
+ * @param string $param
587
+ * @return type
588
+ */
589
+ public function getConfiguration($param)
590
+ {
591
+ return $this->getConfigData($param);
592
+ }
593
 
594
+ /**
595
+ * get HTTP client
596
+ *
597
+ * @return \Yellow_Bitcoin_Model_Http
598
+ */
599
+ private function getHTTPClient()
600
+ {
601
+ return new Yellow_Bitcoin_Model_Http();
602
+ }
603
 
604
+ /**
605
+ * prepare HTTP Headers
606
+ *
607
+ * @param String $nonce
608
+ * @param String $signature
609
+ * @return string
610
+ */
611
+ private function getHeaders($nonce, $signature)
612
+ {
613
+ $headers = array(
614
+ "Content-type:application/json",
615
+ "API-Key:" . Mage::helper('core')->decrypt($this->getConfiguration('public_key')),
616
+ "API-Nonce:$nonce",
617
+ "API-Sign:$signature"
618
+ );
619
+ return $headers;
620
+ }
621
 
622
+ /**
623
+ * returns success status
624
+ *
625
+ * @return String
626
+ */
627
+ public function getSuccessStatus()
628
+ {
629
+ return Mage_Sales_Model_Order::STATE_PROCESSING;
630
+ }
631
 
632
+ /**
633
+ * returns failed status
634
+ *
635
+ * @return String
636
+ */
637
+ public function getFailedStatus()
638
+ {
639
+ return Mage_Sales_Model_Order::STATE_CANCELED;
640
+ }
641
 
642
+ /**
643
+ *
644
+ * @param string $invoiceIncrementId
645
+ * @return boolean
646
+ */
647
+ public function captureInvoice($invoiceIncrementId)
648
+ {
649
+ return Mage::getModel("sales/order_invoice_api")->capture($invoiceIncrementId);
650
+ }
651
+
652
+ /**
653
+ *
654
+ * clear session data
655
+ *
656
+ * @return boolean
657
+ */
658
+ public function clearSessionData()
659
+ {
660
+ Mage::getSingleton('core/session')->unsetData("invoice");
661
+ Mage::getSingleton('core/session')->unsetData("has_invoice");
662
+ Mage::getSingleton('core/session')->unsetData("check_invoice");
663
+ return true;
664
+ }
665
 
666
+ /**
667
+ * log message to file
668
+ *
669
+ * @param string $message
670
+ * @param string $invoice_id
671
+ * @return boolean
672
+ */
673
+ private function log($message, $invoice_id = null)
674
+ {
675
+ $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);
676
+ if ($enabled) {
677
+ Mage::getModel("bitcoin/log")->logMessage($message, $invoice_id);
678
  }
679
+ Mage::log($message, Zend_Log::ERR, "yellow.log");
680
+ return true;
681
+ }
682
 
683
+ /***
684
+ * return the configured server root
685
+ * @return string
686
+ */
687
+ public function getConfiguredServerRoot()
688
+ {
689
+ return $this->server_root;
 
 
 
 
690
  }
691
+
692
+ }
app/code/local/Yellow/Bitcoin/Model/Http.php CHANGED
@@ -1,51 +1,51 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- Class Yellow_Bitcoin_Model_Http extends Varien_Http_Client
29
- {
30
 
31
- /**
32
- * curl options , might be changed later to be configured
33
- * right now i am using php's default values
34
- */
35
- protected $_allowedParams = array(
36
- 'timeout' => 10, /// this might need to convert to configuration later once needed
37
- 'maxredirects' => CURLOPT_MAXREDIRS,
38
- 'proxy' => CURLOPT_PROXY,
39
- 'ssl_cert' => CURLOPT_SSLCERT,
40
- 'userpwd' => CURLOPT_USERPWD
41
- );
42
 
43
- public function __construct()
44
- {
45
- parent::__construct();
46
- $adapter = new Varien_Http_Adapter_Curl();
47
- $adapter->setOptions($this->_allowedParams);
48
- $this->setAdapter($adapter);
49
- return $this;
50
- }
51
- }
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ Class Yellow_Bitcoin_Model_Http extends Varien_Http_Client
29
+ {
30
 
31
+ /**
32
+ * curl options , might be changed later to be configured
33
+ * right now i am using php's default values
34
+ */
35
+ protected $_allowedParams = array(
36
+ 'timeout' => 10, /// this might need to convert to configuration later once needed
37
+ 'maxredirects' => CURLOPT_MAXREDIRS,
38
+ 'proxy' => CURLOPT_PROXY,
39
+ 'ssl_cert' => CURLOPT_SSLCERT,
40
+ 'userpwd' => CURLOPT_USERPWD
41
+ );
42
 
43
+ public function __construct()
44
+ {
45
+ parent::__construct();
46
+ $adapter = new Varien_Http_Adapter_Curl();
47
+ $adapter->setOptions($this->_allowedParams);
48
+ $this->setAdapter($adapter);
49
+ return $this;
50
+ }
51
+ }
app/code/local/Yellow/Bitcoin/Model/Ipn.php CHANGED
@@ -1,64 +1,64 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
 
4
  *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- * */
28
- Class Yellow_Bitcoin_Model_Ipn extends Mage_Core_Model_Abstract
29
  {
30
-
31
- public function _construct()
32
- {
33
- $this->_init('bitcoin/ipn');
34
- return parent::_construct();
35
- }
36
-
37
- /**
38
- * saves the invoice to db
39
- *
40
- */
41
- public function saveInvoice($invoice)
42
- {
43
- $timezone = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
44
- $now = new \DateTime("now", new \DateTimeZone($timezone));
45
- $this->setQuoteId(isset($invoice['quoteId']) ? $invoice['quoteId'] : null);
46
- $this->setOrderId(isset($invoice['orderId']) ? $invoice['orderId'] : null);
47
- $this->setInvoiceId($invoice['invoice_id']);
48
- $this->setUrl($invoice['url']);
49
- $this->setrawBody(json_encode($invoice['raw_body']));
50
- $this->setStatus($invoice['status']);
51
- $this->setAddress($invoice["address"]);
52
- $this->setInvoicePrice($invoice["invoice_price"]);
53
- $this->setInvoiceCcy($invoice["invoice_ccy"]);
54
- $this->setBasePrice($invoice["base_price"]);
55
- $this->setBaseCcy($invoice["base_ccy"]);
56
- $this->setServerTime($invoice["server_time"]);
57
- $this->setExpirationTime($invoice["expiration_time"]);
58
- $this->setCreatedAt($now->format("Y-m-d H:i:s"));
59
- $this->setUpdatedAt($now->format("Y-m-d H:i:s"));
60
- $this->setHash($invoice["hash"]);
61
- return $this->save();
62
- }
63
-
64
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ * */
28
+ Class Yellow_Bitcoin_Model_Ipn extends Mage_Core_Model_Abstract
29
+ {
30
+
31
+ public function _construct()
32
+ {
33
+ $this->_init('bitcoin/ipn');
34
+ return parent::_construct();
35
+ }
36
+
37
  /**
38
+ * saves the invoice to db
39
  *
40
+ */
41
+ public function saveInvoice($invoice)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  {
43
+ $timezone = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
44
+ $now = new \DateTime("now", new \DateTimeZone($timezone));
45
+ $this->setQuoteId(isset($invoice['quoteId']) ? $invoice['quoteId'] : null);
46
+ $this->setOrderId(isset($invoice['orderId']) ? $invoice['orderId'] : null);
47
+ $this->setInvoiceId($invoice['invoice_id']);
48
+ $this->setUrl($invoice['url']);
49
+ $this->setrawBody(json_encode($invoice['raw_body']));
50
+ $this->setStatus($invoice['status']);
51
+ $this->setAddress($invoice["address"]);
52
+ $this->setInvoicePrice($invoice["invoice_price"]);
53
+ $this->setInvoiceCcy($invoice["invoice_ccy"]);
54
+ $this->setBasePrice($invoice["base_price"]);
55
+ $this->setBaseCcy($invoice["base_ccy"]);
56
+ $this->setServerTime($invoice["server_time"]);
57
+ $this->setExpirationTime($invoice["expiration_time"]);
58
+ $this->setCreatedAt($now->format("Y-m-d H:i:s"));
59
+ $this->setUpdatedAt($now->format("Y-m-d H:i:s"));
60
+ $this->setHash($invoice["hash"]);
61
+ return $this->save();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
+
64
+ }
app/code/local/Yellow/Bitcoin/Model/Log.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ * */
28
+ Class Yellow_Bitcoin_Model_Log extends Mage_Core_Model_Abstract
29
+ {
30
+
31
+ const DATABASE_ENABLED_CONFIG_PATH = "payment/bitcoin/db_log";
32
+
33
+ public function _construct()
34
+ {
35
+ $this->_init('bitcoin/log');
36
+ return parent::_construct();
37
+ }
38
+
39
+
40
+ /**
41
+ * log message to database
42
+ * @param $message
43
+ * @param null $invoice_id
44
+ * @return bool|record id
45
+ */
46
+ public function logMessage($message, $invoice_id = null)
47
+ {
48
+ $enabled = Mage::getStoreConfig(self::DATABASE_ENABLED_CONFIG_PATH);
49
+ if ($enabled == true) {
50
+ $timezone = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
51
+ $now = new \DateTime("now", new \DateTimeZone($timezone));
52
+ $this->setData("message", $message);
53
+ $this->setData("created_at", $now->format("Y-m-d H:i:s"));
54
+ if ($invoice_id) {
55
+ $this->setData("invoice_id", $invoice_id);
56
+ }
57
+ $this->save();
58
+ return $this->getData("id");
59
+ } else {
60
+ return false;
61
+ }
62
+ }
63
+
64
+
65
+ }
app/code/local/Yellow/Bitcoin/Model/Resource/Ipn.php CHANGED
@@ -1,93 +1,93 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- * */
28
- class Yellow_Bitcoin_Model_Resource_Ipn extends Mage_Core_Model_Resource_Db_Abstract
29
- {
30
 
31
- protected function _construct()
32
- {
33
- $this->_init('bitcoin/ipn', 'id');
34
- }
35
 
36
- public function MarkAsAuthorizing($invoice_id)
37
- {
38
- return $this->updatePayment($invoice_id, "authorizing");
39
- }
40
 
41
- public function MarkAsPaid($invoice_id)
42
- {
43
- return $this->updatePayment($invoice_id, "paid");
44
- }
45
 
46
- public function MarkAsPartial($invoice_id)
47
- {
48
- return $this->updatePayment($invoice_id, "partial");
49
- }
50
 
51
- public function MarkAsExpired($invoice_id)
52
- {
53
- return $this->updatePayment($invoice_id, "expired");
54
- }
55
 
56
- public function MarkAsRefundOwed($invoice_id)
57
- {
58
- return $this->updatePayment($invoice_id, "refund_owed");
59
- }
60
 
61
- public function MarkAsRefundPaid($invoice_id)
62
- {
63
- return $this->updatePayment($invoice_id, "refund_paid");
64
- }
65
 
66
- public function MarkAsRefundRequested($invoice_id)
67
- {
68
- return $this->updatePayment($invoice_id, "refund_requested");
69
- }
70
 
71
 
72
- private function updatePayment($invoice_id, $status)
73
- {
74
- $wa = $this->_getWriteAdapter();
75
- try {
76
- $timezone = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
77
- $now = new \DateTime("now", new \DateTimeZone($timezone));
78
- $where = array();
79
- $wa->beginTransaction();
80
- $fields["status"] = $status;
81
- $fields["updated_at"] = $now->format("Y-m-d H:i:s");
82
- $where[] = $wa->quoteInto("invoice_id = ?", $invoice_id);
83
- $tableName = $this->getTable("bitcoin/ipn");
84
- $wa->update($tableName, $fields, $where);
85
- $wa->commit();
86
- return true;
87
- } catch (Exception $exc) {
88
- $wa->rollBack();
89
- return $exc->getMessage();
90
- }
91
  }
92
-
93
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ * */
28
+ class Yellow_Bitcoin_Model_Resource_Ipn extends Mage_Core_Model_Resource_Db_Abstract
29
+ {
30
 
31
+ protected function _construct()
32
+ {
33
+ $this->_init('bitcoin/ipn', 'id');
34
+ }
35
 
36
+ public function MarkAsAuthorizing($invoice_id)
37
+ {
38
+ return $this->updatePayment($invoice_id, "authorizing");
39
+ }
40
 
41
+ public function MarkAsPaid($invoice_id)
42
+ {
43
+ return $this->updatePayment($invoice_id, "paid");
44
+ }
45
 
46
+ public function MarkAsPartial($invoice_id)
47
+ {
48
+ return $this->updatePayment($invoice_id, "partial");
49
+ }
50
 
51
+ public function MarkAsExpired($invoice_id)
52
+ {
53
+ return $this->updatePayment($invoice_id, "expired");
54
+ }
55
 
56
+ public function MarkAsRefundOwed($invoice_id)
57
+ {
58
+ return $this->updatePayment($invoice_id, "refund_owed");
59
+ }
60
 
61
+ public function MarkAsRefundPaid($invoice_id)
62
+ {
63
+ return $this->updatePayment($invoice_id, "refund_paid");
64
+ }
65
 
66
+ public function MarkAsRefundRequested($invoice_id)
67
+ {
68
+ return $this->updatePayment($invoice_id, "refund_requested");
69
+ }
70
 
71
 
72
+ private function updatePayment($invoice_id, $status)
73
+ {
74
+ $wa = $this->_getWriteAdapter();
75
+ try {
76
+ $timezone = Mage::getStoreConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE);
77
+ $now = new \DateTime("now", new \DateTimeZone($timezone));
78
+ $where = array();
79
+ $wa->beginTransaction();
80
+ $fields["status"] = $status;
81
+ $fields["updated_at"] = $now->format("Y-m-d H:i:s");
82
+ $where[] = $wa->quoteInto("invoice_id = ?", $invoice_id);
83
+ $tableName = $this->getTable("bitcoin/ipn");
84
+ $wa->update($tableName, $fields, $where);
85
+ $wa->commit();
86
+ return true;
87
+ } catch (Exception $exc) {
88
+ $wa->rollBack();
89
+ return $exc->getMessage();
 
90
  }
 
91
  }
92
+
93
+ }
app/code/local/Yellow/Bitcoin/Model/Resource/Ipn/Collection.php CHANGED
@@ -1,36 +1,36 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- **/
28
- class Yellow_Bitcoin_Model_Resource_Ipn_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
29
- {
30
-
31
- protected function _construct()
32
- {
33
- $this->_init('bitcoin/ipn');
34
- }
35
 
 
 
 
36
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Model_Resource_Ipn_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
29
+ {
 
 
 
 
 
30
 
31
+ protected function _construct()
32
+ {
33
+ $this->_init('bitcoin/ipn');
34
  }
35
+
36
+ }
app/code/local/Yellow/Bitcoin/{Block/Index.php → Model/Resource/Log.php} RENAMED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * The MIT License (MIT)
@@ -14,7 +15,7 @@
14
  *
15
  * The above copyright notice and this permission notice shall be included in all
16
  * copies or substantial portions of the Software.
17
- *
18
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,8 +24,13 @@
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
  * SOFTWARE.
25
  *
26
- **/
 
 
 
 
 
 
 
27
 
28
- class Yellow_Bitcoin_Block_Index extends Mage_Core_Block_Template {
29
-
30
  }
1
  <?php
2
+
3
  /**
4
  *
5
  * The MIT License (MIT)
15
  *
16
  * The above copyright notice and this permission notice shall be included in all
17
  * copies or substantial portions of the Software.
18
+ *
19
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
  * SOFTWARE.
26
  *
27
+ * */
28
+ class Yellow_Bitcoin_Model_Resource_Log extends Mage_Core_Model_Resource_Db_Abstract
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ $this->_init('bitcoin/log', 'id');
34
+ }
35
 
 
 
36
  }
app/code/local/Yellow/Bitcoin/Model/Resource/Log/Collection.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ **/
28
+ class Yellow_Bitcoin_Model_Resource_Log_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
29
+ {
30
+
31
+ protected function _construct()
32
+ {
33
+ $this->_init('bitcoin/log');
34
+ }
35
+
36
+ }
app/code/local/Yellow/Bitcoin/controllers/Adminhtml/IpnController.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Adminhtml_IpnController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ protected function _initAction()
6
+ {
7
+ $this->loadLayout()->_setActiveMenu("bitcoin/ipn")->_addBreadcrumb(Mage::helper("adminhtml")->__("Ipn Manager"), Mage::helper("adminhtml")->__("Ipn Manager"));
8
+ return $this;
9
+ }
10
+
11
+ public function indexAction()
12
+ {
13
+ $this->_title($this->__("Bitcoin"));
14
+ $this->_title($this->__("Manager Ipn"));
15
+ $this->_initAction();
16
+ $this->renderLayout();
17
+ }
18
+
19
+ public function editAction()
20
+ {
21
+ $this->_title($this->__("Bitcoin"));
22
+ $this->_title($this->__("Ipn"));
23
+ $this->_title($this->__("Edit Item"));
24
+
25
+ $id = $this->getRequest()->getParam("id");
26
+ $model = Mage::getModel("bitcoin/ipn")->load($id);
27
+ if ($model->getId()) {
28
+ Mage::register("ipn_data", $model);
29
+ $this->loadLayout();
30
+ $this->_setActiveMenu("bitcoin/ipn");
31
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Ipn Manager"), Mage::helper("adminhtml")->__("Ipn Manager"));
32
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Ipn Description"), Mage::helper("adminhtml")->__("Ipn Description"));
33
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
34
+ $this->_addContent($this->getLayout()->createBlock("bitcoin/adminhtml_ipn_edit"))->_addLeft($this->getLayout()->createBlock("bitcoin/adminhtml_ipn_edit_tabs"));
35
+ $this->renderLayout();
36
+ } else {
37
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("bitcoin")->__("Item does not exist."));
38
+ $this->_redirect("*/*/");
39
+ }
40
+ }
41
+
42
+ public function newAction()
43
+ {
44
+
45
+ $this->_title($this->__("Bitcoin"));
46
+ $this->_title($this->__("Ipn"));
47
+ $this->_title($this->__("New Item"));
48
+
49
+ $id = $this->getRequest()->getParam("id");
50
+ $model = Mage::getModel("bitcoin/ipn")->load($id);
51
+
52
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
+ if (!empty($data)) {
54
+ $model->setData($data);
55
+ }
56
+
57
+ Mage::register("ipn_data", $model);
58
+
59
+ $this->loadLayout();
60
+ $this->_setActiveMenu("bitcoin/ipn");
61
+
62
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
+
64
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Ipn Manager"), Mage::helper("adminhtml")->__("Ipn Manager"));
65
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Ipn Description"), Mage::helper("adminhtml")->__("Ipn Description"));
66
+
67
+
68
+ $this->_addContent($this->getLayout()->createBlock("bitcoin/adminhtml_ipn_edit"))->_addLeft($this->getLayout()->createBlock("bitcoin/adminhtml_ipn_edit_tabs"));
69
+
70
+ $this->renderLayout();
71
+
72
+ }
73
+
74
+ public function saveAction()
75
+ {
76
+
77
+ $post_data = $this->getRequest()->getPost();
78
+
79
+
80
+ if ($post_data) {
81
+
82
+ try {
83
+
84
+
85
+ $model = Mage::getModel("bitcoin/ipn")
86
+ ->addData($post_data)
87
+ ->setId($this->getRequest()->getParam("id"))
88
+ ->save();
89
+
90
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Ipn was successfully saved"));
91
+ Mage::getSingleton("adminhtml/session")->setIpnData(false);
92
+
93
+ if ($this->getRequest()->getParam("back")) {
94
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
95
+ return;
96
+ }
97
+ $this->_redirect("*/*/");
98
+ return;
99
+ } catch (Exception $e) {
100
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
101
+ Mage::getSingleton("adminhtml/session")->setIpnData($this->getRequest()->getPost());
102
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
103
+ return;
104
+ }
105
+
106
+ }
107
+ $this->_redirect("*/*/");
108
+ }
109
+
110
+
111
+ public function deleteAction()
112
+ {
113
+ if ($this->getRequest()->getParam("id") > 0) {
114
+ try {
115
+ $model = Mage::getModel("bitcoin/ipn");
116
+ $model->setId($this->getRequest()->getParam("id"))->delete();
117
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
118
+ $this->_redirect("*/*/");
119
+ } catch (Exception $e) {
120
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
121
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
122
+ }
123
+ }
124
+ $this->_redirect("*/*/");
125
+ }
126
+
127
+
128
+ public function massRemoveAction()
129
+ {
130
+ try {
131
+ $ids = $this->getRequest()->getPost('ids', array());
132
+ foreach ($ids as $id) {
133
+ $model = Mage::getModel("bitcoin/ipn");
134
+ $model->setId($id)->delete();
135
+ }
136
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
137
+ } catch (Exception $e) {
138
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
139
+ }
140
+ $this->_redirect('*/*/');
141
+ }
142
+
143
+ /**
144
+ * Export order grid to CSV format
145
+ */
146
+ public function exportCsvAction()
147
+ {
148
+ $fileName = 'ipn.csv';
149
+ $grid = $this->getLayout()->createBlock('bitcoin/adminhtml_ipn_grid');
150
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
151
+ }
152
+
153
+ /**
154
+ * Export order grid to Excel XML format
155
+ */
156
+ public function exportExcelAction()
157
+ {
158
+ $fileName = 'ipn.xml';
159
+ $grid = $this->getLayout()->createBlock('bitcoin/adminhtml_ipn_grid');
160
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
161
+ }
162
+ }
app/code/local/Yellow/Bitcoin/controllers/Adminhtml/LogController.php ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Yellow_Bitcoin_Adminhtml_LogController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+ protected function _initAction()
6
+ {
7
+ $this->loadLayout()->_setActiveMenu("bitcoin/log")->_addBreadcrumb(Mage::helper("adminhtml")->__("Log Manager"), Mage::helper("adminhtml")->__("Log Manager"));
8
+ return $this;
9
+ }
10
+
11
+ public function indexAction()
12
+ {
13
+ $this->_title($this->__("Bitcoin"));
14
+ $this->_title($this->__("Manager Log"));
15
+ $this->_initAction();
16
+ $this->renderLayout();
17
+ }
18
+
19
+ public function editAction()
20
+ {
21
+ $this->_title($this->__("Bitcoin"));
22
+ $this->_title($this->__("Log"));
23
+ $this->_title($this->__("Edit Item"));
24
+
25
+ $id = $this->getRequest()->getParam("id");
26
+ $model = Mage::getModel("bitcoin/log")->load($id);
27
+ if ($model->getId()) {
28
+ Mage::register("log_data", $model);
29
+ $this->loadLayout();
30
+ $this->_setActiveMenu("bitcoin/log");
31
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Log Manager"), Mage::helper("adminhtml")->__("Log Manager"));
32
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Log Description"), Mage::helper("adminhtml")->__("Log Description"));
33
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
34
+ $this->_addContent($this->getLayout()->createBlock("bitcoin/adminhtml_log_edit"))->_addLeft($this->getLayout()->createBlock("bitcoin/adminhtml_log_edit_tabs"));
35
+ $this->renderLayout();
36
+ } else {
37
+ Mage::getSingleton("adminhtml/session")->addError(Mage::helper("bitcoin")->__("Item does not exist."));
38
+ $this->_redirect("*/*/");
39
+ }
40
+ }
41
+
42
+ public function newAction()
43
+ {
44
+
45
+ $this->_title($this->__("Bitcoin"));
46
+ $this->_title($this->__("Log"));
47
+ $this->_title($this->__("New Item"));
48
+
49
+ $id = $this->getRequest()->getParam("id");
50
+ $model = Mage::getModel("bitcoin/log")->load($id);
51
+
52
+ $data = Mage::getSingleton("adminhtml/session")->getFormData(true);
53
+ if (!empty($data)) {
54
+ $model->setData($data);
55
+ }
56
+
57
+ Mage::register("log_data", $model);
58
+
59
+ $this->loadLayout();
60
+ $this->_setActiveMenu("bitcoin/log");
61
+
62
+ $this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
63
+
64
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Log Manager"), Mage::helper("adminhtml")->__("Log Manager"));
65
+ $this->_addBreadcrumb(Mage::helper("adminhtml")->__("Log Description"), Mage::helper("adminhtml")->__("Log Description"));
66
+
67
+
68
+ $this->_addContent($this->getLayout()->createBlock("bitcoin/adminhtml_log_edit"))->_addLeft($this->getLayout()->createBlock("bitcoin/adminhtml_log_edit_tabs"));
69
+
70
+ $this->renderLayout();
71
+
72
+ }
73
+
74
+ public function saveAction()
75
+ {
76
+
77
+ $post_data = $this->getRequest()->getPost();
78
+
79
+
80
+ if ($post_data) {
81
+
82
+ try {
83
+ $model = Mage::getModel("bitcoin/log")
84
+ ->addData($post_data)
85
+ ->setId($this->getRequest()->getParam("id"))
86
+ ->save();
87
+
88
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Log was successfully saved"));
89
+ Mage::getSingleton("adminhtml/session")->setLogData(false);
90
+
91
+ if ($this->getRequest()->getParam("back")) {
92
+ $this->_redirect("*/*/edit", array("id" => $model->getId()));
93
+ return;
94
+ }
95
+ $this->_redirect("*/*/");
96
+ return;
97
+ } catch (Exception $e) {
98
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
99
+ Mage::getSingleton("adminhtml/session")->setLogData($this->getRequest()->getPost());
100
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
101
+ return;
102
+ }
103
+
104
+ }
105
+ $this->_redirect("*/*/");
106
+ }
107
+
108
+
109
+ public function deleteAction()
110
+ {
111
+ if ($this->getRequest()->getParam("id") > 0) {
112
+ try {
113
+ $model = Mage::getModel("bitcoin/log");
114
+ $model->setId($this->getRequest()->getParam("id"))->delete();
115
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
116
+ $this->_redirect("*/*/");
117
+ } catch (Exception $e) {
118
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
119
+ $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
120
+ }
121
+ }
122
+ $this->_redirect("*/*/");
123
+ }
124
+
125
+
126
+ public function massRemoveAction()
127
+ {
128
+ try {
129
+ $ids = $this->getRequest()->getPost('ids', array());
130
+ foreach ($ids as $id) {
131
+ $model = Mage::getModel("bitcoin/log");
132
+ $model->setId($id)->delete();
133
+ }
134
+ Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
135
+ } catch (Exception $e) {
136
+ Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
137
+ }
138
+ $this->_redirect('*/*/');
139
+ }
140
+
141
+ /**
142
+ * Export order grid to CSV format
143
+ */
144
+ public function exportCsvAction()
145
+ {
146
+ $fileName = 'log.csv';
147
+ $grid = $this->getLayout()->createBlock('bitcoin/adminhtml_log_grid');
148
+ $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
149
+ }
150
+
151
+ /**
152
+ * Export order grid to Excel XML format
153
+ */
154
+ public function exportExcelAction()
155
+ {
156
+ $fileName = 'log.xml';
157
+ $grid = $this->getLayout()->createBlock('bitcoin/adminhtml_log_grid');
158
+ $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
159
+ }
160
+ }
app/code/local/Yellow/Bitcoin/controllers/IndexController.php CHANGED
@@ -1,291 +1,309 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * The MIT License (MIT)
6
- *
7
- * Copyright (c) 2014 YellowPay.co
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- *
27
- * */
28
- class Yellow_Bitcoin_IndexController extends Mage_Core_Controller_Front_Action
29
- {
30
 
31
 
32
- public function payAction()
33
- {
34
- $this->loadLayout();
35
- $this->renderLayout();
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
- public function IpnAction()
38
- {
39
- /**
40
- * return not found on all requests but POST
41
- */
42
- $this->log("----------- IPN request validation ------------");
43
- if (!$this->getRequest()->isPost()) {
44
- return $this->returnForbidden();
45
- }
46
- $ip = long2ip(Mage::helper('core/http')->getRemoteAddr(true));
47
- $this->log("Start IPN request validation") ;
48
- $this->log("IP Address of the sender {$ip}");
49
 
50
- /* start to validate the signature */
51
- $request = $this->getRequest();
52
- $payload = $request->getRawBody();
53
- $public_key = $request->getHeader("API-Key");
54
- $nonce = $request->getHeader("API-Nonce");
55
- $request_signature = $request->getHeader("API-Sign");
56
- $this->log("API-KEY:{$public_key}");
57
- $this->log("API-Nonce:{$nonce}");
58
- $this->log("API-Sign:{$request_signature}");
59
- $this->log("Received payload: " . $payload);
60
 
61
- if (!$public_key || !$nonce || !$request_signature || !$payload) {
62
- $this->log("Credentials missing. Exiting.");
63
- return $this->returnForbidden();
64
- }
65
 
66
- $private_key = Mage::helper('core')->decrypt(
67
- Mage::getModel("bitcoin/bitcoin")->getConfiguration("private_key")
68
- );
69
- $url = Mage::helper('core/url')->getCurrentUrl();
70
- $message = $nonce . $url . $payload;
71
- $current_signature = hash_hmac("sha256", $message, $private_key, false);
72
- $this->log("Calculated signature: " . $current_signature);
73
 
74
- if ($request_signature <> $current_signature) {
75
- $this->log("IPN VALIDATION FAILED");
76
- $this->log("Returning 'page not found'");
77
- $this->log("Your payment data is still safe");
78
- $this->log("----------- IPN request processing will be skipped -----------");
79
- return $this->returnForbidden();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  }
81
- $this->log("VALIDATION PASSED :) Yay");
82
- /* end of validate the signature */
83
- /* by this the request has passed validation */
84
- try {
85
- /* need to check the ip address of the source from a whitelist list of ips , otherwise this might be used illegaly to update orders */
86
- $this->log("----------- IPN request processing ------------");
87
- $id = base64_decode($this->getRequest()->getParam("id"));
88
- //$data = file_get_contents('php://input');
89
- $body = json_decode($payload, true);
90
- $this->log("Id is: {$id}");
91
- $this->log("Received payload: " . $payload);
92
- $url = $body["url"];
93
- /* simple validation check | might be changed later */
94
- $collection = Mage::getModel("bitcoin/ipn")
95
- ->getCollection()
96
- ->getSelect()
97
- ->where("quote_id = ? OR order_id = ?", $id)
98
- ->where("url =?", $url);
99
- $yellow_log = $collection->query()->fetchAll();
100
- $from_order = $from_quote = false;
101
- if (count($yellow_log) == 1) {
102
- if ($yellow_log[0]["quote_id"] === $id) {
103
- $from_quote = true;
104
- $from_order = false;
105
- $this->log("its a quote");
106
- } elseif ($yellow_log[0]["order_id"] === $id) {
107
- $from_quote = false;
108
- $from_order = true;
109
- $this->log("its an order");
110
- }
111
- } else {
112
- $this->log("URL validation failed: {$url}");
113
- $this->log("----------- IPN request processing will be skipped -----------");
114
  return $this->_forward("no-route");
115
  }
116
- if ($from_order) {
117
- $order = Mage::getModel('sales/order')->load($id);
118
- }
119
- if ($from_quote) {
120
- $order = Mage::getModel('sales/order')->load($id, "quote_id");
121
- }
122
- /* skip quote + authorizing state because the order hasn't been placed yet */
123
- if ($from_quote && $body["status"] === "authorizing") {
124
- $this->log(
125
- "Quote id {$id} will be skipped because the order hasn't been placed yet. IPN status: {$body["status"]}"
126
- );
127
- echo json_encode(array("message" => "skipped"));
128
- $this->log("----------- IPN request processing will be skipped -----------");
129
- return;
130
- }
131
- if ($order->getPayment() instanceof Yellow_Bitcoin_Model_Bitcoin) {
132
- $payment = $order->getPayment()->getMethodInstance();
133
- if (!$order || $payment->getCode() <> "bitcoin" || $order->getState(
134
- ) <> Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW
135
- ) {
136
- $this->log("Either this order is not paid via Yellow, or it has an unallowed state");
137
- $this->log("----------- IPN request processing will be skipped -----------");
138
- return $this->_forward("no-route");
139
- }
140
- }
141
- $this->log(" invoice status : {$body["status"]}");
142
- switch ($body['status']) {
143
- case 'paid':
144
- $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus();
145
- $status_message = "Payment confirmation received. Invoice Id: " . $body['id']; // $invoice["message"];
146
- $order->addStatusToHistory($status, $status_message);
147
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
148
- $order->sendNewOrderEmail();
149
- $order->save();
150
- Mage::getResourceModel("bitcoin/ipn")->MarkAsPaid($body["id"]);
151
- /* create an invoice */
152
- $invoiceModel = Mage::getModel('sales/order_invoice_api');
153
- $invoice_id = $invoiceModel->create($order->getIncrementId(), array());
154
- $invoiceModel->capture($invoice_id);
155
- $this->log("Magento Invoice created!");
156
- break;
157
- case 'reissue':
158
- $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus(
159
- ); /// this must bn changed when we had reissue / renew payment ready
160
- $status_message = "Client re-issued the invoice. Invoice Id: " . $body['id']; // $invoice["message"];
161
- $order->addStatusToHistory($status, $status_message);
162
- $order->save();
163
- break;
164
- case 'partial':
165
- $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus(
166
- ); /// this must bn changed when we had partail payment ready
167
- $status_message = "Client made a partial payment. Invoice Id: " . $body['id']; // $invoice["message"];
168
- $order->addStatusToHistory($status, $status_message);
169
- $order->save();
170
- Mage::getResourceModel("bitcoin/ipn")->MarkAsPartial($body["id"]);
171
- break;
172
- case 'failed':
173
- case 'invalid':
174
- $status = Mage::getModel("bitcoin/bitcoin")->getFailedStatus();
175
- $status_message = "Client failed to pay. Invoice Id: " . $body['id']; // $invoice["message"];
176
- $order->addStatusToHistory($status, $status_message);
177
- $order->setState(Mage_Sales_Model_Order::STATE_HOLDED);
178
- $order->cancel();
179
- $order->save();
180
- break;
181
- /// its just a new invoice | authorizing , I will never expect a post with new status , though I had created the block of it
182
- case 'authorizing':
183
- Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($body["id"]);
184
- break;
185
- case 'expired':
186
- /* this to update the ipn table when invoice expired */
187
- Mage::getResourceModel("bitcoin/ipn")->MarkAsExpired($body["id"]);
188
- break;
189
- case 'refund_owed':
190
- Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundOwed($body["id"]);
191
- break;
192
- case 'refund_requested':
193
- Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundRequested($body["id"]);
194
- break;
195
- case 'refund_paid':
196
- Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundPaid($body["id"]);
197
- break;
198
- case 'new':
199
- default:
200
- break;
201
- }
202
- echo json_encode(array("message" => "done"));
203
- $this->log("----------- IPN request processing complete -----------");
204
- } catch (\Exception $e) {
205
- $this->log("EXCEPTION:" . $e->getMessage . "|" . $e->getLine());
206
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
 
208
 
209
- public function StatusAction()
210
- {
211
- $invoice = Mage::getSingleton('core/session')->getData("invoice");
212
- try {
213
- $id = $invoice["id"];
214
- $model = Mage::getModel('bitcoin/bitcoin');
215
- $order = $this->getOrder();
216
- if (!$order) {
217
- $this->log(
218
- "This session does not have a recent order. This page may have been accessed directly."
219
- );
220
- return $this->_forward("no-route");
221
- }
222
- $model->setOrder($order);
223
- $status = $model->checkInvoiceStatus($id);
224
- if ($status == false) {
225
- $this->log("Invoice status check failed");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  return $this->_forward("no-route");
227
- }
228
- switch ($status) {
229
- case "new":
230
- return $this->_redirect('bitcoin/index/pay');
231
- break;
232
- case "paid":
233
- case "partial":
234
- case "authorizing":
235
- return $this->_redirect('checkout/onepage/success');
236
- break;
237
- case "failed":
238
- return $this->_redirect('checkout/onepage/failure');
239
- break;
240
- case "refund_requested":
241
- case "refund_owed":
242
- return $this->_redirect('checkout/onepage/failure');
243
- break;
244
- case "expired":
245
- return $this->_redirect('checkout/onepage/failure');
246
- break;
247
- default:
248
- $this->log("Unknown invoice status. Invoice id: {$id}");
249
- return $this->_forward("no-route");
250
- break;
251
- }
252
- } catch (Mage_Core_Exception $e) {
253
- $this->log("An error occurred: {$e->getMessage()} on line {$e->getLine()}");
254
- return $this->_redirect('checkout/onepage/failure');
255
  }
 
 
 
256
  }
 
257
 
258
- /**
259
- * return current object
260
- * @return bool|Mage_Sales_Model_Order
261
- */
262
- private function getOrder()
263
- {
264
- $session = Mage::getSingleton('checkout/session');
265
- if (!$session->getLastRealOrderId()) {
266
- return false;
267
- }
268
- return Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
269
- }
270
- /*
271
- * log message to yellow.log
272
- */
273
- private function log($message)
274
- {
275
- return Mage::log($message, Zend_Log::INFO, "yellow.log");
276
  }
 
 
277
 
278
- /**
279
- *
280
- * return 403 header
281
- * @return mixed
282
- *
283
- */
284
- private function returnForbidden(){
285
- return $this->getResponse()
286
- ->clearHeaders()
287
- ->setHttpResponseCode(403)
288
- ->sendResponse();
 
 
289
  }
 
 
 
290
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  }
 
 
1
  <?php
2
 
3
+ /**
4
+ *
5
+ * The MIT License (MIT)
6
+ *
7
+ * Copyright (c) 2014 YellowPay.co
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ *
27
+ * */
28
+ class Yellow_Bitcoin_IndexController extends Mage_Core_Controller_Front_Action
29
+ {
30
 
31
 
32
+ public function payAction()
33
+ {
34
+ $this->loadLayout();
35
+ $this->renderLayout();
36
+ }
37
+
38
+ public function IpnAction()
39
+ {
40
+ /**
41
+ * return not found on all requests but POST
42
+ */
43
+ $this->log("----------- IPN request validation ------------");
44
+ if (!$this->getRequest()->isPost()) {
45
+ $this->log("skip none POST requests");
46
+ return $this->returnForbidden();
47
  }
48
+ $ip = long2ip(Mage::helper('core/http')->getRemoteAddr(true));
49
+ $this->log("Start IPN request validation");
50
+ $this->log("IP Address of the sender {$ip}");
 
 
 
 
 
 
 
 
 
51
 
52
+ /* start to validate the signature */
53
+ $request = $this->getRequest();
54
+ $payload = $request->getRawBody();
55
+ $public_key = $request->getHeader("API-Key");
56
+ $nonce = $request->getHeader("API-Nonce");
57
+ $request_signature = $request->getHeader("API-Sign");
58
+ //$this->log("API-KEY:{$public_key}");
59
+ //$this->log("API-Nonce:{$nonce}");
60
+ //$this->log("API-Sign:{$request_signature}");
61
+ $this->log("Received payload: " . $payload);
62
 
63
+ if (!$public_key || !$nonce || !$request_signature || !$payload) {
64
+ $this->log("Credentials missing. Exiting.");
65
+ return $this->returnForbidden();
66
+ }
67
 
68
+ $private_key = Mage::helper('core')->decrypt(
69
+ Mage::getModel("bitcoin/bitcoin")->getConfiguration("private_key")
70
+ );
71
+ $url = Mage::helper('core/url')->getCurrentUrl();
72
+ $this->log("CURRENT IPN URL IS : " .$url);
 
 
73
 
74
+ $message = $nonce . $url . $payload;
75
+ $current_signature = hash_hmac("sha256", $message, $private_key, false);
76
+ $this->log("Calculated signature: " . $current_signature);
77
+
78
+ if ($request_signature <> $current_signature) {
79
+ $this->log("IPN VALIDATION FAILED");
80
+ $this->log("Returning 'page not found'");
81
+ $this->log("Your payment data is still safe");
82
+ $this->log("----------- IPN request processing will be skipped -----------");
83
+ return $this->returnForbidden();
84
+ }
85
+ $this->log("IPN signature validation succeeded");
86
+ /* end of validate the signature */
87
+ /* by this the request has passed validation */
88
+ try {
89
+ /* need to check the ip address of the source from a whitelist list of ips , otherwise this might be used illegaly to update orders */
90
+ $this->log("----------- IPN request processing ------------");
91
+ $id = base64_decode($this->getRequest()->getParam("id"));
92
+ //$data = file_get_contents('php://input');
93
+ $body = json_decode($payload, true);
94
+ //$this->log("current Id is: {$id}");
95
+ $this->log("Received payload: " . $payload, $body["id"]);
96
+ $url = $body["url"];
97
+ $invoice_id = $body["id"];
98
+ /* simple validation check | might be changed later */
99
+ $collection = Mage::getModel("bitcoin/ipn")
100
+ ->getCollection()
101
+ ->getSelect()
102
+ ->where("quote_id = ? OR order_id = ?", $id)
103
+ ->where("invoice_id =?", $invoice_id);
104
+ $yellow_log = $collection->query()->fetchAll();
105
+ $from_order = $from_quote = false;
106
+ if (count($yellow_log) == 1) {
107
+ if ($yellow_log[0]["quote_id"] === $id) {
108
+ $from_quote = true;
109
+ $from_order = false;
110
+ //$this->log("its a quote", $body["id"]);
111
+ } elseif ($yellow_log[0]["order_id"] === $id) {
112
+ $from_quote = false;
113
+ $from_order = true;
114
+ //$this->log("its an order", $body["id"]);
115
+ }
116
+ } else {
117
+ $this->log("URL validation failed: {$url}");
118
+ $this->log("----------- IPN request processing will be skipped -----------", $body["id"]);
119
+ return $this->_forward("no-route");
120
+ }
121
+ if ($from_order) {
122
+ $order = Mage::getModel('sales/order')->load($id);
123
  }
124
+ if ($from_quote) {
125
+ $order = Mage::getModel('sales/order')->load($id, "quote_id");
126
+ }
127
+ /* skip quote + authorizing state because the order hasn't been placed yet */
128
+ if ($from_quote && $body["status"] === "authorizing") {
129
+ $this->log(
130
+ "Quote id {$id} will be skipped because the order hasn't been placed yet. IPN status: {$body["status"]}",
131
+ $body["id"]
132
+ );
133
+ echo json_encode(array("message" => "skipped"));
134
+ $this->log("----------- IPN request processing will be skipped -----------", $body["id"]);
135
+ return;
136
+ }
137
+ if ($order->getPayment() instanceof Yellow_Bitcoin_Model_Bitcoin) {
138
+ $payment = $order->getPayment()->getMethodInstance();
139
+ if (!$order || $payment->getCode() <> "bitcoin" || $order->getState() <> Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW
140
+ ) {
141
+ $this->log("Either this order is not paid via Yellow, or it has an unallowed state", $body["id"]);
142
+ $this->log("----------- IPN request processing will be skipped -----------", $body["id"]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  return $this->_forward("no-route");
144
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  }
146
+ $this->log(" invoice status : {$body["status"]}", $body["id"]);
147
+ switch ($body['status']) {
148
+ case 'paid':
149
+ $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus();
150
+ $status_message = "Payment confirmation received. Invoice Id: " . $body['id']; // $invoice["message"];
151
+ $order->addStatusToHistory($status, $status_message);
152
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING);
153
+ $order->sendNewOrderEmail();
154
+ $order->save();
155
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsPaid($body["id"]);
156
+ /* create an invoice */
157
+ $invoiceModel = Mage::getModel('sales/order_invoice_api');
158
+ $invoice_id = $invoiceModel->create($order->getIncrementId(), array());
159
+ $invoiceModel->capture($invoice_id);
160
+ $this->log("Magento Invoice created!", $body["id"]);
161
+ break;
162
+ case 'reissue':
163
+ $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus(); /// this must bn changed when we had reissue / renew payment ready
164
+ $status_message = "Client re-issued the invoice. Invoice Id: " . $body['id']; // $invoice["message"];
165
+ $order->addStatusToHistory($status, $status_message);
166
+ $order->save();
167
+ break;
168
+ case 'partial':
169
+ $status = Mage::getModel("bitcoin/bitcoin")->getSuccessStatus(); /// this must bn changed when we had partial payment ready
170
+ $status_message = "Client made a partial payment. Invoice Id: " . $body['id']; // $invoice["message"];
171
+ $order->addStatusToHistory($status, $status_message);
172
+ $order->save();
173
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsPartial($body["id"]);
174
+ break;
175
+ case 'failed':
176
+ case 'invalid':
177
+ $status = Mage::getModel("bitcoin/bitcoin")->getFailedStatus();
178
+ $status_message = "Client failed to pay. Invoice Id: " . $body['id']; // $invoice["message"];
179
+ $order->addStatusToHistory($status, $status_message);
180
+ $order->setState(Mage_Sales_Model_Order::STATE_HOLDED);
181
+ $order->cancel();
182
+ $order->save();
183
+ break;
184
+ /// its just a new invoice | authorizing , I will never expect a post with new status , though I had created the block of it
185
+ case 'authorizing':
186
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsAuthorizing($body["id"]);
187
+ break;
188
+ case 'expired':
189
+ /* this to update the ipn table when invoice expired */
190
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsExpired($body["id"]);
191
+ break;
192
+ case 'refund_owed':
193
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundOwed($body["id"]);
194
+ break;
195
+ case 'refund_requested':
196
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundRequested($body["id"]);
197
+ break;
198
+ case 'refund_paid':
199
+ Mage::getResourceModel("bitcoin/ipn")->MarkAsRefundPaid($body["id"]);
200
+ break;
201
+ case 'new':
202
+ default:
203
+ /// @todo : we need to log here
204
+ break;
205
+ }
206
+ echo json_encode(array("message" => "done"));
207
+ $this->log("----------- IPN request processing complete -----------", $body["id"]);
208
+
209
+ } catch (\Exception $e) {
210
+ $this->log("EXCEPTION:" . $e->getMessage . "|" . $e->getLine(), $body["id"]);
211
  }
212
+ }
213
 
214
+ public function StatusAction()
215
+ {
216
+ $invoice = Mage::getSingleton('core/session')->getData("invoice");
217
+ try {
218
+ $id = $invoice["id"];
219
+ $model = Mage::getModel('bitcoin/bitcoin');
220
+ $order = $this->getOrder();
221
+ if (!$order) {
222
+ $this->log(
223
+ "This session does not have a recent order. This page may have been accessed directly or sessions were cleared somehow.",
224
+ $id
225
+ );
226
+ return $this->returnForbidden();
227
+ }
228
+ $model->setOrder($order);
229
+ $status = $model->checkInvoiceStatus($id);
230
+ if ($status == false) {
231
+ $this->log("Invoice status check failed", $id);
232
+ return $this->returnForbidden();
233
+ }
234
+ switch ($status) {
235
+ case "new":
236
+ return $this->_redirect('bitcoin/index/pay');
237
+ break;
238
+ case "paid":
239
+ case "partial":
240
+ case "authorizing":
241
+ return $this->_redirect('checkout/onepage/success');
242
+ break;
243
+ case "failed":
244
+ return $this->_redirect('checkout/onepage/failure');
245
+ break;
246
+ case "refund_requested":
247
+ case "refund_owed":
248
+ return $this->_redirect('checkout/onepage/failure');
249
+ break;
250
+ case "expired":
251
+ return $this->_redirect('checkout/onepage/failure');
252
+ break;
253
+ default:
254
+ $this->log("Unknown invoice status. Invoice id: {$id}", $id);
255
  return $this->_forward("no-route");
256
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  }
258
+ } catch (Mage_Core_Exception $e) {
259
+ $this->log("An error occurred: {$e->getMessage()} on line {$e->getLine()}", $id);
260
+ return $this->_redirect('checkout/onepage/failure');
261
  }
262
+ }
263
 
264
+ /**
265
+ * return current object
266
+ * @return bool|Mage_Sales_Model_Order
267
+ */
268
+ private function getOrder()
269
+ {
270
+ $session = Mage::getSingleton('checkout/session');
271
+ if (!$session->getLastRealOrderId()) {
272
+ return false;
 
 
 
 
 
 
 
 
 
273
  }
274
+ return Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
275
+ }
276
 
277
+
278
+ /**
279
+ * log message to file
280
+ *
281
+ * @param string $message
282
+ * @param string $invoice_id
283
+ * @return boolean
284
+ */
285
+ private function log($message, $invoice_id = null)
286
+ {
287
+ $enabled = Mage::getStoreConfig(Yellow_Bitcoin_Model_Log::DATABASE_ENABLED_CONFIG_PATH);
288
+ if ($enabled) {
289
+ Mage::getModel("bitcoin/log")->logMessage($message, $invoice_id);
290
  }
291
+ Mage::log($message, Zend_Log::ERR, "yellow.log");
292
+ return true;
293
+ }
294
 
295
+ /**
296
+ *
297
+ * return 403 header
298
+ * @return mixed
299
+ *
300
+ */
301
+ private function returnForbidden()
302
+ {
303
+ return $this->getResponse()
304
+ ->clearHeaders()
305
+ ->setHttpResponseCode(403)
306
+ ->sendResponse();
307
  }
308
+
309
+ }
app/code/local/Yellow/Bitcoin/etc/config.xml CHANGED
@@ -27,7 +27,7 @@ SOFTWARE.
27
  <config>
28
  <modules>
29
  <Yellow_Bitcoin>
30
- <version>0.1.2</version>
31
  <depends>
32
  <Mage_Payment/>
33
  </depends>
@@ -55,6 +55,9 @@ SOFTWARE.
55
  <ipn>
56
  <table>yellow_ipn</table>
57
  </ipn>
 
 
 
58
  </entities>
59
  </bitcoin_resource>
60
  </models>
@@ -97,6 +100,74 @@ SOFTWARE.
97
  </updates>
98
  </layout>
99
  </frontend>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  <default>
101
  <payment>
102
  <bitcoin>
@@ -111,6 +182,7 @@ SOFTWARE.
111
  <public_key></public_key>
112
  <private_key></private_key>
113
  <payment_action>authorize</payment_action>
 
114
  </bitcoin>
115
  </payment>
116
  </default>
27
  <config>
28
  <modules>
29
  <Yellow_Bitcoin>
30
+ <version>0.1.3</version>
31
  <depends>
32
  <Mage_Payment/>
33
  </depends>
55
  <ipn>
56
  <table>yellow_ipn</table>
57
  </ipn>
58
+ <log>
59
+ <table>yellow_log</table>
60
+ </log>
61
  </entities>
62
  </bitcoin_resource>
63
  </models>
100
  </updates>
101
  </layout>
102
  </frontend>
103
+
104
+ <admin>
105
+ <routers>
106
+ <bitcoin>
107
+ <use>admin</use>
108
+ <args>
109
+ <module>Yellow_Bitcoin</module>
110
+ <frontName>bitcoin</frontName>
111
+ </args>
112
+ </bitcoin>
113
+ </routers>
114
+ </admin>
115
+ <adminhtml>
116
+ <menu>
117
+ <system>
118
+ <children>
119
+ <bitcoin module="bitcoin">
120
+ <title>Yellow Bitcoin</title>
121
+ <sort_order>1</sort_order>
122
+ <children>
123
+ <log module="bitcoin">
124
+ <title>View Log</title>
125
+ <sort_order>0</sort_order>
126
+ <action>bitcoin/adminhtml_log</action>
127
+ </log>
128
+ <ipn module="bitcoin">
129
+ <title>View Ipn List</title>
130
+ <sort_order>10</sort_order>
131
+ <action>bitcoin/adminhtml_ipn</action>
132
+ </ipn>
133
+ </children>
134
+ </bitcoin>
135
+ </children>
136
+ </system>
137
+ </menu>
138
+ <acl>
139
+ <resources>
140
+ <all>
141
+ <title>Allow Everything</title>
142
+ </all>
143
+ <admin>
144
+ <children>
145
+ <bitcoin translate="title" module="bitcoin">
146
+ <title>Yellow Bitcoin</title>
147
+ <sort_order>1000</sort_order>
148
+ <children>
149
+ <log translate="title">
150
+ <title>Manage Log</title>
151
+ <sort_order>0</sort_order>
152
+ </log>
153
+ <ipn translate="title">
154
+ <title>Manage Ipn</title>
155
+ <sort_order>10</sort_order>
156
+ </ipn>
157
+ </children>
158
+ </bitcoin>
159
+ </children>
160
+ </admin>
161
+ </resources>
162
+ </acl>
163
+ <layout>
164
+ <updates>
165
+ <bitcoin>
166
+ <file>bitcoin.xml</file>
167
+ </bitcoin>
168
+ </updates>
169
+ </layout>
170
+ </adminhtml>
171
  <default>
172
  <payment>
173
  <bitcoin>
182
  <public_key></public_key>
183
  <private_key></private_key>
184
  <payment_action>authorize</payment_action>
185
+ <db_log>0</db_log>
186
  </bitcoin>
187
  </payment>
188
  </default>
app/code/local/Yellow/Bitcoin/etc/system.xml CHANGED
@@ -33,7 +33,7 @@ SOFTWARE.
33
  <label>Yellow Bitcoin</label>
34
  <comment>
35
  <![CDATA[
36
- <div>
37
  <a href="http://yellowpay.co/" target="_blank"><img src="https://avatars2.githubusercontent.com/u/8528793?v=2&s=100" alt= "YellowPay" width='100px' height='100px'/></a>
38
  <p>This extension by <a href="http://www.yellowpay.co/" title="Applications for Ecommerce" style="color: #EA7601">Yellow</a> | <a href="http://yellowpay.co" title="Get support for this extension" style="color: #EA7601">Get Support</a></p>
39
  </div>
@@ -134,6 +134,16 @@ SOFTWARE.
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  </private_key>
 
 
 
 
 
 
 
 
 
 
137
  <sort_order translate="label">
138
  <label>Sort Order</label>
139
  <frontend_type>text</frontend_type>
33
  <label>Yellow Bitcoin</label>
34
  <comment>
35
  <![CDATA[
36
+ <div class="v0.1.2">
37
  <a href="http://yellowpay.co/" target="_blank"><img src="https://avatars2.githubusercontent.com/u/8528793?v=2&s=100" alt= "YellowPay" width='100px' height='100px'/></a>
38
  <p>This extension by <a href="http://www.yellowpay.co/" title="Applications for Ecommerce" style="color: #EA7601">Yellow</a> | <a href="http://yellowpay.co" title="Get support for this extension" style="color: #EA7601">Get Support</a></p>
39
  </div>
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  </private_key>
137
+ <db_log translate="label">
138
+ <comment>
139
+ database logging for development/debugging cases
140
+ </comment>
141
+ <label>Database Log</label>
142
+ <frontend_type>select</frontend_type>
143
+ <source_model>adminhtml/system_config_source_yesno</source_model>
144
+ <sort_order>1</sort_order>
145
+ <show_in_default>1</show_in_default>
146
+ </db_log>
147
  <sort_order translate="label">
148
  <label>Sort Order</label>
149
  <frontend_type>text</frontend_type>
app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
 
5
- $installer->run(
6
- "
7
  CREATE TABLE IF NOT EXISTS `{$installer->getTable('bitcoin/ipn')}` (
8
  `id` int(10) unsigned NOT NULL auto_increment,
9
  `quote_id` int(10) unsigned default NULL,
@@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `{$installer->getTable('bitcoin/ipn')}` (
28
  KEY `invoice_id` (`invoice_id`)
29
  ) ENGINE=INNODB DEFAULT CHARSET=utf8 ;
30
  "
31
- );
32
 
33
- $installer->endSetup();
34
 
1
  <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
 
5
+ $installer->run(
6
+ "
7
  CREATE TABLE IF NOT EXISTS `{$installer->getTable('bitcoin/ipn')}` (
8
  `id` int(10) unsigned NOT NULL auto_increment,
9
  `quote_id` int(10) unsigned default NULL,
28
  KEY `invoice_id` (`invoice_id`)
29
  ) ENGINE=INNODB DEFAULT CHARSET=utf8 ;
30
  "
31
+ );
32
 
33
+ $installer->endSetup();
34
 
app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-upgrade-0.1.0-0.1.1.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $installer = $this;
3
- $installer->startSetup();
4
- $installer->endSetup();
5
 
1
  <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->endSetup();
5
 
app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-upgrade-0.1.2-0.1.3.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ $installer->run("
5
+ CREATE TABLE `{$installer->getTable('bitcoin/log')}` (
6
+ `id` int(11) NOT NULL AUTO_INCREMENT,
7
+ `message` longtext CHARACTER SET utf8 NOT NULL,
8
+ `created_at` datetime NOT NULL,
9
+ `invoice_id` varchar(255) CHARACTER SET utf8 NOT NULL,
10
+ PRIMARY KEY (`id`)
11
+ ) ENGINE=InnoDB AUTO_INCREMENT=1
12
+ ");
13
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/bitcoin.xml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <bitcoin_adminhtml_log_index>
4
+ <reference name="content">
5
+ <block type="bitcoin/adminhtml_log" name="bitcoin_log"/>
6
+ </reference>
7
+ </bitcoin_adminhtml_log_index>
8
+ <bitcoin_adminhtml_ipn_index>
9
+ <reference name="content">
10
+ <block type="bitcoin/adminhtml_ipn" name="btcoin_ipn"/>
11
+ </reference>
12
+ </bitcoin_adminhtml_ipn_index>
13
+ </layout>
app/design/adminhtml/default/default/template/bitcoin/info/invoice.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
2
+ alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:35px;"/>
3
+ <?php if ($url = $this->getInvoiceUrl()) :?>
4
+ <p><a href="<?php echo $url ; ?>" target="_blank"><?php echo $this->__("Invoice page");?></a></p>
5
+ <?php endif;?>
app/design/frontend/base/default/layout/bitcoin.xml CHANGED
@@ -7,28 +7,39 @@
7
  </checkout_onepage_review>
8
  <bitcoin_index_pay>
9
  <reference name="root">
10
- <action method="addBodyClass"><classname></classname></action>
11
- <remove name="left" />
12
- <remove name="right" />
 
 
13
  <action method="setTemplate">
14
  <template>page/empty.phtml</template>
15
  </action>
16
  </reference>
17
  <reference name="head">
18
- <action method="setTitle" translate="title"><title>Pay With Yellow</title></action>
19
- <action method="addItem"><type>skin_css</type><name>css/bitcoin.css</name><params/></action>
 
 
 
 
 
 
20
  </reference>
21
  <reference name="content">
22
  <block type="cms/block" name="yellow-invoice-custom-css">
23
- <action method="setBlockId"><block_id>yellow-invoice-custom-css</block_id></action>
 
 
24
  </block>
25
- <block type="bitcoin/fullscreen_widget_content" name="widget_content" template="bitcoin/fullscreen/widget/content.phtml"/>
 
26
  </reference>
27
  </bitcoin_index_pay>
28
  <bitcoin_index_status>
29
  <reference name="root">
30
- <remove name="left" />
31
- <remove name="right" />
32
  <action method="setTemplate">
33
  <template>page/empty.phtml</template>
34
  </action>
7
  </checkout_onepage_review>
8
  <bitcoin_index_pay>
9
  <reference name="root">
10
+ <action method="addBodyClass">
11
+ <classname></classname>
12
+ </action>
13
+ <remove name="left"/>
14
+ <remove name="right"/>
15
  <action method="setTemplate">
16
  <template>page/empty.phtml</template>
17
  </action>
18
  </reference>
19
  <reference name="head">
20
+ <action method="setTitle" translate="title">
21
+ <title>Pay With Yellow</title>
22
+ </action>
23
+ <action method="addItem">
24
+ <type>skin_css</type>
25
+ <name>css/bitcoin.css</name>
26
+ <params/>
27
+ </action>
28
  </reference>
29
  <reference name="content">
30
  <block type="cms/block" name="yellow-invoice-custom-css">
31
+ <action method="setBlockId">
32
+ <block_id>yellow-invoice-custom-css</block_id>
33
+ </action>
34
  </block>
35
+ <block type="bitcoin/fullscreen_widget_content" name="widget_content"
36
+ template="bitcoin/fullscreen/widget/content.phtml"/>
37
  </reference>
38
  </bitcoin_index_pay>
39
  <bitcoin_index_status>
40
  <reference name="root">
41
+ <remove name="left"/>
42
+ <remove name="right"/>
43
  <action method="setTemplate">
44
  <template>page/empty.phtml</template>
45
  </action>
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) 2014 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,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) 2014 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
+ * @var $this Mage_Authorizenet_Block_Directpost_Iframe
29
+ */
30
+ ?>
31
+ <?php
32
+ $_params = $this->getParams();
33
+ /* @var $_helper Mage_Authorizenet_Helper_Data */
34
+ $_helper = $this->helper('authorizenet');
35
+ ?>
36
+ <html>
37
+ <head>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ <?php if (isset($_params['redirect'])): ?>
41
+ window.location="<?php echo $this->escapeUrl($_params['redirect']) ?>";
42
+ <?php endif; ?>
43
+ <?php if (isset($_params['redirect_parent'])): ?>
44
+ window.top.location="<?php echo $this->escapeUrl($_params['redirect_parent']) ?>";
45
+ <?php endif; ?>
46
+ <?php if (isset($_params['error_msg'])): ?>
47
+ window.top.directPostModel.showError(<?php echo $this->helper('core')->jsonEncode($_params['error_msg']) ?>);
48
+ <?php if (isset($_params['x_invoice_num'])): ?>
49
+ window.top.directPostModel.successUrl="<?php echo $_helper->getSuccessOrderUrl($_params) ?>";
50
+ <?php endif; ?>
51
+ <?php endif; ?>
52
+ //]]>
53
+ </script>
54
+ </head>
55
+ <body></body>
56
+ </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) 2014 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/bitcoin/form/bitcoin.phtml CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
- if(Mage::helper("bitcoin")->isFullScreen()):?>
3
- <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
 
4
  <li>
5
  <div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
6
  <?php echo $this->__("After selecting this payment option and placing your order, you will be redirected to a full page invoice to complete the payment");?>
1
  <?php
2
+ if (Mage::helper("bitcoin")->isFullScreen()):?>
3
+ <ul class="form-list checkout-agreements" id="payment_form_<?php echo $this->getMethodCode() ?>"
4
+ style="display:none;">
5
  <li>
6
  <div class="<?php echo $this->getMethodCode() ?>-instructions-content agreement-content">
7
  <?php echo $this->__("After selecting this payment option and placing your order, you will be redirected to a full page invoice to complete the payment");?>
app/design/frontend/base/default/template/bitcoin/form/logo.phtml CHANGED
@@ -5,7 +5,7 @@
5
  <span style="margin-top: 6px;">
6
  &nbsp;<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
7
  <small>
8
- <a href="<?php echo "http://shubitcoin.com/"; ?>" target="_blank">
9
  <?php echo Mage::helper('bitcoin')->__('What is Bitcoin ?'); ?>
10
  </a>
11
  </small>
5
  <span style="margin-top: 6px;">
6
  &nbsp;<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
7
  <small>
8
+ <a href="<?php echo "http://yellowpay.co/what-is-bitcoin"; ?>" target="_blank">
9
  <?php echo Mage::helper('bitcoin')->__('What is Bitcoin ?'); ?>
10
  </a>
11
  </small>
app/design/frontend/base/default/template/bitcoin/fullscreen.phtml DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- $url = $this->GetWidgetUrl();
3
- $iframe = false;
4
- switch ($url) {
5
- case 'no payment':
6
- case 'disabled':
7
- $iframe = false;
8
- break;
9
- case 'paid':
10
- echo 'Order payment received. Place Order to complete.';
11
- $iframe = false;
12
- break;
13
- case false:
14
- echo 'Error creating invoice. Please try again or try another payment solution.';
15
- $iframe = false;
16
- break;
17
- default:
18
- $iframe = '<iframe src="' . $url . '" style="width:500px; height:255px; overflow:hidden; border:none; margin:auto; display:block;" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
19
- break;
20
- }
21
- if ($iframe): echo $iframe;?>
22
- <script type="text/javascript">
23
- function invoiceListener(event) {
24
- if (event.origin != "https://yolanda-perkins.herokuapp.com") {
25
- alert("Received message from unexpected domain: " + event.origin);
26
- return;
27
- }
28
- switch (event.data) {
29
- case "authorizing":
30
- window.location = "<?php echo Mage::getUrl("bitcoin/index/status");?>";
31
- break;
32
- case "expired":
33
- case "refund_requested":
34
- break;
35
- default:
36
- alert("unknown order status :" + event.data);
37
- break;
38
- }
39
- }
40
- // Attach the message listener
41
- if (window.addEventListener) {
42
- addEventListener("message", invoiceListener, false)
43
- } else {
44
- attachEvent("onmessage", invoiceListener)
45
- }
46
- </script>
47
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/bitcoin/fullscreen/widget/content.phtml CHANGED
@@ -1,56 +1,58 @@
1
  <div id="yp-fullpage-container">
2
- <?php echo $this->getLayout()->createBlock('bitcoin/fullscreen_widget_header')->setTemplate("bitcoin/fullscreen/widget/header.phtml")->toHtml();?>
3
  <div id="yp-invoice-body">
4
  <?php
5
- $url = $this->GetWidgetUrl();
6
- $iframe = false;
7
- switch ($url) {
8
- case 'no payment':
9
- case 'disabled':
10
- $iframe = false;
11
- break;
12
- case 'paid':
13
- echo 'Order payment received. Place Order to complete.';
14
- $iframe = false;
15
- break;
16
- case false:
17
- echo 'Error creating invoice. Please try again or try another payment solution.';
18
- $iframe = false;
19
- break;
20
- default:
21
- $iframe = '<iframe src="' . $url . '" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
22
- break;
23
- }
24
- if ($iframe): echo $iframe;?>
25
- <script type="text/javascript">
26
- function invoiceListener(event) {
27
- console.log(event);
28
- if (event.origin != "https://yolanda-perkins.herokuapp.com" && /\.yellowpay\.co$/.test(event.origin) == false ) {
29
- alert("Received message from unexpected domain: " + event.origin);
30
- return;
31
- }
32
- switch (event.data) {
33
- case "authorizing":
34
- case "paid":
35
- window.location = "<?php echo Mage::getUrl("bitcoin/index/status");?>";
36
- break;
37
- case "expired":
38
- case "refund_requested":
39
- window.location = "<?php echo Mage::getUrl("bitcoin/index/status");?>";
40
- break;
41
- default:
42
- alert("unknown order status :" + event.data);
43
- break;
44
- }
45
  }
46
- // Attach the message listener
47
- if (window.addEventListener) {
48
- addEventListener("message", invoiceListener, false)
49
- } else {
50
- attachEvent("onmessage", invoiceListener)
 
 
 
 
 
 
 
51
  }
52
- </script>
53
- <?php endif; ?>
 
 
 
 
 
 
 
54
  </div>
55
- <?php echo $this->getLayout()->createBlock('bitcoin/fullscreen_widget_footer')->setTemplate("bitcoin/fullscreen/widget/footer.phtml")->toHtml();?>
56
  </div>
1
  <div id="yp-fullpage-container">
2
+ <?php echo $this->getLayout()->createBlock('bitcoin/fullscreen_widget_header')->setTemplate("bitcoin/fullscreen/widget/header.phtml")->toHtml(); ?>
3
  <div id="yp-invoice-body">
4
  <?php
5
+ $url = $this->GetWidgetUrl();
6
+ $iframe = false;
7
+ switch ($url) {
8
+ case 'no payment':
9
+ case 'disabled':
10
+ $iframe = false;
11
+ break;
12
+ case 'paid':
13
+ echo 'Order payment received. Place Order to complete.';
14
+ $iframe = false;
15
+ break;
16
+ case false:
17
+ echo 'Error creating invoice. Please try again or try another payment solution.';
18
+ $iframe = false;
19
+ break;
20
+ default:
21
+ $iframe = '<iframe src="' . $url . '" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
22
+ break;
23
+ }
24
+ if ($iframe): echo $iframe; ?>
25
+ <script type="text/javascript">
26
+ function invoiceListener(event) {
27
+ var origin_pattern = "^" + event.origin.replace(/\./g, "\\.");
28
+ var server_root = "<?php echo $this->getConfiguredServerRoot();?>";
29
+ if (RegExp(origin_pattern).test(server_root) == false &&
30
+ event.origin != "https://yolanda-perkins.herokuapp.com" &&
31
+ RegExp("\\.yellowpay\\.co$").test(event.origin) == false) {
32
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
+ switch (event.data) {
35
+ case "authorizing":
36
+ case "paid":
37
+ window.location = "<?php echo Mage::getUrl("bitcoin/index/status");?>";
38
+ break;
39
+ case "expired":
40
+ case "refund_requested":
41
+ window.location = "<?php echo Mage::getUrl("bitcoin/index/status");?>";
42
+ break;
43
+ default:
44
+ alert("unknown order status :" + event.data);
45
+ break;
46
  }
47
+ }
48
+ // Attach the message listener
49
+ if (window.addEventListener) {
50
+ addEventListener("message", invoiceListener, false)
51
+ } else {
52
+ attachEvent("onmessage", invoiceListener)
53
+ }
54
+ </script>
55
+ <?php endif; ?>
56
  </div>
57
+ <?php echo $this->getLayout()->createBlock('bitcoin/fullscreen_widget_footer')->setTemplate("bitcoin/fullscreen/widget/footer.phtml")->toHtml(); ?>
58
  </div>
app/design/frontend/base/default/template/bitcoin/fullscreen/widget/footer.phtml CHANGED
@@ -1,34 +1,39 @@
1
- <?php $storeName = $this->getStoreName()?>
2
- <?php $invoice = $this->getInvoiceData();?>
3
- <?php $order = $this->getLastOrder();?>
4
  <?php //$invoice = array("invoice_ccy" => "invoice_ccy" , "invoice_price" => "invoice_price" , "base_ccy" => "base_ccy" , "base_price" => "base_price");?>
5
  <div id="yp-fullpage-footer">
6
- <div id="yp-fullpage-yellow-bar"><div class="yp-bar"></div></div>
 
 
7
  <div id="yp-fullpage-footer-content" class="clearfix">
8
  <div id="yp-fullpage-invoice">
9
- <div class="yp-normal-text"><?php echo $this->__("Order# %s" , $order->getIncrementId());?></div>
10
  <div class="yp-vertical-space-10"></div>
11
- <div class="yp-normal-text"><?php echo $this->__("Amount Due :");?></div>
12
- <div class="yp-bolder-text"><?php echo $this->__($invoice["invoice_ccy"]);?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?> </div>
 
13
  <div class="yp-vertical-space-10"></div>
14
- <div id="yp-info"><?php echo $this->__($invoice["invoice_ccy"]);?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?> = <?php echo $this->__($invoice["base_ccy"]);?> <?php echo $this->__("{$invoice["base_price"]}"); ?></div>
 
 
15
  </div>
16
  <div id="yp-fullpage-info">
17
- <div class="yp-bolder-text"><?php echo $this->__("%s is proud to accept Bitcoin!" , $storeName);?></div>
18
  <div class="yp-vertical-space-10"></div>
19
  <div class="yp-normal-text yp-email-field">
20
  <span class="icon-mail2 yp-icon"></span>
21
- <span class=“yp-email-addr"><?php echo $this->escapeHtml($this->getContactEmail());?></span>
22
  </div>
23
  <div class="yp-vertical-space-20"></div>
24
  <div class="yp-bolder-text"><p><?php echo $this->__($this->getCustomerName()); ?></p></div>
25
  <address>
26
- <?php echo $this->getBillingAddress();?>
27
  </address>
28
  <div class="yp-vertical-space-10"></div>
29
  <div class="yp-normal-text yp-email-field">
30
  <span class="icon-mail2 yp-icon"></span>
31
- <span class=“yp-email-addr"><?php echo $this->escapeHtml($this->getCustomerEmail());?></span>
32
  </div>
33
  </div>
34
  </div>
1
+ <?php $storeName = $this->getStoreName() ?>
2
+ <?php $invoice = $this->getInvoiceData(); ?>
3
+ <?php $order = $this->getLastOrder(); ?>
4
  <?php //$invoice = array("invoice_ccy" => "invoice_ccy" , "invoice_price" => "invoice_price" , "base_ccy" => "base_ccy" , "base_price" => "base_price");?>
5
  <div id="yp-fullpage-footer">
6
+ <div id="yp-fullpage-yellow-bar">
7
+ <div class="yp-bar"></div>
8
+ </div>
9
  <div id="yp-fullpage-footer-content" class="clearfix">
10
  <div id="yp-fullpage-invoice">
11
+ <div class="yp-normal-text"><?php echo $this->__("Order# %s", $order->getIncrementId()); ?></div>
12
  <div class="yp-vertical-space-10"></div>
13
+ <div class="yp-normal-text"><?php echo $this->__("Amount Due :"); ?></div>
14
+ <div
15
+ class="yp-bolder-text"><?php echo $this->__($invoice["invoice_ccy"]); ?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?> </div>
16
  <div class="yp-vertical-space-10"></div>
17
+ <div
18
+ id="yp-info"><?php echo $this->__($invoice["invoice_ccy"]); ?> <?php echo $this->__("{$invoice["invoice_price"]}"); ?>
19
+ = <?php echo $this->__($invoice["base_ccy"]); ?> <?php echo $this->__("{$invoice["base_price"]}"); ?></div>
20
  </div>
21
  <div id="yp-fullpage-info">
22
+ <div class="yp-bolder-text"><?php echo $this->__("%s is proud to accept Bitcoin!", $storeName); ?></div>
23
  <div class="yp-vertical-space-10"></div>
24
  <div class="yp-normal-text yp-email-field">
25
  <span class="icon-mail2 yp-icon"></span>
26
+ <span class=“yp-email-addr"><?php echo $this->escapeHtml($this->getContactEmail()); ?></span>
27
  </div>
28
  <div class="yp-vertical-space-20"></div>
29
  <div class="yp-bolder-text"><p><?php echo $this->__($this->getCustomerName()); ?></p></div>
30
  <address>
31
+ <?php echo $this->getBillingAddress(); ?>
32
  </address>
33
  <div class="yp-vertical-space-10"></div>
34
  <div class="yp-normal-text yp-email-field">
35
  <span class="icon-mail2 yp-icon"></span>
36
+ <span class=“yp-email-addr"><?php echo $this->escapeHtml($this->getCustomerEmail()); ?></span>
37
  </div>
38
  </div>
39
  </div>
app/design/frontend/base/default/template/bitcoin/fullscreen/widget/header.phtml CHANGED
@@ -1,6 +1,7 @@
1
- <div id="yp-fullpage-header" class="clearfix" >
2
- <div class="yp-header-logo">
3
- <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>"><img src="<?php echo $this->getLogoSrc() ?>" class="logo-img" alt="<?php echo $this->getLogoAlt() ?>" /></a>
4
- </div>
5
- <div class="yp-header-title"><span><?php echo $this->__("Your Bitcoin Invoice");?></span></div>
 
6
  </div>
1
+ <div id="yp-fullpage-header" class="clearfix">
2
+ <div class="yp-header-logo">
3
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>"><img
4
+ src="<?php echo $this->getLogoSrc() ?>" class="logo-img" alt="<?php echo $this->getLogoAlt() ?>"/></a>
5
+ </div>
6
+ <div class="yp-header-title"><span><?php echo $this->__("Your Bitcoin Invoice"); ?></span></div>
7
  </div>
app/design/frontend/base/default/template/bitcoin/index.phtml DELETED
@@ -1,13 +0,0 @@
1
- <?php $has_invoice = Mage::getSingleton('core/session')->getData('has_invoice'); ?>
2
- <?php if ($has_invoice): ?>
3
- <?php $invoice = Mage::getSingleton('core/session')->getData('invoice'); ?>
4
- <iframe src="<?php echo $this->escapeHtml($invoice["url"]); ?>" frameborder="0"
5
- width="100%" height="400px"></iframe>
6
- <?php else: ?>
7
- <div class="messages">
8
- <div class="error-msg">
9
- <?php $error_msg = Mage::getSingleton('core/session')->getData('error'); ?>
10
- <p><?= $this->__($error_msg); ?></p>
11
- </div>
12
- </div>
13
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/bitcoin/info/bitcoin.phtml DELETED
@@ -1 +0,0 @@
1
- <p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
 
app/design/frontend/base/default/template/bitcoin/info/invoice.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <!-- Yellow Logo -->
2
+ <div id="bitcoin">
3
+ <img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
4
+ alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:35px;"/>
5
+ </div>
6
+ <!-- Yellow Logo -->
app/design/frontend/base/default/template/bitcoin/widget.phtml CHANGED
@@ -1,51 +1,54 @@
1
  <?php
2
- $url = $this->GetWidgetUrl();
3
- $iframe = false;
4
- switch ($url) {
5
- case 'no payment':
6
- case 'disabled':
7
- $iframe = false;
8
- break;
9
- case 'paid':
10
- echo 'Order payment received. Place Order to complete.';
11
- $iframe = false;
12
- break;
13
- case false:
14
- echo 'Error creating invoice. Please try again or try another payment solution.';
15
- $iframe = false;
16
- break;
17
- default:
18
- $iframe = '<iframe src="' . $url . '" style="width:500px; height:255px; overflow:hidden; border:none; margin:auto; display:block;" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
19
- break;
20
- }
21
- if ($iframe): echo $iframe;?>
22
- <script type="text/javascript">
23
- function invoiceListener(event) {
24
- console.log(event);
25
- if (event.origin != "https://yolanda-perkins.herokuapp.com" && !/\.yellowpay\.co$/.test(event.origin) ) {
26
- alert("Received message from unexpected domain: " + event.origin);
27
- return;
28
- }
29
- switch (event.data) {
30
- case "authorizing":
31
- buttons = $$("button.btn-checkout");
32
- buttons.each(function (btn) {
33
- btn.click();
34
- })
35
- break;
36
- case "expired":
37
- case "refund_requested":
38
- break;
39
- default:
40
- alert("unknown order status :" + event.data);
41
- break;
42
- }
43
  }
44
- // Attach the message listener
45
- if (window.addEventListener) {
46
- addEventListener("message", invoiceListener, false)
47
- } else {
48
- attachEvent("onmessage", invoiceListener)
 
 
 
 
 
 
 
 
 
49
  }
50
- </script>
51
- <?php endif; ?>
 
 
 
 
 
 
 
1
  <?php
2
+ $url = $this->GetWidgetUrl();
3
+ $iframe = false;
4
+ switch ($url) {
5
+ case 'no payment':
6
+ case 'disabled':
7
+ $iframe = false;
8
+ break;
9
+ case 'paid':
10
+ echo 'Order payment received. Place Order to complete.';
11
+ $iframe = false;
12
+ break;
13
+ case false:
14
+ echo 'Error creating invoice. Please try again or try another payment solution.';
15
+ $iframe = false;
16
+ break;
17
+ default:
18
+ $iframe = '<iframe src="' . $url . '" style="width:500px; height:255px; overflow:hidden; border:none; margin:auto; display:block;" scrolling="no" allowtransparency="true" frameborder="0"> </iframe>';
19
+ break;
20
+ }
21
+ if ($iframe): echo $iframe; ?>
22
+ <script type="text/javascript">
23
+ function invoiceListener(event) {
24
+ var origin_pattern = "^" + event.origin.replace(/\./g, "\\.");
25
+ var server_root = "<?php echo $this->getConfiguredServerRoot();?>";
26
+ if (RegExp(origin_pattern).test(server_root) == false &&
27
+ event.origin != "https://yolanda-perkins.herokuapp.com" &&
28
+ RegExp("\\.yellowpay\\.co$").test(event.origin) == false) {
29
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
31
+
32
+ switch (event.data) {
33
+ case "authorizing":
34
+ buttons = $$("button.btn-checkout");
35
+ buttons.each(function (btn) {
36
+ btn.click();
37
+ })
38
+ break;
39
+ case "expired":
40
+ case "refund_requested":
41
+ break;
42
+ default:
43
+ alert("unknown order status :" + event.data);
44
+ break;
45
  }
46
+ }
47
+ // Attach the message listener
48
+ if (window.addEventListener) {
49
+ addEventListener("message", invoiceListener, false)
50
+ } else {
51
+ attachEvent("onmessage", invoiceListener)
52
+ }
53
+ </script>
54
+ <?php endif; ?>
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) 2014 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->escapeHtml($_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->escapeHtml($_bundle->getName()) ?>" /></a>
39
+ <h3 class="product-name"><a href="<?php echo $_bundle->getProductUrl() ?>"><?php echo $this->escapeHtml($_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,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ * @var $this Mage_Bundle_Block_Catalog_Product_Price
30
+ */
31
+ /**
32
+ * @var $_coreHelper Mage_Core_Helper_Data
33
+ * @var $_weeeHelper Mage_Weee_Helper_Data
34
+ * @var $_taxHelper Mage_Tax_Helper_Data
35
+ */
36
+ $_coreHelper = $this->helper('core');
37
+ $_weeeHelper = $this->helper('weee');
38
+ $_taxHelper = $this->helper('tax');
39
+
40
+ /**
41
+ * @var $_product Mage_Catalog_Model_Product
42
+ * @var $_priceModel Mage_Bundle_Model_Product_Price
43
+ */
44
+ $_product = $this->getProduct();
45
+ $_priceModel = $_product->getPriceModel();
46
+
47
+ list($_minimalPriceTax, $_maximalPriceTax) = $_priceModel->getTotalPrices($_product, null, null, false);
48
+ list($_minimalPriceInclTax, $_maximalPriceInclTax) = $_priceModel->getTotalPrices($_product, null, true, false);
49
+
50
+ $_weeeTaxAmount = 0;
51
+ ?>
52
+ <?php
53
+ if ($_product->getPriceType() == 1) {
54
+ $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product);
55
+ $_weeeTaxAmountInclTaxes = $_weeeTaxAmount;
56
+ if ($_weeeHelper->isTaxable()) {
57
+ $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
58
+ $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes);
59
+ }
60
+ if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
61
+ $_minimalPriceTax += $_weeeTaxAmount;
62
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
63
+ $_maximalPriceTax += $_weeeTaxAmount;
64
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
65
+ }
66
+ if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)) {
67
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
68
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
69
+ }
70
+
71
+ if ($_weeeHelper->typeOfDisplay($_product, array(1, 2, 4))) {
72
+ $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
73
+ }
74
+ }
75
+ ?>
76
+
77
+ <div class="price-box">
78
+ <?php if ($_product->getPriceView()): ?>
79
+ <p class="minimal-price">
80
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
81
+ <?php if ($this->displayBothPrices()): ?>
82
+ <span class="price-excluding-tax">
83
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
84
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
85
+ </span>
86
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
87
+ <span class="weee">(<small>
88
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
89
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
90
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
91
+ <?php else: ?>
92
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
93
+ <?php endif; ?>
94
+
95
+ <?php echo $_weeeSeparator; ?>
96
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
97
+ <?php $_weeeSeparator = ' + '; ?>
98
+ <?php endforeach; ?>
99
+ </small>)</span>
100
+ <?php endif; ?>
101
+ <span class="price-including-tax">
102
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
103
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
104
+ </span>
105
+ <?php else: ?>
106
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
107
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
108
+ <?php else: ?>
109
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
110
+ <?php endif; ?>
111
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
112
+ <span class="weee">(<small>
113
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
114
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
115
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
116
+ <?php else: ?>
117
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
118
+ <?php endif; ?>
119
+
120
+ <?php echo $_weeeSeparator; ?>
121
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
122
+ <?php $_weeeSeparator = ' + '; ?>
123
+ <?php endforeach; ?>
124
+ </small>)</span>
125
+ <?php endif; ?>
126
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
127
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
128
+ <?php endif; ?>
129
+ <?php endif; ?>
130
+ </p>
131
+ <?php else: ?>
132
+ <?php if ($_minimalPriceTax <> $_maximalPriceTax): ?>
133
+ <p class="price-from">
134
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
135
+ <?php if ($this->displayBothPrices()): ?>
136
+ <span class="price-excluding-tax">
137
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
138
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
139
+ </span>
140
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
141
+ <span class="weee">(<small>
142
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
143
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
144
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
145
+ <?php else: ?>
146
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
147
+ <?php endif; ?>
148
+
149
+ <?php echo $_weeeSeparator; ?>
150
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
151
+ <?php $_weeeSeparator = ' + '; ?>
152
+ <?php endforeach; ?>
153
+ </small>)</span>
154
+ <?php endif; ?>
155
+ <span class="price-including-tax">
156
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
157
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
158
+ </span>
159
+ <?php else: ?>
160
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
161
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
162
+ <?php else: ?>
163
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
164
+ <?php endif; ?>
165
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
166
+ <span class="weee">(<small>
167
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
168
+ <?php if ($_taxHelper->displayPriceIncludingTax() || $_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
169
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
170
+ <?php else: ?>
171
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
172
+ <?php endif; ?>
173
+
174
+ <?php echo $_weeeSeparator; ?>
175
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
176
+ <?php $_weeeSeparator = ' + '; ?>
177
+ <?php endforeach; ?>
178
+ </small>)</span>
179
+ <?php endif; ?>
180
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
181
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
182
+ <?php endif; ?>
183
+ <?php endif; ?>
184
+ </p>
185
+ <p class="price-to">
186
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
187
+ <?php if ($this->displayBothPrices()): ?>
188
+ <span class="price-excluding-tax">
189
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
190
+ <?php echo $_coreHelper->currency($_maximalPriceTax) ?>
191
+ </span>
192
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
193
+ <span class="weee">(<small>
194
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
195
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
196
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
197
+ <?php else: ?>
198
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
199
+ <?php endif; ?>
200
+
201
+ <?php echo $_weeeSeparator; ?>
202
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
203
+ <?php $_weeeSeparator = ' + '; ?>
204
+ <?php endforeach; ?>
205
+ </small>)</span>
206
+ <?php endif; ?>
207
+ <span class="price-including-tax">
208
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax') ?></span>
209
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
210
+ </span>
211
+ <?php else: ?>
212
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
213
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
214
+ <?php else: ?>
215
+ <?php echo $_coreHelper->currency($_maximalPriceTax) ?>
216
+ <?php endif; ?>
217
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
218
+ <span class="weee">(<small>
219
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
220
+ <?php if ($_taxHelper->displayPriceIncludingTax() || $_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
221
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
222
+ <?php else: ?>
223
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
224
+ <?php endif; ?>
225
+
226
+ <?php echo $_weeeSeparator; ?>
227
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
228
+ <?php $_weeeSeparator = ' + '; ?>
229
+ <?php endforeach; ?>
230
+ </small>)</span>
231
+ <?php endif; ?>
232
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
233
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
234
+ <?php endif; ?>
235
+ <?php endif; ?>
236
+ </p>
237
+ <?php else: ?>
238
+ <?php if ($this->displayBothPrices()): ?>
239
+ <span class="price-excluding-tax">
240
+ <span class="label"><?php echo $_taxHelper->__('Excl. Tax:') ?></span>
241
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
242
+ </span>
243
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
244
+ <span class="weee">(<small>
245
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
246
+ <?php if ($_weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
247
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
248
+ <?php else: ?>
249
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
250
+ <?php endif; ?>
251
+
252
+ <?php echo $_weeeSeparator; ?>
253
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
254
+ <?php $_weeeSeparator = ' + '; ?>
255
+ <?php endforeach; ?>
256
+ </small>)</span>
257
+ <?php endif; ?>
258
+ <span class="price-including-tax">
259
+ <span class="label"><?php echo $_taxHelper->__('Incl. Tax:') ?></span>
260
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
261
+ </span>
262
+ <?php else: ?>
263
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
264
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $_weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
265
+ <span class="weee">(<small>
266
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
267
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
268
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
269
+ <?php else: ?>
270
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
271
+ <?php endif; ?>
272
+
273
+ <?php echo $_weeeSeparator; ?>
274
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($amount, true, true); ?>
275
+ <?php $_weeeSeparator = ' + '; ?>
276
+ <?php endforeach; ?>
277
+ </small>)</span>
278
+ <?php endif; ?>
279
+ <?php if ($_weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
280
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
281
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
282
+ <?php else: ?>
283
+ <?php echo $_coreHelper->currency($_minimalPriceTax + $_weeeTaxAmount) ?>
284
+ <?php endif; ?>
285
+ <?php endif; ?>
286
+ <?php endif; ?>
287
+ <?php endif; ?>
288
+ <?php endif; ?>
289
+ </div>
app/design/frontend/base/default/template/bundle/catalog/product/view/option_tierprices.phtml ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ if ($this->getParent()->getPriceType() != Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) {
34
+ $_tierPrices = $this->getTierPrices($_product, $this->getParent());
35
+ }
36
+ $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true);
37
+
38
+ /** @var $_catalogHelper Mage_Catalog_Helper_Data */
39
+ $_catalogHelper = Mage::helper('catalog');
40
+
41
+ $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
42
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
43
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
44
+ }
45
+
46
+ ?>
47
+ <?php if (isset($_tierPrices) && count($_tierPrices) > 0): ?>
48
+ <ul class="<?php echo ($this->getInGrouped() ? 'tier-prices-grouped product-pricing-grouped' : 'tier-prices product-pricing'); ?>">
49
+ <?php if ($this->getInGrouped()): ?>
50
+ <?php $_tierPrices = $this->getTierPrices($_product); ?>
51
+ <?php endif; ?>
52
+ <?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices, false); ?>
53
+ <?php foreach ($_tierPrices as $_index => $_price): ?>
54
+ <li class="tier-price tier-<?php echo $_index; ?>">
55
+ <?php if ($_catalogHelper->canApplyMsrp($_product)): ?>
56
+ <?php if ($this->getInGrouped()): ?>
57
+ <?php echo $this->__('Buy %1$s for', $_price['price_qty']) ?>:
58
+ <?php else: ?>
59
+ <?php echo $this->__('Buy %1$s', $_price['price_qty']) ?>
60
+ <?php endif; ?>
61
+ <?php else: ?>
62
+
63
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
64
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
65
+ <?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']) ?>
66
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
67
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
68
+ <?php if ($_weeeTaxAttributes): ?>
69
+ (<small>
70
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
71
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
72
+ <?php echo $separator; ?>
73
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
74
+ <?php endforeach; ?>
75
+ </small>)
76
+ <?php endif; ?>
77
+ <?php echo $this->__('each') ?>
78
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
79
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
80
+ <?php if ($_weeeTaxAttributes): ?>
81
+ (<small>
82
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
83
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
84
+ <?php echo $separator; ?>
85
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
86
+ <?php endforeach; ?>
87
+ </small>)
88
+ <?php endif; ?>
89
+ <?php echo $this->__('each') ?>
90
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
91
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
92
+ <?php if ($_weeeTaxAttributes): ?>
93
+ (<small>
94
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
95
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
96
+ <?php endforeach; ?>
97
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
98
+ </small>)
99
+ <?php endif; ?>
100
+ <?php echo $this->__('each') ?>
101
+ <?php else: ?>
102
+ <?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']) ?>
103
+ <?php endif; ?>
104
+ <?php else: ?>
105
+ <?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
106
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
107
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?>
108
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
109
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
110
+ <?php if ($_weeeTaxAttributes): ?>
111
+ (<small>
112
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
113
+ <?php echo $separator; ?>
114
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
115
+ <?php $separator = ' + '; endforeach; ?>
116
+ </small>)
117
+ <?php endif; ?>
118
+ <?php echo $this->__('each') ?>
119
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
120
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
121
+ <?php if ($_weeeTaxAttributes): ?>
122
+ (<small>
123
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
124
+ <?php echo $separator; ?>
125
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
126
+ <?php $separator = ' + '; endforeach; ?>
127
+ </small>)
128
+ <?php endif; ?>
129
+ <?php echo $this->__('each') ?>
130
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
131
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?>
132
+ <?php if ($_weeeTaxAttributes): ?>
133
+ (<small>
134
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
135
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
136
+ <?php endforeach; ?>
137
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
138
+ </small>)
139
+ <?php endif; ?>
140
+ <?php echo $this->__('each') ?>
141
+ <?php else: ?>
142
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?>
143
+ <?php endif; ?>
144
+ <?php else: ?>
145
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
146
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?>
147
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
148
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
149
+ <?php if ($_weeeTaxAttributes): ?>
150
+ (<small>
151
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
152
+ <?php echo $separator; ?>
153
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
154
+ <?php $separator = ' + '; endforeach; ?>
155
+ </small>)
156
+ <?php endif; ?>
157
+ <?php echo $this->__('each') ?>
158
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
159
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
160
+ <?php if ($_weeeTaxAttributes): ?>
161
+ (<small>
162
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
163
+ <?php echo $separator; ?>
164
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
165
+ <?php $separator = ' + '; endforeach; ?>
166
+ </small>)
167
+ <?php endif; ?>
168
+ <?php echo $this->__('each') ?>
169
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
170
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
171
+ <?php if ($_weeeTaxAttributes): ?>
172
+ (<small>
173
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
174
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
175
+ <?php endforeach; ?>
176
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?>
177
+ </small>)
178
+ <?php endif; ?>
179
+ <?php echo $this->__('each') ?>
180
+ <?php else: ?>
181
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?>
182
+ <?php endif; ?>
183
+ <?php endif; ?>
184
+ <?php endif; ?>
185
+
186
+ <?php endif; // Can apply MSRP ?>
187
+
188
+ <?php if (!$this->getInGrouped()): ?>
189
+ <?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
190
+ || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?>
191
+ <?php echo $this->__('and') ?>&nbsp;<strong class="benefit"><?php echo $this->__('save')?>&nbsp;<span class="percent tier-fixed"><?php echo $_price['savePercent']?></span>%
192
+ <?php endif ?></strong>
193
+ <?php endif; ?>
194
+
195
+ <?php if ($_catalogHelper->isShowPriceOnGesture($_product)):?>
196
+ <?php $popupId = 'msrp-popup-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
197
+ <a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a>
198
+ <script type="text/javascript">
199
+ <?php
200
+ $addToCartUrl = $this->getProduct()->isSalable()
201
+ ? $this->getAddToCartUrl($_product, array('qty' => $_price['price_qty']))
202
+ : '';
203
+ ?>
204
+ <?php if (!$this->getInGrouped()): ?>
205
+ var newLink = {
206
+ url: "<?php echo $addToCartUrl; ?>",
207
+ qty: "<?php echo $_price['price_qty']?>"
208
+ };
209
+ <?php else: ?>
210
+ var newLink = {
211
+ url: "<?php echo $addToCartUrl; ?>",
212
+ notUseForm: true
213
+ };
214
+ <?php endif ?>
215
+ Catalog.Map.addHelpLink(
216
+ $('<?php echo $popupId ?>'),
217
+ "<?php echo $_product->getName() ?>",
218
+ <?php echo json_encode($_price['real_price_html']) ?>,
219
+ "<?php echo $this->helper('core')->currency($_product->getMsrp(),true,false) ?>",
220
+ newLink
221
+ );
222
+ </script>
223
+ <?php else: ?>
224
+ <span class="msrp-price-hide-message">
225
+ <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
226
+ </span>
227
+ <?php endif; ?>
228
+
229
+
230
+ </li>
231
+
232
+ <?php endforeach ?>
233
+ </ul>
234
+ <?php endif;?>
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) 2014 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,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 = $_product->getFinalPrice() ?>
29
+ <?php $_finalPriceInclTax = $_product->getFinalPrice() ?>
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')->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
36
+ }
37
+ }
38
+ $isMAPTypeOnGesture = Mage::helper('catalog')->isShowPriceOnGesture($_product);
39
+ $canApplyMAP = Mage::helper('catalog')->canApplyMsrp($_product);
40
+ ?>
41
+ <?php if ($_product->getCanShowPrice() !== false):?>
42
+ <div class="price-box">
43
+ <p class="price-as-configured">
44
+ <span class="price-label"><?php echo $this->helper('bundle')->__('Price as configured') ?>:</span>
45
+ <?php if (!$this->getWithoutPrice()): ?>
46
+ <span<?php if (!$isMAPTypeOnGesture && $canApplyMAP): ?> style="display:none"<?php endif ?> class="full-product-price">
47
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
48
+ <span class="price-tax">
49
+ <span class="price-excluding-tax">
50
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
51
+ <span class="price" id="price-excluding-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>">
52
+ <?php if (!$canApplyMAP): ?>
53
+ <?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?>
54
+ <?php endif ?>
55
+ </span>
56
+ </span>
57
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
58
+ <span class="weee">(<small>
59
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
60
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
61
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
62
+ <?php else: ?>
63
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
64
+ <?php endif; ?>
65
+
66
+ <?php echo $_weeeSeparator; ?>
67
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
68
+ <?php $_weeeSeparator = ' + '; ?>
69
+ <?php endforeach; ?>
70
+ </small>)</span>
71
+ <?php endif; ?>
72
+ <span class="price-including-tax">
73
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
74
+ <span class="price" id="price-including-tax-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>">
75
+ <?php if (!$canApplyMAP): ?>
76
+ <?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?>
77
+ <?php endif ?>
78
+ </span>
79
+ </span>
80
+ </span>
81
+ <?php else: ?>
82
+ <span class="price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>">
83
+ <?php if (!$canApplyMAP): ?>
84
+ <?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?>
85
+ <?php endif ?>
86
+ </span>
87
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
88
+ <span class="weee">(<small>
89
+ <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
90
+ <?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
91
+ <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
92
+ <?php else: ?>
93
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
94
+ <?php endif; ?>
95
+
96
+ <?php echo $_weeeSeparator; ?>
97
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
98
+ <?php $_weeeSeparator = ' + '; ?>
99
+ <?php endforeach; ?>
100
+ </small>)</span>
101
+ <?php endif; ?>
102
+ <?php endif; ?>
103
+ </span>
104
+ <?php endif ?>
105
+ </p>
106
+ </div>
107
+ <?php endif; ?>
108
+ <?php if($_product->isSaleable()): ?>
109
+ <script type="text/javascript">
110
+ document.observe("dom:loaded", function() {
111
+ bundle.reloadPrice();
112
+ });
113
+ </script>
114
+ <?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) 2014 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,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) 2014 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 skipTierPricePercentUpdate = true;
34
+ var bundle = new Product.Bundle(<?php echo $this->getJsonConfig() ?>);
35
+ var taxCalcMethod = "<?php echo Mage::helper('tax')->getConfig()->getAlgorithm($_product->getStore()) ?>";
36
+ var CACL_UNIT_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_UNIT_BASE ?>";
37
+ var CACL_ROW_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_ROW_BASE ?>";
38
+ var CACL_TOTAL_BASE = "<?php echo Mage_Tax_Model_Calculation::CALC_TOTAL_BASE ?>";
39
+ //]]>
40
+ </script>
41
+ <?php endif; ?>
42
+ <?php if ($this->displayProductStockStatus()): ?>
43
+ <?php if ($_product->isAvailable()): ?>
44
+ <p class="availability in-stock"><?php echo $this->helper('catalog')->__('Availability:') ?>
45
+ <span><?php echo $this->helper('catalog')->__('In stock') ?></span></p>
46
+ <?php else: ?>
47
+ <p class="availability out-of-stock"><?php echo $this->helper('catalog')->__('Availability:') ?>
48
+ <span><?php echo $this->helper('catalog')->__('Out of stock') ?></span></p>
49
+ <?php endif; ?>
50
+ <?php endif; ?>
51
+ <div class="price-box-bundle">
52
+ <?php echo $this->getPriceHtml($_product) ?>
53
+ </div>
54
+ <?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) 2014 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->escapeHtml($_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) 2014 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->escapeHtml($_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,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ <?php $tierPriceHtml = ''; ?>
35
+
36
+ <dt>
37
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->escapeHtml($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
38
+ </dt>
39
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
40
+ <div class="input-box">
41
+ <?php /** @var $_selection Mage_Catalog_Model_Product*/ ?>
42
+ <?php if ($this->_showSingle()): ?>
43
+ <?php echo $this->getSelectionTitlePrice($_selections[0]); ?>
44
+ <?php if ($_selections[0]->getSelectionCanChangeQty()): ?>
45
+ <?php $tierPriceHtml = $this->getTierPriceHtml($_selections[0]); ?>
46
+ <?php endif; ?>
47
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" />
48
+ <?php else:?>
49
+ <ul class="options-list">
50
+ <?php if (!$_option->getRequired()): ?>
51
+ <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=""/>
52
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span>
53
+ </li>
54
+ <?php endif; ?>
55
+ <?php foreach ($_selections as $_selection): ?>
56
+ <?php if ($_selection->getSelectionCanChangeQty() && $this->_isSelected($_selection)): ?>
57
+ <?php $tierPriceHtml = $this->getTierPriceHtml($_selection); ?>
58
+ <?php endif; ?>
59
+ <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() ?>"/>
60
+ <span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label></span>
61
+ <?php if ($_option->getRequired()): ?>
62
+ <?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
63
+ <?php endif; ?>
64
+ </li>
65
+ <?php endforeach; ?>
66
+ </ul>
67
+ <div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
68
+ <?php endif; ?>
69
+ </div>
70
+ <span id="bundle-option-<?php echo $_option->getId() ?>-tier-prices"> <?php echo $tierPriceHtml; ?></span>
71
+ <span class="qty-holder">
72
+ <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 ?>"/>
73
+ </span>
74
+ </dd>
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/select.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) 2014 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
+ <?php $tierPriceHtml = ''; ?>
35
+
36
+ <dt>
37
+ <label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php echo $this->escapeHtml($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<em>*</em>' ?></label>
38
+ </dt>
39
+ <dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
40
+ <div class="input-box">
41
+ <?php /** @var $_selection Mage_Catalog_Model_Product*/ ?>
42
+ <?php if ($this->_showSingle()): ?>
43
+ <?php echo $this->getSelectionTitlePrice($_selections[0]); ?>
44
+ <?php if ($_selections[0]->getSelectionCanChangeQty()): ?>
45
+ <?php $tierPriceHtml = $this->getTierPriceHtml($_selections[0]); ?>
46
+ <?php endif; ?>
47
+ <input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>"/>
48
+ <?php else:?>
49
+ <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">
50
+ <option value=""><?php echo $this->__('Choose a selection...') ?></option>
51
+ <?php foreach ($_selections as $_selection): ?>
52
+ <?php if ($_selection->getSelectionCanChangeQty() && $this->_isSelected($_selection)): ?>
53
+ <?php $tierPriceHtml = $this->getTierPriceHtml($_selection); ?>
54
+ <?php endif; ?>
55
+ <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>
56
+ <?php endforeach; ?>
57
+ </select>
58
+ <?php endif; ?>
59
+ </div>
60
+ <span id="bundle-option-<?php echo $_option->getId() ?>-tier-prices"> <?php echo $tierPriceHtml; ?></span>
61
+ <span class="qty-holder">
62
+ <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 ?>"/>
63
+ </span>
64
+ </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) 2014 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) 2014 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->escapeHtml($_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->escapeHtml($_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'],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'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></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->escapeHtml($_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) 2014 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->escapeHtml($_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->escapeHtml($_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'],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'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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($_inc + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></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->escapeHtml($_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) 2014 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->escapeHtml($_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->escapeHtml($_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'],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'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></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->escapeHtml($_giftMessage->getSender()) ?>
166
+ <br /><?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
167
+ <br /><?php echo $this->__('Message:'); ?><br /> <?php echo $this->escapeHtml($_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) 2014 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->escapeHtml($_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->escapeHtml($_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->escapeHtml($_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,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
41
+ /**
42
+ * @var $_coreHelper Mage_Core_Helper_Data
43
+ * @var $_weeeHelper Mage_Weee_Helper_Data
44
+ * @var $_taxHelper Mage_Tax_Helper_Data
45
+ */
46
+ $_coreHelper = $this->helper('core');
47
+ $_weeeHelper = $this->helper('weee');
48
+ $_taxHelper = $this->helper('tax');
49
+ $_weeeTaxAmount = 0; ?>
50
+
51
+ <?php $_minimalPriceTax = Mage::helper('tax')->getPrice($_product, $_minimalPrice); ?>
52
+ <?php $_minimalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_minimalPrice, true); ?>
53
+
54
+ <?php
55
+ if ($_product->getPriceType() == 1) {
56
+ $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product);
57
+ $_weeeTaxAmountInclTaxes = $_weeeTaxAmount;
58
+
59
+ if ($_weeeHelper->isTaxable()) {
60
+ $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
61
+ $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes);
62
+ }
63
+
64
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
65
+ $_minimalPriceTax += $_weeeTaxAmount;
66
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
67
+ }
68
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
69
+ $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
70
+ }
71
+
72
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1, 2, 4))) {
73
+ $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
74
+ }
75
+ }
76
+ ?>
77
+
78
+ <div class="price-box">
79
+ <?php if ($_product->getPriceView()): ?>
80
+ <p class="minimal-price">
81
+ <span class="price-label"><?php echo $this->__('As low as') ?>:</span>
82
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
83
+ <span class="price-excluding-tax">
84
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
85
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
86
+ </span>
87
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
88
+ <span class="weee">(<small>
89
+ <?php $_weeeSeparator = '';
90
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
91
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
92
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
93
+ <?php else: ?>
94
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
95
+ <?php endif; ?>
96
+
97
+ <?php echo $_weeeSeparator; ?>
98
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
99
+ <?php $_weeeSeparator = ' + '; ?>
100
+ <?php endforeach; ?>
101
+ </small>)</span>
102
+ <?php endif; ?>
103
+ <span class="price-including-tax">
104
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
105
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
106
+ </span>
107
+ <?php else: ?>
108
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
109
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
110
+ <?php else: ?>
111
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
112
+ <?php endif; ?>
113
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
114
+ <span class="weee">(<small>
115
+ <?php $_weeeSeparator = '';
116
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
117
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
118
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
119
+ <?php else: ?>
120
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
121
+ <?php endif; ?>
122
+
123
+ <?php echo $_weeeSeparator; ?>
124
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
125
+ <?php $_weeeSeparator = ' + '; ?>
126
+ <?php endforeach; ?>
127
+ </small>)</span>
128
+ <?php endif; ?>
129
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
130
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
131
+ <?php endif; ?>
132
+ <?php endif; ?>
133
+ </p>
134
+ <?php else: ?>
135
+ <?php if ($_minimalPrice <> $_maximalPrice): ?>
136
+ <p class="price-from">
137
+ <span class="price-label"><?php echo $this->__('From') ?>:</span>
138
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
139
+ <span class="price-excluding-tax">
140
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
141
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
142
+ </span>
143
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
144
+ <span class="weee">(<small>
145
+ <?php $_weeeSeparator = '';
146
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
147
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
148
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
149
+ <?php else: ?>
150
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
151
+ <?php endif; ?>
152
+
153
+ <?php echo $_weeeSeparator; ?>
154
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
155
+ <?php $_weeeSeparator = ' + '; ?>
156
+ <?php endforeach; ?>
157
+ </small>)</span>
158
+ <?php endif; ?>
159
+ <span class="price-including-tax">
160
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
161
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
162
+ </span>
163
+ <?php else: ?>
164
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
165
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
166
+ <?php else: ?>
167
+ <?php echo $_coreHelper->currency($_minimalPriceTax) ?>
168
+ <?php endif; ?>
169
+
170
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
171
+ <span class="weee">(<small>
172
+ <?php $_weeeSeparator = '';
173
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
174
+ <?php if ($_taxHelper->displayPriceIncludingTax() || Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
175
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
176
+ <?php else: ?>
177
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
178
+ <?php endif; ?>
179
+
180
+ <?php echo $_weeeSeparator; ?>
181
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
182
+ <?php $_weeeSeparator = ' + '; ?>
183
+ <?php endforeach; ?>
184
+ </small>)</span>
185
+ <?php endif; ?>
186
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
187
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
188
+ <?php endif; ?>
189
+ <?php endif; ?>
190
+ </p>
191
+ <?php $_maximalPriceTax = Mage::helper('tax')->getPrice($_product, $_maximalPrice); ?>
192
+ <?php $_maximalPriceInclTax = Mage::helper('tax')->getPrice($_product, $_maximalPrice, true); ?>
193
+ <?php
194
+ if ($_product->getPriceType() == 1) {
195
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))) {
196
+ $_maximalPriceTax += $_weeeTaxAmount;
197
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
198
+ }
199
+ if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)) {
200
+ $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
201
+ }
202
+ }
203
+ ?>
204
+ <p class="price-to">
205
+ <span class="price-label"><?php echo $this->__('To') ?>:</span>
206
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
207
+ <span class="price-excluding-tax">
208
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
209
+ <?php echo Mage::helper('core')->currency($_maximalPriceTax) ?>
210
+ </span>
211
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
212
+ <span class="weee">(<small>
213
+ <?php $_weeeSeparator = '';
214
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
215
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
216
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
217
+ <?php else: ?>
218
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
219
+ <?php endif; ?>
220
+
221
+ <?php echo $_weeeSeparator; ?>
222
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
223
+ <?php $_weeeSeparator = ' + '; ?>
224
+ <?php endforeach; ?>
225
+ </small>)</span>
226
+ <?php endif; ?>
227
+ <span class="price-including-tax">
228
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax') ?></span>
229
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
230
+ </span>
231
+ <?php else: ?>
232
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
233
+ <?php echo $_coreHelper->currency($_maximalPriceInclTax) ?>
234
+ <?php else: ?>
235
+ <?php echo $_coreHelper->currency($_maximalPriceTax) ?>
236
+ <?php endif; ?>
237
+
238
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
239
+ <span class="weee">(<small>
240
+ <?php $_weeeSeparator = '';
241
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
242
+ <?php if ($_taxHelper->displayPriceIncludingTax() || Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
243
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
244
+ <?php else: ?>
245
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
246
+ <?php endif; ?>
247
+
248
+ <?php echo $_weeeSeparator; ?>
249
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
250
+ <?php $_weeeSeparator = ' + '; ?>
251
+ <?php endforeach; ?>
252
+ </small>)</span>
253
+ <?php endif; ?>
254
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
255
+ <?php echo Mage::helper('core')->currency($_maximalPriceInclTax) ?>
256
+ <?php endif; ?>
257
+ <?php endif; ?>
258
+ </p>
259
+ <?php else: ?>
260
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
261
+ <span class="price-excluding-tax">
262
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
263
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
264
+ </span>
265
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
266
+ <span class="weee">(<small>
267
+ <?php $_weeeSeparator = '';
268
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
269
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, array(2, 4))): ?>
270
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
271
+ <?php else: ?>
272
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
273
+ <?php endif; ?>
274
+
275
+ <?php echo $_weeeSeparator; ?>
276
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
277
+ <?php $_weeeSeparator = ' + '; ?>
278
+ <?php endforeach; ?>
279
+ </small>)</span>
280
+ <?php endif; ?>
281
+ <span class="price-including-tax">
282
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
283
+ <?php echo Mage::helper('core')->currency($_minimalPriceInclTax) ?>
284
+ </span>
285
+ <?php else: ?>
286
+ <?php echo Mage::helper('core')->currency($_minimalPriceTax) ?>
287
+ <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && Mage::helper('weee')->typeOfDisplay($_product, array(2, 1, 4))): ?>
288
+ <span class="weee">(<small>
289
+ <?php $_weeeSeparator = '';
290
+ foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
291
+ <?php if ($_taxHelper->displayPriceIncludingTax()): ?>
292
+ <?php $amount = $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(); ?>
293
+ <?php else: ?>
294
+ <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
295
+ <?php endif; ?>
296
+
297
+ <?php echo $_weeeSeparator; ?>
298
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($amount, true, true); ?>
299
+ <?php $_weeeSeparator = ' + '; ?>
300
+ <?php endforeach; ?>
301
+ </small>)</span>
302
+ <?php endif; ?>
303
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
304
+ <?php if ($_taxHelper->displayPriceIncludingTax()) : ?>
305
+ <?php echo $_coreHelper->currency($_minimalPriceInclTax) ?>
306
+ <?php else: ?>
307
+ <?php echo $_coreHelper->currency($_minimalPriceTax + $_weeeTaxAmount) ?>
308
+ <?php endif; ?>
309
+ <?php endif; ?>
310
+ <?php endif; ?>
311
+ <?php endif; ?>
312
+ <?php endif; ?>
313
+ </div>
app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml ADDED
@@ -0,0 +1,412 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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>
49
+ <div class="option-label"><?php echo $attributes['option_label'] ?></div>
50
+ </td>
51
+ <td>&nbsp;</td>
52
+ <td>&nbsp;</td>
53
+ <td>&nbsp;</td>
54
+ <td>&nbsp;</td>
55
+ <td>&nbsp;</td>
56
+ <td>&nbsp;</td>
57
+ </tr>
58
+ <?php $_prevOptionId = $attributes['option_id'] ?>
59
+ <?php endif; ?>
60
+ <?php endif; ?>
61
+ <tr<?php echo (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>
62
+ id="order-item-row-<?php echo $_item->getId() ?>">
63
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
64
+ <td><h4 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h4>
65
+ </td>
66
+ <?php else: ?>
67
+ <td>
68
+ <div class="option-value"><?php echo $this->getValueHtml($_item) ?></div>
69
+ </td>
70
+ <?php endif; ?>
71
+ <td><?php echo $this->escapeHtml($_item->getSku()) ?></td>
72
+ <td class="a-right">
73
+ <?php if ($this->canShowPriceInfo($_item)): ?>
74
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
75
+ <span class="price-excl-tax">
76
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
77
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
78
+ <span class="cart-price">
79
+ <?php endif; ?>
80
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
81
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
82
+ </span>
83
+ <?php endif; ?>
84
+ <?php endif; ?>
85
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
86
+ <span class="cart-tax-total"
87
+ onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
88
+ <?php else: ?>
89
+ <span class="cart-price">
90
+ <?php endif; ?>
91
+
92
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
93
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
94
+ <?php else: ?>
95
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
96
+ <?php endif; ?>
97
+
98
+ </span>
99
+
100
+
101
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
102
+
103
+ <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
104
+ style="display:none;">
105
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, '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']; ?>
109
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
110
+ <?php endforeach; ?>
111
+ </small>
112
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
113
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
114
+ <span class="nobr"><small><?php echo $tax['title']; ?>
115
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
116
+ <?php endforeach; ?>
117
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
118
+ <small>
119
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
120
+ <span class="nobr"><?php echo $tax['title']; ?>
121
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
122
+ <?php endforeach; ?>
123
+ </small>
124
+ <?php endif; ?>
125
+ </span>
126
+
127
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
128
+ <span class="cart-tax-total"
129
+ onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
130
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
131
+ :<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?></span>
132
+ </span>
133
+ <?php endif; ?>
134
+ <?php endif; ?>
135
+ </span>
136
+ <br/>
137
+ <?php endif; ?>
138
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
139
+ <span class="price-incl-tax">
140
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
141
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
142
+ <span class="cart-price">
143
+ <?php endif; ?>
144
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
145
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
146
+ </span>
147
+ <?php endif; ?>
148
+ <?php endif; ?>
149
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
150
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
151
+ <span class="cart-tax-total"
152
+ onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
153
+ <?php else: ?>
154
+ <span class="cart-price">
155
+ <?php endif; ?>
156
+
157
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
158
+ <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
159
+ <?php else: ?>
160
+ <?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxDisposition()) ?>
161
+ <?php endif; ?>
162
+
163
+ </span>
164
+
165
+
166
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
167
+
168
+ <span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
169
+ style="display:none;">
170
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
171
+ <small>
172
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
173
+ <span class="nobr"><?php echo $tax['title']; ?>
174
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
175
+ <?php endforeach; ?>
176
+ </small>
177
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
178
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
179
+ <span class="nobr"><small><?php echo $tax['title']; ?>
180
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
181
+ <?php endforeach; ?>
182
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
183
+ <small>
184
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
185
+ <span class="nobr"><?php echo $tax['title']; ?>
186
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
187
+ <?php endforeach; ?>
188
+ </small>
189
+ <?php endif; ?>
190
+ </span>
191
+
192
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
193
+ <span class="cart-tax-total"
194
+ onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
195
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total Incl. Tax'); ?>
196
+ :<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
197
+ </span>
198
+ <?php endif; ?>
199
+ <?php endif; ?>
200
+ </span>
201
+ <?php endif; ?>
202
+ <?php else: ?>
203
+ &nbsp;
204
+ <?php
205
+ endif;
206
+ ?>
207
+ </td>
208
+ <td class="a-center">
209
+ <?php if ($this->canShowPriceInfo($_item)): ?>
210
+ <?php echo $_item->getQty() * 1 ?>
211
+ <?php else: ?>
212
+ &nbsp;
213
+ <?php endif; ?>
214
+ </td>
215
+ <td class="a-right">
216
+ <?php if ($this->canShowPriceInfo($_item)): ?>
217
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
218
+ <span class="price-excl-tax">
219
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
220
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
221
+ <span class="cart-price">
222
+ <?php endif; ?>
223
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
224
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
225
+ </span>
226
+ <?php endif; ?>
227
+ <?php endif; ?>
228
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
229
+ <span class="cart-tax-total"
230
+ onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
231
+ <?php else: ?>
232
+ <span class="cart-price">
233
+ <?php endif; ?>
234
+
235
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
236
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?>
237
+ <?php else: ?>
238
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
239
+ <?php endif; ?>
240
+
241
+ </span>
242
+
243
+
244
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
245
+
246
+ <span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
247
+ style="display:none;">
248
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
249
+ <small>
250
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
251
+ <span class="nobr"><?php echo $tax['title']; ?>
252
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
253
+ <?php endforeach; ?>
254
+ </small>
255
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
256
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
257
+ <span class="nobr"><small><?php echo $tax['title']; ?>
258
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
259
+ <?php endforeach; ?>
260
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
261
+ <small>
262
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
263
+ <span class="nobr"><?php echo $tax['title']; ?>
264
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
265
+ <?php endforeach; ?>
266
+ </small>
267
+ <?php endif; ?>
268
+ </span>
269
+
270
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
271
+ <span class="cart-tax-total"
272
+ onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
273
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
274
+ :<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?></span>
275
+ </span>
276
+ <?php endif; ?>
277
+ <?php endif; ?>
278
+ </span>
279
+ <br/>
280
+ <?php endif; ?>
281
+ <?php if ($this->helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?>
282
+ <span class="price-incl-tax">
283
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
284
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
285
+ <span class="cart-price">
286
+ <?php endif; ?>
287
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
288
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
289
+ </span>
290
+ <?php endif; ?>
291
+ <?php endif; ?>
292
+
293
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
294
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
295
+ <span class="cart-tax-total"
296
+ onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
297
+ <?php else: ?>
298
+ <span class="cart-price">
299
+ <?php endif; ?>
300
+
301
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
302
+ <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
303
+ <?php else: ?>
304
+ <?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxRowDisposition()) ?>
305
+ <?php endif; ?>
306
+
307
+ </span>
308
+
309
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
310
+ <span class="cart-tax-info"
311
+ id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
312
+ style="display:none;">
313
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
314
+ <small>
315
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
316
+ <span class="nobr"><?php echo $tax['title']; ?>
317
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
318
+ <?php endforeach; ?>
319
+ </small>
320
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
321
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
322
+ <span class="nobr"><small><?php echo $tax['title']; ?>
323
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
324
+ <?php endforeach; ?>
325
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
326
+ <small>
327
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
328
+ <span class="nobr"><?php echo $tax['title']; ?>
329
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
330
+ <?php endforeach; ?>
331
+ </small>
332
+ <?php endif; ?>
333
+ </span>
334
+
335
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
336
+ <span class="cart-tax-total"
337
+ onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
338
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>
339
+ :<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
340
+ </span>
341
+ <?php endif; ?>
342
+ <?php endif; ?>
343
+ </span>
344
+ <?php else: ?>
345
+ &nbsp;
346
+ <?php
347
+ endif;
348
+ ?>
349
+ <?php else: ?>
350
+ &nbsp;
351
+ <?php
352
+ endif;
353
+ ?>
354
+ </td>
355
+ <td class="a-right">
356
+ <?php if ($this->canShowPriceInfo($_item)): ?>
357
+ <?php echo $this->getOrder()->formatPrice(-$_item->getDiscountAmount()) ?>
358
+ <?php else: ?>
359
+ &nbsp;
360
+ <?php endif; ?>
361
+ </td>
362
+ <td class="last a-right">
363
+ <?php if ($this->canShowPriceInfo($_item)): ?>
364
+ <?php echo $this->getOrder()->formatPrice($_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount()) ?>
365
+ <?php else: ?>
366
+ &nbsp;
367
+ <?php endif; ?>
368
+ </td>
369
+ </tr>
370
+ <?php endforeach; ?>
371
+
372
+ <?php if ($_showlastRow): ?>
373
+ <tr class="border">
374
+ <td>
375
+ <?php if ($_options = $this->getItemOptions()): ?>
376
+ <dl class="item-options">
377
+ <?php foreach ($_options as $_option) : ?>
378
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
379
+ <?php if (!$this->getPrintStatus()): ?>
380
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
381
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
382
+ <?php echo $_formatedOptionValue['value'] ?>
383
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
384
+ <div class="truncated_full_value">
385
+ <dl class="item-options">
386
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
387
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
388
+ </dl>
389
+ </div>
390
+ <?php endif; ?>
391
+ </dd>
392
+ <?php else: ?>
393
+ <dd><?php echo $this->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
394
+ <?php endif; ?>
395
+ <?php endforeach; ?>
396
+ </dl>
397
+ <?php endif; ?>
398
+ <?php echo $this->escapeHtml($_item->getDescription()) ?>
399
+ <?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
400
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>"
401
+ class="gift-message-link"
402
+ onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
403
+ <?php endif; ?>
404
+ </td>
405
+ <td>&nbsp;</td>
406
+ <td>&nbsp;</td>
407
+ <td>&nbsp;</td>
408
+ <td>&nbsp;</td>
409
+ <td>&nbsp;</td>
410
+ <td>&nbsp;</td>
411
+ </tr>
412
+ <?php endif; ?>
app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml ADDED
@@ -0,0 +1,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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>
49
+ <div class="option-label"><?php echo $attributes['option_label'] ?></div>
50
+ </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"' : '' ?>
60
+ id="order-item-row-<?php echo $_item->getId() ?>">
61
+ <?php if (!$_item->getOrderItem()->getParentItem()): ?>
62
+ <td><h4 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h4></td>
63
+ <?php else: ?>
64
+ <td>
65
+ <div class="option-value"><?php echo $this->getValueHtml($_item) ?></div>
66
+ </td>
67
+ <?php endif; ?>
68
+ <td><?php echo $this->escapeHtml($_item->getSku()) ?></td>
69
+ <td class="a-right">
70
+ <?php if ($this->canShowPriceInfo($_item)): ?>
71
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
72
+ <span class="price-excl-tax">
73
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
74
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
75
+ <span class="cart-price">
76
+ <?php endif; ?>
77
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
78
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
79
+ </span>
80
+ <?php endif; ?>
81
+ <?php endif; ?>
82
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
83
+ <span class="cart-tax-total"
84
+ onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
85
+ <?php else: ?>
86
+ <span class="cart-price">
87
+ <?php endif; ?>
88
+
89
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
90
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
91
+ <?php else: ?>
92
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
93
+ <?php endif; ?>
94
+
95
+ </span>
96
+
97
+
98
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
99
+
100
+ <span class="cart-tax-info" id="eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
101
+ style="display:none;">
102
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
103
+ <small>
104
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
105
+ <span class="nobr"><?php echo $tax['title']; ?>
106
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
107
+ <?php endforeach; ?>
108
+ </small>
109
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
110
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
111
+ <span class="nobr"><small><?php echo $tax['title']; ?>
112
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
113
+ <?php endforeach; ?>
114
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
115
+ <small>
116
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
117
+ <span class="nobr"><?php echo $tax['title']; ?>
118
+ : <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
119
+ <?php endforeach; ?>
120
+ </small>
121
+ <?php endif; ?>
122
+ </span>
123
+
124
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
125
+ <span class="cart-tax-total"
126
+ onclick="taxToggle('eunit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
127
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
128
+ :<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?></span>
129
+ </span>
130
+ <?php endif; ?>
131
+ <?php endif; ?>
132
+ </span>
133
+ <br/>
134
+ <?php endif; ?>
135
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
136
+ <span class="price-incl-tax">
137
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
138
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
139
+ <span class="cart-price">
140
+ <?php endif; ?>
141
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
142
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
143
+ </span>
144
+ <?php endif; ?>
145
+ <?php endif; ?>
146
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($this->getItem()); ?>
147
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
148
+ <span class="cart-tax-total"
149
+ onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->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($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
155
+ <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
156
+ <?php else: ?>
157
+ <?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxDisposition()) ?>
158
+ <?php endif; ?>
159
+
160
+ </span>
161
+
162
+
163
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
164
+
165
+ <span class="cart-tax-info" id="unit-item-tax-details<?php echo $this->getItem()->getId(); ?>"
166
+ style="display:none;">
167
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
168
+ <small>
169
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
170
+ <span class="nobr"><?php echo $tax['title']; ?>
171
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
172
+ <?php endforeach; ?>
173
+ </small>
174
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
175
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
176
+ <span class="nobr"><small><?php echo $tax['title']; ?>
177
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></small></span>
178
+ <?php endforeach; ?>
179
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
180
+ <small>
181
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
182
+ <span class="nobr"><?php echo $tax['title']; ?>
183
+ : <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
184
+ <?php endforeach; ?>
185
+ </small>
186
+ <?php endif; ?>
187
+ </span>
188
+
189
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
190
+ <span class="cart-tax-total"
191
+ onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
192
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>
193
+ :<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
194
+ </span>
195
+ <?php endif; ?>
196
+ <?php endif; ?>
197
+ </span>
198
+ <?php endif; ?>
199
+ <?php else: ?>
200
+ &nbsp;
201
+ <?php
202
+ endif; ?>
203
+ </td>
204
+ <td class="a-center">
205
+ <?php if ($this->canShowPriceInfo($_item)): ?>
206
+ <?php echo $_item->getQty() * 1 ?>
207
+ <?php else: ?>
208
+ &nbsp;
209
+ <?php endif; ?>
210
+ </td>
211
+ <td class="a-right">
212
+ <?php if ($this->canShowPriceInfo($_item)): ?>
213
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
214
+ <span class="price-excl-tax">
215
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
216
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
217
+ <span class="cart-price">
218
+ <?php endif; ?>
219
+ <span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
220
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
221
+ </span>
222
+ <?php endif; ?>
223
+ <?php endif; ?>
224
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
225
+ <span class="cart-tax-total"
226
+ onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
227
+ <?php else: ?>
228
+ <span class="cart-price">
229
+ <?php endif; ?>
230
+
231
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
232
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?>
233
+ <?php else: ?>
234
+ <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal()) ?>
235
+ <?php endif; ?>
236
+
237
+ </span>
238
+
239
+
240
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
241
+
242
+ <span class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
243
+ style="display:none;">
244
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
245
+ <small>
246
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
247
+ <span class="nobr"><?php echo $tax['title']; ?>
248
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
249
+ <?php endforeach; ?>
250
+ </small>
251
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
252
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
253
+ <span class="nobr"><small><?php echo $tax['title']; ?>
254
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
255
+ <?php endforeach; ?>
256
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
257
+ <small>
258
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
259
+ <span class="nobr"><?php echo $tax['title']; ?>
260
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
261
+ <?php endforeach; ?>
262
+ </small>
263
+ <?php endif; ?>
264
+ </span>
265
+
266
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
267
+ <span class="cart-tax-total"
268
+ onclick="taxToggle('esubtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
269
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>
270
+ :<br/> <?php echo $this->getOrder()->formatPrice($this->getItem()->getRowTotal() + $this->getItem()->getWeeeTaxAppliedRowAmount() + $this->getItem()->getWeeeTaxRowDisposition()); ?></span>
271
+ </span>
272
+ <?php endif; ?>
273
+ <?php endif; ?>
274
+ </span>
275
+ <br/>
276
+ <?php endif; ?>
277
+ <?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
278
+ <span class="price-incl-tax">
279
+ <?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
280
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
281
+ <span class="cart-price">
282
+ <?php endif; ?>
283
+ <span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
284
+ <?php if (!Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
285
+ </span>
286
+ <?php endif; ?>
287
+ <?php endif; ?>
288
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($this->getItem()); ?>
289
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
290
+ <span class="cart-tax-total"
291
+ onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
292
+ <?php else: ?>
293
+ <span class="cart-price">
294
+ <?php endif; ?>
295
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
296
+ <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
297
+ <?php else: ?>
298
+ <?php echo $this->getOrder()->formatPrice($_incl - $this->getItem()->getWeeeTaxRowDisposition()) ?>
299
+ <?php endif; ?>
300
+
301
+ </span>
302
+
303
+
304
+ <?php if (Mage::helper('weee')->getApplied($this->getItem())): ?>
305
+
306
+ <span class="cart-tax-info"
307
+ id="subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>"
308
+ style="display:none;">
309
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
310
+ <small>
311
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
312
+ <span class="nobr"><?php echo $tax['title']; ?>
313
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
314
+ <?php endforeach; ?>
315
+ </small>
316
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
317
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
318
+ <span class="nobr"><small><?php echo $tax['title']; ?>
319
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></small></span>
320
+ <?php endforeach; ?>
321
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
322
+ <small>
323
+ <?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
324
+ <span class="nobr"><?php echo $tax['title']; ?>
325
+ : <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
326
+ <?php endforeach; ?>
327
+ </small>
328
+ <?php endif; ?>
329
+ </span>
330
+
331
+ <?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
332
+ <span class="cart-tax-total"
333
+ onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
334
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>
335
+ :<br/> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
336
+ </span>
337
+ <?php endif; ?>
338
+ <?php endif; ?>
339
+
340
+
341
+
342
+ </span>
343
+ <?php endif; ?>
344
+ <?php else: ?>
345
+ &nbsp;
346
+ <?php
347
+ endif; ?>
348
+ </td>
349
+ </tr>
350
+ <?php endforeach; ?>
351
+
352
+ <?php if ($_showlastRow): ?>
353
+ <tr class="border">
354
+ <td>
355
+ <?php if ($_options = $this->getItemOptions()): ?>
356
+ <dl class="item-options">
357
+ <?php foreach ($_options as $_option) : ?>
358
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
359
+ <?php if (!$this->getPrintStatus()): ?>
360
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
361
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
362
+ <?php echo $_formatedOptionValue['value'] ?>
363
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
364
+ <div class="truncated_full_value">
365
+ <dl class="item-options">
366
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
367
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
368
+ </dl>
369
+ </div>
370
+ <?php endif; ?>
371
+ </dd>
372
+ <?php else: ?>
373
+ <dd><?php echo $this->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
374
+ <?php endif; ?>
375
+ <?php endforeach; ?>
376
+ </dl>
377
+ <?php endif; ?>
378
+ <?php echo $this->escapeHtml($_item->getDescription()) ?>
379
+ <?php if ($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
380
+ <a href="#" id="order-item-gift-message-link-<?php echo $parentItem->getId() ?>"
381
+ class="gift-message-link"
382
+ onclick="return giftMessageToogle('<?php echo $parentItem->getId() ?>')"><?php echo Mage::helper('sales')->__('Gift Message') ?></a>
383
+ <?php endif; ?>
384
+ </td>
385
+ <td>&nbsp;</td>
386
+ <td>&nbsp;</td>
387
+ <td>&nbsp;</td>
388
+ <td>&nbsp;</td>
389
+ </tr>
390
+ <?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) 2014 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->escapeHtml($_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->escapeHtml(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']); ?></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']); ?></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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
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_incl_tax']); ?></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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></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']); ?></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']); ?></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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
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_incl_tax']); ?></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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></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->escapeHtml($_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->escapeHtml($_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->escapeHtml( (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->escapeHtml($_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) 2014 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->escapeHtml($_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->escapeHtml($_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->escapeHtml($_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->escapeHtml($_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->escapeHtml( (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->escapeHtml($_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) 2014 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) 2014 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/captcha/zend.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) 2014 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_Core_Block_Captcha_Zend */ ?>
28
+
29
+ <?php /* @var $captcha Mage_Core_Model_Captcha_Zend */ ?>
30
+ <?php $captcha = $this->getCaptchaModel() ?>
31
+ <li id="captcha-input-box-<?php echo $this->getFormId()?>">
32
+ <label for="captcha_<?php echo $this->getFormId() ?>" class="required"><em>*</em><?php echo $this->__('Please type the letters below')?></label>
33
+ <div class="input-box captcha">
34
+ <input name="<?php echo Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE ?>[<?php echo $this->getFormId()?>]" type="text" class="input-text required-entry" id="captcha_<?php echo $this->getFormId() ?>" />
35
+ </div>
36
+ </li>
37
+ <li>
38
+ <div class="captcha-image" id="captcha-image-box-<?php echo $this->getFormId()?>">
39
+ <img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getSkinUrl('images/reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>" onclick="$('<?php echo $this->getFormId()?>').captcha.refresh(this)">
40
+ <img id="<?php echo $this->getFormId() ?>" class="captcha-img" height="<?php echo $this->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>"/>
41
+ <?php if ($captcha->isCaseSensitive()) :?>
42
+ <div class="captcha-note">
43
+ <?php echo $this->__('<strong>Attention</strong>: Captcha is case sensitive.') ?>
44
+ </div>
45
+ <?php endif; ?>
46
+ </div>
47
+ <script type="text/javascript">//<![CDATA[
48
+ $('<?php echo $this->getFormId() ?>').captcha = new Captcha('<?php echo $this->getRefreshUrl() ?>', '<?php echo $this->getFormId() ?>');
49
+ //]]></script>
50
+ </li>
51
+
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) 2014 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) 2014 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->escapeHtml($_category->getName()).'" title="'.$this->escapeHtml($_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) 2014 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->escapeHtml($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) 2014 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->escapeHtml($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/layer/filter.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) 2014 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 if ($this->shouldDisplayProductCount()): ?>
43
+ (<?php echo $_item->getCount() ?>)
44
+ <?php endif; ?>
45
+ </li>
46
+ <?php endforeach ?>
47
+ </ol>
app/design/frontend/base/default/template/catalog/layer/state.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) 2014 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
+ <span class="label"><?php echo $this->__($_filter->getName()) ?>:</span> <span class="value"><?php echo $this->stripTags($_filter->getLabel()) ?></span>
42
+ <?php
43
+ $clearLinkUrl = $_filter->getClearLinkUrl();
44
+ if ($clearLinkUrl):
45
+ ?>
46
+ <a class="btn-previous" href="<?php echo $_filter->getRemoveUrl() ?>" title="<?php echo $this->__('Previous') ?>"><?php echo $this->__('Previous') ?></a>
47
+ <a class="btn-remove" title="<?php echo $this->escapeHtml($_filter->getFilter()->getClearLinkText()) ?>" href="<?php echo $clearLinkUrl ?>"><?php echo $this->escapeHtml($_filter->getFilter()->getClearLinkText()) ?></a>
48
+ <?php else: ?>
49
+ <a class="btn-remove" href="<?php echo $_filter->getRemoveUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>"><?php echo $this->__('Remove This Item') ?></a>
50
+ <?php endif; ?>
51
+ </li>
52
+ <?php endforeach; ?>
53
+ </ol>
54
+ </div>
55
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/layer/view.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) 2014 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->getLayer()->getState()->getFilters()): ?>
42
+ <div class="actions"><a href="<?php echo $this->getClearUrl() ?>"><?php echo $this->__('Clear All') ?></a></div>
43
+ <?php endif; ?>
44
+ <?php if($this->canShowOptions()): ?>
45
+ <p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
46
+ <dl id="narrow-by-list">
47
+ <?php $_filters = $this->getFilters() ?>
48
+ <?php foreach ($_filters as $_filter): ?>
49
+ <?php if($_filter->getItemsCount()): ?>
50
+ <dt><?php echo $this->__($_filter->getName()) ?></dt>
51
+ <dd><?php echo $_filter->getHtml() ?></dd>
52
+ <?php endif; ?>
53
+ <?php endforeach; ?>
54
+ </dl>
55
+ <script type="text/javascript">decorateDataList('narrow-by-list')</script>
56
+ <?php endif; ?>
57
+ </div>
58
+ </div>
59
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/msrp/popup.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) 2014 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 MAP popup
30
+ *
31
+ */
32
+ ?>
33
+ <?php if (Mage::helper('catalog')->isMsrpEnabled()): ?>
34
+ <div id="map-popup" class="map-popup" style="display:none;">
35
+ <a href="#" class="map-popup-close" id="map-popup-close">x</a>
36
+ <div class="map-popup-arrow"></div>
37
+ <div class="map-popup-heading"><h2 id="map-popup-heading"></h2></div>
38
+ <div class="map-popup-content" id="map-popup-content">
39
+ <div class="map-popup-checkout">
40
+ <form action="" method="POST" id="product_addtocart_form_from_popup">
41
+ <input type="hidden" name="product" class="product_id" value="" id="map-popup-product-id" />
42
+ <div class="additional-addtocart-box">
43
+ <?php echo $this->getChildHtml(); ?>
44
+ </div>
45
+ <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" id="map-popup-button"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
46
+ </form>
47
+ </div>
48
+ <div class="map-popup-msrp" id="map-popup-msrp-box"><strong><?php echo $this->__('Price'); ?>:</strong> <span style="text-decoration:line-through;" id="map-popup-msrp"></span></div>
49
+ <div class="map-popup-price" id="map-popup-price-box"><strong><?php echo $this->__('Actual Price'); ?>:</strong> <span id="map-popup-price"></span></div>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ document.observe("dom:loaded", Catalog.Map.bindProductForm);
53
+ //]]>
54
+ </script>
55
+ </div>
56
+ <div class="map-popup-text" id="map-popup-text"><?php echo Mage::helper('catalog')->getMsrpExplanationMessage(); ?></div>
57
+ <div class="map-popup-text" id="map-popup-text-what-this"><?php echo Mage::helper('catalog')->getMsrpExplanationMessageWhatsThis(); ?></div>
58
+ </div>
59
+ <?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) 2014 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->escapeHtml($_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) 2014 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,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?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->escapeHtml($_item->getName()) ?>" title="<?php echo $this->escapeHtml($_item->getName()) ?>" />
96
+ <?php break;
97
+ case "date":
98
+ echo substr($this->getProductAttributeValue($_item, $_attribute),0,10);
99
+ break;
100
+ default: ?>
101
+ <div class="std">
102
+ <?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
103
+ </div>
104
+ <?php break;
105
+ } ?>
106
+ </td>
107
+ <?php endforeach; ?>
108
+ </tr>
109
+ <?php endforeach; ?>
110
+ </tbody>
111
+ <tbody>
112
+ <tr class="add-to-row">
113
+ <?php $_i=0 ?>
114
+ <?php foreach($this->getItems() as $_item): ?>
115
+ <?php if($_i++%10==0): ?>
116
+ <th>&nbsp;</th>
117
+ <?php endif; ?>
118
+ <td>
119
+ <?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
120
+ <?php if($_item->isSaleable()): ?>
121
+ <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>
122
+ <?php else: ?>
123
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
124
+ <?php endif; ?>
125
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
126
+ <ul class="add-to-links">
127
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_item);?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
128
+ </ul>
129
+ <?php endif; ?>
130
+ </td>
131
+ <?php endforeach; ?>
132
+ </tr>
133
+ </tbody>
134
+ </table>
135
+ <div class="buttons-set">
136
+ <button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
137
+ <span class="please-wait" id="compare-list-please-wait" style="display:none;">
138
+ <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...') ?>
139
+ </span>
140
+ </div>
141
+ <script type="text/javascript">
142
+ decorateTable('product_comparison');
143
+
144
+ /**
145
+ * Send remove item request, after that reload windows
146
+ */
147
+ function removeItem(url)
148
+ {
149
+ new Ajax.Request(url, {
150
+ parameters: {isAjax: 1, method: 'POST'},
151
+ onLoading: function(){$('compare-list-please-wait').show();},
152
+ onSuccess: function(transport) {
153
+ $('compare-list-please-wait').hide();
154
+ window.location.reload();
155
+ window.opener.location.reload();
156
+ }
157
+ });
158
+ }
159
+ </script>
160
+ <?php else: ?>
161
+ <script type="text/javascript">window.close();</script>
162
+ <?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) 2014 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) 2014 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->escapeHtml($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->escapeHtml($this->getCurrentImage()->getLabel()) ?>" title="<?php echo $this->escapeHtml($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) 2014 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) 2014 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->escapeHtml($_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->escapeHtml($_item->getName()) ?>" /></a>
44
+ <div class="product-details">
45
+ <p class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->escapeHtml($_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) 2014 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) 2014 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->escapeHtml($_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->escapeHtml($_link->getName()) ?>" /></a>
39
+ <h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->escapeHtml($_link->getName()) ?>"><?php echo $this->escapeHtml($_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) 2014 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->escapeHtml($_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->escapeHtml($_product->getName()) ?>" /></a>
36
+ <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->escapeHtml($_product->getName()) ?>"><?php echo $this->escapeHtml($_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,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ $_storeId = $_product->getStoreId();
45
+ $_store = $_product->getStore();
46
+ $_id = $_product->getId();
47
+ $_weeeSeparator = '';
48
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
49
+ $_minimalPriceValue = $_product->getMinimalPrice();
50
+ $_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
51
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
52
+ $_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
53
+ $_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
54
+ ?>
55
+
56
+ <?php if (!$_product->isGrouped()): ?>
57
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
58
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
59
+ <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
60
+ <?php if ($_weeeHelper->isTaxable()): ?>
61
+ <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
62
+ <?php endif; ?>
63
+ <?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
64
+ <?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
65
+
66
+ <div class="price-box">
67
+ <?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
68
+ <?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
69
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
70
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
71
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
72
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
73
+ <?php if ($_finalPrice >= $_price): ?>
74
+ <?php if ($_taxHelper->displayBothPrices()): ?>
75
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
76
+ <span class="price-excluding-tax">
77
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
78
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
79
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
80
+ </span>
81
+ </span>
82
+ <span class="price-including-tax">
83
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
84
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
85
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
86
+ </span>
87
+ </span>
88
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
89
+ <span class="price-excluding-tax">
90
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
91
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
92
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
93
+ </span>
94
+ </span>
95
+ <span class="weee">(
96
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
97
+ <?php echo $_weeeSeparator; ?>
98
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
99
+ <?php $_weeeSeparator = ' + '; ?>
100
+ <?php endforeach; ?>
101
+ )</span>
102
+ <span class="price-including-tax">
103
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
104
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
105
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
106
+ </span>
107
+ </span>
108
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
109
+ <span class="price-excluding-tax">
110
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
111
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
112
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, false) ?>
113
+ </span>
114
+ </span>
115
+ <span class="price-including-tax">
116
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
117
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
118
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
119
+ </span>
120
+ <span class="weee">(
121
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
122
+ <?php echo $_weeeSeparator; ?>
123
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
124
+ <?php $_weeeSeparator = ' + '; ?>
125
+ <?php endforeach; ?>
126
+ )</span>
127
+ </span>
128
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
129
+ <span class="price-excluding-tax">
130
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
131
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
132
+ <?php echo $_coreHelper->formatPrice($_price, false) ?>
133
+ </span>
134
+ </span>
135
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
136
+ <span class="weee">
137
+ <?php echo $_weeeTaxAttribute->getName(); ?>
138
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
139
+ </span>
140
+ <?php endforeach; ?>
141
+ <span class="price-including-tax">
142
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
143
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
144
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
145
+ </span>
146
+ </span>
147
+ <?php else: ?>
148
+ <span class="price-excluding-tax">
149
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
150
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
151
+ <?php if ($_finalPrice == $_price): ?>
152
+ <?php echo $_coreHelper->formatPrice($_price, false) ?>
153
+ <?php else: ?>
154
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
155
+ <?php endif; ?>
156
+ </span>
157
+ </span>
158
+ <span class="price-including-tax">
159
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
160
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
161
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
162
+ </span>
163
+ </span>
164
+ <?php endif; ?>
165
+ <?php else: ?>
166
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1))): // including ?>
167
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
168
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
169
+ <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
170
+ </span>
171
+
172
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // show description ?>
173
+ <span class="weee">(
174
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
175
+ <?php echo $_weeeSeparator; ?>
176
+ <?php echo $_weeeTaxAttribute->getName(); ?>
177
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
178
+ <?php $_weeeSeparator = ' + '; ?>
179
+ <?php endforeach; ?>
180
+ )</span>
181
+ <?php endif; ?>
182
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
183
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
184
+ <?php echo $_coreHelper->formatPrice($_price + $_weeeTaxAmount, true) ?>
185
+ </span>
186
+ <span class="weee">(
187
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
188
+ <?php echo $_weeeSeparator; ?>
189
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
190
+ <?php $_weeeSeparator = ' + '; ?>
191
+ <?php endforeach; ?>
192
+ )</span>
193
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
194
+ <span class="regular-price"><?php echo $_coreHelper->formatPrice($_price, true) ?></span><br/>
195
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
196
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
197
+ <span class="weee">
198
+ <?php echo $_weeeTaxAttribute->getName(); ?>
199
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
200
+ </span>
201
+ <?php endforeach; ?>
202
+ <span class="regular-price"
203
+ id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
204
+ <?php echo $_coreHelper->currency($_price + $weeeAmountToDisplay, true, true) ?>
205
+ </span>
206
+ <?php else: ?>
207
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
208
+ <?php if ($_finalPrice == $_price): ?>
209
+ <?php echo $_coreHelper->formatPrice($_price, true) ?>
210
+ <?php else: ?>
211
+ <?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
212
+ <?php endif; ?>
213
+ </span>
214
+ <?php endif; ?>
215
+ <?php endif; ?>
216
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
217
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
218
+ <?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
219
+
220
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
221
+ <p class="old-price">
222
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
223
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
224
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
225
+ </span>
226
+ </p>
227
+
228
+ <?php if ($_taxHelper->displayBothPrices()): ?>
229
+ <p class="special-price">
230
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
231
+ <span class="price-excluding-tax">
232
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
233
+ <span class="price"
234
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
235
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
236
+ </span>
237
+ </span>
238
+ <span class="price-including-tax">
239
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
240
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
241
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
242
+ </span>
243
+ </span>
244
+ </p>
245
+ <?php else: ?>
246
+ <p class="special-price">
247
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
248
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
249
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
250
+ </span>
251
+ </p>
252
+ <?php endif; ?>
253
+
254
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
255
+ <p class="old-price">
256
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
257
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
258
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
259
+ </span>
260
+ </p>
261
+
262
+ <p class="special-price">
263
+ <?php if ($_taxHelper->displayBothPrices()): ?>
264
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
265
+ <span class="price-excluding-tax">
266
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
267
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
268
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
269
+ </span>
270
+ </span>
271
+ <span class="weee">(
272
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
273
+ <?php echo $_weeeSeparator; ?>
274
+ <?php echo $_weeeTaxAttribute->getName(); ?>
275
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
276
+ <?php $_weeeSeparator = ' + '; ?>
277
+ <?php endforeach; ?>
278
+ )</span>
279
+ <span class="price-including-tax">
280
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
281
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
282
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
283
+ </span>
284
+ </span>
285
+ <?php else: ?>
286
+ <p class="special-price">
287
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
288
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
289
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
290
+ </span>
291
+ </p>
292
+ <span class="weee">(
293
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
294
+ <?php echo $_weeeSeparator; ?>
295
+ <?php echo $_weeeTaxAttribute->getName(); ?>
296
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
297
+ <?php $_weeeSeparator = ' + '; ?>
298
+ <?php endforeach; ?>
299
+ )</span>
300
+ <?php endif; ?>
301
+ </p>
302
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
303
+ <p class="old-price">
304
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
305
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
306
+ <?php echo $_coreHelper->formatPrice($_regularPrice + $_originalWeeeTaxAmount, false) ?>
307
+ </span>
308
+ </p>
309
+
310
+ <p class="special-price">
311
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
312
+ <span class="price-excluding-tax">
313
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
314
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
315
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmount, false) ?>
316
+ </span>
317
+ </span>
318
+ <span class="weee">(
319
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
320
+ <?php echo $_weeeSeparator; ?>
321
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
322
+ <?php $_weeeSeparator = ' + '; ?>
323
+ <?php endforeach; ?>
324
+ )</span>
325
+ <span class="price-including-tax">
326
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
327
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
328
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
329
+ </span>
330
+ </span>
331
+ </p>
332
+ <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
333
+ <p class="old-price">
334
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
335
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
336
+ <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
337
+ </span>
338
+ </p>
339
+
340
+ <p class="special-price">
341
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
342
+ <span class="price-excluding-tax">
343
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
344
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
345
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
346
+ </span>
347
+ </span>
348
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
349
+ <span class="weee">
350
+ <?php echo $_weeeTaxAttribute->getName(); ?>
351
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
352
+ </span>
353
+ <?php endforeach; ?>
354
+ <span class="price-including-tax">
355
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
356
+ <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
357
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, false) ?>
358
+ </span>
359
+ </span>
360
+ </p>
361
+ <?php else: // excl. ?>
362
+ <p class="old-price">
363
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
364
+ <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
365
+ <?php echo $_coreHelper->formatPrice($_regularPrice, false) ?>
366
+ </span>
367
+ </p>
368
+
369
+ <?php if ($_taxHelper->displayBothPrices()): ?>
370
+ <p class="special-price">
371
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
372
+ <span class="price-excluding-tax">
373
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
374
+ <span class="price"
375
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
376
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
377
+ </span>
378
+ </span>
379
+ <span class="price-including-tax">
380
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
381
+ <span class="price"
382
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
383
+ <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?>
384
+ </span>
385
+ </span>
386
+ </p>
387
+ <?php else: ?>
388
+ <p class="special-price">
389
+ <span class="price-label"><?php echo $_specialPriceStoreLabel ?></span>
390
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
391
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
392
+ </span>
393
+ </p>
394
+ <?php endif; ?>
395
+ <?php endif; ?>
396
+
397
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
398
+
399
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_convertedFinalPrice): ?>
400
+
401
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
402
+ <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
403
+ <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
404
+ <?php endif; ?>
405
+
406
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
407
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
408
+ <?php else: ?>
409
+ <span class="minimal-price-link">
410
+ <?php endif ?>
411
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
412
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
413
+ <?php echo $_coreHelper->formatPrice($_minimalPriceDisplayValue, false) ?>
414
+ </span>
415
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
416
+ </a>
417
+ <?php else: ?>
418
+ </span>
419
+ <?php endif ?>
420
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
421
+ </div>
422
+
423
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
424
+ <?php
425
+ $showMinPrice = $this->getDisplayMinimalPrice();
426
+ if ($showMinPrice && $_minimalPriceValue) {
427
+ $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
428
+ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
429
+ $price = $showMinPrice ? $_minimalPriceValue : 0;
430
+ } else {
431
+ $price = $_convertedFinalPrice;
432
+ $_exclTax = $_taxHelper->getPrice($_product, $price);
433
+ $_inclTax = $_taxHelper->getPrice($_product, $price, true);
434
+ }
435
+ ?>
436
+ <?php if ($price): ?>
437
+ <div class="price-box">
438
+ <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
439
+ <?php if ($showMinPrice): ?>
440
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
441
+ <?php endif ?>
442
+ <?php if ($_taxHelper->displayBothPrices()): ?>
443
+ <span class="price-excluding-tax">
444
+ <span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
445
+ <span class="price"
446
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
447
+ <?php echo $_coreHelper->formatPrice($_exclTax, false) ?>
448
+ </span>
449
+ </span>
450
+ <span class="price-including-tax">
451
+ <span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
452
+ <span class="price"
453
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
454
+ <?php echo $_coreHelper->formatPrice($_inclTax, false) ?>
455
+ </span>
456
+ </span>
457
+ <?php else: ?>
458
+ <?php
459
+ $_showPrice = $_inclTax;
460
+ if (!$_taxHelper->displayPriceIncludingTax()) {
461
+ $_showPrice = $_exclTax;
462
+ }
463
+ ?>
464
+ <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
465
+ <?php echo $_coreHelper->formatPrice($_showPrice, false) ?>
466
+ </span>
467
+ <?php endif; ?>
468
+ </p>
469
+ </div>
470
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
471
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
app/design/frontend/base/default/template/catalog/product/price_msrp.phtml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 at catalog and sidebars
31
+ *
32
+ * @var $this Mage_Catalog_Block_Product_Price
33
+ */
34
+ ?>
35
+ <?php
36
+ /** @var $_product Mage_Catalog_Model_Product */
37
+ $_product = $this->getProduct();
38
+ $_msrpPrice = "";
39
+ ?>
40
+ <div class="price-box map-info">
41
+ <?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
42
+ <?php if ($_product->getMsrp()): ?>
43
+ <?php $_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true) ?>
44
+ <span class="old-price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span>
45
+ <?php endif; ?>
46
+ <?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
47
+ <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a>
48
+ <script type="text/javascript">
49
+ <?php if ($this->helper('catalog')->isShowPriceOnGesture($_product)): ?>
50
+ var newLink = Catalog.Map.addHelpLink(
51
+ $('<?php echo $helpLinkId ?>'),
52
+ "<?php echo $this->escapeHtml($_product->getName()) ?>",
53
+ <?php echo $this->getRealPriceJs($_product) ?>,
54
+ '<?php echo $_msrpPrice ?>',
55
+ "<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>"
56
+ );
57
+ newLink.product_id = '<?php echo $_product->getId() ?>';
58
+ <?php else: ?>
59
+ Catalog.Map.addHelpLink(
60
+ $('<?php echo $helpLinkId ?>'),
61
+ "<?php echo $this->escapeHtml($_product->getName()) ?>",
62
+ null,
63
+ null,
64
+ "<?php echo $_product->getProductUrl() ?>"
65
+ );
66
+ <?php endif; ?>
67
+
68
+ </script>
69
+ </div>
app/design/frontend/base/default/template/catalog/product/price_msrp_item.phtml ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 at product view page, gift registry and wishlist
31
+ *
32
+ * @var $this Mage_Catalog_Block_Product_Price
33
+ */
34
+ ?>
35
+ <?php
36
+ /** @var $_coreHelper Mage_Core_Helper_Data */
37
+ $_coreHelper = $this->helper('core');
38
+ /** @var $_catalogHelper Mage_Catalog_Helper_Data */
39
+ $_catalogHelper = $this->helper('catalog');
40
+
41
+ /** @var $_product Mage_Catalog_Model_Product */
42
+ $_product = $this->getProduct();
43
+ $_id = $_product->getId();
44
+ $_msrpPrice = '';
45
+ $priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElementIdPrefix() : 'product-price-';
46
+ ?>
47
+ <div class="price-box map-info">
48
+ <?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
49
+ <?php if($_product->getMsrp()): ?>
50
+ <?php $_msrpPrice = $_coreHelper->currency($_product->getMsrp(),true,true) ?>
51
+ <span class="old-price" ><?php echo $_msrpPrice ?></span>
52
+ <?php endif; ?>
53
+
54
+ <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
55
+ <?php $priceElementId = $priceElementIdPrefix . $_id . $this->getIdSuffix(); ?>
56
+ <span id="<?php echo $priceElementId ?>" style="display:none"></span>
57
+ <?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?>
58
+ <a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a>
59
+ <script type="text/javascript">
60
+ Event.observe(window, 'load', function() {
61
+ var priceElement = $("<?php echo $priceElementId ?>"),
62
+ realPrice = <?php echo $this->getRealPriceJs($_product) ?>,
63
+ priceHtml = realPrice.stripScripts();
64
+
65
+ priceElement.innerHTML = priceHtml;
66
+ realPrice.evalScripts();
67
+ var originalOptionPriceReload;
68
+ if (typeof(optionsPrice) != 'undefined' && optionsPrice && optionsPrice.reload) {
69
+ originalOptionPriceReload = optionsPrice.reload;
70
+ Product.OptionsPrice.prototype.reload = function() {
71
+ if (originalOptionPriceReload) {
72
+ originalOptionPriceReload.call(this);
73
+ }
74
+ if ($('<?php echo $popupId ?>') == Catalog.Map.active) {
75
+ Element.update(
76
+ $('map-popup-price'),
77
+ $("<?php echo $priceElementId ?>").innerHTML
78
+ );
79
+ }
80
+ }
81
+ optionsPrice.reload();
82
+ }
83
+ });
84
+
85
+ Catalog.Map.addHelpLink(
86
+ $('<?php echo $popupId ?>'),
87
+ "<?php echo $_product->getName() ?>",
88
+ $("<?php echo $priceElementId ?>"),
89
+ '<?php echo $_msrpPrice ?>',
90
+ "<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>"
91
+ );
92
+ </script>
93
+ <?php else: ?>
94
+ <span class="msrp-price-hide-message">
95
+ <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
96
+ </span>
97
+ <?php endif; ?>
98
+
99
+ <?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?>
100
+ <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__("What's this?"); ?></a>
101
+ <script type="text/javascript">
102
+ Catalog.Map.addHelpLink(
103
+ $('<?php echo $helpLinkId ?>'),
104
+ "<?php echo $this->__("What's this?"); ?>"
105
+ );
106
+ </script>
107
+ </div>
app/design/frontend/base/default/template/catalog/product/price_msrp_noform.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) 2014 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 at catalog and sidebars
31
+ *
32
+ * @var $this Mage_Catalog_Block_Product_Price
33
+ */
34
+ ?>
35
+ <?php
36
+ /** @var $_product Mage_Catalog_Model_Product */
37
+ $_product = $this->getProduct();
38
+ $_msrpPrice = "";
39
+ ?>
40
+ <div class="price-box map-info">
41
+ <?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
42
+ <?php if ($_product->getMsrp()): ?>
43
+ <?php $_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true) ?>
44
+ <span class="old-price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span>
45
+ <?php endif; ?>
46
+ <?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
47
+ <a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a>
48
+ <script type="text/javascript">
49
+ <?php if ($this->helper('catalog')->isShowPriceOnGesture($_product)): ?>
50
+ var productLink = {
51
+ url: "<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>",
52
+ notUseForm: true
53
+ };
54
+ var newLink = Catalog.Map.addHelpLink(
55
+ $('<?php echo $helpLinkId ?>'),
56
+ "<?php echo $_product->getName() ?>",
57
+ <?php echo $this->getRealPriceJs($_product) ?>,
58
+ '<?php echo $_msrpPrice ?>',
59
+ productLink
60
+ );
61
+ newLink.product_id = '<?php echo $_product->getId() ?>';
62
+ <?php else: ?>
63
+ Catalog.Map.addHelpLink(
64
+ $('<?php echo $helpLinkId ?>'),
65
+ null,
66
+ null,
67
+ null,
68
+ "<?php echo $_product->getProductUrl() ?>"
69
+ );
70
+ <?php endif; ?>
71
+
72
+ </script>
73
+ </div>
app/design/frontend/base/default/template/catalog/product/price_msrp_rss.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 displaying product price at rss feeds pages
30
+ *
31
+ * @var $this Mage_Catalog_Block_Product_Price
32
+ */
33
+
34
+ /** @var $_product Mage_Catalog_Model_Product */
35
+ $_product = $this->getProduct();
36
+ ?>
37
+ <div class="price-box map-info">
38
+
39
+ <?php if ($this->helper('catalog')->canApplyMsrp($_product)): ?>
40
+ <a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('Click for price'); ?></a>
41
+ <?php endif; ?>
42
+ </div>
app/design/frontend/base/default/template/catalog/product/view.phtml ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ <?php echo $this->getBlockHtml('formkey') ?>
44
+ <div class="no-display">
45
+ <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
46
+ <input type="hidden" name="related_product" id="related-products-field" value="" />
47
+ </div>
48
+
49
+ <div class="product-shop">
50
+ <div class="product-name">
51
+ <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
52
+ </div>
53
+
54
+ <?php if ($this->canEmailToFriend()): ?>
55
+ <p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
56
+ <?php endif; ?>
57
+
58
+ <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
59
+ <?php echo $this->getChildHtml('alert_urls') ?>
60
+ <?php echo $this->getChildHtml('product_type_data') ?>
61
+ <?php echo $this->getTierPriceHtml() ?>
62
+ <?php echo $this->getChildHtml('extrahint') ?>
63
+
64
+ <?php if (!$this->hasOptions()):?>
65
+ <div class="add-to-box">
66
+ <?php if($_product->isSaleable()): ?>
67
+ <?php echo $this->getChildHtml('addtocart') ?>
68
+ <?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
69
+ <span class="or"><?php echo $this->__('OR') ?></span>
70
+ <?php endif; ?>
71
+ <?php endif; ?>
72
+ <?php echo $this->getChildHtml('addto') ?>
73
+ </div>
74
+ <?php echo $this->getChildHtml('extra_buttons') ?>
75
+ <?php elseif (!$_product->isSaleable()): ?>
76
+ <div class="add-to-box">
77
+ <?php echo $this->getChildHtml('addto') ?>
78
+ </div>
79
+ <?php endif; ?>
80
+
81
+ <?php if ($_product->getShortDescription()):?>
82
+ <div class="short-description">
83
+ <h2><?php echo $this->__('Quick Overview') ?></h2>
84
+ <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
85
+ </div>
86
+ <?php endif;?>
87
+
88
+ <?php echo $this->getChildHtml('other');?>
89
+
90
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
91
+ <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
92
+ <?php endif;?>
93
+
94
+ </div>
95
+
96
+ <div class="product-img-box">
97
+ <?php echo $this->getChildHtml('media') ?>
98
+ </div>
99
+
100
+ <div class="clearer"></div>
101
+ <?php if ($_product->isSaleable() && $this->hasOptions()):?>
102
+ <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
103
+ <?php endif;?>
104
+ </form>
105
+ <script type="text/javascript">
106
+ //<![CDATA[
107
+ var productAddToCartForm = new VarienForm('product_addtocart_form');
108
+ productAddToCartForm.submit = function(button, url) {
109
+ if (this.validator.validate()) {
110
+ var form = this.form;
111
+ var oldUrl = form.action;
112
+
113
+ if (url) {
114
+ form.action = url;
115
+ }
116
+ var e = null;
117
+ try {
118
+ this.form.submit();
119
+ } catch (e) {
120
+ }
121
+ this.form.action = oldUrl;
122
+ if (e) {
123
+ throw e;
124
+ }
125
+
126
+ if (button && button != 'undefined') {
127
+ button.disabled = true;
128
+ }
129
+ }
130
+ }.bind(productAddToCartForm);
131
+
132
+ productAddToCartForm.submitLight = function(button, url){
133
+ if(this.validator) {
134
+ var nv = Validation.methods;
135
+ delete Validation.methods['required-entry'];
136
+ delete Validation.methods['validate-one-required'];
137
+ delete Validation.methods['validate-one-required-by-name'];
138
+ // Remove custom datetime validators
139
+ for (var methodName in Validation.methods) {
140
+ if (methodName.match(/^validate-datetime-.*/i)) {
141
+ delete Validation.methods[methodName];
142
+ }
143
+ }
144
+
145
+ if (this.validator.validate()) {
146
+ if (url) {
147
+ this.form.action = url;
148
+ }
149
+ this.form.submit();
150
+ }
151
+ Object.extend(Validation.methods, nv);
152
+ }
153
+ }.bind(productAddToCartForm);
154
+ //]]>
155
+ </script>
156
+ </div>
157
+
158
+ <div class="product-collateral">
159
+ <?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
160
+ <div class="box-collateral <?php echo "box-{$alias}"?>">
161
+ <?php if ($title = $this->getChildData($alias, 'title')):?>
162
+ <h2><?php echo $this->escapeHtml($title); ?></h2>
163
+ <?php endif;?>
164
+ <?php echo $html; ?>
165
+ </div>
166
+ <?php endforeach;?>
167
+ <?php echo $this->getChildHtml('upsell_products') ?>
168
+ <?php echo $this->getChildHtml('product_additional_data') ?>
169
+ </div>
170
+ </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) 2014 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) 2014 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, this.href); 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) 2014 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 ?>" id="product-addtocart-button" 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) 2014 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->escapeHtml($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) 2014 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) 2014 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->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($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->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($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->escapeHtml($_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->escapeHtml($_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,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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_View_Options */
27
+ ?>
28
+
29
+ <?php $_options = Mage::helper('core')->decorateArray($this->getOptions()) ?>
30
+ <?php if (count($_options)):?>
31
+ <script type="text/javascript">
32
+ //<![CDATA[
33
+ var optionFileUpload = {
34
+ productForm : $('product_addtocart_form'),
35
+ formAction : '',
36
+ formElements : {},
37
+ upload : function(element){
38
+ this.formElements = this.productForm.select('input', 'select', 'textarea', 'button');
39
+ this.removeRequire(element.readAttribute('id').sub('option_', ''));
40
+
41
+ template = '<iframe id="upload_target" name="upload_target" style="width:0; height:0; border:0;"><\/iframe>';
42
+
43
+ Element.insert($('option_'+element.readAttribute('id').sub('option_', '')+'_uploaded_file'), {after: template});
44
+
45
+ this.formAction = this.productForm.action;
46
+
47
+ var baseUrl = '<?php echo $this->getUrl('*/product/upload') ?>';
48
+ var urlExt = 'option_id/'+element.readAttribute('id').sub('option_', '');
49
+
50
+ this.productForm.action = parseSidUrl(baseUrl, urlExt);
51
+ this.productForm.target = 'upload_target';
52
+ this.productForm.submit();
53
+ this.productForm.target = '';
54
+ this.productForm.action = this.formAction;
55
+ },
56
+ removeRequire : function(skipElementId){
57
+ for(var i=0; i<this.formElements.length; i++){
58
+ if (this.formElements[i].readAttribute('id') != 'option_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
59
+ this.formElements[i].disabled='disabled';
60
+ }
61
+ }
62
+ },
63
+ addRequire : function(skipElementId){
64
+ for(var i=0; i<this.formElements.length; i++){
65
+ if (this.formElements[i].readAttribute('name') != 'options_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
66
+ this.formElements[i].disabled='';
67
+ }
68
+ }
69
+ },
70
+ uploadCallback : function(data){
71
+ this.addRequire(data.optionId);
72
+ $('upload_target').remove();
73
+
74
+ if (data.error) {
75
+
76
+ } else {
77
+ $('option_'+data.optionId+'_uploaded_file').value = data.fileName;
78
+ $('option_'+data.optionId+'_file').value = '';
79
+ $('option_'+data.optionId+'_file').hide();
80
+ $('option_'+data.optionId+'').hide();
81
+ 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>';
82
+
83
+ Element.insert($('option_'+data.optionId+'_uploaded_file'), {after: template});
84
+ }
85
+ },
86
+ removeFile : function(optionId)
87
+ {
88
+ $('option_'+optionId+'_uploaded_file').value= '';
89
+ $('option_'+optionId+'_file').show();
90
+ $('option_'+optionId+'').show();
91
+
92
+ $('option_'+optionId+'_file_box').remove();
93
+ }
94
+ }
95
+ var optionTextCounter = {
96
+ count : function(field,cntfield,maxlimit){
97
+ if (field.value.length > maxlimit){
98
+ field.value = field.value.substring(0, maxlimit);
99
+ } else {
100
+ cntfield.innerHTML = maxlimit - field.value.length;
101
+ }
102
+ }
103
+ }
104
+
105
+ Product.Options = Class.create();
106
+ Product.Options.prototype = {
107
+ initialize : function(config) {
108
+ this.config = config;
109
+ this.reloadPrice();
110
+ document.observe("dom:loaded", this.reloadPrice.bind(this));
111
+ },
112
+ reloadPrice : function() {
113
+ var config = this.config;
114
+ var skipIds = [];
115
+ $$('body .product-custom-option').each(function(element){
116
+ var optionId = 0;
117
+ element.name.sub(/[0-9]+/, function(match){
118
+ optionId = parseInt(match[0], 10);
119
+ });
120
+ if (config[optionId]) {
121
+ var configOptions = config[optionId];
122
+ var curConfig = {price: 0};
123
+ if (element.type == 'checkbox' || element.type == 'radio') {
124
+ if (element.checked) {
125
+ if (typeof configOptions[element.getValue()] != 'undefined') {
126
+ curConfig = configOptions[element.getValue()];
127
+ }
128
+ }
129
+ } else if(element.hasClassName('datetime-picker') && !skipIds.include(optionId)) {
130
+ dateSelected = true;
131
+ $$('.product-custom-option[id^="options_' + optionId + '"]').each(function(dt){
132
+ if (dt.getValue() == '') {
133
+ dateSelected = false;
134
+ }
135
+ });
136
+ if (dateSelected) {
137
+ curConfig = configOptions;
138
+ skipIds[optionId] = optionId;
139
+ }
140
+ } else if(element.type == 'select-one' || element.type == 'select-multiple') {
141
+ if ('options' in element) {
142
+ $A(element.options).each(function(selectOption){
143
+ if ('selected' in selectOption && selectOption.selected) {
144
+ if (typeof(configOptions[selectOption.value]) != 'undefined') {
145
+ curConfig = configOptions[selectOption.value];
146
+ }
147
+ }
148
+ });
149
+ }
150
+ } else {
151
+ if (element.getValue().strip() != '') {
152
+ curConfig = configOptions;
153
+ }
154
+ }
155
+ if(element.type == 'select-multiple' && ('options' in element)) {
156
+ $A(element.options).each(function(selectOption) {
157
+ if (('selected' in selectOption) && typeof(configOptions[selectOption.value]) != 'undefined') {
158
+ if (selectOption.selected) {
159
+ curConfig = configOptions[selectOption.value];
160
+ } else {
161
+ curConfig = {price: 0};
162
+ }
163
+ optionsPrice.addCustomPrices(optionId + '-' + selectOption.value, curConfig);
164
+ optionsPrice.reload();
165
+ }
166
+ });
167
+ } else {
168
+ optionsPrice.addCustomPrices(element.id || optionId, curConfig);
169
+ optionsPrice.reload();
170
+ }
171
+ }
172
+ });
173
+ }
174
+ }
175
+ function validateOptionsCallback(elmId, result) {
176
+ var container = $(elmId).up('ul.options-list');
177
+ if (result == 'failed') {
178
+ container.removeClassName('validation-passed');
179
+ container.addClassName('validation-failed');
180
+ } else {
181
+ container.removeClassName('validation-failed');
182
+ container.addClassName('validation-passed');
183
+ }
184
+ }
185
+ var opConfig = new Product.Options(<?php echo $this->getJsonConfig() ?>);
186
+ //]]>
187
+ </script>
188
+ <dl>
189
+ <?php foreach($_options as $_option): ?>
190
+ <?php echo $this->getOptionHtml($_option) ?>
191
+ <?php endforeach; ?>
192
+ </dl>
193
+ <?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) 2014 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) 2014 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->escapeHtml($_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) 2014 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->escapeHtml($_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) 2014 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->escapeHtml($_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) 2014 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->escapeHtml($_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) 2014 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->escapeHtml($_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) 2014 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) 2014 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) 2014 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) 2014 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,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ /** @var $_catalogHelper Mage_Catalog_Helper_Data */
37
+ $_catalogHelper = Mage::helper('catalog');
38
+
39
+ $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
40
+ if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
41
+ $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
42
+ }
43
+
44
+ ?>
45
+ <?php if (count($_tierPrices) > 0): ?>
46
+ <ul class="<?php echo ($this->getInGrouped() ? 'tier-prices-grouped product-pricing-grouped' : 'tier-prices product-pricing'); ?>">
47
+ <?php if ($this->getInGrouped()): ?>
48
+ <?php $_tierPrices = $this->getTierPrices($_product); ?>
49
+ <?php endif; ?>
50
+ <?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices); ?>
51
+ <?php foreach ($_tierPrices as $_index => $_price): ?>
52
+ <li class="tier-price tier-<?php echo $_index; ?>">
53
+ <?php if ($_catalogHelper->canApplyMsrp($_product)): ?>
54
+ <?php if ($this->getInGrouped()): ?>
55
+ <?php echo $this->__('Buy %1$s for', $_price['price_qty']) ?>:
56
+ <?php else: ?>
57
+ <?php echo $this->__('Buy %1$s', $_price['price_qty']) ?>
58
+ <?php endif; ?>
59
+ <?php else: ?>
60
+
61
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
62
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
63
+ <?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']) ?>
64
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
65
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
66
+ <?php if ($_weeeTaxAttributes): ?>
67
+ (<small>
68
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
69
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
70
+ <?php echo $separator; ?>
71
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
72
+ <?php endforeach; ?>
73
+ </small>)
74
+ <?php endif; ?>
75
+ <?php echo $this->__('each') ?>
76
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
77
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
78
+ <?php if ($_weeeTaxAttributes): ?>
79
+ (<small>
80
+ <?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
81
+ <?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
82
+ <?php echo $separator; ?>
83
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
84
+ <?php endforeach; ?>
85
+ </small>)
86
+ <?php endif; ?>
87
+ <?php echo $this->__('each') ?>
88
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
89
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
90
+ <?php if ($_weeeTaxAttributes): ?>
91
+ (<small>
92
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
93
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
94
+ <?php endforeach; ?>
95
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
96
+ </small>)
97
+ <?php endif; ?>
98
+ <?php echo $this->__('each') ?>
99
+ <?php else: ?>
100
+ <?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']) ?>
101
+ <?php endif; ?>
102
+ <?php else: ?>
103
+ <?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
104
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
105
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?>
106
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
107
+ <?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()); ?>
113
+ <?php $separator = ' + '; endforeach; ?>
114
+ </small>)
115
+ <?php endif; ?>
116
+ <?php echo $this->__('each') ?>
117
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
118
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
119
+ <?php if ($_weeeTaxAttributes): ?>
120
+ (<small>
121
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
122
+ <?php echo $separator; ?>
123
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
124
+ <?php $separator = ' + '; endforeach; ?>
125
+ </small>)
126
+ <?php endif; ?>
127
+ <?php echo $this->__('each') ?>
128
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
129
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?>
130
+ <?php if ($_weeeTaxAttributes): ?>
131
+ (<small>
132
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
133
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
134
+ <?php endforeach; ?>
135
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
136
+ </small>)
137
+ <?php endif; ?>
138
+ <?php echo $this->__('each') ?>
139
+ <?php else: ?>
140
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?>
141
+ <?php endif; ?>
142
+ <?php else: ?>
143
+ <?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
144
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?>
145
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
146
+ <?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()); ?>
152
+ <?php $separator = ' + '; endforeach; ?>
153
+ </small>)
154
+ <?php endif; ?>
155
+ <?php echo $this->__('each') ?>
156
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
157
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
158
+ <?php if ($_weeeTaxAttributes): ?>
159
+ (<small>
160
+ <?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
161
+ <?php echo $separator; ?>
162
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
163
+ <?php $separator = ' + '; endforeach; ?>
164
+ </small>)
165
+ <?php endif; ?>
166
+ <?php echo $this->__('each') ?>
167
+ <?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
168
+ <?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
169
+ <?php if ($_weeeTaxAttributes): ?>
170
+ (<small>
171
+ <?php foreach ($_weeeTaxAttributes as $_attribute): ?>
172
+ <?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
173
+ <?php endforeach; ?>
174
+ <?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?>
175
+ </small>)
176
+ <?php endif; ?>
177
+ <?php echo $this->__('each') ?>
178
+ <?php else: ?>
179
+ <?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?>
180
+ <?php endif; ?>
181
+ <?php endif; ?>
182
+ <?php endif; ?>
183
+
184
+ <?php endif; // Can apply MSRP ?>
185
+
186
+ <?php if (!$this->getInGrouped()): ?>
187
+ <?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
188
+ || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?>
189
+ <?php echo $this->__('and') ?>&nbsp;<strong class="benefit"><?php echo $this->__('save')?>&nbsp;<span class="percent tier-<?php echo $_index;?>"><?php echo $_price['savePercent']?></span>%
190
+ <?php endif ?></strong>
191
+ <?php endif; ?>
192
+
193
+ <?php if ($_catalogHelper->isShowPriceOnGesture($_product)):?>
194
+ <?php $popupId = 'msrp-popup-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
195
+ <a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a>
196
+ <script type="text/javascript">
197
+ <?php
198
+ $addToCartUrl = $this->getProduct()->isSalable()
199
+ ? $this->getAddToCartUrl($_product, array('qty' => $_price['price_qty']))
200
+ : '';
201
+ ?>
202
+ <?php if (!$this->getInGrouped()): ?>
203
+ var newLink = {
204
+ url: "<?php echo $addToCartUrl; ?>",
205
+ qty: "<?php echo $_price['price_qty']?>"
206
+ };
207
+ <?php else: ?>
208
+ var newLink = {
209
+ url: "<?php echo $addToCartUrl; ?>",
210
+ notUseForm: true
211
+ };
212
+ <?php endif ?>
213
+ Catalog.Map.addHelpLink(
214
+ $('<?php echo $popupId ?>'),
215
+ "<?php echo $_product->getName() ?>",
216
+ <?php echo json_encode($_price['real_price_html']) ?>,
217
+ "<?php echo $this->helper('core')->currency($_product->getMsrp(),true,false) ?>",
218
+ newLink
219
+ );
220
+ </script>
221
+ <?php else: ?>
222
+ <span class="msrp-price-hide-message">
223
+ <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
224
+ </span>
225
+ <?php endif; ?>
226
+
227
+
228
+ </li>
229
+
230
+ <?php endforeach ?>
231
+ </ul>
232
+ <?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) 2014 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,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) 2014 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 ($this->displayProductStockStatus()): ?>
31
+ <?php if ($_product->isAvailable()): ?>
32
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
33
+ <?php else: ?>
34
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
35
+ <?php endif; ?>
36
+ <?php endif; ?>
37
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
38
+ <?php echo $this->getPriceHtml($_product) ?>
app/design/frontend/base/default/template/catalog/product/view/type/grouped.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) 2014 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 ($this->displayProductStockStatus()): ?>
39
+ <?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
40
+ <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
41
+ <?php else: ?>
42
+ <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
43
+ <?php endif; ?>
44
+ <?php endif; ?>
45
+ <?php echo $this->getChildHtml('product_type_data_extra') ?>
46
+ <table class="data-table grouped-items-table" id="super-product-table">
47
+ <col />
48
+ <col />
49
+ <col width="1" />
50
+ <thead>
51
+ <tr>
52
+ <th><?php echo $this->__('Product Name') ?></th>
53
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
54
+ <th class="a-right"><?php echo $this->__('Price') ?></th>
55
+ <?php endif; ?>
56
+ <?php if ($_product->isSaleable()): ?>
57
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
58
+ <?php endif; ?>
59
+ </tr>
60
+ </thead>
61
+ <tbody>
62
+ <?php if ($_hasAssociatedProducts): ?>
63
+ <?php foreach ($_associatedProducts as $_item): ?>
64
+ <?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
65
+ <tr>
66
+ <td><?php echo $this->escapeHtml($_item->getName()) ?></td>
67
+ <?php if ($this->getCanShowProductPrice($_product)): ?>
68
+ <td class="a-right">
69
+ <?php if ($this->getCanShowProductPrice($_item)): ?>
70
+ <?php echo $this->getPriceHtml($_item, true) ?>
71
+ <?php echo $this->getTierPriceHtml($_item) ?>
72
+ <?php endif; ?>
73
+ </td>
74
+ <?php endif; ?>
75
+ <?php if ($_product->isSaleable()): ?>
76
+ <td class="a-center">
77
+ <?php if ($_item->isSaleable()) : ?>
78
+ <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" />
79
+ <?php else: ?>
80
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
81
+ <?php endif; ?>
82
+ </td>
83
+ <?php endif; ?>
84
+ </tr>
85
+ <?php endforeach; ?>
86
+ <?php else: ?>
87
+ <tr>
88
+ <td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
89
+ </tr>
90
+ <?php endif; ?>
91
+ </tbody>
92
+ </table>
93
+ <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) 2014 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) 2014 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) 2014 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) 2014 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->escapeHtml($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) 2014 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->escapeHtml($this->getAnchorText()) ?></span></a></span>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_default_list.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) 2014 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 echo $this->getPagerHtml() ?>
35
+ <?php $suffix = $this->getNameInLayout(); ?>
36
+ <ol class="mini-products-list" id="widget-new-products-<?php echo $suffix; ?>">
37
+ <?php foreach ($_products->getItems() as $_product): ?>
38
+ <li class="item">
39
+ <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>
40
+ <div class="product-details">
41
+ <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>
42
+ <?php echo $this->getPriceHtml($_product, true, '-widget-new-'.$suffix) ?>
43
+ <?php if ($_product->getIsSalable()): ?>
44
+ <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Cart') ?></a>
45
+ <?php else: ?>
46
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
47
+ <?php endif; ?>
48
+ </div>
49
+ </li>
50
+ <?php endforeach; ?>
51
+ </ol>
52
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_images_list.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) 2014 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 echo $this->getPagerHtml() ?>
35
+ <?php $suffix = $this->getNameInLayout(); ?>
36
+ <ol class="mini-products-images-list" id="widget-new-products-<?php echo $suffix; ?>">
37
+ <?php foreach ($_products->getItems() as $_product): ?>
38
+ <li class="item">
39
+ <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>
40
+ </li>
41
+ <?php endforeach; ?>
42
+ </ol>
43
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/column/new_names_list.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) 2014 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 echo $this->getPagerHtml() ?>
35
+ <?php $suffix = $this->getNameInLayout(); ?>
36
+ <ol id="widget-new-products-<?php echo $suffix; ?>">
37
+ <?php foreach ($_products->getItems() as $_product): ?>
38
+ <li class="item">
39
+ <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>
40
+ </li>
41
+ <?php endforeach; ?>
42
+ </ol>
43
+ <script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/content/new_grid.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) 2014 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 echo $this->getPagerHtml() ?>
34
+ <?php $_columnCount = $this->getColumnCount(); ?>
35
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
36
+ <?php if ($i++%$_columnCount==0): ?>
37
+ <ul class="products-grid">
38
+ <?php endif ?>
39
+ <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
40
+ <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>
41
+ <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>
42
+ <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
43
+ <?php echo $this->getPriceHtml($_product, true, '-widget-new-grid') ?>
44
+ <div class="actions">
45
+ <?php if ($_product->isSaleable()): ?>
46
+ <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>
47
+ <?php else: ?>
48
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
49
+ <?php endif; ?>
50
+ <ul class="add-to-links">
51
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
52
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
53
+ <?php endif; ?>
54
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
55
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
56
+ <?php endif; ?>
57
+ </ul>
58
+ </div>
59
+ </li>
60
+ <?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
61
+ </ul>
62
+ <?php endif ?>
63
+ <?php endforeach; ?>
64
+ </div>
65
+ </div>
66
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/product/widget/new/content/new_list.phtml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 echo $this->getPagerHtml() ?>
34
+ <ol class="products-list">
35
+ <?php $i=0; foreach ($_products->getItems() as $_product): ?>
36
+ <li class="item<?php echo (++$i == count($_products))?' last':''; ?>">
37
+ <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>
38
+ <div class="product-shop">
39
+ <div class="f-fix">
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-list') ?>
43
+ <?php if ($_product->isSaleable()): ?>
44
+ <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>
45
+ <?php else: ?>
46
+ <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
47
+ <?php endif; ?>
48
+ <ul class="add-to-links">
49
+ <?php if ($this->helper('wishlist')->isAllow()) : ?>
50
+ <li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
51
+ <?php endif; ?>
52
+ <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
53
+ <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
54
+ <?php endif; ?>
55
+ </ul>
56
+ </div>
57
+ </div>
58
+ </li>
59
+ <?php endforeach; ?>
60
+ </ol>
61
+ </div>
62
+ </div>
63
+ <?php endif; ?>
app/design/frontend/base/default/template/catalog/rss/product/price.phtml ADDED
@@ -0,0 +1,449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
37
+ /* @var $_coreHelper Mage_Core_Helper_Data */
38
+ /* @var $_weeeHelper Mage_Weee_Helper_Data */
39
+ /* @var $_taxHelper Mage_Tax_Helper_Data */
40
+ $_coreHelper = $this->helper('core');
41
+ $_weeeHelper = $this->helper('weee');
42
+ $_taxHelper = $this->helper('tax');
43
+
44
+ $_product = $this->getProduct();
45
+ $_storeId = $_product->getStoreId();
46
+ $_store = $_product->getStore();
47
+ $_id = $_product->getId();
48
+ $_weeeSeparator = '';
49
+ $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
50
+ $_minimalPriceValue = $_product->getMinimalPrice();
51
+ $_minimalPriceValue = $_store->roundPrice($_store->convertPrice($_minimalPriceValue));
52
+ $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
53
+ $_convertedFinalPrice = $_store->roundPrice($_store->convertPrice($_product->getFinalPrice()));
54
+ $_specialPriceStoreLabel = $this->getProductAttribute('special_price')->getStoreLabel();
55
+ ?>
56
+
57
+ <?php if ($_product->getCanShowPrice() !== false): ?>
58
+
59
+ <?php $_weeeSeparator = ''; ?>
60
+
61
+
62
+ <?php if (!$_product->isGrouped()): ?>
63
+ <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
64
+ <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
65
+ <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
66
+ <?php if ($_weeeHelper->isTaxable()): ?>
67
+ <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_weeeTaxAttributes); ?>
68
+ <?php endif; ?>
69
+ <?php $_weeeTaxAmount = $_store->roundPrice($_store->convertPrice($_weeeTaxAmount)); ?>
70
+ <?php $_weeeTaxAmountInclTaxes = $_store->roundPrice($_store->convertPrice($_weeeTaxAmountInclTaxes)); ?>
71
+
72
+ <div class="price-box">
73
+ <?php $_convertedPrice = $_store->roundPrice($_store->convertPrice($_product->getPrice())); ?>
74
+ <?php $_price = $_taxHelper->getPrice($_product, $_convertedPrice); ?>
75
+ <?php $_regularPrice = $_taxHelper->getPrice($_product, $_convertedPrice, $_simplePricesTax); ?>
76
+ <?php $_finalPrice = $_taxHelper->getPrice($_product, $_convertedFinalPrice) ?>
77
+ <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_convertedFinalPrice, true) ?>
78
+ <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
79
+
80
+ <?php if ($_finalPrice == $_price): ?>
81
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
82
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
83
+ <span class="price-excluding-tax">
84
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
85
+ <span class="price"
86
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $_weeeTaxAmount, true, false) ?></span>
87
+ </span>
88
+ <span class="price-including-tax">
89
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
90
+ <span class="price"
91
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
92
+ </span>
93
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
94
+ <span class="price-excluding-tax">
95
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
96
+ <span class="price"
97
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $_weeeTaxAmount, true, false) ?></span>
98
+ <br/>
99
+ <span class="weee">(<small>
100
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
101
+ <?php echo $_weeeSeparator; ?>
102
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
103
+ <?php $_weeeSeparator = ' + '; ?>
104
+ <?php endforeach; ?>
105
+ </small>)</span>
106
+ </span>
107
+ <span class="price-including-tax">
108
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
109
+ <span class="price"
110
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
111
+ </span>
112
+
113
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
114
+ <span class="price-excluding-tax">
115
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
116
+ <span class="price"
117
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $_weeeTaxAmount, true, false) ?></span>
118
+ </span>
119
+ <span class="price-including-tax">
120
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
121
+ <span class="price"
122
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
123
+ <br/>
124
+ <span class="weee">(<small>
125
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
126
+ <?php echo $_weeeSeparator; ?>
127
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
128
+ <?php $_weeeSeparator = ' + '; ?>
129
+ <?php endforeach; ?>
130
+ </small>)</span>
131
+ </span>
132
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
133
+ <span class="price-excluding-tax">
134
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
135
+ <span class="price"
136
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price, true, false) ?></span>
137
+ </span>
138
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
139
+ <span class="weee">
140
+ <small>
141
+ <?php echo $_weeeTaxAttribute->getName(); ?>
142
+ : <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
143
+ </small>
144
+ </span>
145
+ <br/>
146
+ <?php endforeach; ?>
147
+ <span class="price-including-tax">
148
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
149
+ <span class="price"
150
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
151
+ </span>
152
+ <?php else: ?>
153
+ <span class="price-excluding-tax">
154
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
155
+ <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
156
+ <?php if ($_finalPrice == $_price): ?>
157
+ <?php echo $_coreHelper->formatPrice($_price, false) ?>
158
+ <?php else: ?>
159
+ <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
160
+ <?php endif; ?>
161
+ </span>
162
+ </span>
163
+ <span class="price-including-tax">
164
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
165
+ <span class="price"
166
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax, true, false) ?></span>
167
+ </span>
168
+ <?php endif; ?>
169
+ <?php else: ?>
170
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
171
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
172
+ <span class="regular-price"
173
+ id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $weeeAmountToDisplay, true, true) ?></span>
174
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
175
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
176
+ <span class="regular-price"
177
+ id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $weeeAmountToDisplay, true, true) ?></span>
178
+ <br/>
179
+ <span class="weee">(<small>
180
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
181
+ <?php echo $_weeeSeparator; ?>
182
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
183
+ <?php $_weeeSeparator = ' + '; ?>
184
+ <?php endforeach; ?>
185
+ </small>)</span>
186
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
187
+ <span class="regular-price"
188
+ id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $_weeeTaxAmount, true, true) ?></span>
189
+ <br/>
190
+ <span class="weee">(<small>
191
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
192
+ <?php echo $_weeeSeparator; ?>
193
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
194
+ <?php $_weeeSeparator = ' + '; ?>
195
+ <?php endforeach; ?>
196
+ </small>)</span>
197
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
198
+ <?php $weeeAmountToDisplay = $_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAmountInclTaxes : $_weeeTaxAmount ?>
199
+ <span class="regular-price"><?php echo Mage::helper('core')->currency($_price, true, true) ?></span>
200
+ <br/>
201
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
202
+ <span class="weee">
203
+ <small>
204
+ <?php echo $_weeeTaxAttribute->getName(); ?>
205
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + ($_taxHelper->displayPriceIncludingTax() ? $_weeeTaxAttribute->getTaxAmount() : 0), true, true); ?>
206
+ </small>
207
+ </span>
208
+ <br/>
209
+ <?php endforeach; ?>
210
+ <span class="regular-price"
211
+ id="product-price-weee-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price + $weeeAmountToDisplay, true, true) ?></span>
212
+ <?php else: ?>
213
+ <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
214
+ <?php if ($_finalPrice == $_price): ?>
215
+ <?php echo $_coreHelper->formatPrice($_price, true) ?>
216
+ <?php else: ?>
217
+ <?php echo $_coreHelper->formatPrice($_finalPrice, true) ?>
218
+ <?php endif; ?>
219
+ </span>
220
+ <?php endif; ?>
221
+ <?php endif; ?>
222
+ <?php else: /* if ($_finalPrice == $_price): */ ?>
223
+ <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
224
+ <?php $_originalWeeeTaxAmount = $_store->roundPrice($_store->convertPrice($_originalWeeeTaxAmount)) ?>
225
+
226
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
227
+ <p class="old-price">
228
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
229
+ <span class="price"
230
+ id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?></span>
231
+ </p>
232
+
233
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
234
+ <p class="special-price">
235
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
236
+ <span class="price-excluding-tax">
237
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
238
+ <span class="price"
239
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice + $_weeeTaxAmount, true, false) ?></span>
240
+ </span>
241
+ <span class="price-including-tax">
242
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
243
+ <span class="price"
244
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
245
+ </span>
246
+ </p>
247
+ <?php else: ?>
248
+ <p class="special-price">
249
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
250
+ <span class="price"
251
+ id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?></span>
252
+ </p>
253
+ <?php endif; ?>
254
+
255
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
256
+ <p class="old-price">
257
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
258
+ <span class="price"
259
+ id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?></span>
260
+ </p>
261
+
262
+ <p class="special-price">
263
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
264
+ <?php if ($_taxHelper->displayBothPrices()): ?>
265
+
266
+ <span class="price-excluding-tax">
267
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
268
+ <span class="price"
269
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice + $_weeeTaxAmount, true, false) ?></span>
270
+ </span>
271
+ <br/>
272
+ <span class="weee">(
273
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
274
+ <?php echo $_weeeSeparator; ?>
275
+ <?php echo $_weeeTaxAttribute->getName(); ?>
276
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
277
+ <?php $_weeeSeparator = ' + '; ?>
278
+ <?php endforeach; ?>
279
+ )</span>
280
+
281
+ <span class="price-including-tax">
282
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
283
+ <span class="price"
284
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
285
+ </span>
286
+ <?php else: ?>
287
+ <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
288
+ <?php echo $_coreHelper->formatPrice($_finalPrice + $_weeeTaxAmountInclTaxes, false) ?>
289
+ </span>
290
+ </p>
291
+ <span class="weee">(
292
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
293
+ <?php echo $_weeeSeparator; ?>
294
+ <?php echo $_weeeTaxAttribute->getName(); ?>
295
+ : <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
296
+ <?php $_weeeSeparator = ' + '; ?>
297
+ <?php endforeach; ?>
298
+ )</span>
299
+
300
+ <?php endif; ?>
301
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
302
+ <p class="old-price">
303
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
304
+ <span class="price"
305
+ id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?></span>
306
+ </p>
307
+
308
+ <p class="special-price">
309
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
310
+ <span class="price-excluding-tax">
311
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
312
+ <span class="price"
313
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice + $_weeeTaxAmount, true, false) ?></span>
314
+ </span>
315
+ <br/>
316
+ <span class="weee">(<small>
317
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
318
+ <?php echo $_weeeSeparator; ?>
319
+ <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
320
+ <?php $_weeeSeparator = ' + '; ?>
321
+ <?php endforeach; ?>
322
+ </small>)</span>
323
+ <span class="price-including-tax">
324
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
325
+ <span class="price"
326
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmount, true, false) ?></span>
327
+ </span>
328
+ </p>
329
+ <?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
330
+ <p class="old-price">
331
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
332
+ <span class="price"
333
+ id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice, true, false) ?></span>
334
+ </p>
335
+
336
+ <p class="special-price">
337
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
338
+ <span class="price-excluding-tax">
339
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
340
+ <span class="price"
341
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice, true, false) ?></span>
342
+ </span>
343
+ <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
344
+ <span class="weee">
345
+ <small>
346
+ <?php echo $_weeeTaxAttribute->getName(); ?>
347
+ : <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
348
+ </small>
349
+ </span>
350
+ <br/>
351
+ <?php endforeach; ?>
352
+ <span class="price-including-tax">
353
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
354
+ <span class="price"
355
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?></span>
356
+ </span>
357
+ </p>
358
+ <?php else: // excl. ?>
359
+ <p class="old-price">
360
+ <span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
361
+ <span class="price"
362
+ id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice, true, false) ?></span>
363
+ </p>
364
+
365
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
366
+ <p class="special-price">
367
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
368
+ <span class="price-excluding-tax">
369
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
370
+ <span class="price"
371
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice, true, false) ?></span>
372
+ </span>
373
+ <span class="price-including-tax">
374
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
375
+ <span class="price"
376
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax, true, false) ?></span>
377
+ </span>
378
+ </p>
379
+ <?php else: ?>
380
+ <p class="special-price">
381
+ <span class="price-label"><?php echo $this->__('Special Price:') ?></span>
382
+ <span class="price"
383
+ id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice, true, false) ?></span>
384
+ </p>
385
+ <?php endif; ?>
386
+ <?php endif; ?>
387
+
388
+ <?php endif; /* if ($_finalPrice == $_price): */ ?>
389
+
390
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
391
+
392
+ <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
393
+ <?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))): ?>
394
+ <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
395
+ <?php endif; ?>
396
+
397
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
398
+ <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
399
+ <?php else: ?>
400
+ <span class="minimal-price-link">
401
+ <?php endif ?>
402
+ <span class="label"><?php echo $this->__('As low as:') ?></span>
403
+ <span class="price"
404
+ id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_minimalPriceDisplayValue, true, false) ?></span>
405
+ <?php if ($this->getUseLinkForAsLowAs()): ?>
406
+ </a>
407
+ <?php else: ?>
408
+ </span>
409
+ <?php endif ?>
410
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
411
+ </div>
412
+
413
+ <?php else: /* if (!$_product->isGrouped()): */ ?>
414
+ <?php
415
+ $_exclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null);
416
+ $_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true);
417
+ ?>
418
+ <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
419
+ <div class="price-box">
420
+ <p class="minimal-price">
421
+ <span class="price-label"><?php echo $this->__('Starting at:') ?></span>
422
+ <?php if ($this->helper('tax')->displayBothPrices()): ?>
423
+ <span class="price-excluding-tax">
424
+ <span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
425
+ <span class="price"
426
+ id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_exclTax, true, false) ?></span>
427
+ </span>
428
+ <span class="price-including-tax">
429
+ <span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
430
+ <span class="price"
431
+ id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_inclTax, true, false) ?></span>
432
+ </span>
433
+ <?php else: ?>
434
+ <?php
435
+ $_showPrice = $_inclTax;
436
+ if (!$this->helper('tax')->displayPriceIncludingTax()) {
437
+ $_showPrice = $_exclTax;
438
+ }
439
+ ?>
440
+ <span class="price"
441
+ id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_showPrice, true, false) ?></span>
442
+ <?php endif; ?>
443
+ </p>
444
+ </div>
445
+ <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
446
+ <?php endif; /* if (!$_product->isGrouped()): */ ?>
447
+ <?php else: ?>
448
+ <?php //echo $this->helper('catalog')->__('Price is not available');?>
449
+ <?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) 2014 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 $this->escapeHtml($_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) 2014 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) 2014 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) 2014 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,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) 2014 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
+ <p class="availability-only">
33
+ <a href="#" id="<?php echo $this->getPlaceholderId() ?>" title="<?php echo $this->__('Only %s left', ($this->getStockQty())) ?>"><?php echo $this->__('Only %s left', "<strong>{$this->getStockQty()}</strong>") ?></a>
34
+ </p>
35
+ <table id="<?php echo $this->getDetailsPlaceholderId() ?>" class="availability-only-details no-display">
36
+ <col />
37
+ <col width="1" />
38
+ <thead>
39
+ <tr>
40
+ <th><?php echo $this->__('Product Name') ?></th>
41
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <?php foreach ($this->getChildProducts() as $childProduct) : ?>
46
+ <?php $childProductStockQty = $this->getProductStockQty($childProduct); ?>
47
+ <?php if ($childProductStockQty > 0) : ?>
48
+ <tr>
49
+ <td><?php echo $childProduct->getName() ?></td>
50
+ <td class="a-center"><?php echo $childProductStockQty ?></td>
51
+ </tr>
52
+ <?php endif ?>
53
+ <?php endforeach ?>
54
+ </tbody>
55
+ </table>
56
+ <script type="text/javascript">
57
+ //<![CDATA[
58
+ $('<?php echo $this->getPlaceholderId() ?>').observe('click', function(event){
59
+ this.toggleClassName('expanded');
60
+ $('<?php echo $this->getDetailsPlaceholderId() ?>').toggleClassName('no-display');
61
+ event.stop();
62
+ decorateTable('<?php echo $this->getDetailsPlaceholderId() ?>');
63
+ });
64
+ //]]>
65
+ </script>
66
+ <?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) 2014 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
+ <p class="availability-only">
33
+ <span title="<?php echo $this->__('Only %s left', ($this->getStockQty())) ?>"><?php echo $this->__('Only %s left', "<strong>{$this->getStockQty()}</strong>") ?></span>
34
+ </p>
35
+ <?php endif ?>
app/design/frontend/base/default/template/catalogsearch/advanced/form.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) 2014 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
+ <?php $maxQueryLength= $this->helper('catalogsearch')->getMaxQueryLength();?>
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
37
+ </div>
38
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <form action="<?php echo $this->getSearchPostUrl() ?>" method="get" id="form-validate">
40
+ <div class="fieldset advanced-search">
41
+ <h2 class="legend"><?php echo $this->__('Search Settings') ?></h2>
42
+ <ul class="form-list" id="advanced-search-list">
43
+ <?php foreach ($this->getSearchableAttributes() as $_attribute): ?>
44
+ <?php $_code = $_attribute->getAttributeCode() ?>
45
+ <li>
46
+ <label for="<?php echo $_code ?>"><?php echo $this->getAttributeLabel($_attribute) ?></label>
47
+ <?php switch($this->getAttributeInputType($_attribute)):
48
+ case 'number': ?>
49
+ <div class="input-range">
50
+ <input type="text" name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" />
51
+ <span class="separator">-</span>
52
+ <input type="text" name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" />
53
+ </div>
54
+ <?php break;
55
+ case 'price': ?>
56
+ <div class="input-range">
57
+ <input name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" />
58
+ <span class="separator">-</span>
59
+ <input name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" />
60
+ <small>(<?php echo $this->getCurrency($_attribute); ?>)</small>
61
+ </div>
62
+ <?php break;
63
+ case 'select': ?>
64
+ <div class="input-box">
65
+ <?php echo $this->getAttributeSelectElement($_attribute) ?>
66
+ </div>
67
+ <?php break;
68
+ case 'yesno': ?>
69
+ <?php echo $this->getAttributeYesNoElement($_attribute) ?>
70
+ <?php break;
71
+ case 'date': ?>
72
+ <div class="input-range">
73
+ <?php echo $this->getDateInput($_attribute, 'from') ?>
74
+ <span class="separator">-</span>
75
+ <?php echo $this->getDateInput($_attribute, 'to') ?>
76
+ </div>
77
+ <?php break;
78
+ default: ?>
79
+ <div class="input-box">
80
+ <input type="text" name="<?php echo $_code ?>" id="<?php echo $_code ?>" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute)) ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text <?php echo $this->getAttributeValidationClass($_attribute) ?>" maxlength="<?php echo $maxQueryLength;?>" />
81
+ </div>
82
+ <?php endswitch; ?>
83
+ </li>
84
+ <?php endforeach; ?>
85
+ </ul>
86
+ <script type="text/javascript">decorateList('advanced-search-list')</script>
87
+ </div>
88
+ <div class="buttons-set">
89
+ <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
90
+ </div>
91
+ </form>
92
+ <script type="text/javascript">
93
+ //<![CDATA[
94
+ var dataForm = new VarienForm('form-validate', true);
95
+ //]]>
96
+ </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) 2014 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->escapeHtml($this->helper('catalog')->__($criteria['name'])); ?>:</strong> <?php echo $this->escapeHtml($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,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) 2014 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_Core_Block_Template */
27
+ /* @var $catalogSearchHelper Mage_Catalogsearch_Helper_Data */
28
+ $catalogSearchHelper = $this->helper('catalogsearch');
29
+ ?>
30
+ <form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">
31
+ <div class="form-search">
32
+ <label for="search"><?php echo $this->__('Search:') ?></label>
33
+ <input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text" maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" />
34
+ <button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
35
+ <div id="search_autocomplete" class="search-autocomplete"></div>
36
+ <script type="text/javascript">
37
+ //<![CDATA[
38
+ var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
39
+ searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
40
+ //]]>
41
+ </script>
42
+ </div>
43
+ </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) 2014 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) 2014 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->escapeHtml($_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) 2014 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) 2014 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) 2014 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) 2014 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.png'); ?>" 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.png'); ?>" alt="<?php echo $this->__('MasterCard SecureCode') ?>" /></a>
32
+ </div>
33
+ </li>
app/design/frontend/base/default/template/checkout/cart.phtml ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ <?php echo $this->getBlockHtml('formkey'); ?>
51
+ <fieldset>
52
+ <table id="shopping-cart-table" class="data-table cart-table">
53
+ <col width="1" />
54
+ <col />
55
+ <col width="1" />
56
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
57
+ <col width="1" />
58
+ <?php endif ?>
59
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
60
+ <col width="1" />
61
+ <?php endif; ?>
62
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
63
+ <col width="1" />
64
+ <?php endif; ?>
65
+ <col width="1" />
66
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
67
+ <col width="1" />
68
+ <?php endif; ?>
69
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
70
+ <col width="1" />
71
+ <?php endif; ?>
72
+ <col width="1" />
73
+
74
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
75
+ <thead>
76
+ <tr>
77
+ <th rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
78
+ <th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
79
+ <th rowspan="<?php echo $mergedCells; ?>"></th>
80
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
81
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span></th>
82
+ <?php endif ?>
83
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
84
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
85
+ <th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
86
+ <th rowspan="<?php echo $mergedCells; ?>" class="a-center">&nbsp;</th>
87
+ </tr>
88
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
89
+ <tr>
90
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
91
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
92
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
93
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
94
+ </tr>
95
+ <?php endif; ?>
96
+ </thead>
97
+ <tfoot>
98
+ <tr>
99
+ <td colspan="50" class="a-right">
100
+ <?php if($this->getContinueShoppingUrl()): ?>
101
+ <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>
102
+ <?php endif; ?>
103
+ <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
104
+ <button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>
105
+ <!--[if lt IE 8]>
106
+ <input type="hidden" id="update_cart_action_container" />
107
+ <script type="text/javascript">
108
+ //<![CDATA[
109
+ Event.observe(window, 'load', function()
110
+ {
111
+ // Internet Explorer (lt 8) does not support value attribute in button elements
112
+ $emptyCartButton = $('empty_cart_button');
113
+ $cartActionContainer = $('update_cart_action_container');
114
+ if ($emptyCartButton && $cartActionContainer) {
115
+ Event.observe($emptyCartButton, 'click', function()
116
+ {
117
+ $emptyCartButton.setAttribute('name', 'update_cart_action_temp');
118
+ $cartActionContainer.setAttribute('name', 'update_cart_action');
119
+ $cartActionContainer.setValue('empty_cart');
120
+ });
121
+ }
122
+
123
+ });
124
+ //]]>
125
+ </script>
126
+ <![endif]-->
127
+ </td>
128
+ </tr>
129
+ </tfoot>
130
+ <tbody>
131
+ <?php foreach($this->getItems() as $_item): ?>
132
+ <?php echo $this->getItemHtml($_item) ?>
133
+ <?php endforeach ?>
134
+ </tbody>
135
+ </table>
136
+ <script type="text/javascript">decorateTable('shopping-cart-table')</script>
137
+ </fieldset>
138
+ </form>
139
+ <div class="cart-collaterals">
140
+ <div class="col2-set">
141
+ <div class="col-1">
142
+ <?php echo $this->getChildHtml('crosssell') ?>
143
+ </div>
144
+ <div class="col-2">
145
+ <?php /* Extensions placeholder */ ?>
146
+ <?php echo $this->getChildHtml('checkout.cart.extra') ?>
147
+ <?php echo $this->getChildHtml('coupon') ?>
148
+ <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
149
+ </div>
150
+ </div>
151
+ <div class="totals">
152
+ <?php echo $this->getChildHtml('totals'); ?>
153
+ <?php if(!$this->hasError()): ?>
154
+ <ul class="checkout-types">
155
+ <?php foreach ($this->getMethods('methods') as $method): ?>
156
+ <?php if ($methodHtml = $this->getMethodHtml($method)): ?>
157
+ <li><?php echo $methodHtml; ?></li>
158
+ <?php endif; ?>
159
+ <?php endforeach; ?>
160
+ </ul>
161
+ <?php endif; ?>
162
+ </div>
163
+ </div>
164
+ </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) 2014 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->escapeHtml($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) 2014 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->escapeHtml($_item->getName()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($_item->getName()) ?>" /></a>
41
+ <div class="product-details">
42
+ <h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->escapeHtml($_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) 2014 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,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ $canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
31
+ ?>
32
+ <tr>
33
+ <td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
34
+ <td>
35
+ <h2 class="product-name">
36
+ <?php if ($this->hasProductUrl()):?>
37
+ <a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
38
+ <?php else: ?>
39
+ <?php echo $this->escapeHtml($this->getProductName()) ?>
40
+ <?php endif; ?>
41
+ </h2>
42
+ <?php if ($_options = $this->getOptionList()):?>
43
+ <dl class="item-options">
44
+ <?php foreach ($_options as $_option) : ?>
45
+ <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
46
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
47
+ <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
48
+ <?php if (isset($_formatedOptionValue['full_view'])): ?>
49
+ <div class="truncated_full_value">
50
+ <dl class="item-options">
51
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
52
+ <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
53
+ </dl>
54
+ </div>
55
+ <?php endif; ?>
56
+ </dd>
57
+ <?php endforeach; ?>
58
+ </dl>
59
+ <?php endif;?>
60
+ <?php if ($messages = $this->getMessages()): ?>
61
+ <?php foreach ($messages as $message): ?>
62
+ <p class="item-msg <?php echo $message['type'] ?>">* <?php echo $this->escapeHtml($message['text']) ?></p>
63
+ <?php endforeach; ?>
64
+ <?php endif; ?>
65
+ <?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
66
+ <?php if ($addInfoBlock): ?>
67
+ <?php echo $addInfoBlock->setItem($_item)->toHtml() ?>
68
+ <?php endif;?>
69
+ </td>
70
+ <td class="a-center">
71
+ <?php if ($isVisibleProduct): ?>
72
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
73
+ <?php endif ?>
74
+ </td>
75
+ <?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
76
+ <td class="a-center">
77
+ <?php if ($isVisibleProduct): ?>
78
+ <a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move'); ?></a>
79
+ <?php endif ?>
80
+ </td>
81
+ <?php endif ?>
82
+
83
+ <?php if ($canApplyMsrp): ?>
84
+ <td class="a-right"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
85
+ <span class="cart-price">
86
+ <span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
87
+ <?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
88
+ <a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
89
+ <script type="text/javascript">
90
+ Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
91
+ </script>
92
+ </span>
93
+ </td>
94
+ <?php else: ?>
95
+
96
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
97
+ <td class="a-right">
98
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
99
+ <span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
100
+ <?php else: ?>
101
+ <span class="cart-price">
102
+ <?php endif; ?>
103
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
104
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
105
+ <?php else: ?>
106
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
107
+ <?php endif; ?>
108
+
109
+ </span>
110
+
111
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
112
+
113
+ <div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
114
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
115
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
116
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
117
+ <?php endforeach; ?>
118
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
119
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
120
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
121
+ <?php endforeach; ?>
122
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
123
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
124
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
125
+ <?php endforeach; ?>
126
+ <?php endif; ?>
127
+ </div>
128
+
129
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
130
+ <div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
131
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
132
+ </div>
133
+ <?php endif; ?>
134
+ <?php endif; ?>
135
+ </td>
136
+ <?php endif; ?><!-- inclusive price starts here -->
137
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
138
+ <td>
139
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
140
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
141
+ <span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
142
+ <?php else: ?>
143
+ <span class="cart-price">
144
+ <?php endif; ?>
145
+
146
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
147
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
148
+ <?php else: ?>
149
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
150
+ <?php endif; ?>
151
+
152
+ </span>
153
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
154
+
155
+ <div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
156
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
157
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
158
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
159
+ <?php endforeach; ?>
160
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
161
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
162
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
163
+ <?php endforeach; ?>
164
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
165
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
166
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
167
+ <?php endforeach; ?>
168
+ <?php endif; ?>
169
+ </div>
170
+
171
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
172
+ <div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
173
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
174
+ </div>
175
+ <?php endif; ?>
176
+ <?php endif; ?>
177
+ </td>
178
+ <?php endif; ?>
179
+ <?php endif; ?>
180
+ <td class="a-center">
181
+ <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" />
182
+ </td>
183
+
184
+ <!--Sub total starts here -->
185
+ <?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
186
+ <td class="a-right">
187
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
188
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
189
+ <?php else: ?>
190
+ <span class="cart-price">
191
+ <?php endif; ?>
192
+
193
+ <?php if ($canApplyMsrp): ?>
194
+ <span class="cart-msrp-subtotal">--</span>
195
+ <?php else: ?>
196
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
197
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
198
+ <?php else: ?>
199
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
200
+ <?php endif; ?>
201
+ <?php endif; ?>
202
+
203
+ </span>
204
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
205
+
206
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
207
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
208
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
209
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
210
+ <?php endforeach; ?>
211
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
212
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
213
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
214
+ <?php endforeach; ?>
215
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
216
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
217
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
218
+ <?php endforeach; ?>
219
+ <?php endif; ?>
220
+ </div>
221
+
222
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
223
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
224
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
225
+ </div>
226
+ <?php endif; ?>
227
+ <?php endif; ?>
228
+ </td>
229
+ <?php endif; ?>
230
+ <?php if (($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
231
+ <td>
232
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
233
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
234
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
235
+ <?php else: ?>
236
+ <span class="cart-price">
237
+ <?php endif; ?>
238
+
239
+ <?php if ($canApplyMsrp): ?>
240
+ <span class="cart-msrp-subtotal">--</span>
241
+ <?php else: ?>
242
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
243
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
244
+ <?php else: ?>
245
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
246
+ <?php endif; ?>
247
+ <?php endif; ?>
248
+
249
+ </span>
250
+
251
+
252
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
253
+
254
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
255
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
256
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
257
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
258
+ <?php endforeach; ?>
259
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
260
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
261
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
262
+ <?php endforeach; ?>
263
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
264
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
265
+ <span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
266
+ <?php endforeach; ?>
267
+ <?php endif; ?>
268
+ </div>
269
+
270
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
271
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
272
+ <span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
273
+ </div>
274
+ <?php endif; ?>
275
+ <?php endif; ?>
276
+ </td>
277
+ <?php endif; ?>
278
+ <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>
279
+ </tr>
app/design/frontend/base/default/template/checkout/cart/noItems.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) 2014 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
+ <?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?>
33
+ <p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
34
+ <p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
35
+ <?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
36
+ </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) 2014 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->escapeHtml($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->escapeHtml($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
+ <a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist"><?php echo $this->__('Move'); ?></a>
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) 2014 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->escapeHtml($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->escapeHtml($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
+ <a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist"><?php echo $this->__('Move'); ?></a>
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,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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_Checkout_Block_Cart_Shipping */ ?>
28
+ <div class="shipping">
29
+ <h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
30
+ <div class="shipping-form">
31
+ <form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
32
+ <p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
33
+ <ul class="form-list">
34
+ <li>
35
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
36
+ <div class="input-box">
37
+ <?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
38
+ </div>
39
+ </li>
40
+ <?php //if($this->getStateActive()): ?>
41
+ <li>
42
+ <label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('State/Province') ?></label>
43
+ <div class="input-box">
44
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
45
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
46
+ </select>
47
+ <script type="text/javascript">
48
+ //<![CDATA[
49
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
50
+ //]]>
51
+ </script>
52
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
53
+ </div>
54
+ </li>
55
+ <?php //endif; ?>
56
+ <?php if($this->getCityActive()): ?>
57
+ <li>
58
+ <label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
59
+ <div class="input-box">
60
+ <input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" />
61
+ </div>
62
+ </li>
63
+ <?php endif; ?>
64
+ <li>
65
+ <label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
66
+ <div class="input-box">
67
+ <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->escapeHtml($this->getEstimatePostcode()) ?>" />
68
+ </div>
69
+ </li>
70
+ </ul>
71
+ <div class="buttons-set">
72
+ <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>
73
+ </div>
74
+ </form>
75
+ <script type="text/javascript">
76
+ //<![CDATA[
77
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
78
+ //]]>
79
+ </script>
80
+
81
+ <?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
82
+ <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
83
+ <dl class="sp-methods">
84
+ <?php foreach ($_shippingRateGroups as $code => $_rates): ?>
85
+ <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
86
+ <dd>
87
+ <ul>
88
+ <?php foreach ($_rates as $_rate): ?>
89
+ <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
90
+ <?php if ($_rate->getErrorMessage()): ?>
91
+ <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
92
+ <?php else: ?>
93
+ <input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
94
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
95
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
96
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
97
+ <?php echo $_excl; ?>
98
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
99
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
100
+ <?php endif; ?>
101
+ </label>
102
+ <?php endif ?>
103
+ </li>
104
+ <?php endforeach; ?>
105
+ </ul>
106
+ </dd>
107
+ <?php endforeach; ?>
108
+ </dl>
109
+ <div class="buttons-set">
110
+ <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>
111
+ </div>
112
+ </form>
113
+ <?php endif; ?>
114
+ <script type="text/javascript">
115
+ //<![CDATA[
116
+ var coShippingMethodForm = new VarienForm('shipping-zip-form');
117
+ var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
118
+
119
+ coShippingMethodForm.submit = function () {
120
+ var country = $F('country');
121
+ var optionalZip = false;
122
+
123
+ for (i=0; i < countriesWithOptionalZip.length; i++) {
124
+ if (countriesWithOptionalZip[i] == country) {
125
+ optionalZip = true;
126
+ }
127
+ }
128
+ if (optionalZip) {
129
+ $('postcode').removeClassName('required-entry');
130
+ }
131
+ else {
132
+ $('postcode').addClassName('required-entry');
133
+ }
134
+ return VarienForm.prototype.submit.bind(coShippingMethodForm)();
135
+ }
136
+ //]]>
137
+ </script>
138
+ </div>
139
+ </div>
app/design/frontend/base/default/template/checkout/cart/sidebar.phtml ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ <?php if ($this->canApplyMsrp()): ?>
50
+ <span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
51
+ <?php else: ?>
52
+ <span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
53
+ <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
54
+ <br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
55
+ <?php endif; ?>
56
+ <?php endif; ?>
57
+ </p>
58
+ </div>
59
+ <?php endif ?>
60
+ <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
61
+ <div class="actions">
62
+ <?php echo $this->getChildHtml('extra_actions') ?>
63
+ <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>
64
+ </div>
65
+ <?php endif ?>
66
+ <?php $_items = $this->getRecentItems() ?>
67
+ <?php if(count($_items)): ?>
68
+ <p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
69
+ <ol id="cart-sidebar" class="mini-products-list">
70
+ <?php foreach($_items as $_item): ?>
71
+ <?php echo $this->getItemHtml($_item) ?>
72
+ <?php endforeach; ?>
73
+ </ol>
74
+ <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
75
+ <?php else: ?>
76
+ <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
77
+ <?php endif ?>
78
+ </div>
79
+ </div>
80
+ <?php endif;?>
app/design/frontend/base/default/template/checkout/cart/sidebar/default.phtml ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ $canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
31
+ ?>
32
+ <li class="item">
33
+ <?php if ($this->hasProductUrl()): ?>
34
+ <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
35
+ <?php else: ?>
36
+ <span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
37
+ <?php endif; ?>
38
+ <div class="product-details">
39
+ <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>
40
+ <?php if ($isVisibleProduct): ?>
41
+ <a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item') ?>" class="btn-edit"><?php echo $this->__('Edit item')?></a>
42
+ <?php endif ?>
43
+ <p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p>
44
+ <strong><?php echo $this->getQty() ?></strong> x
45
+
46
+ <?php if ($canApplyMsrp): ?>
47
+
48
+ <span class="map-cart-sidebar-item"><?php echo $this->__('See price before order confirmation.'); ?></span>
49
+
50
+ <?php else: ?>
51
+
52
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
53
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
54
+ <?php echo $this->__('Excl. Tax'); ?>:
55
+ <?php endif; ?>
56
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
57
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
58
+ <?php else: ?>
59
+ <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
60
+ <?php endif; ?>
61
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
62
+ <br />
63
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
64
+ <small>
65
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
66
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
67
+ <?php endforeach; ?>
68
+ </small>
69
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
70
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
71
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
72
+ <?php endforeach; ?>
73
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
74
+ <small>
75
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
76
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
77
+ <?php endforeach; ?>
78
+ </small>
79
+ <?php endif; ?>
80
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
81
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
82
+ <?php endif; ?>
83
+ <?php endif; ?>
84
+ <?php endif; ?>
85
+
86
+
87
+
88
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
89
+ <?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
90
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
91
+ <br /><?php echo $this->__('Incl. Tax'); ?>:
92
+ <?php endif; ?>
93
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
94
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
95
+ <?php else: ?>
96
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
97
+ <?php endif; ?>
98
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
99
+ <br />
100
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
101
+ <small>
102
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
103
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
104
+ <?php endforeach; ?>
105
+ </small>
106
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
107
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
108
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
109
+ <?php endforeach; ?>
110
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
111
+ <small>
112
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
113
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
114
+ <?php endforeach; ?>
115
+ </small>
116
+ <?php endif; ?>
117
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
118
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
119
+ <?php endif; ?>
120
+ <?php endif; ?>
121
+ <?php endif; ?>
122
+
123
+ <?php endif; //Can apply MSRP ?>
124
+
125
+ <?php if ($_options = $this->getOptionList()):?>
126
+ <div class="truncated">
127
+ <div class="truncated_full_value">
128
+ <dl class="item-options">
129
+ <?php foreach ($_options as $_option) : ?>
130
+ <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
131
+ <dd>
132
+ <?php if (is_array($_option['value'])): ?>
133
+ <?php echo nl2br(implode("\n", $_option['value'])) ?>
134
+ <?php else: ?>
135
+ <?php echo $_option['value'] ?>
136
+ <?php endif; ?>
137
+ </dd>
138
+ <?php endforeach; ?>
139
+ </dl>
140
+ </div>
141
+ <a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
142
+ </div>
143
+ <?php endif; ?>
144
+ </div>
145
+ </li>
app/design/frontend/base/default/template/checkout/cart/totals.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) 2014 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
+ * @var $this Mage_Checkout_Block_Cart_Totals
33
+ */
34
+ ?>
35
+ <?php if ($this->canApplyMsrp()): ?>
36
+ <div class="cart-msrp-totals"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></div>
37
+ <?php else: ?>
38
+ <table id="shopping-cart-totals-table">
39
+ <col />
40
+ <col width="1" />
41
+ <tfoot>
42
+ <?php echo $this->renderTotals('footer'); ?>
43
+ </tfoot>
44
+ <tbody>
45
+ <?php echo $this->renderTotals(); ?>
46
+ </tbody>
47
+ </table>
48
+ <?php endif; ?>
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) 2014 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) 2014 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 data-action="add-new-customer-address" 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->escapeHtml($_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" data-action="checkout-continue-shipping" 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) 2014 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->escapeHtml($_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->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_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) 2014 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->escapeHtml($_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 $this->escapeHtml($_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 id="payment-continue" 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) 2014 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) 2014 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->escapeHtml($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->escapeHtml($_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->escapeHtml($_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) 2014 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,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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_Checkout_Block_Multishipping_Overview */ ?>
28
+ <div class="multiple-checkout">
29
+ <div class="page-title">
30
+ <h1><?php echo $this->__('Review Order') ?></h1>
31
+ </div>
32
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
+ <form id="review-order-form" action="<?php echo $this->getPostActionUrl() ?>" method="post" onsubmit="return showLoader();">
34
+ <?php echo $this->getBlockHtml('formkey'); ?>
35
+ <div class="col2-set">
36
+ <h2 class="legend"><?php echo $this->__('Billing Information') ?></h2>
37
+ <div class="col-1">
38
+ <div class="box">
39
+ <?php $_address=$this->getBillingAddress() ?>
40
+ <div class="box-title">
41
+ <h3><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
42
+ </div>
43
+ <div class="box-content">
44
+ <address>
45
+ <?php echo $_address->format('html') ?>
46
+ </address>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="col-2">
51
+ <div class="box">
52
+ <div class="box-title">
53
+ <h3><?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo $this->__('Change') ?></a></h3>
54
+ </div>
55
+ <div class="box-content">
56
+ <input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" />
57
+ <input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" />
58
+ <?php echo $this->getPaymentHtml() ?>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
64
+ <div class="col2-set">
65
+ <h2 class="legend"><?php echo $this->__('Shipping Information') ?></h2>
66
+ <?php foreach ($this->getShippingAddresses() as $_index => $_address): ?>
67
+ <h3 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getShippingAddressCount()) ?></h3>
68
+ <div class="col-1 col-narrow">
69
+ <div class="box">
70
+ <div class="box-title">
71
+ <h4><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h4>
72
+ </div>
73
+ <div class="box-content">
74
+ <address>
75
+ <?php echo $_address->format('html') ?>
76
+ </address>
77
+ </div>
78
+ </div>
79
+ <div class="box">
80
+ <div class="box-title">
81
+ <h4><?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo $this->__('Change') ?></a></h4>
82
+ </div>
83
+ <div class="box-content">
84
+ <?php if($_rate=$this->getShippingAddressRate($_address)): ?>
85
+ <p>
86
+ <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> - <?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
87
+ <?php $_excl = $this->getShippingPriceExclTax($_address); ?>
88
+ <?php $_incl = $this->getShippingPriceInclTax($_address); ?>
89
+ <?php echo $_excl; ?>
90
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
91
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
92
+ <?php endif; ?>
93
+ </p>
94
+ <?php endif; ?>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <div class="col-2 col-wide">
99
+ <h4><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h4>
100
+ <table class="data-table" id="overview-table-<?php echo $_address->getId() ?>">
101
+ <col />
102
+ <col width="1" />
103
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
104
+ <col width="1" />
105
+ <?php endif; ?>
106
+ <col width="1" />
107
+ <col width="1" />
108
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
109
+ <col width="1" />
110
+ <?php endif; ?>
111
+ <thead>
112
+ <tr>
113
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
114
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
115
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
116
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
117
+ </tr>
118
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
119
+ <tr>
120
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
121
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
122
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
123
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
124
+ </tr>
125
+ <?php endif; ?>
126
+ </thead>
127
+ <tfoot>
128
+ <?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?>
129
+ </tfoot>
130
+ <tbody>
131
+ <?php foreach ($this->getShippingAddressItems($_address) as $_item): ?>
132
+ <?php echo $this->getRowItemHtml($_item); ?>
133
+ <?php endforeach; ?>
134
+ </tbody>
135
+ </table>
136
+ <script type="text/javascript">decorateTable('overview-table-<?php echo $_address->getId() ?>')</script>
137
+ </div>
138
+ <?php if($this->getShippingAddressCount()!=$_index+1): ?>
139
+ <div class="divider"></div>
140
+ <?php endif; ?>
141
+ <?php endforeach; ?>
142
+ </div>
143
+ <?php if ($this->getQuote()->hasVirtualItems()): ?>
144
+ <div class="col2-set">
145
+ <h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
146
+ <div class="col-1 col-narrow"></div>
147
+ <div class="col-2 col-wide">
148
+ <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
149
+ <?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
150
+ <table class="data-table" id="virtual-overview-table">
151
+ <col />
152
+ <col width="1" />
153
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
154
+ <col width="1" />
155
+ <?php endif; ?>
156
+ <col width="1" />
157
+ <col width="1" />
158
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
159
+ <col width="70" />
160
+ <?php endif; ?>
161
+ <thead>
162
+ <tr>
163
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
164
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
165
+ <th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
166
+ <th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
167
+ </tr>
168
+ <?php if ($this->helper('tax')->displayCartBothPrices()): ?>
169
+ <tr>
170
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
171
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
172
+ <th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
173
+ <th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
174
+ </tr>
175
+ <?php endif; ?>
176
+ </thead>
177
+ <tfoot>
178
+ <?php echo $this->renderTotals($this->getBillinAddressTotals()); ?>
179
+ </tfoot>
180
+ <tbody>
181
+ <?php foreach ($this->getVirtualItems() as $_item): ?>
182
+ <?php echo $this->getRowItemHtml($_item); ?>
183
+ <?php endforeach; ?>
184
+ </tbody>
185
+ </table>
186
+ <script type="text/javascript">decorateTable('virtual-overview-table')</script>
187
+ </div>
188
+ </div>
189
+ <?php endif; ?>
190
+
191
+ <?php echo $this->getChildHtml('items_after'); ?>
192
+
193
+ <div id="checkout-review-submit">
194
+ <?php echo $this->getChildHtml('agreements') ?>
195
+ <div class="place-order">
196
+ <div class="grand-total">
197
+ <div class="inner">
198
+ <big><?php echo $this->__('Grand Total:') ?> <?php echo $this->helper('checkout')->formatPrice($this->getTotal()) ?></big>
199
+ <div id="review-buttons-container">
200
+ <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>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ <span class="please-wait" id="review-please-wait" style="display:none;">
205
+ <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...') ?>
206
+ </span>
207
+ </div>
208
+ </div>
209
+ <div class="buttons-set">
210
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Billing Information') ?></a></p>
211
+ </div>
212
+ </form>
213
+ <script type="text/javascript">
214
+ //<![CDATA[
215
+ var submitted = false;
216
+
217
+ function showLoader()
218
+ {
219
+ if (submitted) {
220
+ return false;
221
+ }
222
+ if ($('checkout-agreements')) {
223
+ var checkboxes = $$('#checkout-agreements input');
224
+ for (var i=0, l=checkboxes.length; i<l; i++) {
225
+ if (!checkboxes[i].checked) {
226
+ alert("<?php echo $this->__('Please agree to all Terms and Conditions before placing the orders.')?>");
227
+ return false;
228
+ }
229
+ }
230
+ }
231
+
232
+ submitted = true;
233
+ var step='review';
234
+ Element.show(step+'-please-wait');
235
+ $(step+'-buttons-container').setStyle({opacity:.5});
236
+ $(step+'-buttons-container').descendants().each(function(s) {
237
+ s.disabled = true;
238
+ });
239
+ return true;
240
+ }
241
+ //]]>
242
+ </script>
243
+ </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) 2014 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'],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'],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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></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'],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'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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 + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></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,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ * @var $this Mage_Checkout_Block_Multishipping_Shipping
33
+ */
34
+ ?>
35
+ <div class="multiple-checkout">
36
+ <div class="page-title">
37
+ <h1><?php echo $this->__('Select Shipping Method') ?></h1>
38
+ </div>
39
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
40
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form">
41
+ <?php foreach ($this->getAddresses() as $_index => $_address): ?>
42
+ <div class="col2-set">
43
+ <h2 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getAddressCount()) ?></h2>
44
+ <div class="col-1 col-narrow">
45
+ <div class="box">
46
+ <div class="box-title">
47
+ <h3><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressEditUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
48
+ </div>
49
+ <div class="box-content">
50
+ <address><?php echo $_address->format('html') ?></address>
51
+ </div>
52
+ </div>
53
+ <div class="box box-sp-methods">
54
+ <div class="pointer"></div>
55
+ <div class="box-title">
56
+ <h3><?php echo $this->__('Shipping Method') ?></h3>
57
+ </div>
58
+ <div class="box-content">
59
+ <?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?>
60
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
61
+ <?php else: ?>
62
+ <dl class="sp-methods">
63
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
64
+ <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
65
+ <dd>
66
+ <ul>
67
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
68
+ <li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"' ?>>
69
+ <?php if ($_rate->getErrorMessage()): ?>
70
+ <?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
71
+ <?php else: ?>
72
+ <?php if ($_sole) : ?>
73
+ <span class="no-display"><input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" checked="checked"/></span>
74
+ <?php else: ?>
75
+ <input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_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" />
76
+ <?php endif; ?>
77
+ <label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
78
+ <?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
79
+ <?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?>
80
+ <?php echo $_excl; ?>
81
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
82
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
83
+ <?php endif; ?>
84
+ </label>
85
+ <?php endif ?>
86
+ </li>
87
+ <?php endforeach; ?>
88
+ </ul>
89
+ </dd>
90
+ <?php endforeach; ?>
91
+ </dl>
92
+ <?php endif; ?>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ <div class="col-2 col-wide">
97
+ <?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?>
98
+ <h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getItemsEditUrl($_address) ?>"><?php echo $this->__('Edit Items') ?></a></h3>
99
+ <table class="data-table" id="shipping-table-<?php echo $_address->getId() ?>">
100
+ <col />
101
+ <col width="1" />
102
+ <thead>
103
+ <tr>
104
+ <th><?php echo $this->__('Product Name') ?></th>
105
+ <th class="a-center"><?php echo $this->__('Qty') ?></th>
106
+ </tr>
107
+ </thead>
108
+ <tbody>
109
+ <?php foreach ($this->getAddressItems($_address) as $_item): ?>
110
+ <tr>
111
+ <td>
112
+ <?php echo $this->getItemHtml($_item->getQuoteItem()) ?>
113
+ </td>
114
+ <td class="a-center"><?php echo $_item->getQty() ?></td>
115
+ </tr>
116
+ <?php endforeach; ?>
117
+ </tbody>
118
+ </table>
119
+ <script type="text/javascript">decorateTable('shipping-table-<?php echo $_address->getId() ?>')</script>
120
+ <?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?>
121
+ </div>
122
+ </div>
123
+ <?php endforeach; ?>
124
+ <?php echo $this->getChildHtml('checkout_billing_items') ?>
125
+ <div class="buttons-set">
126
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Select Addresses') ?></a></p>
127
+ <button data-action="checkout-continue-billing" type="submit" title="<?php echo $this->__('Continue to Billing Information') ?>" class="button"><span><span><?php echo $this->__('Continue to Billing Information') ?></span></span></button>
128
+ </div>
129
+ </form>
130
+ </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) 2014 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) 2014 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 data-role="page-title"><?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 data-role="order-numbers">
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,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) 2014 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
+ <ol class="opc" id="checkoutSteps">
33
+ <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
34
+ <?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
35
+ <li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">
36
+ <div class="step-title">
37
+ <span class="number"><?php echo $i ?></span>
38
+ <h2><?php echo $_stepInfo['label'] ?></h2>
39
+ <a href="#"><?php echo $this->__('Edit') ?></a>
40
+ </div>
41
+ <div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;">
42
+ <?php echo $this->getChildHtml($_stepId) ?>
43
+ </div>
44
+ </li>
45
+ <?php endforeach ?>
46
+ </ol>
47
+ <script type="text/javascript">
48
+ //<![CDATA[
49
+ var accordion = new Accordion('checkoutSteps', '.step-title', true);
50
+ <?php if($this->getActiveStep()): ?>
51
+ accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
52
+ <?php endif ?>
53
+ var checkout = new Checkout(accordion,{
54
+ progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
55
+ review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
56
+ saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
57
+ failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
58
+ );
59
+ //]]>
60
+ </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) 2014 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->escapeHtml($_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->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_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,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->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->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
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->escapeHtml($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
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
60
+ <li class="wide">
61
+ <label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
62
+ <div class="input-box">
63
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
64
+ </div>
65
+ </li>
66
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
67
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
68
+ <li class="wide">
69
+ <div class="input-box">
70
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
71
+ </div>
72
+ </li>
73
+ <?php endfor; ?>
74
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
75
+ <li class="wide">
76
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
77
+ <div class="input-box">
78
+ <input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
79
+ </div>
80
+ </li>
81
+ <?php endif; ?>
82
+ <li class="fields">
83
+ <div class="field">
84
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
85
+ <div class="input-box">
86
+ <input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
87
+ </div>
88
+ </div>
89
+ <div class="field">
90
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
91
+ <div class="input-box">
92
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
93
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
94
+ </select>
95
+ <script type="text/javascript">
96
+ //<![CDATA[
97
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
98
+ //]]>
99
+ </script>
100
+ <input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
107
+ <div class="input-box">
108
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
113
+ <div class="input-box">
114
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
115
+ </div>
116
+ </div>
117
+ </li>
118
+ <li class="fields">
119
+ <div class="field">
120
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
121
+ <div class="input-box">
122
+ <input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
123
+ </div>
124
+ </div>
125
+ <div class="field">
126
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
127
+ <div class="input-box">
128
+ <input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
129
+ </div>
130
+ </div>
131
+ </li>
132
+ <?php if(!$this->isCustomerLoggedIn()): ?>
133
+
134
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
135
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
136
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
137
+ <li class="fields">
138
+ <?php if ($_dob->isEnabled()): ?>
139
+ <div class="field">
140
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
141
+ </div>
142
+ <?php endif; ?>
143
+ <?php if ($_gender->isEnabled()): ?>
144
+ <div class="field">
145
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
146
+ </div>
147
+ <?php endif ?>
148
+ </li>
149
+ <?php endif ?>
150
+
151
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
152
+ <?php if ($_taxvat->isEnabled()): ?>
153
+ <li>
154
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
155
+ </li>
156
+ <?php endif ?>
157
+
158
+ <li class="fields" id="register-customer-password">
159
+ <div class="field">
160
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
161
+ <div class="input-box">
162
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
163
+ </div>
164
+ </div>
165
+ <div class="field">
166
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
167
+ <div class="input-box">
168
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
169
+ </div>
170
+ </div>
171
+ </li>
172
+ <?php endif; ?>
173
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
174
+ <li class="control">
175
+ <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>
176
+ </li>
177
+ <?php else:?>
178
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
179
+ <?php endif; ?>
180
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
181
+ </ul>
182
+ </fieldset>
183
+ </li>
184
+ <?php /* Extensions placeholder */ ?>
185
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
186
+ <?php if ($this->canShip()): ?>
187
+ <li class="control">
188
+ <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>
189
+ <li class="control">
190
+ <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>
191
+ </li>
192
+ <?php endif; ?>
193
+ </ul>
194
+ <?php if (!$this->canShip()): ?>
195
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
196
+ <?php endif; ?>
197
+ <div class="buttons-set" id="billing-buttons-container">
198
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
199
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
200
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
201
+ <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...') ?>
202
+ </span>
203
+ </div>
204
+ </fieldset>
205
+ </form>
206
+ <script type="text/javascript">
207
+ //<![CDATA[
208
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
209
+ var billingForm = new VarienForm('co-billing-form');
210
+
211
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
212
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
213
+
214
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
215
+ //]]>
216
+ </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) 2014 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) 2014 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,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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 /* Extensions placeholder */ ?>
28
+ <?php echo $this->getChildHtml('checkout.onepage.login.extra')?>
29
+ <div class="col2-set">
30
+ <?php echo $this->getChildHtml('login_before')?>
31
+ <div class="col-1">
32
+ <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>
33
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
34
+ <p><?php echo $this->__('Register with us for future convenience:') ?></p>
35
+ <?php else: ?>
36
+ <p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
37
+ <?php echo $this->__('Register with us for future convenience:') ?></p>
38
+ <ul>
39
+ <li><?php echo $this->__('Fast and easy check out') ?></li>
40
+ <li><?php echo $this->__('Easy access to your order history and status') ?></li>
41
+ </ul>
42
+ <?php endif; ?>
43
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
44
+ <ul class="form-list">
45
+ <?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
46
+ <li class="control">
47
+ <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>
48
+ </li>
49
+ <?php endif; ?>
50
+ <li class="control">
51
+ <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>
52
+ </li>
53
+ </ul>
54
+ <h4><?php echo $this->__('Register and save time!') ?></h4>
55
+ <p><?php echo $this->__('Register with us for future convenience:') ?></p>
56
+ <ul class="ul">
57
+ <li><?php echo $this->__('Fast and easy check out') ?></li>
58
+ <li><?php echo $this->__('Easy access to your order history and status') ?></li>
59
+ </ul>
60
+ <?php else: ?>
61
+ <input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
62
+ <?php endif; ?>
63
+ </div>
64
+ <div class="col-2">
65
+ <h3><?php echo $this->__('Login') ?></h3>
66
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
67
+ <form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
68
+ <fieldset>
69
+ <?php echo $this->getBlockHtml('formkey'); ?>
70
+ <h4><?php echo $this->__('Already registered?') ?></h4>
71
+ <p><?php echo $this->__('Please log in below:') ?></p>
72
+ <ul class="form-list">
73
+ <li>
74
+ <label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
75
+ <div class="input-box">
76
+ <input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
77
+ </div>
78
+ </li>
79
+ <li>
80
+ <label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
81
+ <div class="input-box">
82
+ <input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
83
+ </div>
84
+ </li>
85
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
86
+ </ul>
87
+ </fieldset>
88
+ </form>
89
+ </div>
90
+ </div>
91
+ <div class="col2-set">
92
+ <div class="col-1">
93
+ <div class="buttons-set">
94
+ <p class="required">&nbsp;</p>
95
+ <button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
96
+ </div>
97
+ </div>
98
+ <div class="col-2">
99
+ <div class="buttons-set">
100
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
101
+ <a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
102
+ <button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ <script type="text/javascript">
107
+ //<![CDATA[
108
+ var loginForm = new VarienForm('login-form', true);
109
+ $('login-email').observe('keypress', bindLoginPost);
110
+ $('login-password').observe('keypress', bindLoginPost);
111
+ function bindLoginPost(evt){
112
+ if (evt.keyCode == Event.KEY_RETURN) {
113
+ loginForm.submit();
114
+ }
115
+ }
116
+ function onepageLogin(button)
117
+ {
118
+ if(loginForm.validator && loginForm.validator.validate()){
119
+ button.disabled = true;
120
+ loginForm.submit();
121
+ }
122
+ }
123
+ //]]>
124
+ </script>
app/design/frontend/base/default/template/checkout/onepage/payment.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) 2014 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 quoteBaseGrandTotal = <?php echo (float)$this->getQuoteBaseGrandTotal(); ?>;
30
+ var checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
31
+ var payment = new Payment('co-payment-form', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
32
+ var lastPrice;
33
+ //]]>
34
+ </script>
35
+ <form action="" id="co-payment-form">
36
+ <fieldset>
37
+ <?php echo $this->getChildHtml('methods') ?>
38
+ </fieldset>
39
+ </form>
40
+ <div class="tool-tip" id="payment-tool-tip" style="display:none;">
41
+ <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
42
+ <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>
43
+ </div>
44
+ <div class="buttons-set" id="payment-buttons-container">
45
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
46
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
47
+ <button type="button" class="button" onclick="payment.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
48
+ <span class="please-wait" id="payment-please-wait" style="display:none;">
49
+ <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...') ?>
50
+ </span>
51
+ </div>
52
+ <script type="text/javascript">
53
+ //<![CDATA[
54
+ function toggleToolTip(event){
55
+ if($('payment-tool-tip')){
56
+ $('payment-tool-tip').setStyle({
57
+ top: (Event.pointerY(event)-560)+'px'//,
58
+ //left: (Event.pointerX(event)+100)+'px'
59
+ })
60
+ $('payment-tool-tip').toggle();
61
+ }
62
+ Event.stop(event);
63
+ }
64
+ if($('payment-tool-tip-close')){
65
+ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
66
+ }
67
+ //]]>
68
+ </script>
69
+ <script type="text/javascript">
70
+ //<![CDATA[
71
+ payment.currentMethod = "<?php echo $this->getChild('methods')->getSelectedMethodCode() ?>";
72
+ //]]>
73
+ </script>
app/design/frontend/base/default/template/checkout/onepage/payment/info.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) 2014 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
+ <dl class="sp-methods" id="checkout-payment-method-load">
28
+ <!-- Content dynamically loaded. Content from the methods.phtml is loaded during the ajax call -->
29
+ </dl>
app/design/frontend/base/default/template/checkout/onepage/payment/methods.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) 2014 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
+ * @var $this Mage_Checkout_Block_Onepage_Payment_Methods
32
+ */
33
+ ?>
34
+
35
+ <?php
36
+ $methods = $this->getMethods();
37
+ $oneMethod = count($methods) <= 1;
38
+ ?>
39
+ <?php if (empty($methods)): ?>
40
+ <dt>
41
+ <?php echo $this->__('No Payment Methods') ?>
42
+ </dt>
43
+ <?php else:
44
+ foreach ($methods as $_method):
45
+ $_code = $_method->getCode();
46
+ ?>
47
+ <dt>
48
+ <?php if(!$oneMethod): ?>
49
+ <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
50
+ <?php else: ?>
51
+ <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>
52
+ <?php $oneMethod = $_code; ?>
53
+ <?php endif; ?>
54
+ <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
55
+ </dt>
56
+ <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
57
+ <dd>
58
+ <?php echo $html; ?>
59
+ </dd>
60
+ <?php endif; ?>
61
+ <?php endforeach;
62
+ endif;
63
+ ?>
64
+ <?php echo $this->getChildChildHtml('additional'); ?>
65
+ <script type="text/javascript">
66
+ //<![CDATA[
67
+ <?php echo $this->getChildChildHtml('scripts'); ?>
68
+ payment.init();
69
+ <?php if (is_string($oneMethod)): ?>
70
+ payment.switchMethod('<?php echo $oneMethod ?>');
71
+ <?php endif; ?>
72
+ //]]>
73
+ </script>
app/design/frontend/base/default/template/checkout/onepage/progress.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) 2014 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
+ <div id="billing-progress-opcheckout">
35
+ <?php echo $this->getChildHtml('billing.progress') ?>
36
+ </div>
37
+ <?php endif; ?>
38
+
39
+ <?php if ($this->getCheckout()->getStepData('shipping', 'is_show')): ?>
40
+ <div id="shipping-progress-opcheckout">
41
+ <?php echo $this->getChildHtml('shipping.progress') ?>
42
+ </div>
43
+ <?php endif; ?>
44
+
45
+ <?php if ($this->getCheckout()->getStepData('shipping_method', 'is_show')): ?>
46
+ <div id="shipping_method-progress-opcheckout">
47
+ <?php echo $this->getChildHtml('shippingmethod.progress') ?>
48
+ </div>
49
+ <?php endif; ?>
50
+
51
+ <?php if ($this->getCheckout()->getStepData('payment', 'is_show')): ?>
52
+ <div id="payment-progress-opcheckout">
53
+ <?php echo $this->getChildHtml('payment.progress') ?>
54
+ </div>
55
+ <?php endif; ?>
56
+ </dl>
57
+ </div>
58
+ </div>
59
+
app/design/frontend/base/default/template/checkout/onepage/progress/billing.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) 2014 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->getCheckout()->getStepData('billing', 'complete')): ?>
28
+ <dt class="complete">
29
+ <?php echo $this->__('Billing Address') ?><span class="changelink"> <span class="separator">|</span> <a
30
+ href="#billing"
31
+ onclick="checkout.changeSection('opc-billing'); return false;"><?php echo $this->__('Change') ?></a></span>
32
+ </dt>
33
+ <dd class="complete">
34
+ <address><?php echo $this->getBilling()->format('html') ?></address>
35
+ </dd>
36
+ <?php else: ?>
37
+ <dt>
38
+ <?php echo $this->__('Billing Address') ?>
39
+ </dt>
40
+ <?php endif; ?>
app/design/frontend/base/default/template/checkout/onepage/progress/payment.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) 2014 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->getCheckout()->getStepData('payment', 'complete')): ?>
28
+ <dt class="complete">
29
+ <?php echo $this->__('Payment Method') ?><span class="changelink"> <span class="separator">|</span> <a
30
+ href="#payment"
31
+ onclick="checkout.changeSection('opc-payment'); return false;"><?php echo $this->__('Change') ?></a></span>
32
+ </dt>
33
+ <dd class="complete">
34
+ <?php echo $this->getPaymentHtml() ?>
35
+ </dd>
36
+ <?php else: ?>
37
+ <dt>
38
+ <?php echo $this->__('Payment Method') ?>
39
+ </dt>
40
+ <?php endif; ?>
41
+
app/design/frontend/base/default/template/checkout/onepage/progress/shipping.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->getCheckout()->getStepData('shipping', 'complete')): ?>
28
+ <?php $completeClass = $this->getCheckout()->getStepData('shipping', 'complete') ? 'complete' : ''; ?>
29
+ <dt class="<?php echo $completeClass ?>">
30
+ <?php echo $this->__('Shipping Address') ?> <span class="changelink"><span class="separator">|</span> <a
31
+ href="#payment"
32
+ onclick="checkout.changeSection('opc-shipping');return false;"><?php echo $this->__('Change') ?></a></span>
33
+ </dt>
34
+ <dd class="<?php echo $completeClass ?>">
35
+ <?php if ($this->getCheckout()->getStepData('shipping', 'complete')): ?>
36
+ <address><?php echo $this->getShipping()->format('html') ?></address>
37
+ <?php endif; ?>
38
+ </dd>
39
+ <?php else: ?>
40
+ <dt>
41
+ <?php echo $this->__('Shipping Address') ?>
42
+ </dt>
43
+ <?php endif; ?>
44
+
app/design/frontend/base/default/template/checkout/onepage/progress/shipping_method.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) 2014 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->getCheckout()->getStepData('shipping_method', 'complete')): ?>
28
+ <dt class="complete">
29
+ <?php echo $this->__('Shipping Method') ?> <span class="changelink"><span class="separator">|</span> <a
30
+ href="#shipping_method"
31
+ onclick="checkout.changeSection('opc-shipping_method'); return false;"><?php echo $this->__('Change') ?></a></span>
32
+ </dt>
33
+ <dd class="complete">
34
+ <?php if ($this->getShippingMethod()): ?>
35
+ <?php echo $this->getShippingDescription() ?>
36
+
37
+ <?php $_excl = $this->getShippingPriceExclTax(); ?>
38
+ <?php $_incl = $this->getShippingPriceInclTax(); ?>
39
+ <?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
40
+ <?php echo $_incl; ?>
41
+ <?php else: ?>
42
+ <?php echo $_excl; ?>
43
+ <?php endif; ?>
44
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
45
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
46
+ <?php endif; ?>
47
+
48
+ <?php else: ?>
49
+ <?php echo $this->__('Shipping method has not been selected yet') ?>
50
+ <?php endif; ?>
51
+ </dd>
52
+ <?php else: ?>
53
+ <dt>
54
+ <?php echo $this->__('Shipping Method') ?>
55
+ </dt>
56
+ <?php endif; ?>
57
+
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) 2014 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
+ <!-- Content loaded dynamically -->
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) 2014 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) 2014 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', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?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,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->escapeHtml($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->escapeHtml($_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->escapeHtml($_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'],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'],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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
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_incl_tax'],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 + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></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
+ <!-- sub total starts here -->
147
+ <?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
148
+ <td class="a-right">
149
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
150
+ <span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
151
+ <?php else: ?>
152
+ <span class="cart-price">
153
+ <?php endif; ?>
154
+
155
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
156
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
157
+ <?php else: ?>
158
+ <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
159
+ <?php endif; ?>
160
+
161
+ </span>
162
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
163
+
164
+ <div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
165
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
166
+ <small>
167
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
168
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
169
+ <?php endforeach; ?>
170
+ </small>
171
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
172
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
173
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
174
+ <?php endforeach; ?>
175
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
176
+ <small>
177
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
178
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
179
+ <?php endforeach; ?>
180
+ </small>
181
+ <?php endif; ?>
182
+ </div>
183
+
184
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
185
+ <div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
186
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
187
+ </div>
188
+ <?php endif; ?>
189
+ <?php endif; ?>
190
+ </td>
191
+ <?php endif; ?>
192
+ <?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
193
+ <td>
194
+ <?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
195
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
196
+ <span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
197
+ <?php else: ?>
198
+ <span class="cart-price">
199
+ <?php endif; ?>
200
+
201
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
202
+ <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
203
+ <?php else: ?>
204
+ <?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
205
+ <?php endif; ?>
206
+
207
+ </span>
208
+
209
+
210
+ <?php if (Mage::helper('weee')->getApplied($_item)): ?>
211
+
212
+ <div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
213
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
214
+ <small>
215
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
216
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
217
+ <?php endforeach; ?>
218
+ </small>
219
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
220
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
221
+ <span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
222
+ <?php endforeach; ?>
223
+ <?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
224
+ <small>
225
+ <?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
226
+ <span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
227
+ <?php endforeach; ?>
228
+ </small>
229
+ <?php endif; ?>
230
+ </div>
231
+
232
+ <?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
233
+ <div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
234
+ <span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
235
+ </div>
236
+ <?php endif; ?>
237
+ <?php endif; ?>
238
+ </td>
239
+ <?php endif; ?>
240
+ </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) 2014 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,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
47
+ </div>
48
+ </div>
49
+ </li>
50
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
51
+ <li class="wide">
52
+ <label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
53
+ <div class="input-box">
54
+ <input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
55
+ </div>
56
+ </li>
57
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
58
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
59
+ <li class="wide">
60
+ <div class="input-box">
61
+ <input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
62
+ </div>
63
+ </li>
64
+ <?php endfor; ?>
65
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
66
+ <li class="wide">
67
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
68
+ <div class="input-box">
69
+ <input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
70
+ </div>
71
+ </li>
72
+ <?php endif; ?>
73
+ <li class="fields">
74
+ <div class="field">
75
+ <label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
76
+ <div class="input-box">
77
+ <input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
78
+ </div>
79
+ </div>
80
+ <div class="field">
81
+ <label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
82
+ <div class="input-box">
83
+ <select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
84
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
85
+ </select>
86
+ <script type="text/javascript">
87
+ //<![CDATA[
88
+ $('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
89
+ //]]>
90
+ </script>
91
+ <input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
92
+ </div>
93
+ </div>
94
+ </li>
95
+ <li class="fields">
96
+ <div class="field">
97
+ <label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
98
+ <div class="input-box">
99
+ <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
100
+ </div>
101
+ </div>
102
+ <div class="field">
103
+ <label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
104
+ <div class="input-box">
105
+ <?php echo $this->getCountryHtmlSelect('shipping') ?>
106
+ </div>
107
+ </div>
108
+ </li>
109
+ <li class="fields">
110
+ <div class="field">
111
+ <label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
112
+ <div class="input-box">
113
+ <input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
114
+ </div>
115
+ </div>
116
+ <div class="field">
117
+ <label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
118
+ <div class="input-box">
119
+ <input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
120
+ </div>
121
+ </div>
122
+ </li>
123
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
124
+ <li class="control">
125
+ <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>
126
+ <?php else:?>
127
+ <li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
128
+ <?php endif;?>
129
+ </ul>
130
+ </fieldset>
131
+ </li>
132
+ <li class="control">
133
+ <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>
134
+ </li>
135
+ </ul>
136
+ <div class="buttons-set" id="shipping-buttons-container">
137
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
138
+ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
139
+ <button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
140
+ <span id="shipping-please-wait" class="please-wait" style="display:none;">
141
+ <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...') ?>
142
+ </span>
143
+ </div>
144
+ </form>
145
+ <script type="text/javascript">
146
+ //<![CDATA[
147
+ var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
148
+ '<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
149
+ var shippingForm = new VarienForm('co-shipping-form');
150
+ shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
151
+ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
152
+ $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
153
+
154
+ var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
155
+ //]]>
156
+ </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) 2014 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
+ <!-- Content loaded dynamically -->
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) 2014 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,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
28
+ <?php $_shippingRateGroups = $this->getShippingRates(); ?>
29
+ <?php if (!$_shippingRateGroups): ?>
30
+ <p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
31
+ <?php else: ?>
32
+ <dl class="sp-methods">
33
+ <?php $shippingCodePrice = array(); ?>
34
+ <?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
35
+ <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
36
+ <dd>
37
+ <ul>
38
+ <?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
39
+ <?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
40
+ <li>
41
+ <?php if ($_rate->getErrorMessage()): ?>
42
+ <ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
43
+ <?php else: ?>
44
+ <?php if ($_sole) : ?>
45
+ <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>
46
+ <?php else: ?>
47
+ <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"/>
48
+
49
+ <?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
53
+ //]]>
54
+ </script>
55
+ <?php endif; ?>
56
+
57
+ <?php endif; ?>
58
+ <label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
59
+ <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
60
+ <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
61
+ <?php echo $_excl; ?>
62
+ <?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
63
+ (<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
64
+ <?php endif; ?>
65
+ </label>
66
+ <?php endif ?>
67
+ </li>
68
+ <?php endforeach; ?>
69
+ </ul>
70
+ </dd>
71
+ <?php endforeach; ?>
72
+ </dl>
73
+ <script type="text/javascript">
74
+ //<![CDATA[
75
+ <?php if (!empty($shippingCodePrice)): ?>
76
+ var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
77
+ <?php endif; ?>
78
+
79
+ $$('input[type="radio"][name="shipping_method"]').each(function(el){
80
+ Event.observe(el, 'click', function(){
81
+ if (el.checked == true) {
82
+ var getShippingCode = el.getValue();
83
+ <?php if (!empty($shippingCodePrice)): ?>
84
+ var newPrice = shippingCodePrice[getShippingCode];
85
+ if (!lastPrice) {
86
+ lastPrice = newPrice;
87
+ quoteBaseGrandTotal += newPrice;
88
+ }
89
+ if (newPrice != lastPrice) {
90
+ quoteBaseGrandTotal += (newPrice-lastPrice);
91
+ lastPrice = newPrice;
92
+ }
93
+ <?php endif; ?>
94
+ checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
95
+ return false;
96
+ }
97
+ });
98
+ });
99
+ //]]>
100
+ </script>
101
+ <?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) 2014 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) 2014 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
+ <td 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->escapeHtml($this->getTotal()->getTitle()); ?>
31
+ <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
32
+ </td>
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) 2014 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) 2014 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 $this->escapeHtml($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) 2014 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) 2014 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) 2014 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) 2014 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) 2014 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) 2014 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->escapeHtml($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) 2014 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->escapeHtml($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) 2014 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) 2014 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->escapeHtml($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->escapeHtml($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) 2014 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) 2014 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->escapeHtml($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) 2014 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,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) 2014 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 /* Extensions placeholder */ ?>
39
+ <?php echo $this->getChildHtml('customer.account.dashboard.extra') ?>
40
+ <?php echo $this->getChildHtml('info') ?>
41
+ <?php echo $this->getChildHtml('address') ?>
42
+ </div>
43
+ <?php echo $this->getChildHtml('info1') ?>
44
+ <?php echo $this->getChildHtml('info2') ?>
45
+ </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) 2014 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) 2014 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->escapeHtml($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,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) 2014 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->escapeHtml($this->getCustomer()->getName()) ?><br />
37
+ <?php echo $this->escapeHtml($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
+ <?php /* Extensions placeholder */ ?>
61
+ <?php echo $this->getChildHtml('customer.account.dashboard.info.extra')?>
62
+ </div>
63
+ <?php endif; ?>
64
+ </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) 2014 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) 2014 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) 2014 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) 2014 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">
88
+ function deleteAddress(addressId) {
89
+ if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) {
90
+ window.location='<?php echo $this->getUrl("customer/address/delete") ?>address/'+addressId;
91
+ }
92
+ return false;
93
+ }
94
+ </script>
app/design/frontend/base/default/template/customer/address/book.phtml ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ * Temlate for Mage_Customer_Block_Address_Book block
30
+ * @var $test Mage_Customer_Block_Address_Book
31
+ */
32
+ ?>
33
+ <div class="page-title title-buttons">
34
+ <h1><?php echo $this->__('Address Book') ?></h1>
35
+ <button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="window.location='<?php echo $this->getAddAddressUrl() ?>';"><span><span><?php echo $this->__('Add New Address') ?></span></span></button>
36
+ </div>
37
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
38
+ <div class="col2-set addresses-list">
39
+ <div class="col-1 addresses-primary">
40
+ <h2><?php echo $this->__('Default Addresses') ?></h2>
41
+ <ol>
42
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultBilling()): ?>
43
+ <li class="item">
44
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
45
+ <address>
46
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
47
+ </address>
48
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Billing Address') ?></a></p>
49
+ </li>
50
+ <?php else: ?>
51
+ <li class="item">
52
+ <h3><?php echo $this->__('Default Billing Address') ?></h3>
53
+ <?php echo $this->__('You have no default billing address in your address book.') ?>
54
+ </li>
55
+ <?php endif ?>
56
+
57
+ <?php if($_pAddsses = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping()): ?>
58
+ <li class="item">
59
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
60
+ <address>
61
+ <?php echo $this->getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
62
+ </address>
63
+ <p><a href="<?php echo $this->getAddressEditUrl(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>"><?php echo $this->__('Change Shipping Address') ?></a></p>
64
+ </li>
65
+ <?php else: ?>
66
+ <li class="item empty">
67
+ <h3><?php echo $this->__('Default Shipping Address') ?></h3>
68
+ <p><?php echo $this->__('You have no default shipping address in your address book.') ?></p>
69
+ </li>
70
+ <?php endif ?>
71
+ </ol>
72
+ </div>
73
+ <div class="col-2 addresses-additional">
74
+ <h2><?php echo $this->__('Additional Address Entries') ?></h2>
75
+ <ol>
76
+ <?php if($_pAddsses = $this->getAdditionalAddresses()): ?>
77
+ <?php foreach($_pAddsses as $_address): ?>
78
+ <li class="item">
79
+ <address>
80
+ <?php echo $this->getAddressHtml($_address) ?>
81
+ </address>
82
+ <p><a href="<?php echo $this->getUrl('customer/address/edit', array('id'=>$_address->getId())) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span> <a href="#" class="link-remove" onclick="return deleteAddress('<?php echo $_address->getId() ?>');"><?php echo $this->__('Delete Address') ?></a></p>
83
+ </li>
84
+ <?php endforeach; ?>
85
+ <?php else: ?>
86
+ <li class="item empty">
87
+ <p><?php echo $this->__('You have no additional address entries in your address book.') ?></p>
88
+ </li>
89
+ <?php endif ?>
90
+ </ol>
91
+ </div>
92
+ </div>
93
+ <div class="buttons-set">
94
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
95
+ </div>
96
+ <script type="text/javascript">
97
+ //<![CDATA[
98
+ function deleteAddress(addressId) {
99
+ if(confirm('<?php echo $this->__('Are you sure you want to delete this address?') ?>')) {
100
+ window.location='<?php echo $this->getDeleteUrl() ?>id/'+addressId;
101
+ }
102
+ return false;
103
+ }
104
+ //]]>
105
+ </script>
app/design/frontend/base/default/template/customer/address/edit.phtml ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ * Edit customer address template
30
+ *
31
+ * @see Mage_Customer_Block_Address_Edit
32
+ */
33
+ ?>
34
+ <?php if($this->getTitle()): ?>
35
+ <div class="page-title">
36
+ <h1><?php echo $this->getTitle() ?></h1>
37
+ </div>
38
+ <?php endif; ?>
39
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
40
+ <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="form-validate">
41
+ <div class="fieldset">
42
+ <?php echo $this->getBlockHtml('formkey')?>
43
+ <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
44
+ <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
45
+ <h2 class="legend"><?php echo $this->__('Contact Information') ?></h2>
46
+ <ul class="form-list">
47
+ <li class="fields">
48
+ <?php echo $this->getNameBlockHtml() ?>
49
+ </li>
50
+ <li class="wide">
51
+ <label for="company"><?php echo $this->__('Company') ?></label>
52
+ <div class="input-box">
53
+ <input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
54
+ </div>
55
+ </li>
56
+ <li class="fields">
57
+ <div class="field">
58
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
59
+ <div class="input-box">
60
+ <input type="text" name="telephone" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="telephone" />
61
+ </div>
62
+ </div>
63
+ <div class="field">
64
+ <label for="fax"><?php echo $this->__('Fax') ?></label>
65
+ <div class="input-box">
66
+ <input type="text" name="fax" id="fax" title="<?php echo $this->__('Fax') ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" />
67
+ </div>
68
+ </div>
69
+ </li>
70
+ </ul>
71
+ </div>
72
+ <div class="fieldset">
73
+ <h2 class="legend"><?php echo $this->__('Address') ?></h2>
74
+ <ul class="form-list">
75
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
76
+ <li class="wide">
77
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
78
+ <div class="input-box">
79
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
80
+ </div>
81
+ </li>
82
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
83
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
84
+ <li class="wide">
85
+ <div class="input-box">
86
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
87
+ </div>
88
+ </li>
89
+ <?php endfor; ?>
90
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
91
+ <li class="wide">
92
+ <label for="vat_id"><?php echo $this->__('VAT Number') ?></label>
93
+ <div class="input-box">
94
+ <input type="text" name="vat_id" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" id="vat_id" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
95
+ </div>
96
+ </li>
97
+ <?php endif; ?>
98
+ <li class="fields">
99
+ <div class="field">
100
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
101
+ <div class="input-box">
102
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
103
+ </div>
104
+ </div>
105
+ <div class="field">
106
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
107
+ <div class="input-box">
108
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
109
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
110
+ </select>
111
+ <script type="text/javascript">
112
+ //<![CDATA[
113
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
114
+ //]]>
115
+ </script>
116
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" />
117
+ </div>
118
+ </div>
119
+ </li>
120
+ <li class="fields">
121
+ <div class="field">
122
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
123
+ <div class="input-box">
124
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
125
+ </div>
126
+ </div>
127
+ <div class="field">
128
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
129
+ <div class="input-box">
130
+ <?php echo $this->getCountryHtmlSelect() ?>
131
+ </div>
132
+ </div>
133
+ </li>
134
+ <li<?php if($this->canSetAsDefaultBilling()) echo ' class="control"' ?>>
135
+ <?php if($this->isDefaultBilling()): ?>
136
+ <strong><?php echo $this->__('Default Billing Address') ?></strong>
137
+ <?php elseif($this->canSetAsDefaultBilling()): ?>
138
+ <input type="checkbox" id="primary_billing" name="default_billing" value="1" title="<?php echo $this->__('Use as My Default Billing Address') ?>" class="checkbox" /><label for="primary_billing"><?php echo $this->__('Use as my default billing address') ?></label>
139
+ <?php else: ?>
140
+ <input type="hidden" name="default_billing" value="1" />
141
+ <?php endif; ?>
142
+ </li>
143
+ <li<?php if($this->canSetAsDefaultShipping()) echo ' class="control"' ?>>
144
+ <?php if($this->isDefaultShipping()): ?>
145
+ <strong><?php echo $this->__('Default Shipping Address') ?></strong>
146
+ <?php elseif($this->canSetAsDefaultShipping()): ?>
147
+ <input type="checkbox" id="primary_shipping" name="default_shipping" value="1" title="<?php echo $this->__('Use as My Default Shipping Address') ?>" class="checkbox" /><label for="primary_shipping"><?php echo $this->__('Use as my default shipping address') ?></label>
148
+ <?php else: ?>
149
+ <input type="hidden" name="default_shipping" value="1" />
150
+ <?php endif; ?>
151
+ </li>
152
+ </ul>
153
+ </div>
154
+ <div class="buttons-set">
155
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
156
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
157
+ <button data-action="save-customer-address" type="submit" title="<?php echo $this->__('Save Address') ?>" class="button"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
158
+ </div>
159
+ </form>
160
+ <script type="text/javascript">
161
+ //<![CDATA[
162
+ var dataForm = new VarienForm('form-validate', true);
163
+ new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
164
+ //]]>
165
+ </script>
app/design/frontend/base/default/template/customer/balance.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) 2014 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->getMessagesBlock()->getGroupedHtml() ?>
28
+ <?php echo $this->__('Your account balance is: %s', $customer->getStoreBalance()) ?>
29
+ <div class="buttons-set">
30
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
31
+ </div>
app/design/frontend/base/default/template/customer/form/address.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) 2014 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">countryRegions = <?php echo $this->helper('directory')->getRegionJson() ?></script>
28
+
29
+ <div class="page-title">
30
+ <h1><?php if($data->getAddressId()): ?><?php echo $this->__('Edit Address Entry') ?><?php else: ?><?php echo $this->__('New Address Entry') ?><?php endif ?></h1>
31
+ </div>
32
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
33
+ <form action="<?php echo $action ?>" method="post" id="form-validate">
34
+ <div class="fieldset">
35
+ <input type="hidden" name="address_id" value="<?php echo $data->getAddressId() ?>" />
36
+ <input type="hidden" name="customer_id" id="address_id" value="<?php echo $data->getCustomerId() ?>" />
37
+ <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
38
+ <ul class="form-list">
39
+ <li class="fields">
40
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($data)->toHtml() ?>
41
+ </li>
42
+ <li>
43
+ <label for="company"><?php echo $this->__('Company') ?></label>
44
+ <div class="input-box">
45
+ <input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->escapeHtml($data->getCompany()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
46
+ </div>
47
+ </li>
48
+ </ul>
49
+ </div>
50
+ <div class="fieldset">
51
+ <h2 class="legend"><?php echo $this->__('Address') ?></h2>
52
+ <ul class="form-list">
53
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
54
+ <li class="wide">
55
+ <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
56
+ <div class="input-box">
57
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($data->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
58
+ </div>
59
+ </li>
60
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
61
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
62
+ <li class="wide">
63
+ <div class="input-box">
64
+ <input type="text" name="street[]" value="<?php echo $this->escapeHtml($data->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
65
+ </div>
66
+ </li>
67
+ <?php endfor; ?>
68
+ <li class="fields">
69
+ <div class="field">
70
+ <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
71
+ <div class="input-box">
72
+ <input type="text" name="city" value="<?php echo $this->escapeHtml($data->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
73
+ </div>
74
+ </div>
75
+ <div class="field">
76
+ <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
77
+ <div class="input-box">
78
+ <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
79
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
80
+ </select>
81
+ <script type="text/javascript">
82
+ //<![CDATA[
83
+ $('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
84
+ //]]>
85
+ </script>
86
+ <input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
87
+ </div>
88
+ </div>
89
+ </li>
90
+ <li class="fields">
91
+ <div class="field">
92
+ <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
93
+ <div class="input-box">
94
+ <input type="text" name="postcode" value="<?php echo $this->escapeHtml($data->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
95
+ </div>
96
+ </div>
97
+ <div class="field">
98
+ <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
99
+ <div class="input-box">
100
+ <select name="country_id" id="country" title="<?php echo $this->__('Country') ?>" class="validate-select">
101
+ <?php echo $countries->toHtmlOptions($data->getCountryId()) ?>
102
+ </select>
103
+ </div>
104
+ </div>
105
+ </li>
106
+ <li class="fields">
107
+ <div class="field">
108
+ <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
109
+ <div class="input-box">
110
+ <input type="text" name="telephone" value="<?php echo $this->escapeHtml($data->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="telephone" />
111
+ </div>
112
+ </div>
113
+ <div class="field">
114
+ <label for="fax"><?php echo $this->__('Fax') ?></label>
115
+ <div class="input-box">
116
+ <input type="text" name="fax" value="<?php echo $this->escapeHtml($data->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="fax" />
117
+ </div>
118
+ </div>
119
+ </li>
120
+ <?php foreach ($primaryTypes as $code=>$type): ?>
121
+ <li<?php if (!$address->isPrimary($type['address_type_id'])) echo ' class="control"' ?>>
122
+ <?php if ($address->isPrimary($type['address_type_id'])): ?>
123
+ <strong><?php echo $this->__("This is My Default %s Address", ucfirst($type['name'])) ?></strong>
124
+ <?php else: ?>
125
+ <input type="checkbox" id="primary_<?php echo $code ?>" name="primary_types[]" value="<?php echo $type['address_type_id'] ?>" class="checkbox" /><label for="primary_<?php echo $code ?>"><?php echo $this->__("Use as My Default %s Address", ucfirst($type['name'])) ?></label>
126
+ <?php endif ?>
127
+ </li>
128
+ <?php endforeach ?>
129
+ </ul>
130
+ </div>
131
+ <div class="buttons-set">
132
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
133
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/address/') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
134
+ <button data-action="save-customer-address" type="submit" class="button" title="<?php echo $this->__('Save Address') ?>"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
135
+ </div>
136
+ </form>
137
+ <script type="text/javascript">
138
+ //<![CDATA[
139
+ var dataForm = new VarienForm('form-validate', true);
140
+ //dataForm.setElementsRelation('country', 'state', '<?php echo $this->getUrl('directory/json/childRegion') ?>');
141
+ new RegionUpdater('country', 'region', 'region_id', countryRegions, undefined, 'zip');
142
+ //]]>
143
+ </script>
app/design/frontend/base/default/template/customer/form/changepassword.phtml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->__('Change Account Password') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $action ?>" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Change Account Password') ?></h2>
34
+ <ul class="form-list">
35
+ <li>
36
+ <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
37
+ <div class="input-box">
38
+ <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text required-entry" name="current_password" id="current_password" />
39
+ </div>
40
+ </li>
41
+ <li class="fields">
42
+ <div class="field">
43
+ <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
44
+ <div class="input-box">
45
+ <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text required-entry validate-password" name="password" id="password" />
46
+ </div>
47
+ </div>
48
+ <div class="field">
49
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
50
+ <div class="input-box">
51
+ <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
52
+ </div>
53
+ </div>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+ <div class="buttons-set">
58
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
59
+ <p class="back-link"><a href="<?php echo $this->getUrl('customer/account') ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
60
+ <button type="submit" title="<?php echo $this->__('Save Password') ?>" class="button"><span><span><?php echo $this->__('Save Password') ?></span></span></button>
61
+ </div>
62
+ </form>
63
+ <script type="text/javascript">
64
+ //<![CDATA[
65
+ var dataForm = new VarienForm('form-validate');
66
+ //]]>
67
+ </script>
app/design/frontend/base/default/template/customer/form/confirmation.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) 2014 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->__('Send confirmation link') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Retrieve your confirmation link here') ?></h2>
34
+ <p><?php echo $this->__('Please enter your email below and we\'ll send you confirmation link for it.') ?></p>
35
+ <ul class="form-list">
36
+ <li>
37
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
38
+ <div class="input-box">
39
+ <input type="text" name="email" id="email_address" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" value="<?php echo $this->escapeHtml($this->getEmail()) ?>" />
40
+ </div>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ <div class="buttons-set">
45
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
46
+ <p class="back-link"><a href="<?php echo $this->helper('customer')->getLoginUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Login') ?></a></p>
47
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
48
+ </div>
49
+ </form>
50
+ <script type="text/javascript">
51
+ //<![CDATA[
52
+ var dataForm = new VarienForm('form-validate', true);
53
+ //]]>
54
+ </script>
app/design/frontend/base/default/template/customer/form/edit.phtml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->__('Edit Account Information') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $this->getUrl('customer/account/editPost') ?>" method="post" id="form-validate" autocomplete="off">
32
+ <div class="fieldset">
33
+ <?php echo $this->getBlockHtml('formkey')?>
34
+ <h2 class="legend"><?php echo $this->__('Account Information') ?></h2>
35
+ <ul class="form-list">
36
+ <li class="fields">
37
+ <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?>
38
+ </li>
39
+ <li>
40
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
41
+ <div class="input-box">
42
+ <input type="text" name="email" id="email" value="<?php echo $this->escapeHtml($this->getCustomer()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email" />
43
+ </div>
44
+ </li>
45
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
46
+ <?php if ($_dob->isEnabled()): ?>
47
+ <li><?php echo $_dob->setDate($this->getCustomer()->getDob())->toHtml() ?></li>
48
+ <?php endif ?>
49
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
50
+ <?php if ($_taxvat->isEnabled()): ?>
51
+ <li><?php echo $_taxvat->setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?></li>
52
+ <?php endif ?>
53
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
54
+ <?php if ($_gender->isEnabled()): ?>
55
+ <li><?php echo $_gender->setGender($this->getCustomer()->getGender())->toHtml() ?></li>
56
+ <?php endif ?>
57
+ <li class="control">
58
+ <input type="checkbox" name="change_password" id="change_password" value="1" onclick="setPasswordForm(this.checked)" title="<?php echo $this->__('Change Password') ?>"<?php if($this->getCustomer()->getChangePassword()==1): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="change_password"><?php echo $this->__('Change Password') ?></label>
59
+ </li>
60
+ </ul>
61
+ </div>
62
+ <div class="fieldset" style="display:none;">
63
+ <h2 class="legend"><?php echo $this->__('Change Password') ?></h2>
64
+ <ul class="form-list">
65
+ <li>
66
+ <label for="current_password" class="required"><em>*</em><?php echo $this->__('Current Password') ?></label>
67
+ <div class="input-box">
68
+ <!-- This is a dummy hidden field to trick firefox from auto filling the password -->
69
+ <input type="text" class="input-text no-display" name="dummy" id="dummy" />
70
+ <input type="password" title="<?php echo $this->__('Current Password') ?>" class="input-text" name="current_password" id="current_password" />
71
+ </div>
72
+ </li>
73
+ <li class="fields">
74
+ <div class="field">
75
+ <label for="password" class="required"><em>*</em><?php echo $this->__('New Password') ?></label>
76
+ <div class="input-box">
77
+ <input type="password" title="<?php echo $this->__('New Password') ?>" class="input-text validate-password" name="password" id="password" />
78
+ </div>
79
+ </div>
80
+ <div class="field">
81
+ <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password') ?></label>
82
+ <div class="input-box">
83
+ <input type="password" title="<?php echo $this->__('Confirm New Password') ?>" class="input-text validate-cpassword" name="confirmation" id="confirmation" />
84
+ </div>
85
+ </div>
86
+ </li>
87
+ </ul>
88
+ </div>
89
+ <div class="buttons-set">
90
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
91
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
92
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
93
+ </div>
94
+ </form>
95
+ <script type="text/javascript">
96
+ //<![CDATA[
97
+ var dataForm = new VarienForm('form-validate', true);
98
+ function setPasswordForm(arg){
99
+ if(arg){
100
+ $('current_password').up(3).show();
101
+ $('current_password').addClassName('required-entry');
102
+ $('password').addClassName('required-entry');
103
+ $('confirmation').addClassName('required-entry');
104
+
105
+ }else{
106
+ $('current_password').up(3).hide();
107
+ $('current_password').removeClassName('required-entry');
108
+ $('password').removeClassName('required-entry');
109
+ $('confirmation').removeClassName('required-entry');
110
+ }
111
+ }
112
+
113
+ <?php if($this->getCustomer()->getChangePassword()): ?>
114
+ setPasswordForm(true);
115
+ <?php endif; ?>
116
+ //]]>
117
+ </script>
app/design/frontend/base/default/template/customer/form/forgotpassword.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) 2014 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->__('Forgot Your Password?') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <form action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" method="post" id="form-validate">
32
+ <div class="fieldset">
33
+ <h2 class="legend"><?php echo $this->__('Retrieve your password here') ?></h2>
34
+ <p><?php echo $this->__('Please enter your email address below. You will receive a link to reset your password.') ?></p>
35
+ <ul class="form-list">
36
+ <li>
37
+ <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
38
+ <div class="input-box">
39
+ <input type="text" name="email" alt="email" id="email_address" class="input-text required-entry validate-email" value="<?php echo $this->escapeHtml($this->getEmailValue()) ?>" />
40
+ </div>
41
+ </li>
42
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
43
+ </ul>
44
+ </div>
45
+ <div class="buttons-set">
46
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
47
+ <p class="back-link"><a href="<?php echo $this->helper('customer')->getLoginUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back to Login') ?></a></p>
48
+ <button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
49
+ </div>
50
+ </form>
51
+ <script type="text/javascript">
52
+ //<![CDATA[
53
+ var dataForm = new VarienForm('form-validate', true);
54
+ //]]>
55
+ </script>
app/design/frontend/base/default/template/customer/form/login.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) 2014 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
+ * Customer login form template
30
+ *
31
+ * @see Mage_Customer_Block_Form_Login
32
+ */
33
+ ?>
34
+ <div class="account-login">
35
+ <div class="page-title">
36
+ <h1><?php echo $this->__('Login or Create an Account') ?></h1>
37
+ </div>
38
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
39
+ <?php /* Extensions placeholder */ ?>
40
+ <?php echo $this->getChildHtml('customer.form.login.extra')?>
41
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
42
+ <?php echo $this->getBlockHtml('formkey'); ?>
43
+ <div class="col2-set">
44
+ <div class="col-1 new-users">
45
+ <div class="content">
46
+ <h2><?php echo $this->__('New Customers') ?></h2>
47
+ <p><?php echo $this->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
48
+ </div>
49
+ </div>
50
+ <div class="col-2 registered-users">
51
+ <div class="content">
52
+ <h2><?php echo $this->__('Registered Customers') ?></h2>
53
+ <p><?php echo $this->__('If you have an account with us, please log in.') ?></p>
54
+ <ul class="form-list">
55
+ <li>
56
+ <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
57
+ <div class="input-box">
58
+ <input type="text" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
59
+ </div>
60
+ </li>
61
+ <li>
62
+ <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
63
+ <div class="input-box">
64
+ <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
65
+ </div>
66
+ </li>
67
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
68
+ </ul>
69
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <div class="col2-set">
74
+ <div class="col-1 new-users">
75
+ <div class="buttons-set">
76
+ <button type="button" title="<?php echo $this->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo $this->getCreateAccountUrl() ?>';"><span><span><?php echo $this->__('Create an Account') ?></span></span></button>
77
+ </div>
78
+ </div>
79
+ <div class="col-2 registered-users">
80
+ <div class="buttons-set">
81
+ <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left"><?php echo $this->__('Forgot Your Password?') ?></a>
82
+ <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </form>
87
+ <script type="text/javascript">
88
+ //<![CDATA[
89
+ var dataForm = new VarienForm('login-form', true);
90
+ //]]>
91
+ </script>
92
+ </div>
app/design/frontend/base/default/template/customer/form/mini.login.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) 2014 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-login">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('Login') ?></span></strong>
30
+ </div>
31
+ <form action="<?php echo $this->getPostActionUrl() ?>" method="post">
32
+ <div class="block-content">
33
+ <label for="mini-login"><?php echo $this->__('Email:') ?></label><input type="text" name="login[username]" id="mini-login" class="input-text" />
34
+ <label for="mini-password"><?php echo $this->__('Password:') ?></label><input type="password" name="login[password]" id="mini-password" class="input-text" />
35
+ <div class="actions">
36
+ <button type="submit" class="button"><span><span><?php echo $this->__('Login') ?></span></span></button>
37
+ </div>
38
+ </div>
39
+ </form>
40
+ </div>
app/design/frontend/base/default/template/customer/form/newsletter.phtml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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->__('Newsletter Subscription') ?></h1>
29
+ </div>
30
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
31
+ <?php echo $this->getChildHtml('form_before')?>
32
+ <form action="<?php echo $this->getAction() ?>" method="post" id="form-validate">
33
+ <div class="fieldset">
34
+ <?php echo $this->getBlockHtml('formkey')?>
35
+ <h2 class="legend"><?php echo $this->__('Newsletter Subscription') ?></h2>
36
+ <ul class="form-list">
37
+ <li class="control"><input type="checkbox" name="is_subscribed" id="subscription" value="1" title="<?php echo $this->__('General Subscription') ?>"<?php if($this->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="subscription"><?php echo $this->__('General Subscription') ?></label></li>
38
+ <?php /* Extensions placeholder */ ?>
39
+ <?php echo $this->getChildHtml('customer.form.newsletter.extra')?>
40
+ </ul>
41
+ </div>
42
+ <div class="buttons-set">
43
+ <p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
44
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
45
+ </div>
46
+ </form>
47
+ <?php /* Extensions placeholder */ ?>
48
+ <?php echo $this->getChildHtml('customer.form.newsletter.extra2')?>
49
+ <script type="text/javascript">
50
+ //<![CDATA[
51
+ var dataForm = new VarienForm('form-validate', true);
52
+ //]]>
53
+ </script>
app/design/frontend/base/default/template/customer/form/register.phtml ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2014 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
+ * Create account form template
30
+ *
31
+ * @var $this Mage_Customer_Block_Form_Register
32
+ */
33
+ ?>
34
+ <div class="account-create">
35
+ <div class="page-title">
36
+ <h1><?p