You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 lines
19 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- ONEY CALCULATE PAYMENT SIMULATION -->
  4. <template id="oney_detail_simulation" name="Oney detail">
  5. <input type="hidden" id="Type-oney" name="Type oney" value="3x-oney"/>
  6. <a href="#" onclick="document.getElementById('div-oney-3x').style.display = 'inline';
  7. document.getElementById('button-3x-group').className = 'button-3x-group-active';
  8. document.getElementById('div-oney-4x').style.display = 'none';
  9. document.getElementById('button-4x-group').className = 'button-4x-group';"
  10. style="text-decoration: none;">
  11. <div id="button-3x-group" class="button-3x-group-active">
  12. <span class="text-button">3x payment</span>
  13. </div>
  14. </a>
  15. <a href="#" onclick="document.getElementById('div-oney-3x').style.display = 'none';
  16. document.getElementById('button-3x-group').className = 'button-3x-group';
  17. document.getElementById('div-oney-4x').style.display = 'inline';
  18. document.getElementById('button-4x-group').className = 'button-4x-group-active';"
  19. style="text-decoration: none;">
  20. <div id="button-4x-group" class="button-4x-group">
  21. <span class="text-button">4x payment</span>
  22. </div>
  23. </a>
  24. <div class="payment-detail">
  25. <div id="div-oney-3x" style="display: inline;">
  26. <table class="table-detail" cellspacing="0">
  27. <tr>
  28. <td><strong>For an amount of:</strong></td><td><strong><input id="amount_total_oney_3x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  29. </tr>
  30. <tr>
  31. <td>First intake:</td><td><strong><input id="contribution_of_3x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  32. </tr>
  33. <tr class="small-text">
  34. <td colspan="2">(Cost of financing: <strong>8,93 €</strong>TAEG : <strong>19,26 €</strong>)</td>
  35. </tr>
  36. <tr>
  37. <td>Monthly payments N°1:</td><td><strong><input id="1st_monthly_payment_3x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  38. </tr>
  39. <tr>
  40. <td>Monthly payments N°2:</td><td><strong><input id="2nd_monthly_payment_3x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  41. </tr>
  42. <tr>
  43. <td></td><td></td>
  44. </tr>
  45. <tr>
  46. <td></td><td></td>
  47. </tr>
  48. <tr>
  49. <td><strong>Total :</strong></td><td>
  50. <strong><input id="total_payment_3x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  51. </tr>
  52. </table>
  53. </div>
  54. <div id="div-oney-4x" style="display: none;">
  55. <table class="table-detail" cellspacing="0">
  56. <tr>
  57. <td><strong>For an amount of:</strong></td><td><strong><input id="amount_total_oney_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  58. </tr>
  59. <tr>
  60. <td>First intake:</td><td><strong><input id="contribution_of_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  61. </tr>
  62. <tr class="small-text">
  63. <td colspan="2">(Cost of financing: <strong>8,93 €</strong>TAEG : <strong>19,26 €</strong>)</td>
  64. </tr>
  65. <tr>
  66. <td>Monthly payments N°1:</td><td><strong><input id="1st_monthly_payment_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  67. </tr>
  68. <tr>
  69. <td>Monthly payments N°2:</td><td><strong><input id="2nd_monthly_payment_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  70. </tr>
  71. <tr>
  72. <td>Monthly payments N°3:</td><td><strong><input id="3nd_monthly_payment_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  73. </tr>
  74. <tr>
  75. <td></td><td></td>
  76. </tr>
  77. <tr>
  78. <td><strong>Total :</strong></td><td class="text-right">
  79. <strong><input id="total_payment_4x" type="text" class="text-right-simulation" disabled="disabled" t-att-value="0"/> <span t-esc="currency_symbol"/></strong></td>
  80. </tr>
  81. </table>
  82. </div>
  83. </div>
  84. </template>
  85. <template id="product_quantity_oney" inherit_id="website_sale.product_quantity">
  86. <xpath expr="//input[@name='add_qty']" position="attributes">
  87. <attribute name="id">add_qty</attribute>
  88. </xpath>
  89. </template>
  90. <!-- ONEY FOOTER DETAIL INFORMATION -->
  91. <template id="oney_footer_detail" name="Oney Footer Detail">
  92. <div class="footer-oney"><t t-esc="FooterMessage"/></div>
  93. </template>
  94. <!-- BANNER ONEY IN PRODUCT FORM-->
  95. <template id="product_price_oney" inherit_id="website_sale.product_price">
  96. <xpath expr="//div[@itemprop='offers']/h3" position="after">
  97. <div style="visibility: hidden;">
  98. <span t-if="product.image_1920">
  99. <img t-att-src="image_data_uri(product.image_1920)" style="height: 6px;"/>
  100. </span>
  101. <span t-else=""
  102. t-field="product.image_1920"
  103. t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}"
  104. />
  105. </div>
  106. <div t-if="acquirer.code == 'payplug' and acquirer.state != 'disables' and acquirer.payment_type_oney == True and authorized_by_company == True"
  107. class="banner_oney_product"
  108. name="banner_oney">
  109. <!-- POPUP SIMULATION ONEY BANNER -->
  110. <div t-if="authorized_by_oney==True" id="OneyPopup" style="display: inline; margin-bottom: 3px;" >
  111. <a href="#" class="js_oney_banner">
  112. <img id="img-oney" src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_1.png"
  113. class="img-oney"
  114. style="display: inline;"/>
  115. <img id="img-oney-top" src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_2.png"
  116. class="img-oney-top"
  117. style="display: none;"/>
  118. </a>
  119. </div>
  120. </div>
  121. <!-- TO CALCULATE THE TOTAL AMOUNT ACCORDING TO THE QUANTITY -->
  122. <input type="hidden" id="priceoney" name="priceoney" t-att-value="combination_info['price']"/>
  123. <!-- POPUP INFORMATION ONEY -->
  124. <div t-if="acquirer.code == 'payplug' and acquirer.state != 'disabled' and acquirer.payment_type_oney == True and authorized_by_company == True">
  125. <div id="InformationOney" style="display: inline;">
  126. <div t-if="authorized_by_oney==False">
  127. <a href="#" class="js_oney_information" id="oney_information">
  128. <img id="img-oney-gray" src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_3.png" class="img-oney"/>
  129. </a>
  130. </div>
  131. <!-- POPUP INFORMATION -->
  132. <div id="div_oney_information_none" class="div-oney-none" style="display: none; top: 0px; left: 0px;">
  133. <div>
  134. <p class="div-oney-none-text"><t t-esc="InformationMessage"/></p>
  135. </div>
  136. <div class="arrow-left-none"/>
  137. </div>
  138. </div>
  139. </div>
  140. <!-- PRICE BY QTY -->
  141. <span id="text_simulations_oney" style="display: none;"><i>Simulation Oney :</i></span>
  142. <span t-if="acquirer.code == 'payplug' and acquirer.state != 'disabled' and acquirer.payment_type_oney == True">
  143. <input type="number" disabled="disabled" t-att-value="combination_info['price']"
  144. id="price_total_oney"
  145. style="display: none; white-space: nowrap;"
  146. class="text-price-product-oney"/>
  147. </span>
  148. <input type="hidden" id="authorized_by_oney" disabled="disabled" t-att-value="authorized_by_oney"/>
  149. <!-- POPUP SIMULATION ONEY -->
  150. <div id="oney_popup" class="div-oney" style="display:none; top: -30px; left: 300px;">
  151. <div class="arrow-left"/>
  152. <div class="div2-oney">
  153. <div class="div-oney-close">
  154. <a href="#" onclick="document.getElementById('oney_popup').style.display = 'none';" class="oney-close" title="Close">X</a>
  155. </div>
  156. <img src="/acquirer_payplug/static/src/img/icon/oney/title_popup.png" class="title_oney"/>
  157. <t t-call="acquirer_payplug.oney_detail_simulation"/>
  158. <t t-call="acquirer_payplug.oney_footer_detail"/>
  159. </div>
  160. </div>
  161. </xpath>
  162. </template>
  163. <!-- TO DISPLAY POP-UPS OF THE FORM SHOP CART -->
  164. <template id="pop_up_oney_summary" inherit_id="website_sale.short_cart_summary" name="Short Cart right column">
  165. <xpath expr="//div[hasclass('js_cart_summary')]" position="after">
  166. <!-- POP-UP SIMULATION -->
  167. <div id="oney_popup_card" class="div-oney" style="display:none; top: 185px; left: -172px;">
  168. <div class="arrow-left"/>
  169. <div id="div2-oney" class="div2-oney">
  170. <div class="div-oney-close">
  171. <a href="#" class="js_oney_close" title="Close">X</a>
  172. </div>
  173. <img src="/acquirer_payplug/static/src/img/icon/oney/title_popup.png" class="title_oney"/>
  174. <t t-call="acquirer_payplug.oney_detail_simulation"/>
  175. <t t-call="acquirer_payplug.oney_footer_detail"/>
  176. </div>
  177. </div>
  178. <!-- POPUP INFORMATION -->
  179. <div id="div_oney_none" class="div-oney-none" style="display: none; top: 200px; left: 500px;">
  180. <div>
  181. <p class="div-oney-none-text"><t t-esc="InformationMessage"/></p>
  182. </div>
  183. <div class="arrow-left-none"/>
  184. </div>
  185. </xpath>
  186. </template>
  187. <!-- FORM SHOP CART -->
  188. <template id="short_cart_summary" inherit_id="website_sale.short_cart_summary" name="Short Cart right column">
  189. <xpath expr="//div[hasclass('card-body')]" position="after">
  190. <t t-if="acquirer">
  191. <div t-if="acquirer.code == 'payplug' and acquirer.state != 'disabled' and acquirer.payment_type_oney == True and authorized_by_company == True and acquirer.is_published == True"
  192. style="width: 95%; margin-top: 8px;"
  193. class="js_popup_oney_cart">
  194. <input type="hidden" id="total_price_cart" name="priceoney" t-att-value="website_sale_order.amount_total"/>
  195. <div class="banner-oney-product float-end" name="banner_oney">
  196. <t t-if="website_sale_order.amount_total &gt; 100 and website_sale_order.amount_total &lt; 3000">
  197. <a href="#" class="js_oney_banner_cart">
  198. <img src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_1.png" class="img-oney"/>
  199. <img src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_2.png" class="img-oney-top"/>
  200. </a>
  201. </t>
  202. <t t-if="website_sale_order.amount_total &lt; 100 or website_sale_order.amount_total &gt; 3000">
  203. <a href="#" class="js_information_none_oney_cart">
  204. <img src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_3.png" class="img-oney"/>
  205. </a>
  206. </t>
  207. </div>
  208. </div>
  209. </t>
  210. <br/>
  211. </xpath>
  212. </template>
  213. <template id="icon_list_oney" name="Payment Icon List Oney">
  214. <xpath expr="//ul/t[2]" position="after">
  215. <ul class="payment_icon_list float-end list-inline" data-max-icons="3">
  216. <t t-set="icon_index" t-value="0"/>
  217. <t t-set="MAX_ICONS" t-value="3"/>
  218. <!-- === Icons === -->
  219. <!-- Only shown if in the first 3 icons -->
  220. <t t-foreach="provider.payment_icon_ids.filtered(lambda r: r.image_payment_form)" t-as="icon">
  221. <li t-attf-class="list-inline-item{{'' if (icon_index &lt; MAX_ICONS) else ' d-none'}}">
  222. <span t-esc="icon.image_payment_form"
  223. t-options="{'widget': 'image', 'alt-field': 'name'}"
  224. data-toggle="tooltip"
  225. t-att-title="icon.name"/>
  226. </li>
  227. <t t-set="icon_index" t-value="icon_index + 1"/>
  228. </t>
  229. <t t-if="icon_index >= MAX_ICONS">
  230. <!-- === "show more" button === -->
  231. <!-- Only displayed if too many payment icons -->
  232. <li style="display:block;" class="list-inline-item">
  233. <span class="float-end more_option text-info">
  234. <a name="o_payment_icon_more"
  235. data-toggle="tooltip"
  236. t-att-title="', '.join([icon.name for icon in provider.payment_icon_ids[MAX_ICONS:]])">
  237. show more
  238. </a>
  239. </span>
  240. </li>
  241. <!-- === "show less" button === -->
  242. <!-- Only displayed when "show more" is clicked -->
  243. <li style="display:block;" class="list-inline-item d-none">
  244. <span class="float-end more_option text-info">
  245. <a name="o_payment_icon_less">show less</a>
  246. </span>
  247. </li>
  248. <br/>
  249. <!-- BANNER INFORMATION -->
  250. <div t-if="authorized_by_oney == False">
  251. <a href="#" class="js_oney_information_payment" style="cursor: help;">
  252. <img src="/acquirer_payplug/static/src/img/icon/oney/icon_oney_3x4x_3.png" style="width: 170px; margin-bottom: 5px; margin-top: 33px;"/>
  253. </a>
  254. <!-- POPUP INFORMATION -->
  255. <div id="div_oney_information_payment_none" class="div-oney-none" style="z-index: 3000; display: none; top: -10px; left: -313px;">
  256. <div>
  257. <p class="div-oney-none-text"><t t-esc="InformationMessage"/></p>
  258. </div>
  259. <div class="arrow-left-none"/>
  260. </div>
  261. <br/>
  262. </div>
  263. <span t-if="authorized_by_oney == True">
  264. <p style="font-size: 12px;"><i class="fa fa-arrow-circle-down"/><b><i> Select 3x or 4x payment.</i></b></p>
  265. <table style="width: 100%; margin-top: 3px;">
  266. <tr>
  267. <td>
  268. <i class="fa fa-check-square-o fa-lg" style="color: green; opacity: 1.00" id="checkbox_3x" role="img"/>
  269. <input type="checkbox" style="display: none;" id="checked_3_x" checked="true" onclick="return false;"/>
  270. <img id="payment_banner_img_3x" class="payment_banner_img_3x"
  271. src="/acquirer_payplug/static/src/img/icon/oney/logo-oney-3xpayant.png"
  272. style="width: 120px; display: inline;"
  273. title="Oney simulation payment in 3x"/>
  274. <a href="#" class="js_payment_img-3x-gray">
  275. <img id="payment_banner_img_3x_gray" src="/acquirer_payplug/static/src/img/icon/oney/logo-oney-3xpayant.png"
  276. style="width: 120px; display: none; opacity: 0.35"
  277. title="Oney simulation payment in 3x"/>
  278. </a>
  279. </td>
  280. </tr>
  281. <tr>
  282. <td colspan="2" style="width: 100%;">
  283. <div id="table_3x_oney" style="display:inline;" class="table_x_oney">
  284. <table style="width: 100%; border-top: 2px solid #55ce03; margin-bottom: 5px;">
  285. <tr><td>Contribution of:</td><td class="text-right"><span t-esc="payment_3x['contribution_of_3x']"/> <span t-esc="currency_symbol"/></td></tr>
  286. <tr><td>1st monthly payment:</td><td class="text-right"><span t-esc="payment_3x['1st_monthly_payment_3x']"/> <span t-esc="currency_symbol"/></td></tr>
  287. <tr><td>2nd monthly payment:</td><td class="text-right"><span t-esc="payment_3x['2nd_monthly_payment_3x']"/> <span t-esc="currency_symbol"/></td></tr>
  288. </table>
  289. </div>
  290. </td>
  291. </tr>
  292. <tr style="height: 8px;"/>
  293. <tr>
  294. <td style="margin-top: 8px;">
  295. <i class="fa fa-check-square-o fa-lg" style="color: green; opacity: 0.25" id="checkbox_4x" role="img"/>
  296. <input type="checkbox" style="display: none;" id="checked_4_x" onclick="return false;"/>
  297. <img id="payment_banner_img_4x" class="payment_banner_img_4x"
  298. src="/acquirer_payplug/static/src/img/icon/oney/logo-oney-4xpayant.png"
  299. style="width: 120px; display: none;"
  300. title="Oney simulation payment in 4x"/>
  301. <a href="#" class="js_payment_img-4x-gray" style="v-align: top;">
  302. <img id="payment_banner_img_4x_gray" src="/acquirer_payplug/static/src/img/icon/oney/logo-oney-4xpayant.png"
  303. style="width: 120px; display: inline; opacity: 0.35"
  304. title="Oney simulation payment in 4x"/>
  305. </a>
  306. </td>
  307. </tr>
  308. <tr>
  309. <td colspan="2" style="width: 100%;">
  310. <div id="table_4x_oney" style="display:none;" class="table_x_oney">
  311. <table style="width: 100%; border-top: 2px solid #55ce03; margin-bottom: 5px;">
  312. <tr><td>Contribution of:</td><td class="text-right"><span t-esc="payment_4x['contribution_of_4x']"/> <span t-esc="currency_symbol"/></td></tr>
  313. <tr><td>1st monthly payment:</td><td class="text-right"><span t-esc="payment_4x['1st_monthly_payment_4x']"/> <span t-esc="currency_symbol"/></td></tr>
  314. <tr><td>2nd monthly payment:</td><td class="text-right"><span t-esc="payment_4x['2nd_monthly_payment_4x']"/> <span t-esc="currency_symbol"/></td></tr>
  315. <tr><td>3nd monthly payment:</td><td class="text-right"><span t-esc="payment_4x['3nd_monthly_payment_4x']"/> <span t-esc="currency_symbol"/></td></tr>
  316. </table>
  317. </div>
  318. </td>
  319. </tr>
  320. </table>
  321. </span>
  322. </t>
  323. </ul>
  324. </xpath>
  325. </template>
  326. </odoo>