PageRenderTime 67ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/hotdeals/views/templates/front/allproduct.tpl

https://bitbucket.org/eljosze94/automasterstore
Smarty Template | 142 lines | 104 code | 14 blank | 24 comment | 45 complexity | 491f832276cb1f517ba32702b8913a95 MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, JSON, MIT, LGPL-2.1, MPL-2.0-no-copyleft-exception
  1. {*
  2. * 2007-2017 PrestaShop
  3. *
  4. * NOTICE OF LICENSE
  5. *
  6. * This source file is subject to the Academic Free License (AFL 3.0)
  7. * that is bundled with this package in the file LICENSE.txt.
  8. * It is also available through the world-wide-web at this URL:
  9. * http://opensource.org/licenses/afl-3.0.php
  10. * If you did not receive a copy of the license and are unable to
  11. * obtain it through the world-wide-web, please send an email
  12. * to license@prestashop.com so we can send you a copy immediately.
  13. *
  14. * DISCLAIMER
  15. *
  16. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  17. * versions in the future. If you wish to customize PrestaShop for your
  18. * needs please refer to http://www.prestashop.com for more information.
  19. *
  20. * @author PrestaShop SA <contact@prestashop.com>
  21. * @copyright 2007-2017 PrestaShop SA
  22. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  23. * International Registered Trademark & Property of PrestaShop SA
  24. *}
  25. <h3>{l s='All Deal Product' mod='hotdeals'}</h3>
  26. {if isset($products) && $products}
  27. <!-- Products list -->
  28. <div class="product_list row">
  29. {foreach from=$products item=product name=products}
  30. <div class="ajax_block_product col-xs-12 col-sm-4 col-md-3">
  31. <div class="product-container" itemscope itemtype="http://schema.org/Product">
  32. <div class="left-block">
  33. <div class="product-image-container">
  34. <a class="product_img_link" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}" itemprop="url">
  35. <img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'htmlall':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'htmlall':'UTF-8'}{else}{$product.name|escape:'htmlall':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'htmlall':'UTF-8'}{else}{$product.name|escape:'htmlall':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width|escape:'htmlall':'UTF-8'}" height="{$homeSize.height|escape:'htmlall':'UTF-8'}"{/if} itemprop="image" />
  36. </a>
  37. {if isset($product.new) && $product.new == 1}
  38. <a class="new-box" href="{$product.link|escape:'htmlall':'UTF-8'}">
  39. <span class="new-label">{l s='New' mod='hotdeals'}</span>
  40. </a>
  41. {/if}
  42. {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}
  43. <a class="sale-box" href="{$product.link|escape:'htmlall':'UTF-8'}">
  44. <span class="sale-label">{l s='Sale!' mod='hotdeals'}</span>
  45. </a>
  46. {/if}
  47. </div>
  48. {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
  49. <div class="content_price_top">
  50. {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
  51. {hook h="displayProductPriceBlock" product=$product type='before_price'}
  52. <span class="price product-price">
  53. {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
  54. </span>
  55. {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
  56. {hook h="displayProductPriceBlock" product=$product type="old_price"}
  57. <span class="old-price product-price">
  58. {displayWtPrice p=$product.price_without_reduction}
  59. </span>
  60. {hook h="displayProductPriceBlock" id_product=$product.id_product type="old_price"}
  61. {if $product.specific_prices.reduction_type == 'percentage'}
  62. <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100|escape:'htmlall':'UTF-8'}%</span>
  63. {/if}
  64. {/if}
  65. {hook h="displayProductPriceBlock" product=$product type="price"}
  66. {hook h="displayProductPriceBlock" product=$product type="unit_price"}
  67. {hook h="displayProductPriceBlock" product=$product type='after_price'}
  68. {/if}
  69. </div>
  70. {/if}
  71. {if isset($product.is_virtual) && !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}
  72. {hook h="displayProductPriceBlock" product=$product type="weight"}
  73. </div>
  74. <div class="right-block">
  75. <h5 itemprop="name">
  76. {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
  77. <a class="product-name" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}" itemprop="url" >
  78. {$product.name|truncate:45:'...'|escape:'htmlall':'UTF-8'}
  79. </a>
  80. </h5>
  81. {hook h='displayProductListReviews' product=$product}
  82. </div>
  83. {if (!$PS_CATALOG_MODE && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
  84. <div class="content_price_hotdeals" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  85. {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
  86. <span itemprop="price" class="price product-price">
  87. {hook h="displayProductPriceBlock" product=$product type="before_price"}
  88. {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
  89. </span>
  90. <meta itemprop="priceCurrency" content="{$currency->iso_code|escape:'htmlall':'UTF-8'}" />
  91. {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
  92. {hook h="displayProductPriceBlock" product=$product type="old_price"}
  93. <span class="old-price product-price">
  94. {displayWtPrice p=$product.price_without_reduction}
  95. </span>
  96. {if $product.specific_prices.reduction_type == 'percentage'}
  97. <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100|escape:'htmlall':'UTF-8'}%</span>
  98. {/if}
  99. {/if}
  100. {if $PS_STOCK_MANAGEMENT && isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
  101. {/if}
  102. {hook h="displayProductPriceBlock" product=$product type="price"}
  103. {hook h="displayProductPriceBlock" product=$product type="unit_price"}
  104. {/if}
  105. </div>
  106. {/if}
  107. <div class="button-container-hotdeals">
  108. {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
  109. {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
  110. {capture}add=1&amp;id_product={$product.id_product|intval|escape:'htmlall':'UTF-8'}{if isset($static_token)}&amp;token={$static_token|escape:'htmlall':'UTF-8'}{/if}{/capture}
  111. <a class="button ajax_add_to_cart_button btn btn-default" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'htmlall':'UTF-8'}" rel="nofollow" title="{l s='Add to cart' mod='hotdeals'}" data-id-product="{$product.id_product|intval|escape:'htmlall':'UTF-8'}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval|escape:'htmlall':'UTF-8'}{else}{$product.minimal_quantity|intval|escape:'htmlall':'UTF-8'}{/if}">
  112. <span>{l s='Add to cart' mod='hotdeals'}</span>
  113. </a>
  114. {else}
  115. <span class="button ajax_add_to_cart_button btn btn-default disabled">
  116. <span>{l s='Add to cart' mod='hotdeals'}</span>
  117. </span>
  118. {/if}
  119. {/if}
  120. <a class="button lnk_view btn btn-default" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View' mod='hotdeals'}">
  121. <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize' mod='hotdeals'}{else}{l s='More' mod='hotdeals'}{/if}</span>
  122. </a>
  123. </div>
  124. </div><!-- .product-container> -->
  125. </div>
  126. {/foreach}
  127. </div>
  128. {/if}