Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into tpl-quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
yannicka committed Feb 26, 2024
2 parents 782c262 + 204533b commit 14b39b2
Show file tree
Hide file tree
Showing 57 changed files with 174 additions and 31 deletions.
2 changes: 2 additions & 0 deletions templates/_partials/footer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
{hook h='displayFooter'}
{/block}
</div>

<div class="footer__main__bottom row">
{block name='hook_footer_after'}
{hook h='displayFooterAfter'}
{/block}
</div>

<p class="copyright">
{block name='copyright_link'}
<a href="https://www.prestashop-project.org/" target="_blank" rel="noopener noreferrer nofollow">
Expand Down
6 changes: 6 additions & 0 deletions templates/_partials/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{block name='head_charset'}
<meta charset="utf-8">
{/block}

{block name='head_ie_compatibility'}
<meta http-equiv="x-ua-compatible" content="ie=edge">
{/block}
Expand All @@ -15,17 +16,22 @@
{/block}

<title>{block name='head_seo_title'}{$page.meta.title}{/block}</title>

{block name='hook_after_title_tag'}
{hook h='displayAfterTitleTag'}
{/block}

<meta name="description" content="{block name='head_seo_description'}{$page.meta.description}{/block}">
<meta name="keywords" content="{block name='head_seo_keywords'}{$page.meta.keywords}{/block}">

{if $page.meta.robots !== 'index'}
<meta name="robots" content="{$page.meta.robots}">
{/if}

{if $page.canonical}
<link rel="canonical" href="{$page.canonical}">
{/if}

{block name='head_hreflang'}
{foreach from=$urls.alternative_langs item=pageUrl key=code}
<link rel="alternate" href="{$pageUrl}" hreflang="{$code}">
Expand Down
2 changes: 2 additions & 0 deletions templates/_partials/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<div class="{$headerTopName}__left col-md-5">
{hook h='displayNav1'}
</div>

<div class="{$headerTopName}__right col-md-7">
{hook h='displayNav2'}
</div>
Expand Down Expand Up @@ -80,5 +81,6 @@
</div>
</div>
</div>

{hook h='displayNavFullWidth'}
{/block}
6 changes: 6 additions & 0 deletions templates/_partials/microdata/product-jsonld.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,27 @@
* file that was distributed with this source code.
*}
{assign var=hasAggregateRating value=false}

{if !empty($product.productComments.averageRating) && !empty($product.productComments.nbComments)}
{assign var=hasAggregateRating value=true}
{assign var=ratingValue value=$product.productComments.averageRating}
{assign var=ratingReviewCount value=$product.productComments.nbComments}
{/if}

{if !empty($ratings.avg) && !empty($nbComments)}
{assign var=hasAggregateRating value=true}
{assign var=ratingValue value=$ratings.avg}
{assign var=ratingReviewCount value=$nbComments}
{/if}

{assign var=hasWeight value=false}

{if isset($product.weight) && ($product.weight != 0)}
{assign var=hasWeight value=true}
{/if}

{assign var=hasOffers value=$product.show_price}

<script type="application/ld+json">
{
"@context": "https://schema.org/",
Expand Down
11 changes: 9 additions & 2 deletions templates/catalog/_partials/facets.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@

<section class="facet">
<p class="h6 facet-title d-none d-sm-block d-md-block">{$facet.label}</p>

{assign var=_expand_id value=10|mt_rand:100000}
{assign var=_collapse value=true}

{foreach from=$facet.filters item="filter"}
{if $filter.active}{assign var=_collapse value=false}{/if}
{/foreach}

<div class="title d-none d-sm-block d-md-none" data-target="#facet_{$_expand_id}" data-bs-toggle="collapse"{if !$_collapse} aria-expanded="true"{/if}>
<p class="h6 facet-title">{$facet.label}</p>

<span>
<span class="navbar-toggler collapse-icons">
<i class="material-icons add">&#xE313;</i>
Expand Down Expand Up @@ -87,6 +90,7 @@
rel="nofollow"
>
{$filter.label}

{if $filter.magnitude}
<span class="magnitude">({$filter.magnitude})</span>
{/if}
Expand All @@ -96,15 +100,14 @@
{/foreach}
</ul>
{/block}

{else}

{block name='facet_item_dropdown'}
<ul id="facet_{$_expand_id}" class="collapse{if !$_collapse} in{/if}">
<li>
<div class="facet-dropdown dropdown">
<a class="select-title" rel="nofollow" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{$active_found = false}

<span>
{foreach from=$facet.filters item="filter"}
{if $filter.active}
Expand All @@ -115,12 +118,15 @@
{$active_found = true}
{/if}
{/foreach}

{if !$active_found}
{l s='(no filter)' d='Shop.Theme.Global'}
{/if}
</span>

<i class="material-icons" aria-hidden="true">&#xE5C5;</i>
</a>

<div class="dropdown-menu dropdown-menu-start">
{foreach from=$facet.filters item="filter"}
{if !$filter.active}
Expand All @@ -130,6 +136,7 @@
class="dropdown-item select-list"
>
{$filter.label}

{if $filter.magnitude}
({$filter.magnitude})
{/if}
Expand Down
2 changes: 2 additions & 0 deletions templates/catalog/_partials/miniatures/brand.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
<img src="{$brand.image}" alt="{$brand.name}" loading="lazy">
</a>
</div>

<div class="brand__infos">
<p><a class="brand__link" href="{$brand.url}">{$brand.name}</a></p>
{$brand.text nofilter}
</div>

<div class="brand__products">
<a class="btn" href="{$brand.url}">{$brand.nb_products}</a>
</div>
Expand Down
3 changes: 3 additions & 0 deletions templates/catalog/_partials/miniatures/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@
{if $product.add_to_cart_url}
<form action="{$urls.pages.cart}" method="post" class="d-flex flex-wrap flex-md-nowrap gap-3 align-items-center mt-3">
<input type="hidden" value="{$product.id_product}" name="id_product">

<input type="hidden" name="token" value="{$static_token}" />

<div class="quantity-button js-quantity-button w-100 w-sm-auto">
{include file='components/qty-input.tpl'
attributes=[
Expand All @@ -190,6 +192,7 @@
marginHelper="mb-0"
}
</div>

<button data-button-action="add-to-cart" class="btn btn-primary flex-grow-1 flex-md-grow-0">
<i class="material-icons" aria-hidden="true">&#xe854;</i>
<span class="visually-hidden">{l s='Add to cart' d='Shop.Theme.Actions'}</span>
Expand Down
1 change: 1 addition & 0 deletions templates/catalog/_partials/product-activation.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{foreach $page.admin_notifications as $notif}
<div>
<i class="material-icons" aria-hidden="true">&#xE001;</i>

<p class="alert-text">{$notif.message}</p>
</div>
{/foreach}
Expand Down
3 changes: 2 additions & 1 deletion templates/catalog/_partials/product-add-to-cart.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*}
<div class="product__add-to-cart product-add-to-cart js-product-add-to-cart">
{if !$configuration.is_catalog}

<div class="mb-3">
{block name='product_availability'}
<span id="product-availability" class="product__availability js-product-availability d-flex align-items-center">
Expand All @@ -16,10 +15,12 @@
{else}
<i class="material-icons product-unavailable me-2">&#xE14B;</i>
{/if}

{$product.availability_message}
{/if}
</span>
{/block}

{block name='product_delivery_times'}
{if $product.is_virtual == 0}
{if $product.additional_delivery_times == 1}
Expand Down
2 changes: 2 additions & 0 deletions templates/catalog/_partials/product-cover-thumbnails.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>

<button class="carousel-control-next" type="button" data-bs-target="#product-images" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
Expand Down Expand Up @@ -70,6 +71,7 @@
data-full-size-image-url="{$image.bySize.home_default.url}"
>
</picture>

<div class="product__images__modal-opener" data-bs-toggle="modal" data-bs-target="#product-modal">
<i class="material-icons zoom-in">search</i>
</div>
Expand Down
8 changes: 8 additions & 0 deletions templates/catalog/_partials/product-customization-modal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@

<div class="{$componentName}__content">
{assign var=customization_modal_id value="{$componentName}--{$product.id_customization|intval}"}

<button type="button" class="btn btn-sm btn-outline-primary mb-2"
data-bs-toggle="modal"
data-bs-target="#{$customization_modal_id}"
>
{l s='Customized' d='Shop.Theme.Checkout'}
</button>

<div class="modal fade" id="{$customization_modal_id}" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-fullscreen-sm-down">
<div class="modal-content">
<div class="modal-header">
<p class="h5 modal-title">{l s='Product customization' d='Shop.Theme.Checkout'}</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{l s='Close' d='Shop.Theme.Global'}"></button>
</div>

<div class="modal-body">
{assign var=image_modals value=[]}

{foreach from=$product.customizations item="customization"}
{foreach from=$customization.fields item="field"}
<div class="{$componentName}__line{if !$field@last} mb-3{/if}">
<p class="mb-2 text-dark">{$field.label}</p>

{if $field.type == 'text'}
<p class="mb-0">
{if $field.id_module|intval}
Expand All @@ -36,6 +41,7 @@
</p>
{elseif $field.type == 'image'}
{assign var=image_modal_id value="{$componentName}_image--{mt_rand()}"}

<a href="#{$image_modal_id}" data-bs-toggle="modal" data-bs-dismiss="modal" >
<img class="rounded-3" src="{$field.image.small.url}">
</a>
Expand Down Expand Up @@ -68,9 +74,11 @@
<p class="h5 modal-title">{$image_modal['title']}</p>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{l s='Close' d='Shop.Theme.Global'}"></button>
</div>

<div class="modal-body">
<img class="img-fluid" src="{$image_modal['image_url']}">
</div>

<div class="modal-footer border-1 d-flex flex-wrap justify-content-between w-100">
<div class="d-inline-flex">
<span>{$image_modal['image_info'][0]} x {$image_modal['image_info'][1]}</span>
Expand Down
6 changes: 6 additions & 0 deletions templates/catalog/_partials/product-customization.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@
<div class="card bg-light border-1 mb-4">
<div class="card-body px-2 px-sm-3">
<p class="h5 card-title mb-3">{l s='Product customization' d='Shop.Theme.Catalog'}</p>

{block name='product_customization_form'}
<form method="post" action="{$product.url}" enctype="multipart/form-data" class="mb-0">
{foreach from=$customizations.fields item="field"}
<div class="product-customization__item card border-1 mb-2 mb-sm-3">
<div class="card-header bg-transparent fw-bold border-1">{$field.label}</div>

<div class="card-body px-2 px-sm-3">
<div class="row row-cols-1">
{if $field.type === 'text'}
<div>
<textarea placeholder="{l s='Your message here' d='Shop.Forms.Help'}" class="form-control product-message" maxlength="250" {if $field.required} required {/if} name="{$field.input_name}"></textarea>
</div>

{if $field.text !== ''}
<div class="mt-3">
<p class="h6 product-customization__message">{l s='Your customization:' d='Shop.Theme.Catalog'}</p>
Expand All @@ -29,6 +32,7 @@
<div>
<input class="form-control file-input js-file-input" {if $field.required} required {/if} type="file" name="{$field.input_name}">
</div>

{if $field.is_customized}
<div class="mt-3">
<div class="d-flex align-items-end">
Expand All @@ -40,6 +44,7 @@
{/if}
</div>
</div>

<div class="card-footer bg-transparent border-1">
<div class="d-flex">
<div class="flex-grow-1">
Expand All @@ -56,6 +61,7 @@
</div>
</div>
{/foreach}

<div class="mt-3 mt-sm-0">
<button class="btn btn-primary" type="submit" name="submitCustomizedData">{l s='Save Customization' d='Shop.Theme.Actions'}</button>
</div>
Expand Down
7 changes: 7 additions & 0 deletions templates/catalog/_partials/product-details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<div class="detail__left">
<span class="detail__title">{l s='Brand' d='Shop.Theme.Catalog'}</span>
</div>

<div class="detail__right">
{if isset($manufacturer_image_url)}
<a href="{$product_brand_url}">
Expand All @@ -38,6 +39,7 @@
<div class="detail__left">
<span class="detail__title">{l s='Reference' d='Shop.Theme.Catalog'}</span>
</div>

<div class="detail__right">
<span>{$product.reference_to_display}</span>
</div>
Expand All @@ -51,6 +53,7 @@
<div class="detail__left">
<span class="detail__title">{l s='In stock' d='Shop.Theme.Catalog'}</span>
</div>

<div class="detail__right">
<span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span>
</div>
Expand All @@ -64,6 +67,7 @@
<div class="detail__left">
<span class="detail__title">{l s='Availability date:' d='Shop.Theme.Catalog'}</span>
</div>

<div class="detail__right">
<span>{$product.availability_date}</span>
</div>
Expand All @@ -78,6 +82,7 @@
<div class="detail__left">
<span class="detail__title">{l s='Condition' d='Shop.Theme.Catalog'}</span>
</div>

<div class="detail__right">
<span>{$product.condition.label}</span>
</div>
Expand All @@ -92,6 +97,7 @@
<div class="detail__left">
<span class="detail__title">{$key}</span>
</div>

<div class="detail__right">
<span>{$reference}</span>
</div>
Expand Down Expand Up @@ -120,6 +126,7 @@
<div class="detail__left">
<span class="detail__title">{$feature.name}</span>
</div>

<div class="detail__right">
<span>{$feature.value|escape:'htmlall'|nl2br nofilter}</span>
</div>
Expand Down
2 changes: 2 additions & 0 deletions templates/catalog/_partials/product-discounts.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<section class="product__discounts js-product-discounts">
{if $product.quantity_discounts}
<p class="h6 product__discounts__title">{l s='Volume discounts' d='Shop.Theme.Catalog'}</p>

{block name='product_discount_table'}
<div class="table-wrapper border border-secondary py-2 px-0 px-md-3 mb-3">
<table class="table product__discounts__table w-100 mb-0">
Expand All @@ -15,6 +16,7 @@
<th class="text-center">{l s='You Save' d='Shop.Theme.Catalog'}</th>
</tr>
</thead>

<tbody>
{foreach from=$product.quantity_discounts item='quantity_discount' name='quantity_discounts'}
<tr data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value}" data-discount-quantity="{$quantity_discount.quantity}">
Expand Down

0 comments on commit 14b39b2

Please sign in to comment.