forked from brooksbingham/theme-elegance
92 lines
3.9 KiB
Smarty
92 lines
3.9 KiB
Smarty
{**
|
|
* 2007-2019 PrestaShop and Contributors
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* https://opensource.org/licenses/AFL-3.0
|
|
* If you did not receive a copy of the license and are unable to
|
|
* obtain it through the world-wide-web, please send an email
|
|
* to license@prestashop.com so we can send you a copy immediately.
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
|
* versions in the future. If you wish to customize PrestaShop for your
|
|
* needs please refer to https://www.prestashop.com for more information.
|
|
*
|
|
* @author PrestaShop SA <contact@prestashop.com>
|
|
* @copyright 2007-2019 PrestaShop SA and Contributors
|
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
|
* International Registered Trademark & Property of PrestaShop SA
|
|
*}
|
|
{if $cart.vouchers.allowed}
|
|
{block name='cart_voucher'}
|
|
<div class="block-promo">
|
|
<div class="cart-voucher flex flex-col gap-8">
|
|
{if $cart.vouchers.added}
|
|
{block name='cart_voucher_list'}
|
|
<ul class="promo-name card-block">
|
|
{foreach from=$cart.vouchers.added item=voucher}
|
|
<li class="cart-summary-line flex justify-between">
|
|
<span class="font-semibold">{$voucher.name}</span>
|
|
<div class="flex gap-2">
|
|
<span class="font-semibold">{$voucher.reduction_formatted}</span>
|
|
<a href="{$voucher.delete_url}" data-link-action="remove-voucher">
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler stroke-gray-700 icon-tabler-trash" width="24" height="24" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round">
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
|
<path d="M4 7l16 0"></path>
|
|
<path d="M10 11l0 6"></path>
|
|
<path d="M14 11l0 6"></path>
|
|
<path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path>
|
|
<path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/block}
|
|
{/if}
|
|
|
|
<div id="promo-code mt-8">
|
|
<div class="promo-code">
|
|
{block name='cart_voucher_form'}
|
|
<form action="{$urls.pages.cart}" data-link-action="add-voucher" method="post">
|
|
<input type="hidden" name="token" value="{$static_token}">
|
|
<input type="hidden" name="addDiscount" value="1">
|
|
<input class="promo-input" type="text" name="discount_name" placeholder="{l s='Promo code' d='Shop.Theme.Checkout'}">
|
|
<button type="submit" class="px-4 py-2 uppercase font-medium border text-center border-blue-950 hover:text-blue-900 hover:border-blue-900 hover:underline text-blue-950"><span>{l s='Add' d='Shop.Theme.Actions'}</span></button>
|
|
</form>
|
|
{/block}
|
|
|
|
{block name='cart_voucher_notifications'}
|
|
<div class="alert alert-danger js-error" role="alert">
|
|
<span class="ml-1 js-error-text"></span>
|
|
</div>
|
|
{/block}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{if $cart.discounts|count > 0}
|
|
<p class="block-promo promo-highlighted">
|
|
{l s='Take advantage of our exclusive offers:' d='Shop.Theme.Actions'}
|
|
</p>
|
|
<ul class="js-discount card-block promo-discounts">
|
|
{foreach from=$cart.discounts item=discount}
|
|
<li class="cart-summary-line">
|
|
<span class="label">
|
|
<span class="code">{$discount.code}</span> - {$discount.name}
|
|
</span>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
{/if}
|