feat(main): Add base theme: This is the falcon theme out of the box.
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
<div class="product-miniature__actions">
|
||||
{if $product.add_to_cart_url && ($product.quantity > 0 || $product.allow_oosp) && !$configuration.is_catalog}
|
||||
<form class="product-miniature__form" action="{$product.add_to_cart_url}" method="post">
|
||||
<input type="hidden" name="id_product" value="{$product.id}">
|
||||
<input
|
||||
type="hidden"
|
||||
name="qty"
|
||||
value="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity != ''}{$product.product_attribute_minimal_quantity}{else}{$product.minimal_quantity}{/if}"
|
||||
class="form-control input-qty"
|
||||
>
|
||||
<button
|
||||
class="btn btn-primary btn-block add-to-cart"
|
||||
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>
|
||||
</form>
|
||||
{else}
|
||||
<a href="{$product.canonical_url}"
|
||||
class="btn btn-secondary btn-block"
|
||||
> {l s='View' d='Shop.Theme.Actions'}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
@ -0,0 +1,18 @@
|
||||
{block name='product_price_and_shipping'}
|
||||
{if $product.show_price}
|
||||
<div class="product-miniature__pricing text-right">
|
||||
{if $product.has_discount}
|
||||
{hook h='displayProductPriceBlock' product=$product type="old_price"}
|
||||
<span class="price price--regular mr-1" aria-label="{l s='Regular price' d='Shop.Theme.Catalog'}">{$product.regular_price}</span>
|
||||
{/if}
|
||||
|
||||
{hook h='displayProductPriceBlock' product=$product type="before_price"}
|
||||
|
||||
<span class="price" aria-label="{l s='Price' d='Shop.Theme.Catalog'}">{$product.price}</span>
|
||||
|
||||
{hook h='displayProductPriceBlock' product=$product type='unit_price'}
|
||||
|
||||
{hook h='displayProductPriceBlock' product=$product type='weight'}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
@ -0,0 +1,36 @@
|
||||
{block name='product_thumbnail'}
|
||||
<div class="product-miniature__thumb position-relative {$thumbExtraClass|default:''}">
|
||||
<a href="{$product.url}" class="product-miniature__thumb-link">
|
||||
{images_block webpEnabled=$webpEnabled}
|
||||
<img
|
||||
{if $product.default_image}
|
||||
data-full-size-image-url="{$product.default_image.large.url}"
|
||||
{generateImagesSources image=$product.default_image size='home_default' lazyload=true}
|
||||
alt="{if !empty($product.default_image.legend)}{$product.default_image.legend}{else}{$product.name|truncate:30:'...'}{/if}"
|
||||
width="{$product.default_image.bySize.home_default.width}"
|
||||
height="{$product.default_image.bySize.home_default.height}"
|
||||
{else}
|
||||
src="{$urls.no_picture_image.bySize.home_default.url}"
|
||||
alt="{$product.name|truncate:30:'...'}"
|
||||
width="{$urls.no_picture_image.bySize.home_default.width}"
|
||||
height="{$urls.no_picture_image.bySize.home_default.height}"
|
||||
{/if}
|
||||
class="img-fluid rounded lazyload"
|
||||
/>
|
||||
{/images_block}
|
||||
|
||||
{include file='catalog/_partials/product-flags.tpl'}
|
||||
</a>
|
||||
|
||||
{block name='quick_view'}
|
||||
<a class="quick-view product-miniature__functional-btn btn btn-light shadow rounded-circle" href="#" data-link-action="quickview">
|
||||
<span class="material-icons product-miniature__functional-btn-icon">visibility</span>
|
||||
</a>
|
||||
{/block}
|
||||
|
||||
|
||||
{block name='product_reviews'}
|
||||
{hook h='displayProductListReviews' product=$product}
|
||||
{/block}
|
||||
</div>
|
||||
{/block}
|
||||
@ -0,0 +1,9 @@
|
||||
{block name='product_name'}
|
||||
{$headingTag = 'h2'}
|
||||
{if $page.page_name == 'index'}
|
||||
{$headingTag = 'h3'}
|
||||
{/if}
|
||||
<{$headingTag} class="h5 product-miniature__title mb-2">
|
||||
<a class="text-reset" href="{$product.url}">{$product.name}</a>
|
||||
</{$headingTag}>
|
||||
{/block}
|
||||
@ -0,0 +1,7 @@
|
||||
<div class="product-miniature__information {if !$product.main_variants} product-miniature__information--no-variants{/if} hidden-sm-down">
|
||||
{block name='product_variants'}
|
||||
{if $product.main_variants}
|
||||
{include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants}
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
47
templates/catalog/_partials/miniatures/brand.tpl
Normal file
47
templates/catalog/_partials/miniatures/brand.tpl
Normal file
@ -0,0 +1,47 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* 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.md.
|
||||
* 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://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='brand_miniature_item'}
|
||||
<li class="col-lg-3 col-sm-4 col-6 mb-3">
|
||||
<div class="card h-100">
|
||||
{$sizes = Image::getSize('home_default')}
|
||||
<img
|
||||
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='{$sizes.width}' height='{$sizes.height}' viewBox='0 0 1 1'%3E%3C/svg%3E"
|
||||
data-src="{$brand.image|replace:'small_default':'home_default'}"
|
||||
alt="{$brand.name}"
|
||||
class="card-img-top lazyload"
|
||||
width="{$sizes.width}"
|
||||
height="{$sizes.height}"
|
||||
>
|
||||
<div class="card-body">
|
||||
<p class="h6 mb-0">
|
||||
<a class="text-reset stretched-link" href="{$brand.url}">{$brand.name}</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<span class="btn btn-link p-0">{$brand.nb_products}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/block}
|
||||
40
templates/catalog/_partials/miniatures/category.tpl
Normal file
40
templates/catalog/_partials/miniatures/category.tpl
Normal file
@ -0,0 +1,40 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* 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.md.
|
||||
* 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://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='category_miniature_item'}
|
||||
<section class="category-miniature">
|
||||
<a href="{$category.url}">
|
||||
<img
|
||||
src="{$category.image.medium.url}"
|
||||
alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}"
|
||||
>
|
||||
</a>
|
||||
|
||||
<h1 class="h2">
|
||||
<a href="{$category.url}">{$category.name}</a>
|
||||
</h1>
|
||||
|
||||
<div class="category-description">{$category.description nofilter}</div>
|
||||
</section>
|
||||
{/block}
|
||||
62
templates/catalog/_partials/miniatures/pack-product.tpl
Normal file
62
templates/catalog/_partials/miniatures/pack-product.tpl
Normal file
@ -0,0 +1,62 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* 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.md.
|
||||
* 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://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='pack_miniature_item'}
|
||||
<div class="card overflow-hidden">
|
||||
<div class="row no-gutters flex-nowrap">
|
||||
<div class="col-4 col-md-3 col-xl-2">
|
||||
<a href="{$product.url}" title="{$product.name}">
|
||||
{images_block webpEnabled=$webpEnabled}
|
||||
<img
|
||||
class="img-fluid lazyload"
|
||||
{generateImagesSources image=$product.default_image size='cart_default' lazyload=true}
|
||||
width="{$product.default_image.bySize.cart_default.width}"
|
||||
height="{$product.default_image.bySize.cart_default.height}"
|
||||
{if !empty($product.default_image.legend)}
|
||||
alt="{$product.default_image.legend}"
|
||||
title="{$product.default_image.legend}"
|
||||
{else}
|
||||
alt="{$product.name}"
|
||||
{/if}
|
||||
data-full-size-image-url="{$product.default_image.large.url}"
|
||||
>
|
||||
{/images_block}
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body align-self-center">
|
||||
<p class="pack-product-name h6 mb-2">
|
||||
<a href="{$product.url}" class="text-reset" title="{$product.name}">
|
||||
<span class="text-muted">{$product.pack_quantity}x</span> {$product.name}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
{if $showPackProductsPrice}
|
||||
<div class="price">
|
||||
{$product.price}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
64
templates/catalog/_partials/miniatures/product-list.tpl
Normal file
64
templates/catalog/_partials/miniatures/product-list.tpl
Normal file
@ -0,0 +1,64 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* 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.md.
|
||||
* 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://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='product_miniature_item'}
|
||||
{$listingType = $type|default:'listing'}
|
||||
<div
|
||||
class="products-list__block products-list__block--list"
|
||||
>
|
||||
<article class="product-miniature card js-product-miniature p-2 h-100 {block name='product_miniature_item_class'}{/block}" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-lg-3">
|
||||
{include file='catalog/_partials/miniatures/_partials/product-thumb.tpl'}
|
||||
</div>
|
||||
<div class="col-md-8 col-lg-9">
|
||||
|
||||
<div class="d-flex flex-column h-100">
|
||||
{include file='catalog/_partials/miniatures/_partials/product-title.tpl'}
|
||||
|
||||
{block name='product_desc'}
|
||||
{if $product.description_short}
|
||||
<div class="product-miniature__desc">
|
||||
{$product.description_short nofilter}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
<div class="row mt-auto">
|
||||
<div class="col">
|
||||
{include file='catalog/_partials/miniatures/_partials/product-prices.tpl'}
|
||||
</div>
|
||||
<div class="col">
|
||||
{include file='catalog/_partials/miniatures/_partials/product-form.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
50
templates/catalog/_partials/miniatures/product.tpl
Normal file
50
templates/catalog/_partials/miniatures/product.tpl
Normal file
@ -0,0 +1,50 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* 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.md.
|
||||
* 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://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||
*}
|
||||
{block name='product_miniature_item'}
|
||||
{$listingType = $type|default:'listing'}
|
||||
<div
|
||||
{if $listingType === 'listing'}
|
||||
class="products-list__block products-list__block--grid"
|
||||
{elseif $listingType === 'slider'}
|
||||
class="swiper-slide product-slider__item col-6 col-md-4 col-lg-3"
|
||||
{/if}
|
||||
>
|
||||
<article
|
||||
class="product-miniature card js-product-miniature p-2 h-100 {block name='product_miniature_item_class'}{/block}"
|
||||
data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}"
|
||||
>
|
||||
{include file='catalog/_partials/miniatures/_partials/product-thumb.tpl' thumbExtraClass='mb-2'}
|
||||
|
||||
{include file='catalog/_partials/miniatures/_partials/product-title.tpl'}
|
||||
|
||||
{include file='catalog/_partials/miniatures/_partials/product-prices.tpl'}
|
||||
|
||||
{block name='product_form'}
|
||||
{include file='catalog/_partials/miniatures/_partials/product-form.tpl'}
|
||||
{/block}
|
||||
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user