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,129 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{extends file='checkout/_partials/steps/checkout-step.tpl'}
{block name='step_content'}
<div class="js-address-form">
<form
method="POST"
action="{url entity='order' params=['id_address' => $id_address]}"
data-refresh-url="{url entity='order' params=['ajax' => 1, 'action' => 'addressForm', 'id_address' => $id_address]}"
data-ps-action="form-validation"
>
{if $use_same_address}
<p>
{if $cart.is_virtual}
{l s='The selected address will be used as your personal address (for invoice).' d='Shop.Theme.Checkout'}
{else}
{l s='The selected address will be used both as your personal address (for invoice) and as your delivery address.' d='Shop.Theme.Checkout'}
{/if}
</p>
{else}
<p class="h3">{l s='Shipping Address' d='Shop.Theme.Checkout'}</p>
{/if}
{if $show_delivery_address_form}
<div id="delivery-address">
{render file = 'checkout/_partials/address-form.tpl'
ui = $address_form
use_same_address = $use_same_address
type = "delivery"
form_has_continue_button = $form_has_continue_button
}
</div>
{elseif $customer.addresses|count> 0}
<div id="delivery-addresses" class="address__list js-address-selector">
{include file = 'checkout/_partials/address-selector-block.tpl'
addresses = $customer.addresses
name = "id_address_delivery"
selected = $id_address_delivery
type = "delivery"
interactive = !$show_delivery_address_form and !$show_invoice_address_form
}
</div>
{if isset($delivery_address_error)}
<p class="alert alert-danger js-address-error" name="alert-delivery" id="id-failure-address-{$delivery_address_error.id_address}">{$delivery_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}
<div class="buttons-wrapper mb-3">
<a href="{$new_address_delivery_url}" class="btn btn-outline-primary">
<i class="material-icons" aria-hidden="true">&#xE145;</i>
{l s='Add new address' d='Shop.Theme.Actions'}
</a>
</div>
{if $use_same_address && !$cart.is_virtual}
<a data-link-action="different-invoice-address" href="{$use_different_address_url}" class="btn btn-basic">
{l s='Billing address differs from shipping address' d='Shop.Theme.Checkout'}
</a>
{/if}
{/if}
{if !$use_same_address}
<p class="h3 mt-4">{l s='Your Invoice Address' d='Shop.Theme.Checkout'}</p>
{if $show_invoice_address_form}
<div id="invoice-address">
{render file = 'checkout/_partials/address-form.tpl'
ui = $address_form
use_same_address = $use_same_address
type = "invoice"
form_has_continue_button = $form_has_continue_button
}
</div>
{else}
<div id="invoice-addresses" class="address__list js-address-selector">
{include file = 'checkout/_partials/address-selector-block.tpl'
addresses = $customer.addresses
name = "id_address_invoice"
selected = $id_address_invoice
type = "invoice"
interactive = !$show_delivery_address_form and !$show_invoice_address_form
}
</div>
{if isset($invoice_address_error)}
<p class="alert alert-danger js-address-error" name="alert-invoice" id="id-failure-address-{$invoice_address_error.id_address}">{$invoice_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}
<a href="{$new_address_invoice_url}" class="btn btn-outline-primary w-100 w-md-auto">
<i class="material-icons" aria-hidden="true">&#xE145;</i>
{l s='Add new address' d='Shop.Theme.Actions'}
</a>
{/if}
{/if}
<div class="buttons-wrapper buttons-wrapper--split buttons-wrapper--invert-mobile mt-3">
<button class="btn btn-outline-primary js-back" type="button" data-step="checkout-personal-information-step">
<i class="material-icons rtl-flip" aria-hidden="true">&#xE5C4;</i>
{l s='Back to Personal Information' d='Shop.Theme.Actions'}
</button>
{if !$form_has_continue_button}
<button type="submit" class="btn btn-primary" name="confirm-addresses" value="1">
{l s='Continue to Shipping' d='Shop.Theme.Actions'}
<div class="material-icons rtl-flip" aria-hidden="true">&#xE5C8;</div>
</button>
<input type="hidden" id="not-valid-addresses" class="js-not-valid-addresses" value="{$not_valid_addresses}">
{/if}
</div>
</form>
{capture name="address_selector_bottom"}{hook h='displayAddressSelectorBottom'}{/capture}
{if $smarty.capture.address_selector_bottom}
{block name='address_selector_bottom'}
<div class="address-selector-bottom mt-3">
{$smarty.capture.address_selector_bottom nofilter}
</div>
{/block}
{/if}
</div>
{/block}

View File

@@ -0,0 +1,39 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{block name='step'}
<section
id="{$identifier}"
class="{[
'step' => true,
'tab-pane' => true,
'collapse' => true,
'step--current' => $step_is_current,
'step--reachable' => $step_is_reachable,
'step--complete' => $step_is_complete && !$step_is_current,
'js-current-step' => $step_is_current,
'active' => $step_is_current,
'show' => $step_is_current
]|classnames}" role="tabpanel">
<div class="step__title js-step-title">
{if $step_is_current eq true}
<h1 class="page-title-section">
{else}
<p class="page-title-section">
{/if}
{$title}
{if $step_is_current eq true}
</h1>
{else}
</p>
{/if}
<hr>
</div>
<div class="step__content">
{block name='step_content'}DUMMY STEP CONTENT{/block}
</div>
</section>
{/block}

View File

@@ -0,0 +1,177 @@
{extends file='checkout/_partials/steps/checkout-step.tpl'}
{block name='step_content'}
{hook h='displayPaymentTop'}
{* used by javascript to correctly handle cart updates when we are on payment step (eg vouchers added) *}
<div style="display:none" class="js-cart-payment-step-refresh"></div>
{if !empty($display_transaction_updated_info)}
<p class="payment-options__updated">
{l s='Transaction amount has been correctly updated' d='Shop.Theme.Checkout'}
</p>
{/if}
{if $is_free}
<p class="payment-options__free">{l s='No payment needed for this order' d='Shop.Theme.Checkout'}</p>
{/if}
<div class="payment-options__list{if $is_free} d-block d-sm-none{/if}">
{foreach from=$payment_options item="module_options"}
{foreach from=$module_options item="option"}
<div id="{$option.id}-container" class="payment-option">
{* This is the way an option should be selected when Javascript is enabled *}
<div class="payment-option__form-check form-check">
<input
class="payment-option__input form-check-input ps-shown-by-js {if $option.binary} binary{/if}"
type="radio"
name="payment-option"
data-module-name="{$option.module_name}"
id="{$option.id}"
{if ($selected_payment_option == $option.id || $is_free) || ($payment_options|@count === 1 && $module_options|@count === 1)} checked {/if}
>
<label class="payment-option__label form-check-label" for="{$option.id}">
{if $option.logo}
<img class="img-fluid" src="{$option.logo}" loading="lazy">
{/if}
{$option.call_to_action_text}
</label>
</div>
{* This is the way an option should be selected when Javascript is disabled *}
<form method="GET" class="payment-option__no-js-form ps-hidden-by-js">
{if $option.id === $selected_payment_option}
{l s='Selected' d='Shop.Theme.Checkout'}
{else}
<button class="ps-hidden-by-js" type="submit" name="select_payment_option" value="{$option.id}">
{l s='Choose' d='Shop.Theme.Actions'}
</button>
{/if}
</form>
{if $option.additionalInformation}
<div
id="{$option.id}-additional-information"
class="payment-option__additional-information js-additional-information"
{if $option.id != $selected_payment_option}style="display: none;"{/if}
>
{$option.additionalInformation nofilter}
</div>
{/if}
<div
id="pay-with-{$option.id}-form"
class="js-payment-option-form"
{if $option.id != $selected_payment_option}style="display: none;"{/if}
>
{if $option.form}
{$option.form nofilter}
{else}
<form id="payment-form" method="POST" action="{$option.action nofilter}">
{foreach from=$option.inputs item=input}
<input type="{$input.type}" name="{$input.name}" value="{$input.value}">
{/foreach}
<button style="display:none" id="pay-with-{$option.id}" type="submit"></button>
</form>
{/if}
</div>
</div>
{/foreach}
{foreachelse}
<p class="alert alert-danger">{l s='Unfortunately, there are no payment method available.' d='Shop.Theme.Checkout'}</p>
{/foreach}
</div>
{if $conditions_to_approve|count}
<p class="ps-hidden-by-js">
{* At the moment, we're not showing the checkboxes when JS is disabled
because it makes ensuring they were checked very tricky and overcomplicates
the template. Might change later.
*}
{l s='By confirming the order, you certify that you have read and agree with all of the conditions below:' d='Shop.Theme.Checkout'}
</p>
<form id="conditions-to-approve" class="js-conditions-to-approve mt-3" method="GET">
{foreach from=$conditions_to_approve item="condition" key="condition_name"}
<div class="my-2 form-check">
<input id = "conditions_to_approve[{$condition_name}]"
name = "conditions_to_approve[{$condition_name}]"
required
type = "checkbox"
value = "1"
class = "ps-shown-by-js form-check-input"
>
<label class="js-terms form-check-label" for="conditions_to_approve[{$condition_name}]">
{$condition nofilter}
</label>
</div>
{/foreach}
</form>
{/if}
{hook h='displayCheckoutBeforeConfirmation'}
{if $show_final_summary}
{include file='checkout/_partials/order-final-summary.tpl'}
{/if}
{if $show_final_summary}
<article class="alert alert-danger mb-4 js-alert-payment-conditions" role="alert">
{if isset($tos_cms) && $tos_cms && $conditions_to_approve|count == 1}
{l
s='Please make sure you\'ve chosen a [1]payment method[/1] and accepted the [2]terms and conditions[/2].'
sprintf=[
'[1]' => '<a href="#checkout-payment-step" class="alert-link">',
'[/1]' => '</a>',
'[2]' => '<a href="#conditions-to-approve" class="alert-link">',
'[/2]' => '</a>'
]
d='Shop.Theme.Checkout'
}
{elseif !empty($conditions_to_approve)}
{l
s='Please make sure you\'ve chosen a [1]payment method[/1] and accepted the required condition(s).'
sprintf=[
'[1]' => '<a href="#checkout-payment-step" class="alert-link">',
'[/1]' => '</a>'
]
d='Shop.Theme.Checkout'
}
{else}
{l s='Please make sure you\'ve chosen a [1]payment method[/1].'
sprintf=[
'[1]' => '<a href="#checkout-payment-step" class="alert-link">',
'[/1]' => '</a>'
]
d='Shop.Theme.Checkout'
}
{/if}
</article>
{/if}
<div class="buttons-wrapper buttons-wrapper--split buttons-wrapper--invert-mobile mt-3">
<button class="btn btn-outline-primary js-back" type="button" data-step="checkout-delivery-step">
<div class="material-icons rtl-flip" aria-hidden="true">&#xE5C4;</div>
{l s='Back to Shipping' d='Shop.Theme.Actions'}
</button>
<div id="payment-confirmation" class="js-payment-confirmation">
<div class="ps-shown-by-js">
<button type="submit" class="btn btn-primary {if !$selected_payment_option} disabled{/if}">
{l s='Place Order' d='Shop.Theme.Checkout'}
<div class="material-icons rtl-flip" aria-hidden="true">&#xE5C8;</div>
</button>
</div>
<div class="ps-hidden-by-js">
{if $selected_payment_option and $all_conditions_approved}
<label for="pay-with-{$selected_payment_option}">{l s='Order with an obligation to pay' d='Shop.Theme.Checkout'}</label>
{/if}
</div>
</div>
</div>
{hook h='displayPaymentByBinaries'}
{/block}

View File

@@ -0,0 +1,100 @@
{extends file='checkout/_partials/steps/checkout-step.tpl'}
{$stepName = 'personnal-information'}
{block name='step_content'}
{hook h='displayPersonalInformationTop' customer=$customer}
{if $customer.is_logged && !$customer.is_guest}
<div class="step__account">
<p>
{* [1][/1] is for a HTML tag. *}
{l s='Connected as [1]%firstname% %lastname%[/1].'
d='Shop.Theme.Customeraccount'
sprintf=[
'[1]' => "<a href='{$urls.pages.identity}' aria-label='{l s='My account (%firstname% %lastname%)' d='Shop.Theme.Customeraccount' sprintf=['%firstname%' => $customer.firstname, '%lastname%' => $customer.lastname]}'>",
'[/1]' => "</a>",
'%firstname%' => $customer.firstname,
'%lastname%' => $customer.lastname
]
}
</p>
<p class="mb-1">
{* [1][/1] is for a HTML tag. *}
{l
s='Not you? [1]Sign out[/1]'
d='Shop.Theme.Customeraccount'
sprintf=[
'[1]' => "<a class='text-danger' href='{$urls.actions.logout}'>",
'[/1]' => "</a>"
]
}
</p>
{if !isset($empty_cart_on_logout) || $empty_cart_on_logout}
<p class="mb-0">
<small class="text-body-tertiary">{l s='If you sign out now, your cart will be emptied.' d='Shop.Theme.Checkout'}</small>
</p>
{/if}
</div>
<form id="checkout-continue-form" method="GET" action="{$urls.pages.order}">
<div class="buttons-wrapper buttons-wrapper--end mt-3">
<button
class="btn btn-primary"
name="controller"
type="submit"
value="order"
>
{l s='Continue to Addresses' d='Shop.Theme.Actions'}
<i class="material-icons rtl-flip" aria-hidden="true">&#xE5C8;</i>
</button>
</div>
</form>
{else}
<ul class="nav nav-underline" id="personal-information-tabs" role="tablist">
<li class="nav-item" role="presentation">
<button
class="nav-link {if !$show_login_form}active{/if}"
data-bs-toggle="tab"
data-bs-target="#checkout-guest-form"
type="button"
role="tab"
aria-controls="checkout-guest-form"
aria-selected="{if !$show_login_form}true{else}false{/if}"
>
{if isset($guest_allowed) && $guest_allowed}
{l s='Order as a guest' d='Shop.Theme.Checkout'}
{else}
{l s='New customer' d='Shop.Theme.Checkout'}
{/if}
</button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link {if $show_login_form}active{/if}"
data-bs-toggle="tab"
data-bs-target="#checkout-login-form"
type="button"
role="tab"
aria-controls="checkout-login-form"
aria-selected="{if $show_login_form}true{else}false{/if}"
>
{l s='Sign in' d='Shop.Theme.Actions'}
</button>
</li>
</ul>
<div class="tab-content" id="personal-information-tabs-content">
<div class="tab-pane fade{if !$show_login_form} show active{/if}" id="checkout-guest-form" aria-labelledby="checkout-guest-form" role="tabpanel">
{render file='checkout/_partials/customer-form.tpl' ui=$register_form guest_allowed=$guest_allowed}
</div>
<div class="tab-pane fade{if $show_login_form} show active{/if}" id="checkout-login-form" aria-labelledby="checkout-login-form" role="tabpanel">
{render file='checkout/_partials/login-form.tpl' ui=$login_form}
</div>
</div>
{/if}
{/block}

View File

@@ -0,0 +1,113 @@
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
{extends file='checkout/_partials/steps/checkout-step.tpl'}
{block name='step_content'}
<div id="delivery-options__hook">
{$hookDisplayBeforeCarrier nofilter}
</div>
<div class="delivery-options__container">
{if $delivery_options|count}
<form
id="js-delivery"
data-url-update="{url entity='order' params=['ajax' => 1, 'action' => 'selectDeliveryOption']}"
method="post"
class="delivery-options__form"
>
{block name='delivery_options'}
<div class="delivery-options__list">
{foreach from=$delivery_options item=carrier key=carrier_id name=delivery_options}
<div class="delivery-option__item js-delivery-option">
<label class="delivery-option__label" for="delivery_option_{$carrier.id}">
<div class="delivery-option__left">
<span class="delivery-option__check form-check">
<input type="radio" class="form-check-input" name="delivery_option[{$id_address}]" id="delivery_option_{$carrier.id}" value="{$carrier_id}"{if $delivery_option == $carrier_id} checked{/if}>
</span>
<div class="delivery-option__carrier {if $carrier.logo} delivery-option__carrier--hasLogo{/if}">
{if $carrier.logo}
<img class="delivery-option__carrier-logo" src="{$carrier.logo}" class="img-fluid" alt="{$carrier.name}" loading="lazy" aria-hidden="true">
{/if}
<span class="delivery-option__carrier-name">{$carrier.name}</span>
</div>
</div>
<div class="delivery-option__content">
{$carrier.delay}
</div>
<div class="delivery-option__price">
{$carrier.price}
</div>
</label>
<div class="delivery-option__extra js-carrier-extra" {if $delivery_option == $carrier_id}data-active{/if}>
{capture name='delivery_option_extra_content'}{$carrier.extraContent nofilter}{/capture}
{if !empty($smarty.capture.delivery_option_extra_content)}
<div class="delivery-option__extra-content js-carrier-extra-content">
{$smarty.capture.delivery_option_extra_content nofilter}
</div>
{/if}
</div>
</div>
{/foreach}
</div>
{/block}
<div class="order-options">
<div id="delivery" class="mb-4">
<label for="delivery_message" class="form-label">{l s='Write a comment about this order' d='Shop.Theme.Checkout'}</label>
<textarea class="form-control" rows="2" cols="120" id="delivery_message" placeholder="{l s='Write your comment...' d='Shop.Theme.Checkout'}" name="delivery_message">{$delivery_message}</textarea>
</div>
{if $recyclablePackAllowed}
<div class="form-check" for="input_recyclable">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" id="input_recyclable" name="recyclable" value="1"{if $recyclable} checked{/if}>
{l s='I would like to receive my order in recycled packaging.' d='Shop.Theme.Checkout'}
</label>
</div>
{/if}
{if $gift.allowed}
<div class="form-check mb-4">
<label class="form-check-label" for="input_gift" data-bs-toggle="collapse" data-bs-target="#gift">
<input class="form-check-input js-gift-checkbox" id="input_gift" name="gift" type="checkbox" value="1"{if $gift.isGift} checked="checked"{/if}>
{$gift.label}
</label>
</div>
<div id="gift" class="collapse{if $gift.isGift} show{/if}">
<label for="gift_message" class="form-label">{l s='If you\'d like, you can add a note to the gift:' d='Shop.Theme.Checkout'}</label>
<textarea class="form-control" rows="2" cols="120" id="gift_message" name="gift_message">{$gift.message}</textarea>
</div>
{/if}
</div>
<div class="buttons-wrapper buttons-wrapper--split buttons-wrapper--invert-mobile mt-3">
<button class="btn btn-outline-primary w-100 w-md-auto mb-3 mb-md-0 js-back" type="button" data-step="checkout-addresses-step">
<div class="material-icons rtl-flip" aria-hidden="true">&#xE5C4;</div>
{l s='Back to Addresses' d='Shop.Theme.Actions'}
</button>
<button type="submit" class="btn btn-primary w-100 w-md-auto" name="confirmDeliveryOption" value="1">
{l s='Continue to Payment' d='Shop.Theme.Actions'}
<div class="material-icons rtl-flip" aria-hidden="true">&#xE5C8;</div>
</button>
</div>
</form>
{else}
<p class="alert alert-danger">{l s='Unfortunately, there are no carriers available for your delivery address.' d='Shop.Theme.Checkout'}</p>
{/if}
</div>
<div class="delivery-options__display-after-carrier" id="hook-display-after-carrier">
{$hookDisplayAfterCarrier nofilter}
</div>
<div class="delivery-options__extra-carrier" id="extra_carrier"></div>
{/block}

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.
*}
{block name='step'}
<section class="step step--unreachable d-none" id="{$identifier}">
<div class="step__title js-step-title">
<p class="step__title-left h3">
{$title}
</p>
</div>
</section>
{/block}