Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$componentName = 'breadcrumb'}
<nav data-depth="{$breadcrumb.count}" class="{$componentName}__wrapper" aria-label="{$componentName}">
<div class="container">
<ol class="{$componentName}">
{block name='breadcrumb'}
{foreach from=$breadcrumb.links item=path name=breadcrumb}
{block name='breadcrumb_item'}
<li class="{$componentName}-item">
{if not $smarty.foreach.breadcrumb.last}
<a href="{$path.url}" class="{$componentName}-link"><span>{$path.title}</span></a>
{else}
<span>{$path.title}</span>
{/if}
</li>
{/block}
{/foreach}
{/block}
</ol>
</div>
</nav>

View File

@@ -0,0 +1,9 @@
{block name='copyright'}
<div class="copyright">
{block name='copyright_link'}
<a href="https://www.prestashop-project.org/" target="_blank" rel="noopener noreferrer nofollow">
{l s='%copyright% %year% - Ecommerce software by %prestashop%' sprintf=['%prestashop%' => 'PrestaShop™', '%year%' => 'Y'|date, '%copyright%' => '©'] d='Shop.Theme.Global'}
</a>
{/block}
</div>
{/block}

View File

@@ -0,0 +1,38 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{capture name="footer_before"}{hook h='displayFooterBefore'}{/capture}
{if $smarty.capture.footer_before}
{block name='hook_footer_before'}
<div class="footer footer__before">
{$smarty.capture.footer_before nofilter}
</div>
{/block}
{/if}
{block name='footer_main'}
<div class="footer footer__main">
<div class="container">
{capture name="footer_main_top"}{hook h='displayFooter'}{/capture}
{if $smarty.capture.footer_main_top}
{block name='hook_footer_main'}
<div class="footer__main-top row">
{$smarty.capture.footer_main_top nofilter}
</div>
{/block}
{/if}
{capture name="footer_main_bottom"}{hook h='displayFooterAfter'}{/capture}
{if isset($smarty.capture.footer_main_bottom) && $smarty.capture.footer_main_bottom}
{block name='hook_footer_after'}
<div class="footer__main-bottom row">
{$smarty.capture.footer_main_bottom nofilter}
</div>
{/block}
{/if}
{include file='_partials/copyright.tpl'}
</div>
</div>
{/block}

View File

@@ -0,0 +1,25 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{if $errors|count}
<div class="help-block">
{block name='form_errors'}
<div class="alert alert-danger mt-3 alert-dismissible" role="alert" tabindex="0">
{if $errors|count > 1}
<p class="mb-1">
{l s='There are %d% errors:' sprintf=['%d%' => $errors|count] d='Shop.Notifications.Error'}
</p>
<ol class="mb-0">
{foreach $errors as $error}
<li>{$error|nl2br nofilter}</li>
{/foreach}
</ol>
{else}
{$errors.0|nl2br nofilter}
{/if}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{l s='Close' d='Shop.Theme.Actions'}"></button>
</div>
{/block}
</div>
{/if}

View File

@@ -0,0 +1,219 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{if $field.type == 'hidden'}
{block name='form_field_item_hidden'}
<input type="hidden" name="{$field.name}" value="{$field.value}">
{/block}
{else}
<div class="mb-3{if !empty($field.errors)} has-error{/if}">
{if ($field.type !== 'checkbox')}
<label class="form-label{if $field.required} required{/if}" for="field-{$field.name}">
{if $field.type !== 'checkbox'}
{$field.label}
{/if}
</label>
{/if}
{if $field.type === 'select'}
{block name='form_field_item_select'}
<select class="form-select" name="{$field.name}" id="field-{$field.name}" {if $field.required}required{/if}>
<option value disabled selected>{l s='-- please choose --' d='Shop.Forms.Labels'}</option>
{foreach from=$field.availableValues item="label" key="value"}
<option value="{$value}" {if $value eq $field.value} selected {/if}>{$label}</option>
{/foreach}
</select>
{/block}
{elseif $field.type === 'countrySelect'}
{block name='form_field_item_country'}
<select
class="form-select js-country"
name="{$field.name}"
id="field-{$field.name}"
{if $field.required}required{/if}
>
<option value disabled selected>{l s='-- please choose --' d='Shop.Forms.Labels'}</option>
{foreach from=$field.availableValues item="label" key="value"}
<option value="{$value}" {if $value eq $field.value} selected {/if}>{$label}</option>
{/foreach}
</select>
{/block}
{elseif $field.type === 'radio-buttons'}
{block name='form_field_item_radio'}
<div aria-labelledby="field-{$field.name}-label">
<p class="visually-hidden" id="field-{$field.name}-label">{$field.label}</p>
{foreach from=$field.availableValues item="label" key="value"}
<div class="form-check form-check-inline">
<input
class="form-check-input"
type="radio"
name="{$field.name}"
id="field-{$field.name}_{$value}"
value="{$value}"
{if $field.required}required{/if}
{if $value eq $field.value} checked {/if}
>
<label class="form-check-label" for="field-{$field.name}_{$value}">
{$label}
</label>
</div>
{/foreach}
</div>
{/block}
{elseif $field.type === 'checkbox'}
{block name='form_field_item_checkbox'}
<div class="form-check">
<input
class="form-check-input"
name="{$field.name}"
type="checkbox"
value="1"
id="field-{$field.name}"
value="1" {if $field.value}checked="checked"{/if}
{if $field.required}required{/if}
>
<label class="form-check-label{if $field.required} required{/if}" for="field-{$field.name}">
{$field.label nofilter}
</label>
</div>
{/block}
{elseif $field.type === 'date'}
{block name='form_field_item_date'}
<input name="{$field.name}" class="form-control" type="date" id="field-{$field.name}" value="{$field.value}"{if isset($field.availableValues.placeholder)} placeholder="{$field.availableValues.placeholder}" aria-label="{$field.availableValues.placeholder}"{/if}>
{if isset($field.availableValues.comment)}
<span class="form-text">
{$field.availableValues.comment}
</span>
{/if}
{/block}
{elseif $field.type === 'birthday'}
{block name='form_field_item_birthday'}
<div class="js-parent-focus">
{html_select_date
field_order=DMY
time={$field.value}
field_array={$field.name}
prefix=false
reverse_years=true
field_separator='<br>'
day_extra='class="form-select"'
month_extra='class="form-select"'
year_extra='class="form-select"'
day_empty={l s='-- day --' d='Shop.Forms.Labels'}
month_empty={l s='-- month --' d='Shop.Forms.Labels'}
year_empty={l s='-- year --' d='Shop.Forms.Labels'}
start_year={'Y'|date}-100 end_year={'Y'|date}
}
</div>
{/block}
{elseif $field.type === 'password'}
{block name='form_field_item_password'}
<div class="input-group password-field">
<input
class="form-control"
name="{$field.name}"
id="field-{$field.name}"
type="password"
{if $field.autocomplete}autocomplete="{$field.autocomplete}"{/if}
value=""
minlength="{$configuration.password_policy.minimum_length|default:8}"
maxlength="{$configuration.password_policy.maximum_length|default:72}"
data-minscore="{$configuration.password_policy.minimum_score|default:3}"
data-bs-placement="top"
data-bs-trigger="manual"
data-ps-ref="password-policy-input"
spellcheck="false"
{if $field.required}required{/if}
>
<button
class="btn btn-primary"
type="button"
data-ps-action="toggle-password"
data-text-show="{l s='Show password' d='Shop.Theme.Actions'}"
data-text-hide="{l s='Hide password' d='Shop.Theme.Actions'}"
aria-label="{l s='Show password' d='Shop.Theme.Actions'}"
aria-controls="field-{$field.name}"
aria-live="polite"
>
<i class="material-icons" aria-hidden="true">&#xE8F4;</i>
</button>
</div>
<div data-ps-target="password-feedback-target"></div>
{/block}
{elseif $field.type === 'textarea'}
{block name='form_field_item_textarea'}
<textarea
id="field-{$field.name}"
class="form-control"
name="{$field.name}"
{if isset($field.availableValues.placeholder)}placeholder="{$field.availableValues.placeholder}"{/if}
{if $field.maxLength}maxlength="{$field.maxLength}"{/if}
{if $field.required}required{/if}
{if isset($field.availableValues.rows)}rows="{$field.availableValues.rows}"{/if}
{if isset($field.availableValues.cols)}cols="{$field.availableValues.cols}"{/if}
>{$field.value|default}</textarea>
{if isset($field.availableValues.comment)}
<span class="form-text">
{$field.availableValues.comment}
</span>
{/if}
{/block}
{else}
{block name='form_field_item_other'}
<input
class="form-control"
name="{$field.name}"
id="field-{$field.name}"
type="{$field.type}"
value="{$field.value}"
{if $field.autocomplete}autocomplete="{$field.autocomplete}"{/if}
{if isset($field.availableValues.placeholder)}placeholder="{$field.availableValues.placeholder}"{/if}
{if $field.maxLength}maxlength="{$field.maxLength}"{/if}
{if !empty($field.minLength)}minlength="{$field.minLength}"{/if}
aria-label="{$field.label}"
{if $field.required}required{/if}
>
{if isset($field.availableValues.comment)}
<span class="form-text">
{$field.availableValues.comment}
</span>
{/if}
{/block}
{/if}
{block name='form_field_errors'}
{include file='_partials/form-errors.tpl' errors=$field.errors}
{/block}
{block name='form_field_comment'}
{if (!$field.required && !in_array($field.type, ['radio-buttons', 'checkbox']))}
<div class="form-text">{l s='Optional' d='Shop.Forms.Labels'}</div>
{/if}
{/block}
</div>
{/if}

View File

@@ -0,0 +1,80 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{block name='head_charset'}
<meta charset="utf-8">
{/block}
{block name='head_ie_compatibility'}
<meta http-equiv="x-ua-compatible" content="ie=edge">
{/block}
{block name='head_seo'}
{block name='head_preload'}
{include file='_partials/preload.tpl'}
{/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}">
{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}">
{/foreach}
{/block}
{block name='head_microdata'}
{include file='_partials/microdata/head-jsonld.tpl'}
{/block}
{block name='head_microdata_special'}{/block}
{block name='head_pagination_seo'}
{include file='_partials/pagination-seo.tpl'}
{/block}
{block name='head_open_graph'}
<meta property="og:title" content="{$page.meta.title}">
<meta property="og:description" content="{$page.meta.description}">
<meta property="og:url" content="{$urls.current_url}">
<meta property="og:site_name" content="{$shop.name}">
{if !isset($product) && $page.page_name != 'product'}<meta property="og:type" content="website">{/if}
{/block}
{/block}
{block name='head_viewport'}
<meta name="viewport" content="width=device-width, initial-scale=1">
{/block}
{block name='head_icons'}
<link rel="icon" type="image/vnd.microsoft.icon" href="{$shop.favicon}?{$shop.favicon_update_time}">
<link rel="shortcut icon" type="image/x-icon" href="{$shop.favicon}?{$shop.favicon_update_time}">
{/block}
{block name='stylesheets'}
{include file='_partials/stylesheets.tpl' stylesheets=$stylesheets}
{/block}
{block name='javascript_head'}
{include file='_partials/javascript.tpl' javascript=$javascript.head vars=$js_custom_vars}
{/block}
{block name='hook_header'}
{$HOOK_HEADER nofilter}
{/block}
{block name='hook_extra'}{/block}

View File

@@ -0,0 +1,86 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$headerBanner = 'header-banner'}
{$headerTop = 'header-top'}
{$headerBottom = 'header-bottom'}
{$headerNavFullWidth = 'header-nav-full-width'}
{capture name="header_banner"}{hook h='displayBanner'}{/capture}
{block name='header_banner'}
{if !empty($smarty.capture.header_banner)}
<div class="{$headerBanner}">
{$smarty.capture.header_banner nofilter}
</div>
{/if}
{/block}
{capture name="header_nav_1"}{hook h='displayNav1'}{/capture}
{capture name="header_nav_2"}{hook h='displayNav2'}{/capture}
{block name='header_nav'}
{if !empty($smarty.capture.header_nav_1) || !empty($smarty.capture.header_nav_2)}
<div class="{$headerTop} d-none d-md-block">
<div class="container-md">
<div class="row">
<div class="{$headerTop}__left col-md-4">
{$smarty.capture.header_nav_1 nofilter}
</div>
<div class="{$headerTop}__right col-md-8">
{$smarty.capture.header_nav_2 nofilter}
</div>
</div>
</div>
</div>
{/if}
{/block}
{block name='header_bottom'}
<div class="{$headerBottom}">
<div class="{$headerBottom}__container container-md">
<div class="{$headerBottom}__row row gx-2 gx-md-4 align-items-stretch">
<div class="{$headerBottom}__logo d-flex align-items-center col-auto me-auto me-md-0">
{if $shop.logo_details}
{if $page.page_name == 'index'}<h1 class="{$headerBottom}__h1 mb-0">{/if}
{renderLogo}
{if $page.page_name == 'index'}</h1>{/if}
{/if}
</div>
{hook h='displayTop'}
<div id="_mobile_ps_customersignin" class="d-md-none d-flex col-auto">
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
<div class="header-block">
<a href="{$urls.pages.my_account}" class="header-block__action-btn">
<i class="material-icons header-block__icon" aria-hidden="true">&#xE853;</i>
</a>
</div>
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
</div>
{if !$configuration.is_catalog}
<div id="_mobile_ps_shoppingcart" class="d-md-none d-flex col-auto">
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
<div class="header-block">
<a href="{$urls.pages.cart}" class="header-block__action-btn">
<i class="material-icons header-block__icon" aria-hidden="true">&#xE8CC;</i>
<span class="header-block__badge">{$cart.products_count}</span>
</a>
</div>
{* JUST PLACEHOLDER FOR RESPONSIVE COMPONENT TO LOAD REAL ONE *}
</div>
{/if}
</div>
</div>
</div>
{capture name="nav_full_width"}{hook h='displayNavFullWidth'}{/capture}
{if !empty($smarty.capture.nav_full_width)}
<div class="{$headerNavFullWidth}">
{$smarty.capture.nav_full_width nofilter}
</div>
{/if}
{/block}

View File

@@ -0,0 +1,16 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{function renderLogo}
<a class="navbar-brand d-block" href="{$urls.pages.index}">
<img
class="logo img-fluid"
src="{$shop.logo_details.src}"
alt="{$shop.name}"
width="{$shop.logo_details.width}"
height="{$shop.logo_details.height}"
>
</a>
{/function}

View File

@@ -0,0 +1,21 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{foreach $javascript.external as $js}
<script type="text/javascript" src="{$js.uri}" {$js.attribute}></script>
{/foreach}
{foreach $javascript.inline as $js}
<script type="text/javascript">
{$js.content nofilter}
</script>
{/foreach}
{if isset($vars) && $vars|@count}
<script type="text/javascript">
{foreach from=$vars key=var_name item=var_value}
var {$var_name} = {$var_value|json_encode nofilter};
{/foreach}
</script>
{/if}

View File

@@ -0,0 +1,69 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name" : "{$shop.name}",
"url" : "{$urls.pages.index}",
{if $shop.logo_details}
"logo": {
"@type": "ImageObject",
"url":"{$shop.logo_details.src}"
}
{/if}
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"isPartOf": {
"@type": "WebSite",
"url": "{$urls.pages.index}",
"name": "{$shop.name}"
},
"name": "{$page.meta.title}",
"url": "{$urls.current_url}"
}
</script>
{if $page.page_name == 'index'}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url" : "{$urls.pages.index}",
"image": {
"@type": "ImageObject",
"url":"{$shop.logo_details.src}"
},
"potentialAction": {
"@type": "SearchAction",
"target": "{'--search_term_string--'|str_replace:'{search_term_string}':$link->getPageLink('search',true,null,['search_query'=>'--search_term_string--'])}",
"query-input": "required name=search_term_string"
}
}
</script>
{/if}
{if isset($breadcrumb.links[1])}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{foreach from=$breadcrumb.links item=path name=breadcrumb}
{
"@type": "ListItem",
"position": {$smarty.foreach.breadcrumb.iteration},
"name": "{$path.title}",
"item": "{$path.url}"
}{if !$smarty.foreach.breadcrumb.last},{/if}
{/foreach}]
}
</script>
{/if}

View File

@@ -0,0 +1,88 @@
{**
* For the full copyright and license information, please view the LICENSE
* 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/",
"@type": "Product",
"name": "{$product.name}",
"description": "{$page.meta.description|regex_replace:"/[\r\n]/" : " "}",
"category": "{$product.category_name}",
{if !empty($product.cover)}"image" :"{$product.cover.bySize.home_default.url}",{/if}
"sku": "{if $product.reference}{$product.reference}{else}{$product.id}{/if}",
"mpn": "{if $product.mpn}{$product.mpn}{elseif $product.reference}{$product.reference}{else}{$product.id}{/if}"
{if $product.ean13},"gtin": "{$product.ean13}"{/if}
{if $product.upc},"gtin12": "{$product.upc}"{/if}
{if isset($product_manufacturer) && $product_manufacturer->name},
"brand": {
"@type": "Brand",
"name": "{$product_manufacturer->name|escape:'html':'UTF-8'}"
}
{elseif $shop.name},
"brand": {
"@type": "Organization",
"name": "{$shop.name}"
}
{/if}
{if $hasAggregateRating},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "{$ratingValue|round:1|escape:'html':'UTF-8'}",
"reviewCount": "{$ratingReviewCount|escape:'html':'UTF-8'}"
}
{/if}
{if $hasWeight},
"weight": {
"@context": "https://schema.org",
"@type": "QuantitativeValue",
"value": "{$product.weight}",
"unitCode": "{$product.weight_unit}"
}
{/if}
{if $hasOffers},
"offers": {
"@type": "Offer",
"priceCurrency": "{$currency.iso_code}",
"price": "{$product.price_amount}",
"url": "{$product.url}",
"priceValidUntil": "{($smarty.now + (int) (60*60*24*15))|date_format:"%Y-%m-%d"}",
{if $product.images|count > 0}
"image": {strip}[
{foreach from=$product.images item=p_img name="p_img_list"}
"{$p_img.large.url}"{if not $smarty.foreach.p_img_list.last},{/if}
{/foreach}
]{/strip},
{/if}
{if !empty($product.show_condition) && !empty($product.condition)}"itemCondition": "{$product.condition.schema_url}",{/if}
"availability": "{$product.seo_availability}",
"seller": {
"@type": "Organization",
"name": "{$shop.name}"
}
}
{/if}
}
</script>

View File

@@ -0,0 +1,20 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ItemList",
"itemListElement": [
{foreach from=$listing.products item=item name=productsForJsonLd}
{
"@type": "ListItem",
"position": {$smarty.foreach.productsForJsonLd.iteration},
"name": "{$item.name}",
"url": "{$item.url}"
}{if !$smarty.foreach.productsForJsonLd.last},{/if}
{/foreach}
]
}
</script>

View File

@@ -0,0 +1,78 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{if isset($notifications)}
<div id="notifications">
<div class="container">
{if $notifications.error}
{block name='notifications_error'}
<div class="alert alert-danger alert-dismissible" role="alert" tabindex="0">
{if $notifications.error|count > 1}
<ul class="mb-0">
{foreach $notifications.error as $notif}
<li>{$notif nofilter}</li>
{/foreach}
</ul>
{else}
{$notifications.error.0 nofilter}
{/if}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{/block}
{/if}
{if $notifications.warning}
{block name='notifications_warning'}
<div class="alert alert-warning alert-dismissible" role="alert" tabindex="0">
{if $notifications.warning|count > 1}
<ul class="mb-0">
{foreach $notifications.warning as $notif}
<li>{$notif nofilter}</li>
{/foreach}
</ul>
{else}
{$notifications.warning.0 nofilter}
{/if}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{/block}
{/if}
{if $notifications.success}
{block name='notifications_success'}
<div class="alert alert-success alert-dismissible" role="alert" tabindex="0">
{if $notifications.success|count > 1}
<ul class="mb-0">
{foreach $notifications.success as $notif}
<li>{$notif nofilter}</li>
{/foreach}
</ul>
{else}
{$notifications.success.0 nofilter}
{/if}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{/block}
{/if}
{if $notifications.info}
{block name='notifications_info'}
<div class="alert alert-info alert-dismissible" role="alert" tabindex="0">
{if $notifications.info|count > 1}
<ul class="mb-0">
{foreach $notifications.info as $notif}
<li>{$notif nofilter}</li>
{/foreach}
</ul>
{else}
{$notifications.info.0 nofilter}
{/if}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{/block}
{/if}
</div>
</div>
{/if}

View File

@@ -0,0 +1,27 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{if isset($listing.pagination) && $listing.pagination.should_be_displayed}
{$page_nb = 1}
{if isset($smarty.get.page)}
{$page_nb = $smarty.get.page|intval|default:1}
{/if}
{$queryPage = '?page='|cat:$page_nb}
{$page.canonical = $page.canonical|replace:$queryPage:''}
{$prev = false}
{$next = false}
{if ($page_nb - 1) == 1}
{$prev = $page.canonical}
{elseif $page_nb> 2}
{$prev = ($page['canonical']|cat:'?page='|cat:($page_nb - 1))}
{/if}
{if $listing.pagination.total_items> $listing.pagination.items_shown_to}
{$next = ($page['canonical']|cat:'?page='|cat:($page_nb + 1))}
{/if}
{if $prev}<link rel="prev" href="{$prev}">{/if}
{if $next}<link rel="next" href="{$next}">{/if}
{/if}

View File

@@ -0,0 +1,72 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{$componentName = 'pagination'}
<nav class="{$componentName}__container">
<div class="{$componentName}__number">
{block name='pagination_summary'}
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=['%from%' => $pagination.items_shown_from ,'%to%' => $pagination.items_shown_to, '%total%' => $pagination.total_items]}
{/block}
</div>
<div class="{$componentName}__nav">
{block name='pagination_page_list'}
<nav aria-label="{l s='Products pagination' d='Shop.Theme.Catalog'}">
{if $pagination.should_be_displayed}
<ul class="{$componentName}">
{foreach from=$pagination.pages item="page" name="paginationLoop"}
{if $page@iteration === 1}
<li class="page-item">
<button data-ps-data="{$page.url}"
class="page-link previous {['disabled' => !$page.clickable, 'js-pager-link' => $page.clickable]|classnames}"
{if !$page.clickable}aria-disabled="true" disabled{/if}
aria-label="{l s='Go to previous page' d='Shop.Theme.Actions'}"
>
<i class="material-icons rtl-flip" aria-hidden="true">&#xE314;</i>
<span class="d-none d-xl-flex">{l s='Previous' d='Shop.Theme.Actions'}</span>
</button>
</li>
{if $page.type === 'previous'}
{continue}
{/if}
{/if}
{if $page.type === 'spacer'}
<li class="page-item disabled">
<span class="page-link" aria-hidden="true">&hellip;</span>
</li>
{elseif $page.type != "prev" && $page.type != "next"}
<li class="page-item{if $page.current} active{/if}">
<button data-ps-data="{$page.url}"
class="page-link {['js-pager-link' => $page.clickable]|classnames}"
{if !$page.clickable}aria-disabled="true"{/if}
{if $page.current}aria-current="page"{/if}
aria-label="{l s='Go to page %page%' sprintf=['%page%' => $page.page] d='Shop.Theme.Actions'}"
>
{$page.page}
</button>
</li>
{/if}
{if $smarty.foreach.paginationLoop.last}
<li class="page-item">
<button data-ps-data="{$page.url}"
class="page-link next {['disabled' => !$page.clickable, 'js-pager-link' => $page.clickable]|classnames}"
{if !$page.clickable}aria-disabled="true" disabled{/if}
aria-label="{l s='Go to next page' d='Shop.Theme.Actions'}"
>
<span class="d-none d-xl-flex">{l s='Next' d='Shop.Theme.Actions'}</span>
<i class="material-icons rtl-flip" aria-hidden="true">&#xE315;</i>
</button>
</li>
{/if}
{/foreach}
</ul>
{/if}
</nav>
{/block}
</div>
</nav>

View File

@@ -0,0 +1,8 @@
{$themeDir = _PS_THEME_DIR_}
{$preloadFilePath = "`$themeDir`assets/preload.html"}
{$assetsUrl = $urls.theme_assets}
{if file_exists($preloadFilePath)}
{capture name="preloadBlock"}{include file=$preloadFilePath}{/capture}
{$smarty.capture.preloadBlock|replace:'href="../':"href=\"$assetsUrl" nofilter}
{/if}

View File

@@ -0,0 +1,13 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{foreach $stylesheets.external as $stylesheet}
<link rel="stylesheet" href="{$stylesheet.uri}" type="text/css" media="{$stylesheet.media}">
{/foreach}
{foreach $stylesheets.inline as $stylesheet}
<style>
{$stylesheet.content}
</style>
{/foreach}