PageRenderTime 54ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/tools/smarty_v2/compile/%%30^302^3028DB03%%blockcart-json.tpl.php

http://marocmall.googlecode.com/
PHP | 150 lines | 141 code | 9 blank | 0 comment | 47 complexity | 302e9d26a7dd3429cfaa4d97e21a15a7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php /* Smarty version 2.6.20, created on 2011-12-23 16:38:17
  2. compiled from C:%5CD%5CMarocMall/modules/blockcart/blockcart-json.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('modifier', 'addslashes', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 35, false),array('modifier', 'replace', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 35, false),array('modifier', 'html_entity_decode', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 37, false),array('modifier', 'escape', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 38, false),array('modifier', 'truncate', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 38, false),array('modifier', 'cat', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 86, false),array('function', 'displayWtPrice', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 37, false),array('function', 'convertPrice', 'C:\\D\\MarocMall/modules/blockcart/blockcart-json.tpl', 90, false),)), $this); ?>
  5. {
  6. "products": [
  7. <?php if ($this->_tpl_vars['products']): ?>
  8. <?php $_from = $this->_tpl_vars['products']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['products'] = array('total' => count($_from), 'iteration' => 0);
  9. if ($this->_foreach['products']['total'] > 0):
  10. foreach ($_from as $this->_tpl_vars['product']):
  11. $this->_foreach['products']['iteration']++;
  12. ?>
  13. <?php $this->assign('productId', $this->_tpl_vars['product']['id_product']); ?>
  14. <?php $this->assign('productAttributeId', $this->_tpl_vars['product']['id_product_attribute']); ?>
  15. {
  16. "id": <?php echo $this->_tpl_vars['product']['id_product']; ?>
  17. ,
  18. "link": "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['link']->getProductLink($this->_tpl_vars['product']['id_product'],$this->_tpl_vars['product']['link_rewrite'],$this->_tpl_vars['product']['category']))) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  19. ",
  20. "quantity": <?php echo $this->_tpl_vars['product']['cart_quantity']; ?>
  21. ,
  22. "priceByLine": "<?php if ($this->_tpl_vars['priceDisplay'] == @PS_TAX_EXC): ?><?php echo ((is_array($_tmp=Product::displayWtPrice(array('p' => $this->_tpl_vars['product']['total']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  23. <?php else: ?><?php echo ((is_array($_tmp=Product::displayWtPrice(array('p' => $this->_tpl_vars['product']['total_wt']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  24. <?php endif; ?>",
  25. "name": "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['product']['name'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 15, '...', true) : smarty_modifier_truncate($_tmp, 15, '...', true)); ?>
  26. ",
  27. "price": "<?php if ($this->_tpl_vars['priceDisplay'] == @PS_TAX_EXC): ?><?php echo ((is_array($_tmp=Product::displayWtPrice(array('p' => $this->_tpl_vars['product']['total']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  28. <?php else: ?><?php echo ((is_array($_tmp=Product::displayWtPrice(array('p' => $this->_tpl_vars['product']['total_wt']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  29. <?php endif; ?>",
  30. "idCombination": <?php if (isset ( $this->_tpl_vars['product']['attributes_small'] )): ?><?php echo $this->_tpl_vars['productAttributeId']; ?>
  31. <?php else: ?>0<?php endif; ?>,
  32. <?php if (isset ( $this->_tpl_vars['product']['attributes_small'] )): ?>
  33. "hasAttributes": true,
  34. "attributes": "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['product']['attributes_small'])) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  35. ",
  36. <?php else: ?>
  37. "hasAttributes": false,
  38. <?php endif; ?>
  39. "hasCustomizedDatas": <?php if (isset ( $this->_tpl_vars['customizedDatas'][$this->_tpl_vars['productId']][$this->_tpl_vars['productAttributeId']] )): ?>true<?php else: ?>false<?php endif; ?>,
  40. "customizedDatas":[
  41. <?php if (isset ( $this->_tpl_vars['customizedDatas'][$this->_tpl_vars['productId']][$this->_tpl_vars['productAttributeId']] )): ?>
  42. <?php $_from = $this->_tpl_vars['customizedDatas'][$this->_tpl_vars['productId']][$this->_tpl_vars['productAttributeId']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['customizedDatas'] = array('total' => count($_from), 'iteration' => 0);
  43. if ($this->_foreach['customizedDatas']['total'] > 0):
  44. foreach ($_from as $this->_tpl_vars['id_customization'] => $this->_tpl_vars['customization']):
  45. $this->_foreach['customizedDatas']['iteration']++;
  46. ?>{
  47. "customizationId": <?php echo $this->_tpl_vars['id_customization']; ?>
  48. ,
  49. "quantity": "<?php echo $this->_tpl_vars['customization']['quantity']; ?>
  50. ",
  51. "datas": [
  52. <?php $_from = $this->_tpl_vars['customization']['datas']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['customization'] = array('total' => count($_from), 'iteration' => 0);
  53. if ($this->_foreach['customization']['total'] > 0):
  54. foreach ($_from as $this->_tpl_vars['type'] => $this->_tpl_vars['datas']):
  55. $this->_foreach['customization']['iteration']++;
  56. ?>
  57. {
  58. "type": "<?php echo $this->_tpl_vars['type']; ?>
  59. ",
  60. "datas":
  61. [
  62. <?php $_from = $this->_tpl_vars['datas']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['datas'] = array('total' => count($_from), 'iteration' => 0);
  63. if ($this->_foreach['datas']['total'] > 0):
  64. foreach ($_from as $this->_tpl_vars['index'] => $this->_tpl_vars['data']):
  65. $this->_foreach['datas']['iteration']++;
  66. ?>
  67. {
  68. "index": <?php echo $this->_tpl_vars['index']; ?>
  69. ,
  70. "value": "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['value'])) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  71. ",
  72. "truncatedValue": "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['data']['value'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 28, '...') : smarty_modifier_truncate($_tmp, 28, '...')))) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  73. "
  74. }<?php if (! ($this->_foreach['datas']['iteration'] == $this->_foreach['datas']['total'])): ?>,<?php endif; ?>
  75. <?php endforeach; endif; unset($_from); ?>]
  76. }<?php if (! ($this->_foreach['customization']['iteration'] == $this->_foreach['customization']['total'])): ?>,<?php endif; ?>
  77. <?php endforeach; endif; unset($_from); ?>
  78. ]
  79. }<?php if (! ($this->_foreach['customizedDatas']['iteration'] == $this->_foreach['customizedDatas']['total'])): ?>,<?php endif; ?>
  80. <?php endforeach; endif; unset($_from); ?>
  81. <?php endif; ?>
  82. ]
  83. }<?php if (! ($this->_foreach['products']['iteration'] == $this->_foreach['products']['total'])): ?>,<?php endif; ?>
  84. <?php endforeach; endif; unset($_from); ?><?php endif; ?>
  85. ],
  86. "discounts": [
  87. <?php if ($this->_tpl_vars['discounts']): ?><?php $_from = $this->_tpl_vars['discounts']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['discounts'] = array('total' => count($_from), 'iteration' => 0);
  88. if ($this->_foreach['discounts']['total'] > 0):
  89. foreach ($_from as $this->_tpl_vars['discount']):
  90. $this->_foreach['discounts']['iteration']++;
  91. ?>
  92. {
  93. "id": "<?php echo $this->_tpl_vars['discount']['id_discount']; ?>
  94. ",
  95. "name": "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['discount']['name'])) ? $this->_run_mod_handler('cat', true, $_tmp, ' : ') : smarty_modifier_cat($_tmp, ' : ')))) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['discount']['description']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['discount']['description'])))) ? $this->_run_mod_handler('truncate', true, $_tmp, 18, '...') : smarty_modifier_truncate($_tmp, 18, '...')))) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  96. ",
  97. "description": "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['discount']['description'])) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  98. ",
  99. "nameDescription": "<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['discount']['name'])) ? $this->_run_mod_handler('cat', true, $_tmp, ' : ') : smarty_modifier_cat($_tmp, ' : ')))) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['discount']['description']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['discount']['description'])))) ? $this->_run_mod_handler('truncate', true, $_tmp, 18, '...') : smarty_modifier_truncate($_tmp, 18, '...')))) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, '\\\'', '\'') : smarty_modifier_replace($_tmp, '\\\'', '\'')); ?>
  100. ",
  101. "link": "<?php echo $this->_tpl_vars['link']->getPageLink('order.php',true); ?>
  102. ?deleteDiscount=<?php echo $this->_tpl_vars['discount']['id_discount']; ?>
  103. ",
  104. "price": "-<?php if ($this->_tpl_vars['discount']['value_real'] != '!'): ?><?php if ($this->_tpl_vars['priceDisplay'] == 1): ?><?php echo ((is_array($_tmp=Product::convertPrice(array('price' => $this->_tpl_vars['discount']['value_tax_exc']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  105. <?php else: ?><?php echo ((is_array($_tmp=Product::convertPrice(array('price' => $this->_tpl_vars['discount']['value_real']), $this))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8'));?>
  106. <?php endif; ?><?php endif; ?>"
  107. }
  108. <?php if (! ($this->_foreach['discounts']['iteration'] == $this->_foreach['discounts']['total'])): ?>,<?php endif; ?>
  109. <?php endforeach; endif; unset($_from); ?><?php endif; ?>
  110. ],
  111. "shippingCost": "<?php echo ((is_array($_tmp=$this->_tpl_vars['shipping_cost'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  112. ",
  113. <?php if (isset ( $this->_tpl_vars['tax_cost'] )): ?>
  114. "taxCost": "<?php echo ((is_array($_tmp=$this->_tpl_vars['tax_cost'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  115. ",
  116. <?php endif; ?>
  117. "wrappingCost": "<?php echo ((is_array($_tmp=$this->_tpl_vars['wrapping_cost'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  118. ",
  119. "nbTotalProducts": "<?php echo $this->_tpl_vars['nb_total_products']; ?>
  120. ",
  121. "total": "<?php echo ((is_array($_tmp=$this->_tpl_vars['total'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  122. ",
  123. "productTotal": "<?php echo ((is_array($_tmp=$this->_tpl_vars['product_total'])) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  124. ",
  125. <?php if (isset ( $this->_tpl_vars['errors'] ) && $this->_tpl_vars['errors']): ?>
  126. "hasError" : true,
  127. "errors" : [
  128. <?php $_from = $this->_tpl_vars['errors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['errors'] = array('total' => count($_from), 'iteration' => 0);
  129. if ($this->_foreach['errors']['total'] > 0):
  130. foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['error']):
  131. $this->_foreach['errors']['iteration']++;
  132. ?>
  133. "<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['error'])) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp)))) ? $this->_run_mod_handler('html_entity_decode', true, $_tmp, 2, 'UTF-8') : html_entity_decode($_tmp, 2, 'UTF-8')); ?>
  134. "
  135. <?php if (! ($this->_foreach['errors']['iteration'] == $this->_foreach['errors']['total'])): ?>,<?php endif; ?>
  136. <?php endforeach; endif; unset($_from); ?>
  137. ]
  138. <?php else: ?>
  139. "hasError" : false
  140. <?php endif; ?>
  141. }