- Created a new template for the cart rule form with custom label, switch, and choice widgets. - Implemented the InPost Pay block in the order details template for displaying delivery method, APM, and VAT invoice request. - Added legacy support for the order details template to maintain compatibility with older PrestaShop versions.
25 lines
1.2 KiB
Twig
25 lines
1.2 KiB
Twig
<div class="inpostizi-btn-preview">
|
|
<p class="inpostizi-btn-preview__title text-center mb-0">
|
|
{{ 'Button preview'|legacy_trans }}
|
|
</p>
|
|
|
|
<p class="small inpostizi-btn-preview__title-subtitle text-center mb-3">
|
|
{{ 'In order for the widget preview to be displayed, a valid merchant client ID must be provided in the "Configuration" tab.'|legacy_trans }}
|
|
{{ 'Remember to click the \'Save\' button after you finish configuring the button styles'|legacy_trans }}
|
|
</p>
|
|
|
|
{% set btnConfig = form.vars.value %}
|
|
{% set type = form.vars.name %}
|
|
|
|
{% set styleType = btnConfig.darkMode ? 'dark' : 'light' %}
|
|
<div
|
|
class="js-inpostizi-btn-preview-content inpostizi-btn-preview__content inpostizi-btn-preview__content--{{ styleType }} clearfix"
|
|
data-type="{{ type }}"
|
|
{% if form.vars.preview_container_styles is defined and form.vars.preview_container_styles is not same as({}) %}
|
|
style="{% for name,value in form.vars.preview_container_styles %}{{ name|escape('html_attr') }}:{{ value|escape('html_attr') }};{% endfor %}"
|
|
{% endif %}
|
|
>
|
|
{% include '@Modules/inpostizi/views/templates/admin/config/gui/preview_btn.html.twig'%}
|
|
</div>
|
|
</div>
|