forked from brooksbingham/theme-elegance
122 lines
5.5 KiB
Smarty
122 lines
5.5 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="flex max-md:flex-col flex-1 gap-4 items-center">
|
|
<div class="w-40 h-40">
|
|
<img class="object-cover w-full h-full" src="{$product.cover.bySize.cart_default.url}" alt="{$product.name|escape:'quotes'}">
|
|
</div>
|
|
<div class="flex flex-1 max-md:items-center flex-col gap-2">
|
|
<div class="product-line-info flex flex-col">
|
|
<a class="label text-lg font-semibold max-md:text-center" href="{$product.url}" data-id_customization="{$product.id_customization|intval}">{$product.name}</a>
|
|
{if is_array($product.customizations) && $product.customizations|count}
|
|
{block name='cart_detailed_product_line_customization'}
|
|
{foreach from=$product.customizations item="customization"}
|
|
<a href="#product-customizations-modal-{$customization.id_customization}" class="text-blue-900 font-medium max-md:text-center" rel="modal:open" >{l s='Show customizations' d='Shop.Theme.Catalog'}</a>
|
|
<div class="modal bg-white p-4" id="product-customizations-modal-{$customization.id_customization}" >
|
|
<div class="w-full flex items-center justify-between mb-4">
|
|
<h4 class="modal-title text-xl font-bold">{l s='Customizations' d='Shop.Theme.Catalog'}</h4>
|
|
</div>
|
|
<div class="modal-body flex flex-col gap-2">
|
|
{foreach from=$customization.fields item="field"}
|
|
<div class="product-customization-line row">
|
|
<div class="col-sm-12 col-xs-8 value">
|
|
{if $field.type == 'text'}
|
|
{if (int)$field.id_module}
|
|
{$field.text nofilter}
|
|
{else}
|
|
{$field.text}
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
{/block}
|
|
{/if}
|
|
</div>
|
|
<div class="flex gap-4 product-line-info product-price h5 {if $product.has_discount}has-discount{/if}">
|
|
{if $product.has_discount}
|
|
<span class="line-through text-red-400">{$product.regular_price}</span>
|
|
{/if}
|
|
<div class="current-price">
|
|
<span class="price font-medium">{$product.price}</span>
|
|
{if $product.unit_price_full}
|
|
<div class="unit-price-cart">{$product.unit_price_full}</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center font-medium w-max">
|
|
<input
|
|
class="js-cart-line-product-quantity text-center w-8 border-none active:ring-0 focus:ring-0"
|
|
data-down-url="{$product.down_quantity_url}"
|
|
data-up-url="{$product.up_quantity_url}"
|
|
data-update-url="{$product.update_quantity_url}"
|
|
data-product-id="{$product.id_product}"
|
|
value="{$product.quantity}"
|
|
name="product-quantity-spin"
|
|
min="{$product.minimal_quantity}"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="flex flex-col gap-4 w-24 items-center">
|
|
<span class="product-price text-base font-bold">
|
|
{if isset($product.is_gift) && $product.is_gift}
|
|
{l s='Gift' d='Shop.Theme.Checkout'}
|
|
{else}
|
|
{$product.total}
|
|
{/if}
|
|
</span>
|
|
<div class="cart-line-product-actions flex flex-col gap-2">
|
|
<a
|
|
class = "remove-from-cart"
|
|
rel = "nofollow"
|
|
href = "{$product.remove_from_cart_url}"
|
|
data-link-action = "delete-from-cart"
|
|
data-id-product = "{$product.id_product|escape:'javascript'}"
|
|
data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}"
|
|
data-id-customization = "{$product.id_customization|escape:'javascript'}"
|
|
>
|
|
{if !isset($product.is_gift) || !$product.is_gift}
|
|
<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>
|
|
{/if}
|
|
</a>
|
|
|
|
{block name='hook_cart_extra_product_actions'}
|
|
{hook h='displayCartExtraProductActions' product=$product}
|
|
{/block}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|