theme-elegance/templates/catalog/_partials/product-add-to-cart.tpl

106 lines
4.6 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
*}
<div class="product-add-to-cart flex flex-col gap-4 my-12">
{if !$configuration.is_catalog}
{block name='product_availability'}
<span id="product-availability" class='flex w-full justify-center items-center gap-1 text-xl'>
{if $product.show_availability && $product.availability_message}
{if $product.availability == 'available'}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-box-seam" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M12 3l8 4.5v9l-8 4.5l-8 -4.5v-9l8 -4.5"></path>
<path d="M12 12l8 -4.5"></path>
<path d="M8.2 9.8l7.6 -4.6"></path>
<path d="M12 12v9"></path>
<path d="M12 12l-8 -4.5"></path>
</svg>
{elseif $product.availability == 'last_remaining_items'}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-hourglass" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6.5 7h11"></path>
<path d="M6.5 17h11"></path>
<path d="M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1z"></path>
<path d="M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1z"></path>
</svg>
{else}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M8.812 4.793l3.188 -1.793l8 4.5v8.5m-2.282 1.784l-5.718 3.216l-8 -4.5v-9l2.223 -1.25"></path>
<path d="M14.543 10.57l5.457 -3.07"></path>
<path d="M12 12v9"></path>
<path d="M12 12l-8 -4.5"></path>
<path d="M16 5.25l-4.35 2.447m-2.564 1.442l-1.086 .611"></path>
<path d="M3 3l18 18"></path>
</svg>
{/if}
{$product.availability_message}
{/if}
</span>
{/block}
{block name='product_quantity'}
<div class="flex w-full flex-col gap-4">
<div class="add">
<button
class="add-to-cart w-full h-12 bg-blue-950 disabled:bg-gray-700 text-white text-base font-light"
data-button-action="add-to-cart"
type="submit"
{if !$product.add_to_cart_url}
disabled
{/if}
>
{l s='ADD TO CART' d='Shop.Theme.Actions'}
</button>
</div>
{hook h='displayCustomProductActions'}
<div class='customize'>
<button
class="w-full h-12 border border-blue-950 text-blue-950 text-base font-normal"
>
CUSTOMIZE
</button>
</div>
{hook h='displayProductActions' product=$product}
</div>
{/block}
{block name='product_minimal_quantity'}
<p class="product-minimal-quantity">
{if $product.minimal_quantity > 1}
{l
s='The minimum purchase order quantity for the product is %quantity%.'
d='Shop.Theme.Checkout'
sprintf=['%quantity%' => $product.minimal_quantity]
}
{/if}
</p>
{/block}
{/if}
</div>