PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/prestashop/_/cache/smarty/compile/8c/ed/29/8ced29d5e22e2149bdbf511680ace64bc66849e1.file.suppliers.tpl.php

https://gitlab.com/A.Julien/sendstockbymail-module-prestashop
PHP | 229 lines | 224 code | 5 blank | 0 comment | 25 complexity | e3baccc3afe3d71cc9c762d9de27a575 MD5 | raw file
  1. <?php /* Smarty version Smarty-3.1.19, created on 2016-08-29 22:06:58
  2. compiled from "C:\xampp\htdocs\prestashop\prestashop\_\admin\themes\default\template\controllers\products\suppliers.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:3139957c495e2a852d0-05866385%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. '8ced29d5e22e2149bdbf511680ace64bc66849e1' =>
  8. array (
  9. 0 => 'C:\\xampp\\htdocs\\prestashop\\prestashop\\_\\admin\\themes\\default\\template\\controllers\\products\\suppliers.tpl',
  10. 1 => 1472500726,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '3139957c495e2a852d0-05866385',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. 'product' => 0,
  21. 'suppliers' => 0,
  22. 'supplier' => 0,
  23. 'link' => 0,
  24. 'associated_suppliers' => 0,
  25. 'attributes' => 0,
  26. 'id_default_currency' => 0,
  27. 'associated_suppliers_collection' => 0,
  28. 'asc' => 0,
  29. 'attribute' => 0,
  30. 'index' => 0,
  31. 'product_designation' => 0,
  32. 'reference' => 0,
  33. 'price_te' => 0,
  34. 'currencies' => 0,
  35. 'currency' => 0,
  36. 'id_currency' => 0,
  37. ),
  38. 'has_nocache_code' => false,
  39. 'version' => 'Smarty-3.1.19',
  40. 'unifunc' => 'content_57c495e2d5dc87_33390049',
  41. ),false); /*/%%SmartyHeaderCode%%*/?>
  42. <?php if ($_valid && !is_callable('content_57c495e2d5dc87_33390049')) {function content_57c495e2d5dc87_33390049($_smarty_tpl) {?>
  43. <input type="hidden" name="supplier_loaded" value="1">
  44. <?php if (isset($_smarty_tpl->tpl_vars['product']->value->id)) {?>
  45. <div id="product-suppliers" class="panel product-tab">
  46. <input type="hidden" name="submitted_tabs[]" value="Suppliers" />
  47. <h3><?php echo smartyTranslate(array('s'=>'Suppliers of the current product'),$_smarty_tpl);?>
  48. </h3>
  49. <div class="alert alert-info">
  50. <?php echo smartyTranslate(array('s'=>'This interface allows you to specify the suppliers of the current product and eventually its combinations.'),$_smarty_tpl);?>
  51. <br />
  52. <?php echo smartyTranslate(array('s'=>'It is also possible to specify supplier references according to previously associated suppliers.'),$_smarty_tpl);?>
  53. <br />
  54. <br />
  55. <?php echo smartyTranslate(array('s'=>'When using the advanced stock management tool (see Preferences/Products), the values you define (prices, references) will be used in supply orders.'),$_smarty_tpl);?>
  56. </div>
  57. <label><?php echo smartyTranslate(array('s'=>'Please choose the suppliers associated with this product. Please select a default supplier, as well.'),$_smarty_tpl);?>
  58. </label>
  59. <table class="table">
  60. <thead>
  61. <tr>
  62. <th class="fixed-width-xs"><span class="title_box"><?php echo smartyTranslate(array('s'=>'Selected'),$_smarty_tpl);?>
  63. </span></th>
  64. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Supplier Name'),$_smarty_tpl);?>
  65. </span></th>
  66. <th class="fixed-width-xs"><span class="title_box"><?php echo smartyTranslate(array('s'=>'Default'),$_smarty_tpl);?>
  67. </span></th>
  68. </tr>
  69. </thead>
  70. <tbody>
  71. <?php $_smarty_tpl->tpl_vars['supplier'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['supplier']->_loop = false;
  72. $_from = $_smarty_tpl->tpl_vars['suppliers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  73. foreach ($_from as $_smarty_tpl->tpl_vars['supplier']->key => $_smarty_tpl->tpl_vars['supplier']->value) {
  74. $_smarty_tpl->tpl_vars['supplier']->_loop = true;
  75. ?>
  76. <tr>
  77. <td><input type="checkbox" class="supplierCheckBox" name="check_supplier_<?php echo $_smarty_tpl->tpl_vars['supplier']->value['id_supplier'];?>
  78. " <?php if ($_smarty_tpl->tpl_vars['supplier']->value['is_selected']==true) {?>checked="checked"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['supplier']->value['id_supplier'];?>
  79. " /></td>
  80. <td><?php echo $_smarty_tpl->tpl_vars['supplier']->value['name'];?>
  81. </td>
  82. <td><input type="radio" id="default_supplier_<?php echo $_smarty_tpl->tpl_vars['supplier']->value['id_supplier'];?>
  83. " name="default_supplier" value="<?php echo $_smarty_tpl->tpl_vars['supplier']->value['id_supplier'];?>
  84. " <?php if ($_smarty_tpl->tpl_vars['supplier']->value['is_selected']==false) {?>disabled="disabled"<?php }?> <?php if ($_smarty_tpl->tpl_vars['supplier']->value['is_default']==true) {?>checked="checked"<?php }?> /></td>
  85. </tr>
  86. <?php } ?>
  87. </tbody>
  88. </table>
  89. <a class="btn btn-link bt-icon confirm_leave" href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminSuppliers'), ENT_QUOTES, 'UTF-8', true);?>
  90. &addsupplier">
  91. <i class="icon-plus"></i> <?php echo smartyTranslate(array('s'=>'Create a new supplier'),$_smarty_tpl);?>
  92. <i class="icon-external-link-sign"></i>
  93. </a>
  94. <div class="panel-footer">
  95. <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminProducts'), ENT_QUOTES, 'UTF-8', true);?>
  96. <?php if (isset($_REQUEST['page'])&&$_REQUEST['page']>1) {?>&amp;submitFilterproduct=<?php echo intval($_REQUEST['page']);?>
  97. <?php }?>" class="btn btn-default"><i class="process-icon-cancel"></i> <?php echo smartyTranslate(array('s'=>'Cancel'),$_smarty_tpl);?>
  98. </a>
  99. <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save'),$_smarty_tpl);?>
  100. </button>
  101. <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save and stay'),$_smarty_tpl);?>
  102. </button>
  103. </div>
  104. </div>
  105. <div class="panel">
  106. <h3><?php echo smartyTranslate(array('s'=>'Supplier reference(s)'),$_smarty_tpl);?>
  107. </h3>
  108. <div class="alert alert-info">
  109. <?php if (count($_smarty_tpl->tpl_vars['associated_suppliers']->value)==0) {?>
  110. <?php echo smartyTranslate(array('s'=>'You must specify the suppliers associated with this product. You must also select the default product supplier before setting references.'),$_smarty_tpl);?>
  111. <?php } else { ?>
  112. <?php echo smartyTranslate(array('s'=>'You can specify product reference(s) for each associated supplier.'),$_smarty_tpl);?>
  113. <?php }?>
  114. <?php echo smartyTranslate(array('s'=>'Click "Save and Stay" after changing selected suppliers to display the associated product references.'),$_smarty_tpl);?>
  115. </div>
  116. <div class="panel-group" id="accordion-supplier">
  117. <?php $_smarty_tpl->tpl_vars['supplier'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['supplier']->_loop = false;
  118. $_from = $_smarty_tpl->tpl_vars['associated_suppliers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  119. foreach ($_from as $_smarty_tpl->tpl_vars['supplier']->key => $_smarty_tpl->tpl_vars['supplier']->value) {
  120. $_smarty_tpl->tpl_vars['supplier']->_loop = true;
  121. ?>
  122. <div class="panel">
  123. <div class="panel-heading">
  124. <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-supplier" href="#supplier-<?php echo $_smarty_tpl->tpl_vars['supplier']->value->id;?>
  125. "><?php if (isset($_smarty_tpl->tpl_vars['supplier']->value->name)) {?><?php echo $_smarty_tpl->tpl_vars['supplier']->value->name;?>
  126. <?php }?></a>
  127. </div>
  128. <div id="supplier-<?php echo $_smarty_tpl->tpl_vars['supplier']->value->id;?>
  129. ">
  130. <div class="panel-body">
  131. <table class="table">
  132. <thead>
  133. <tr>
  134. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Product name'),$_smarty_tpl);?>
  135. </span></th>
  136. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Supplier reference'),$_smarty_tpl);?>
  137. </span></th>
  138. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Unit price tax excluded'),$_smarty_tpl);?>
  139. </span></th>
  140. <th><span class="title_box"><?php echo smartyTranslate(array('s'=>'Unit price currency'),$_smarty_tpl);?>
  141. </span></th>
  142. </tr>
  143. </thead>
  144. <tbody>
  145. <?php $_smarty_tpl->tpl_vars['attribute'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['attribute']->_loop = false;
  146. $_smarty_tpl->tpl_vars['index'] = new Smarty_Variable;
  147. $_from = $_smarty_tpl->tpl_vars['attributes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  148. foreach ($_from as $_smarty_tpl->tpl_vars['attribute']->key => $_smarty_tpl->tpl_vars['attribute']->value) {
  149. $_smarty_tpl->tpl_vars['attribute']->_loop = true;
  150. $_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['attribute']->key;
  151. ?>
  152. <?php $_smarty_tpl->tpl_vars['reference'] = new Smarty_variable('', null, 0);?>
  153. <?php $_smarty_tpl->tpl_vars['price_te'] = new Smarty_variable('', null, 0);?>
  154. <?php $_smarty_tpl->tpl_vars['id_currency'] = new Smarty_variable($_smarty_tpl->tpl_vars['id_default_currency']->value, null, 0);?>
  155. <?php $_smarty_tpl->tpl_vars['asc'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['asc']->_loop = false;
  156. $_from = $_smarty_tpl->tpl_vars['associated_suppliers_collection']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  157. foreach ($_from as $_smarty_tpl->tpl_vars['asc']->key => $_smarty_tpl->tpl_vars['asc']->value) {
  158. $_smarty_tpl->tpl_vars['asc']->_loop = true;
  159. ?>
  160. <?php if ($_smarty_tpl->tpl_vars['asc']->value->id_product==$_smarty_tpl->tpl_vars['attribute']->value['id_product']&&$_smarty_tpl->tpl_vars['asc']->value->id_product_attribute==$_smarty_tpl->tpl_vars['attribute']->value['id_product_attribute']&&$_smarty_tpl->tpl_vars['asc']->value->id_supplier==$_smarty_tpl->tpl_vars['supplier']->value->id_supplier) {?>
  161. <?php $_smarty_tpl->tpl_vars['reference'] = new Smarty_variable($_smarty_tpl->tpl_vars['asc']->value->product_supplier_reference, null, 0);?>
  162. <?php $_smarty_tpl->tpl_vars['price_te'] = new Smarty_variable(Tools::ps_round($_smarty_tpl->tpl_vars['asc']->value->product_supplier_price_te,2), null, 0);?>
  163. <?php if ($_smarty_tpl->tpl_vars['asc']->value->id_currency) {?>
  164. <?php $_smarty_tpl->tpl_vars['id_currency'] = new Smarty_variable($_smarty_tpl->tpl_vars['asc']->value->id_currency, null, 0);?>
  165. <?php }?>
  166. <?php }?>
  167. <?php } ?>
  168. <tr <?php if ((1 & $_smarty_tpl->tpl_vars['index']->value)) {?>class="alt_row"<?php }?>>
  169. <td><?php echo $_smarty_tpl->tpl_vars['product_designation']->value[$_smarty_tpl->tpl_vars['attribute']->value['id_product_attribute']];?>
  170. </td>
  171. <td>
  172. <input type="text" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['reference']->value, ENT_QUOTES, 'UTF-8', true);?>
  173. " name="supplier_reference_<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product'];?>
  174. _<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product_attribute'];?>
  175. _<?php echo $_smarty_tpl->tpl_vars['supplier']->value->id_supplier;?>
  176. " />
  177. </td>
  178. <td>
  179. <input type="text" value="<?php echo htmlentities($_smarty_tpl->tpl_vars['price_te']->value);?>
  180. " name="product_price_<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product'];?>
  181. _<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product_attribute'];?>
  182. _<?php echo $_smarty_tpl->tpl_vars['supplier']->value->id_supplier;?>
  183. " />
  184. </td>
  185. <td>
  186. <select name="product_price_currency_<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product'];?>
  187. _<?php echo $_smarty_tpl->tpl_vars['attribute']->value['id_product_attribute'];?>
  188. _<?php echo $_smarty_tpl->tpl_vars['supplier']->value->id_supplier;?>
  189. ">
  190. <?php $_smarty_tpl->tpl_vars['currency'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['currency']->_loop = false;
  191. $_from = $_smarty_tpl->tpl_vars['currencies']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  192. foreach ($_from as $_smarty_tpl->tpl_vars['currency']->key => $_smarty_tpl->tpl_vars['currency']->value) {
  193. $_smarty_tpl->tpl_vars['currency']->_loop = true;
  194. ?>
  195. <option value="<?php echo $_smarty_tpl->tpl_vars['currency']->value['id_currency'];?>
  196. "
  197. <?php if ($_smarty_tpl->tpl_vars['currency']->value['id_currency']==$_smarty_tpl->tpl_vars['id_currency']->value) {?>selected="selected"<?php }?>
  198. ><?php echo $_smarty_tpl->tpl_vars['currency']->value['name'];?>
  199. </option>
  200. <?php } ?>
  201. </select>
  202. </td>
  203. </tr>
  204. <?php } ?>
  205. </tbody>
  206. </table>
  207. </div>
  208. </div>
  209. </div>
  210. <?php } ?>
  211. </div>
  212. <div class="panel-footer">
  213. <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getAdminLink('AdminProducts'), ENT_QUOTES, 'UTF-8', true);?>
  214. <?php if (isset($_REQUEST['page'])&&$_REQUEST['page']>1) {?>&amp;submitFilterproduct=<?php echo intval($_REQUEST['page']);?>
  215. <?php }?>" class="btn btn-default"><i class="process-icon-cancel"></i> <?php echo smartyTranslate(array('s'=>'Cancel'),$_smarty_tpl);?>
  216. </a>
  217. <button type="submit" name="submitAddproduct" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save'),$_smarty_tpl);?>
  218. </button>
  219. <button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right" disabled="disabled"><i class="process-icon-loading"></i> <?php echo smartyTranslate(array('s'=>'Save and stay'),$_smarty_tpl);?>
  220. </button>
  221. </div>
  222. </div>
  223. <?php }?>
  224. <?php }} ?>