W szablonach Rubin, Szafir oraz Topaz / One Page Shop wprowadziliśmy funkcjonalność szybkich zwrotów. Umożliwia ona klientom składanie wniosku o zwrot produktu zarówno z poziomu profilu klienta (zalogowani), jak i z dedykowanej strony zwrotów po podaniu numeru zamówienia oraz adresu e-mail (niezalogowani). Wraz z funkcjonalnością pojawił się m.in. rozbudowany ekran potwierdzenia zwrotu zawierający kolejne kroki i adres do wysyłki, banery informacyjne dotyczące terminu zwrotu oraz przyciski akcji w tabeli produktów wyświetlane bezpośrednio (zamiast w rozwijanym menu).
Aby Twój szablon poprawnie obsługiwał te zmiany, wprowadź modyfikacje opisane poniżej w sekcji dotyczącej Twojego szablonu. Po zakończeniu edycji pamiętaj o kompilacji i minifikacji plików js oraz scss.
Szablon Rubin
1. Tłumaczenia
W panelu administracyjnym sklepu zaktualizuj dwa istniejące tłumaczenia oraz dodaj nowe klucze wymagane przez funkcjonalność szybkich zwrotów.
Zaktualizuj poniższe istniejące tłumaczenia:
ReturnSuccessTitle
– PL: Gotowe! Przyjęliśmy Twoje zgłoszenie
– EN: Done! We have received your request
– DE: Fertig! Wir haben Ihre Anfrage erhalten
– FR: C’est fait ! Nous avons reçu votre demande
ReturnSuccessInfo
– PL: Przygotuj paczkę i odeślij ją do nas – wszystkie szczegóły znajdziesz poniżej.
– EN: Prepare the package and send it back to us – all the details are below.
– DE: Bereiten Sie das Paket vor und senden Sie es an uns zurück – alle Details finden Sie unten.
– FR: Préparez le colis et renvoyez-le nous – tous les détails sont ci-dessous.
Dodaj nowe tłumaczenia:
OrderReturnDeadlineInfo
– PL: Zamówienie można zwrócić w ciągu {0} dni od daty dostawy.
– EN: You can return the order within {0} days from the delivery date.
– DE: Sie können die Bestellung innerhalb von {0} Tagen ab Lieferdatum zurückgeben.
– FR: Vous pouvez retourner la commande dans les {0} jours suivant la date de livraison.
RestrictedOrderViewInfo
– PL: Wybrane dane zamówienia zostały ukryte ze względów bezpieczeństwa. Możesz zwrócić produkty bez logowania.
– EN: Some order details are hidden for security reasons. You can return products without signing in.
– DE: Einige Bestelldetails wurden aus Sicherheitsgründen ausgeblendet. Sie können Produkte ohne Anmeldung zurücksenden.
– FR: Certaines informations de la commande ont été masquées pour des raisons de sécurité. Vous pouvez retourner des produits sans vous connecter.
Com_RefundMethod
– PL: Sposób zwrotu środków
– EN: Refund method
– DE: Rückerstattungsmethode
– FR: Mode de remboursement
Com_RefundAsPaid
– PL: Tak jak zapłacono
– EN: Same as paid
– DE: Wie bezahlt
– FR: Comme payé
Com_RefundToBankAccount
– PL: Na konto bankowe
– EN: To bank account
– DE: Auf Bankkonto
– FR: Sur le compte bancaire
Com_BankAccountNumber
– PL: Nr konta bankowego
– EN: Bank account number
– DE: Bankkontonummer
– FR: Numéro de compte bancaire
Com_ConfirmationSentTo
– PL: Potwierdzenie zwrotu zostało wysłane na adres:
– EN: Return confirmation has been sent to:
– DE: Bestätigung wurde gesendet an:
– FR: La confirmation de retour a été envoyée à:
Com_NextSteps
– PL: Następne kroki
– EN: Next Steps
– DE: Nächste Schritte
– FR: Prochaines étapes
Com_PackProducts
– PL: Bezpiecznie zapakuj swoje produkty
– EN: Safely pack your products
– DE: Verpacken Sie Ihre Produkte sicher
– FR: Emballez vos produits en toute sécurité
Com_SendPackageTo
– PL: Wyślij paczkę na adres:
– EN: Send the package to the address:
– DE: Senden Sie das Paket an die Adresse:
– FR: Envoyez le colis à l’adresse:
Com_RefundAfterReceive
– PL: Pieniądze zwrócimy niezwłocznie po otrzymaniu i sprawdzeniu Twojej paczki
– EN: We will refund the money promptly upon receipt and inspection of your package
– DE: Wir erstatten das Geld umgehend nach Erhalt und Überprüfung Ihres Pakets zurück
– FR: Nous rembourserons l’argent rapidement après réception et inspection de votre colis
ReturnInThreeSteps
– PL: Zwróć towar w 3 krokach
– EN: Return the product in 3 steps
– DE: Geben Sie die Ware in 3 Schritten zurück
– FR: Retournez la marchandise en 3 étapes
ReturnWithoutReasonInfo
– PL: Przysługuje Ci możliwość zwrotu bez podania przyczyny.
– EN: You have the right to return the product without giving a reason.
– DE: Sie haben das Recht, die Ware ohne Angabe von Gründen zurückzugeben.
– FR: Vous avez le droit de retourner la marchandise sans donner de motif.
OrEnterOrderNumber
– PL: lub podaj numer zamówienia
– EN: or enter the order number
– DE: oder geben Sie die Bestellnummer ein
– FR: ou saisissez le numéro de commande
FillForm
– PL: Wypełnij formularz
– EN: Fill out the form
– DE: Füllen Sie das Formular aus
– FR: Remplissez le formulaire
ReturnOnline
– PL: zwrotu online
– EN: online return
– DE: Online-Rückgabe
– FR: retour en ligne
SendParcel
– PL: Wyślij paczkę
– EN: Send the parcel
– DE: Paket senden
– FR: Envoyer le colis
SendParcelToOurAddress
– PL: nadaj przesyłkę na nasz adres
– EN: send the parcel to our address
– DE: senden Sie das Paket an unsere Adresse
– FR: envoyez le colis à notre adresse
FastSimpleSecure
– PL: Szybko, prosto i bezpiecznie.
– EN: Fast, simple and secure.
– DE: Schnell, einfach und sicher.
– FR: Rapide, simple et sécurisé.
ReadyForReturn
– PL: Gotowy do zwrotu?
– EN: Ready for return?
– DE: Bereit zur Rückgabe?
– FR: Prêt pour le retour ?
ReadyForReturnInfo
– PL: Kliknij poniżej, aby rozpocząć proces zwrotu. Przeprowadzimy Cię przez wszystkie kroki.
– EN: Click below to start the return process. We will guide you through all the steps.
– DE: Klicken Sie unten, um den Rückgabeprozess zu starten. Wir führen Sie durch alle Schritte.
– FR: Cliquez ci-dessous pour lancer le processus de retour. Nous vous guiderons à travers toutes les étapes.
StartReturn
– PL: Rozpocznij zwrot
– EN: Start return
– DE: Rückgabe starten
– FR: Commencer le retour
ProductReturn
– PL: Zwrot produktu
– EN: Product return
– DE: Produktrückgabe
– FR: Retour du produit
ProductReturnFormInfo
– PL: Wprowadź dane zamówienia, aby zlokalizować zakup i rozpocząć proces zwrotu. Numer zamówienia znajdziesz w e-mailu z potwierdzeniem.
– EN: Enter the order details to locate the purchase and start the return process. You will find the order number in the confirmation e-mail.
– DE: Geben Sie die Bestelldaten ein, um den Kauf zu lokalisieren und den Rückgabeprozess zu starten. Die Bestellnummer finden Sie in der Bestätigungs-E-Mail.
– FR: Saisissez les données de la commande pour localiser l’achat et démarrer le processus de retour. Vous trouverez le numéro de commande dans l’e-mail de confirmation.
InvalidOrderNumber
– PL: Błędny numer zamówienia. Spróbuj ponownie.
– EN: Invalid order number. Please try again.
– DE: Ungültige Bestellnummer. Bitte versuchen Sie es erneut.
– FR: Numéro de commande incorrect. Veuillez réessayer.
FindOrder
– PL: Znajdź zamówienie
– EN: Find order
– DE: Bestellung finden
– FR: Trouver la commande
LoginToSeeOrdersAndReturn
– PL: aby zobaczyć swoje zamówienia i dokonać zwrotu.
– EN: to see your orders and make a return.
– DE: um Ihre Bestellungen einzusehen und eine Rückgabe vorzunehmen.
– FR: pour voir vos commandes et effectuer un retour.
RefundLookupError
– PL: Wystąpił błąd podczas wyszukiwania zamówienia. Spróbuj ponownie później.
– EN: An error occurred while searching for the order. Please try again later.
– DE: Bei der Suche nach der Bestellung ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut.
– FR: Une erreur s’est produite lors de la recherche de la commande. Veuillez réessayer plus tard.
2. Nowa strona Szybkie zwroty
Funkcjonalność szybkich zwrotów wymaga utworzenia dodatkowej strony statycznej refunds. Wykonaj poniższe kroki.
Plik refunds.html w katalogu głównym szablonu
W katalogu głównym szablonu utwórz nowy plik refunds.html z następującą zawartością:
{% extends '_layout.html' -%}
{% block pageContent -%}
{% include 'static-elements/refunds/refunds.html’ -%}
{% endblock -%}
Plik static-elements/refunds/refunds.html
W folderze static-elements utwórz nowy katalog refunds, a w nim plik refunds.html:
{{ translations.Returns }}
{{ translations.ReturnInThreeSteps }}
{{ translations.ReturnWithoutReasonInfo }}
- 1
{{ translations.LogIn }} {{ translations.OrEnterOrderNumber }}
- 2
{{ translations.FillForm }} {{ translations.ReturnOnline }}
- 3
{{ translations.SendParcel }} – {{ translations.SendParcelToOurAddress }}
{{ translations.FastSimpleSecure }}
{{ translations.ReadyForReturn }}
{{ translations.ReadyForReturnInfo }}
{% if usr.Authenticated -%}
{{ translations.StartReturn }}
{% else -%}
{% endif -%}
{% unless usr.Authenticated -%}
{% endunless -%}
Plik js/layout1.js – kod obsługi formularza zwrotu
Na końcu pliku js/layout1.js dodaj poniższy kod odpowiedzialny za walidację i wysłanie formularza wyszukiwania zamówienia (dla niezalogowanego klienta):
$(document).ready(function() {
refunds.init();
});
const refunds = {
init: function() {
this.events();
},
findRefundOrder: function(orderNumber, email) {
return $.post(”, {
__action: 'Order/QuickReturnLookup’,
orderId: orderNumber,
email: email,
__csrf: __CSRF
});
},
showForm: function() {
$(’.refunds-initial-view-js’).addClass(’hidden-js’);
$(’.refund-form-view-js’).removeClass(’hidden-js’);
$(’.refund-form-js input[name=”orderNumber”]’).trigger(’focus’);
},
clearFieldError: function(input) {
const $input = $(input);
$input.removeClass(’validation-error-js’);
$input.closest(’.form__input-wrapper’).find(’.form__invalid-input’).addClass(’hidden-js’);
},
submitForm: async function(button) {
const $submit = $(button);
const $form = $submit.closest(’.refund-form-js’);
const $orderInput = $form.find(’input[name=”orderNumber”]’);
const $emailInput = $form.find(’input[name=”email”]’);
const orderValue = $orderInput.val().trim();
const emailValue = $emailInput.val().trim();
const emailRegex = /^\w+([-+.’]\w+)*@\w+([-.]\w+)*\.\w{2,}$/;
let hasError = false;
$form.find(’.form__invalid-input’).addClass(’hidden-js’);
$form.find(’.form__input-value’).removeClass(’validation-error-js’);
if (orderValue.length === 0) {
$orderInput.addClass(’validation-error-js’);
$orderInput.closest(’.form__input-wrapper’).find(’.validation-required-js’).removeClass(’hidden-js’);
hasError = true;
}
if (emailValue.length === 0) {
$emailInput.addClass(’validation-error-js’);
$emailInput.closest(’.form__input-wrapper’).find(’.validation-required-js’).removeClass(’hidden-js’);
hasError = true;
} else if (!emailRegex.test(emailValue)) {
$emailInput.addClass(’validation-error-js’);
$emailInput.closest(’.form__input-wrapper’).find(’.email-valid-js’).removeClass(’hidden-js’);
hasError = true;
}
if (hasError) {
return;
}
$submit.prop(’disabled’, true);
try {
const result = await refunds.findRefundOrder(orderValue, emailValue);
const action = result.action;
if (action.Redirect302) {
globalThis.location.href = action.Redirect302;
return;
}
app.temporaryPopupMessage(undefined, action.Message, action.Type);
} catch (error) {
console.error(’Refund order lookup failed.’, error);
app.temporaryPopupMessage(undefined, $form.data(’error’), 'err’);
} finally {
$submit.prop(’disabled’, false);
}
},
events: function() {
$(’body’).on(’click’, ’.start-refund-js’, function() {
refunds.showForm();
});
$(’body’).on(’input’, ’.refund-form-js .form__input-value’, function() {
refunds.clearFieldError(this);
});
$(’body’).on(’click’, ’.refund-form-submit-js’, function(e) {
e.preventDefault();
refunds.submitForm(this);
});
$(’body’).on(’keydown’, ’.refund-form-js input’, function(e) {
if (e.key === 'Enter’) {
e.preventDefault();
$(this).closest(’.refund-form-js’).find(’.refund-form-submit-js’).trigger(’click’);
}
});
}
};
Pliki SCSS strony Szybkie zwroty
W folderze scss/static-elements utwórz nowy katalog refunds i umieść w nim trzy pliki: refunds-g.scss, refunds-m.scss i refunds-t.scss.
scss/static-elements/refunds/refunds-g.scss:
.refunds-page-title {
margin: 0 0 24px;
font-size: 24px;
font-weight: 500;
line-height: 32px;
color: $primaryColorFont;
}
.refunds-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 32px;
margin-bottom: 32px;
color: $primaryColorFont;
}
.refunds-info {
align-self: flex-start;
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
max-width: 800px;
&__title {
margin: 0;
font-size: 20px;
font-weight: 600;
line-height: 28px;
color: $primaryColorFont;
}
&__intro {
margin: 0;
font-size: 16px;
font-weight: 500;
line-height: 24px;
color: $primaryColorFont;
}
&__hint {
margin: 4px 0 0;
font-size: 12px;
font-weight: 400;
line-height: 20px;
color: $breadcrumbs;
}
}
.refunds-steps {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 8px;
&__item {
display: flex;
align-items: center;
gap: 12px;
}
&__number {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 50%;
background-color: #f3f3f3;
color: $primaryColor;
font-size: 14px;
font-weight: 600;
line-height: 20px;
}
&__text {
margin: 0;
font-size: 14px;
font-weight: 400;
line-height: 22px;
color: $primaryColorFont;
strong {
font-weight: 600;
}
}
}
.refunds-cta {
box-sizing: border-box;
width: 100%;
max-width: 578px;
padding: 40px;
display: flex;
flex-direction: column;
align-items: center;
gap: 24px;
background-color: $bgColor;
border: 1px solid $lightBorderColor;
border-radius: 8px;
&__header {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
width: 100%;
}
&__title {
margin: 0;
font-size: 24px;
font-weight: 600;
line-height: 32px;
text-align: center;
color: $primaryColorFont;
}
&__description {
margin: 0;
font-size: 16px;
font-weight: 400;
line-height: 24px;
text-align: center;
color: $breadcrumbs;
}
&__button {
width: 100%;
text-decoration: none;
}
}
.refund-form-section {
display: flex;
justify-content: center;
width: 100%;
margin-bottom: 32px;
}
.refund-form {
box-sizing: border-box;
width: 100%;
max-width: 578px;
padding: 40px;
background-color: $bgColor;
border: 1px solid $lightBorderColor;
border-radius: 8px;
&__header {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 32px;
}
&__title {
margin: 0;
font-size: 24px;
font-weight: 600;
line-height: 32px;
color: $primaryColorFont;
}
&__description {
margin: 0;
font-size: 14px;
font-weight: 400;
line-height: 20px;
color: $breadcrumbs;
}
&__body {
display: flex;
flex-direction: column;
}
.form__input-wrapper {
.form__input-value {
&.validation-error-js {
border-color: $dangerColor;
color: $dangerColor;
}
}
.form__invalid-input {
position: static;
display: block;
margin: 4px 0 0;
padding-left: 16px;
text-align: left;
color: $dangerColor;
font-size: 12px;
font-weight: 400;
line-height: 16px;
}
}
&__submit {
width: 100%;
margin-top: 4px;
}
&__login-info {
margin: 16px 0 0;
text-align: center;
font-size: 14px;
font-weight: 400;
line-height: 20px;
color: $primaryColorFont;
}
&__login-link {
color: $primaryColor;
font-weight: 600;
cursor: pointer;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
scss/static-elements/refunds/refunds-m.scss:
@media screen and (max-width: 767px) {
.refunds-page-title {
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
.refunds-container {
gap: 24px;
margin-bottom: 24px;
}
.refunds-info {
max-width: 100%;
gap: 12px;
&__title {
font-size: 18px;
line-height: 24px;
}
&__intro {
font-size: 14px;
line-height: 22px;
}
}
.refunds-steps {
&__item {
align-items: flex-start;
gap: 10px;
}
&__number {
width: 28px;
height: 28px;
font-size: 13px;
}
&__text {
font-size: 13px;
line-height: 20px;
padding-top: 3px;
}
}
.refunds-cta {
padding: 24px;
&__title {
font-size: 20px;
line-height: 28px;
}
&__description {
font-size: 14px;
line-height: 22px;
}
}
.refund-form {
padding: 24px;
&__header {
margin-bottom: 24px;
}
&__title {
font-size: 20px;
line-height: 28px;
}
&__description {
font-size: 13px;
line-height: 18px;
}
&__login-info {
font-size: 13px;
}
}
}
scss/static-elements/refunds/refunds-t.scss:
@media screen and (min-width: 768px) and (max-width: 1439px) {
.refunds-info {
max-width: 100%;
}
}
3. Modyfikacje istniejących plików HTML
partials/cart/thx.html
W pliku partials/cart/thx.html znajdź fragment generujący etykietę zgody w sekcji zgód marketingowych:
Usuń z niego atrybut for=”{{ consent.FieldValue }}”. Po zmianie linia powinna wyglądać tak:
partials/common/login.html
1. W pliku partials/common/login.html w kontenerze opakowującym formularz dodaj klasę login-container-popup. Zamień linię:
2. W warunku otaczającym przycisk zamykający popup logowania usuń warunek and settings.signIn == „popup”. Zamień linię:
{% if page.PageId != config.DefinedPages.Login.Id and page.PageId != config.DefinedPages.CustomerProfile.Id and page.PageId != config.DefinedPages.Order.Id and settings.signIn == "popup" -%}
na:
{% if page.PageId != config.DefinedPages.Login.Id and page.PageId != config.DefinedPages.CustomerProfile.Id and page.PageId != config.DefinedPages.Order.Id -%}
partials/product/amount-stepper.html
W pliku partials/product/amount-stepper.html znajdź blok ustawiający zmienne dla typów complaint i return:
{% if type == 'complaint' or type == 'return' -%}
{% assign reloadClass = '' -%}
{% assign complaintOrReturn = true -%}
{% endif -%}
i dodaj w jego wnętrzu nową linię ustawiającą maksymalną ilość produktu:
{% if type == 'complaint' or type == 'return' -%}
{% assign reloadClass = '' -%}
{% assign complaintOrReturn = true -%}
{% assign max = product.Quantity | Normalize -%}
{% endif -%}
partials/order/products-partials/product-table-header.html
Na samym początku pliku partials/order/products-partials/product-table-header.html dodaj blok przypisujący flagę complaintsOrReturnsEnabled:
{% if config.Complaints.ComplaintsEnabled or config.Complaints.ReturnsEnabled -%}
{% assign complaintsOrReturnsEnabled = true -%}
{% endif -%}
partials/product/products-table.html
Przyciski reklamacji i zwrotu są wyświetlane bezpośrednio w tabeli, zamiast w rozwijanym menu. W pliku partials/product/products-table.html znajdź komórkę z opcjami:
{% if order.Status == 3 and complaintsOrReturnsEnabled and product.CanComplain == true -%}
{% endif -%}
i zastąp ją następującym fragmentem:
{% if order.Status == 3 and complaintsOrReturnsEnabled -%}
{% if config.Complaints.ComplaintsEnabled == true and product.CanComplain == true -%}
{% endif -%}
{% if config.Complaints.ReturnsEnabled == true and product.CanReturn == true and product.IsSetElement == false -%}
{% endif -%}
{% endif -%}
Następnie w tym samym pliku znajdź zewnętrzny warunek otaczający kontenery formularzy reklamacji i zwrotu i poluzuj go (usuń warunek product.CanComplain == true). Zamień:
{% if order.Status == 3 and complaintsOrReturnsEnabled and product.CanComplain == true -%}
na:
{% if order.Status == 3 and complaintsOrReturnsEnabled -%}
partials/customer-profile/orders/order-details.html
W pliku partials/customer-profile/orders/order-details.html wykonaj poniższe zmiany.
a) Bloki Opcje (zawierające klasę options submenu z przyciskami akcji zamówienia) opakuj warunkiem {% unless order.Restricted -%} … {% endunless -%}, aby ukryć je dla niezalogowanych klientów dokonujących szybkiego zwrotu. Wstaw {% unless order.Restricted -%} bezpośrednio przed otwierającym
:
{% unless order.Restricted -%}
{% endunless -%}
b) W kontenerze messages-container-js na początku (przed istniejącymi komunikatami typu OrderEditable) dodaj baner informujący o ukrytych danych zamówienia oraz, na końcu kontenera, baner informujący o terminie zwrotu:
{% if order.Restricted -%}
{% endif -%}
{% if order.Status == 3 and config.Complaints.ReturnsEnabled -%}
{% endif -%}
c) We wszystkich miejscach wyświetlających numer telefonu klienta zamień warunki sprawdzające jedynie pusty ciąg na warunki sprawdzające również wartość null. Zamień każde wystąpienie:
{% if order.Customer.DeliveryAddress.PhoneNo != '' -%}
na:
{% if order.Customer.DeliveryAddress.PhoneNo != null and order.Customer.DeliveryAddress.PhoneNo != '' -%}
d) Analogicznie zaktualizuj warunek wyświetlania NIP-u/TIN-u w sekcji danych do faktury. Zamień:
{% elseif order.Customer.TIN != '' -%}
na:
{% elseif order.Customer.TIN != null and order.Customer.TIN != '' -%}
e) W sekcji adresu dostawy zamień otwierający warunek alternatywny {% else -%} (bezpośrednio przed kontenerem z translations.DelivAddress) na bardziej restrykcyjny:
{% elseif order.Customer.DeliveryAddress != null -%}
f) Sekcję wybranego dokumentu (ChoosenDocument) opakuj warunkiem ukrywającym ją dla zamówień typu restricted. Wstaw {% unless order.Restricted -%} przed kontenerem order-details-item z tytułem translations.ChoosenDocument oraz {% endunless -%} za jego zamykającym
.
g) W sekcji dokumentów zamówienia dodaj do warunku sprawdzenie order.Restricted == false. Zamień:
{% if orderDocumentsSize > 0 -%}
na:
{% if orderDocumentsSize > 0 and order.Restricted == false -%}
h) W sekcji załączników zamówienia dodaj analogiczne sprawdzenie. Zamień:
{% if config.Orders.AttachmentsEnabled and orderAttachmentsSize > 0 -%}
na:
{% if config.Orders.AttachmentsEnabled and orderAttachmentsSize > 0 and order.Restricted == false -%}
i) W sekcji zamówień powiązanych zamień:
{% if order.RelatedOrders[0] -%}
na:
{% if order.RelatedOrders[0] and order.Restricted == false -%}
partials/customer-profile/complaints/complaint-form.html
W pliku partials/customer-profile/complaints/complaint-form.html wprowadź poniższe zmiany.
a) W kontenerze amount-stepper-container (wewnątrz warunku {% if type != 'set-return’ -%}) na samym początku dodaj nową etykietę:
{{ translations.Quantity }}:
b) Pod sekcją z komentarzem reklamacji/zwrotu (po zamykającym {% endif -%} z sekcji complaint-message-textarea) wewnątrz warunku {% if type != 'set-return’ -%} dodaj sekcję wyboru sposobu zwrotu środków:
{{ translations.Com_RefundAsPaid }} {% if order.Payment.Name and order.Payment.Name != ” -%} ({{ order.Payment.Name }}){% endif -%}
{{ translations.Com_RefundToBankAccount }}
c) W sekcji załączników plików zamień prosty licznik file-{{forloop.index}} na prefiks zawierający identyfikator zamówienia, numer produktu i typ formularza. Tuż przed pętlą {% for i in (1..config.Complaints.AttachmentsMaxCount) -%} dodaj nową linię:
{% capture filePrefix -%}file-{{ order.Id }}-{{ product.No }}-{{ type }}{% endcapture -%}
Następnie wewnątrz pętli zamień:
na:
d) Komunikat sukcesu wyświetlany po wysłaniu formularza ma być inny dla reklamacji, a inny dla zwrotu. Znajdź kontener
) dodaj baner informujący o terminie zwrotu wraz z przypisaniem flagi complaintsOrReturnsEnabled:
{% if config.Complaints.ComplaintsEnabled or config.Complaints.ReturnsEnabled -%}
{% assign complaintsOrReturnsEnabled = true -%}
{% endif -%}
{% if order.Status == 3 and complaintsOrReturnsEnabled -%}
{% endif -%}
d) Blok z przyciskami akcji wewnątrz info-container-js (zawierający przyciski order.CanCancel, edycji, ponowienia zakupu itd.) opakuj warunkiem {% unless order.Restricted -%} … {% endunless -%}. Wstaw {% unless order.Restricted -%} bezpośrednio przed pierwszym {% if order.CanCancel -%}, a {% endunless -%} po zamykającym warunku odpowiedzialnym za popup potwierdzenia ({% include 'partials/common/confirmation-popup.html’ with 0 -%}).
e) W sekcji wyświetlającej dokumenty zamówienia zamień:
{% if order.Documents %}
na:
{% if order.Documents and order.Restricted == false %}
f) We wszystkich miejscach wyświetlających numer telefonu klienta zamień warunki sprawdzające jedynie pusty ciąg na warunki sprawdzające również wartość null. Zamień każde wystąpienie:
{% if order.Customer.DeliveryAddress.PhoneNo != '' -%}
na:
{% if order.Customer.DeliveryAddress.PhoneNo != null and order.Customer.DeliveryAddress.PhoneNo != '' -%}
g) Każdą sekcję z tytułem translations.ChoosenDocument opakuj warunkiem ukrywającym ją dla zamówień restricted. Wstaw {% unless order.Restricted -%} bezpośrednio przed
oraz {% endunless -%} po jej zamykającym
.
h) W sekcji wyświetlającej alternatywny adres dostawy zamień warunek {% else -%} (bezpośrednio przed order-info-item-ui z translations.DelivAddress) na bardziej restrykcyjny:
{% elseif order.Customer.DeliveryAddress != null -%}
i) W sekcji danych do faktury zamień warunek wyświetlania NIP-u/TIN-u. Zamień:
{% elseif order.Customer.TIN != '' -%}
na:
{% elseif order.Customer.TIN != null and order.Customer.TIN != '' -%}
j) W sekcji załączników zamówienia (kontener attachements-ui remarks-ui) zamień warunek otaczający. Zamień:
{% if config.Orders.AttachmentsEnabled -%}
na:
{% if config.Orders.AttachmentsEnabled and order.Restricted == false -%}
k) W sekcji zamówień powiązanych (kontener remarks-ui eshop-order-ui) zamień:
{% if order.RelatedOrders -%}
na:
{% if order.RelatedOrders and order.Restricted == false -%}
partials/customer-profile/complaints/complaint-form.html
W pliku partials/customer-profile/complaints/complaint-form.html wprowadź poniższe zmiany.
a) W kontenerze amount-stepper-container-ui amount-stepper-container-lq (wewnątrz warunku {% if type != 'set-return’ -%}) na samym początku dodaj etykietę widoczną tylko dla zwrotów:
{% unless complaint -%}
{{ translations.Quantity }}:
{% endunless -%}
b) Bezpośrednio po zamknięciu kontenera amount-stepper-container-ui (po jego
i odpowiadającym {% endif -%}) dodaj sekcję wyboru sposobu zwrotu środków – widoczną tylko w formularzu zwrotu:
{% unless complaint -%}
{% endunless -%}
c) Komunikat sukcesu wyświetlany po wysłaniu formularza ma być inny dla reklamacji, a inny dla zwrotu. Znajdź kontener