Akcje

W Comarch e-Sklep udostępniliśmy do Państwa dyspozycji Akcje –  są to działania na stronie związane z interakcją użytkownika (kupującego jak i zarządzającego sklepem), takie jak np. dokonywanie zakupów, dodawanie produktów do koszyka czy zmiana waluty.

Lista dostępnych akcji znajduje się w Panelu Administracyjnym sklepu w następującej ścieżce: Panel administracyjny/Wygląd sklepu/Dokumentacja.

Związane z Klientem

Akcje te możemy określić jako powiązane z Klientem i jego działaniami na stronie.

W skład tych akcji wchodzą:

CompanyChange EmployeeUnlock
CompanyDefaultUpdate EmployeeUpdate
ConsentAccept LanguageChange
ConsentsLoginAccept LanguageDefaultUpdate
ConsentWithdraw Login
CurrencyChange Logout
DeliveryAddressAdd OldPasswordChange
DeliveryAddressDelete PasswordChange
DeliveryAddressUpdate PasswordRecover
EmailChange Register
EmployeeAdd ReviewAuthorUpdate
EmployeeDelete Update
EmployeeLock

 

Dotyczące zamówienia

Akcje w tej grupie dotyczą składanych zamówień.

W skład tych akcji wchodzą:

Accept DeliveryCountryChange
Add DeliveryDateChange
Cancel EmailSet
AttachmentAdd FastDeliveryCheck
AttachmentDelete InvoiceAddressUpdate
AttributesSet InvoiceChange
ComplaintAdd NoteAdd
BuyerChange PaymentMake
BuyerUpdate PointsUse
ComplaintCancel RestorePayment
Copy ReturnAdd
CouponAdd StatusGet
CouponDelete TinUpdate
DeliveryAddressUpdate StepNext
DeliveryChange StepPrev
DeliveryCollectionPointChange

 

Newsletter

Akcja odpowiada za działanie związane z newsletterem.

W skład tych akcji wchodzą:

Subscribe Unsubscribe

 

Akcje GET

Akcje te umożliwiają pobieranie danych z serwera celem utworzenia np. breadcrumbs.

W skład tych akcji wchodzą:

CollectionPointCities SearchAdvanced
CollectionPoints SearchAutocomplete
Groups SearchFilters
Search ProductId

 

Produkty

Akcje te odpowiadają za działania związane z produktami, takimi jak możliwość dodania opinii na temat produktu.

W skład tych akcji wchodzą:

AskForPrice ReviewAdd
CollectionPointsStockLevelsGet StockLevelsGet
ComparisonToolAdd WishListAdd
ComparisonToolDelete WishListCheck
DeliveryCostGet WishListDelete
FastDeliveryCheck WishListUpdate
NotifyAboutProductAvailability

 

Koszyk

Akcje te odpowiadają za działania związane z koszykiem, np. dodaniem produktu do koszyka.

W skład tych akcji wchodzą:

Add NameSet
AttributesSet PositionDelete
Change QuantityChange
Create Recalculate
Delete SetAdd
ExternalAdd SetExtAdd
ImportCSV

 

Kontakt

Akcje te odpowiadają za kontakt, np. w celu zapytania o dany produkt.

W skład tych akcji wchodzą:

AskAboutProduct TellFriendAboutProduct
Send

 

Edycja zamówienia

Akcje te związane są z edycją zamówienia.

W skład tych akcji wchodzą:

Accept PositionAttributesSet
AttributesSet PositionDelete
Cancel PositionQuantityChange
CartCreate PositionUndo
CartMerge Recalculate
Edit Undo

 

External

Akcje te odpowiedzialne są za możliwość logowania się poprzez Facebook lub Google.

W skład tych akcji wchodzą:

FbAccountLink GoogleAccountLink
FbAccountUnlink GoogleAccountUnlink
FbLogin GoogleLogin

 

Sync

Akcje te odpowiadają za działania związane z pobieraniem danych z baz systemów. Więcej informacji można znaleźć klikając w odnośnik – Comarch e-Sklep Sync.

W skład tych akcji wchodzą:

Exec

 

Zapytania ofertowe

Akcje te odpowiadają za działania związane ze składaniem zapytań ofertowych.

W skład tych akcji wchodzą:

Add Set
CartMerge

 

Sesja użytkownika

Akcje te odpowiadają za działania związane z utrzymywaniem sesji użytkownika.

W skład tych akcji wchodzą:

Ping

 



 

Opis używanych akcji:

 

CompanyChange

Akcja odpowiada za zmianę firmy.

Parametry:

  • id (int, pole obowiązkowe).
<form action="{{ page.Url }}{{ page.QueryString | H }}" method="post">
<input type="hidden" name="__action" value="Customer/CompanyChange"/>
<input type="hidden" name="id" value=""/>
</form>

 


 

CompanyDefaultUpdate

Akcja odpowiada za wczytanie domyślnych ustawień firmy.

Parametry:

  • id (int, pole obowiązkowe).
<form action="{{ page.Url }}{{ page.QueryString | H }}" method="post">
<input type="hidden" name="__action" value="Customer/CompanyDefaultUpdate"/>
<input type="hidden" name="id" value=""/>
</form>

 


 

ConsentAccept

Akcja odpowiadająca za akceptację zgody, na przykład podczas składania zamówienia.

Parametry:

  • tos (int lub null),
  • channelKey (string).
{% for tos in customer-profile.Consents -%}
   {% if tos.Checked == false -%}
     <div class="form-lq tos-ui">
     <div class="tos-name-ui">{{ tos.Text }}</div>
       {% assign channelsSize = tos.Channels | Size -%}
        {% if channelsSize > 0 -%}
         {% for channel in tos.Channels -%}
          <div class="channel-ui">
          <button class="agreements-in-profile-lq" data-action="Customer/ConsentAccept" data-key="{{ channel.Key }}">{{translations.Accept}}</button>
          <span class="channel-name-ui">{{channel.Name}}</span>
          </div>
         {% endfor -%}
         {% else -%}
          <div class="date-container-ui">
          <button class="agreements-in-profile-lq tos-lq" data-action="Customer/ConsentAccept" data-key="{{ tos.Id }}">{{translations.AcceptAgreement}}</button>
          </div>
         {% endif -%}
      </div>
    {% endif -%}
{% endfor -%}

 


 

ConsentsLoginAccept

Akcja odpowiadająca za akceptację zgody obowiązkowej podczas logowania.

Parametry:

  • tos (int[]) – może zostac przekazane wielokrotnie w ramach jednej akcji (int),
  • channelKey (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string).
<form method="POST">
<input type="hidden" name="__action" value="Customer/ConsentsLoginAccept"/>
{% for tos in __consents -%}
   {% if tos.Required and tos.Statement == false -%}
     {% assign requiredExists = true -%}
     {% break -%}
   {% endif -%}
{% endfor -%}
</form>

 


 

ConsentWithdraw

Akcja odpowiada za wycofanie zgody.

Parametry:

  • tos (int lub null),
  • channelKey (string).
{% for tos in customer-profile.Consents -%}
   {% if tos.Checked -%}
     <div class="form-lq tos-ui">
     <div class="tos-name-ui">{{ tos.Text }}</div>
       {% assign channelsSize = tos.Channels | Size -%}
        {% if channelsSize > 0 -%}
         {% for channel in tos.Channels -%}
          <div class="channel-ui">
          {% if channel.Checked -%}
              <button class="agreements-in-profile-js btn-pure-ui f-left-ui" data-action="Customer/ConsentWithdraw" data-key="{{ channel.Key }}">{{translations.Withdraw}}</button>
              <span class="channel-name-with-date-ui">{{channel.Name}}</span>
              <span class="date-label-ui">{{translations.AcceptanceDate}}: </span>
              <span class="date-ui"> <strong>{{channel.Date | Date:dateFormat}}</strong></span>
	      {% assign checkedChannelsSize = checkedChannelsSize | Plus:1 -%}
	  {% endif -%}
          </div>
         {% endfor -%}
         {% else -%}
          <div class="date-container-ui">
		<button class="agreements-in-profile-js tos-js btn-pure-ui" data-action="Customer/ConsentWithDraw" data-key="{{ tos.Id }}">{{translations.WithdrawAgreement}}</button>
		<span class="date-label-ui">{{translations.AgreementAccepted}}: </span>
                <span class="date-ui"> <strong>{{tos.Date | Date:dateFormat}}</strong></span>
		{% if tos.Required -%}
		     <div class="withdraw-required-info-ui error-ui">{{translations.WithdrawRequiredInfo}}!</div>
		{% endif -%}
	  </div>
         {% endif -%}
      </div>
    {% endif -%}
{% endfor -%}

 


 

CurrencyChange

Akcja odpowiada za zmianę waluty.

Parametry:

  • currency (string, pole obowiązkowe).
<form method="post">
<select name="currency" required>
{% for currency in config.Currencies -%}
<option value="{{ currency.Code }}">{{ currency.Code }}</option>
{% endfor -%}
</select>
<button type="submit">Zmień</button>
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" required />
<input type="hidden" name="__action" value="Customer/CurrencyChange" required />
</form>

 


 

DeliveryAddressAdd

Akcja odpowiada za dodanie adresu do dostawy.

Parametry:

  • addresId (int lub null),
  • default (bool),
  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string, pole obowiązkowe) – maksymalna długość to 2 znaki,
  • zipCode (string)- maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/DeliveryAddressAdd" />
<input type="hidden" name="__template" value="customer/profile-data.html" />
{% include 'customer/profile-data-address.html' %}
<button>Zatwierdź</button>
</form>

 


 

DeliveryAddressDelete

Umożliwia usunięcie adresu dostawy.

Parametry:

  • addressId (int, pole obowiązkowe).
{% assign address = customer.DeliveryAddresses[0] -%}
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/DeliveryAddressDelete" />
<input type="hidden" name="addressId" value="{{ address.Id }}" />
</form>

 


 

DeliveryAddressUpdate

Akcja umożliwia edycję adresu.

Parametry:

  • addresId (int lub null),
  • default (bool),
  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string, pole obowiązkowe) – maksymalna długość to 2 znaki,
  • zipCode (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/DeliveryAddressUpdate" />
<input type="hidden" name="__template" value="customer/profile-data.html" />
<input type="hidden" name="addressId" value="{{ address.Id }}" />
{% if address.Default %}
<input type="hidden" name="default" value="1" />
{% endif %}
<div>
{% if address.Street == "" %}
{% include 'customer/profile-data-address.html' with -1 %}
{% else %}
{% include 'customer/profile-data-address-pr.html' with address.Id %}
{% endif %}
</div>
<button>Zatwierdź</button>
{% if address.Default == false %}
<button data-id="{{ address.Id }}">{{ translations.Cst_RemoveDeliveryAddress}}</button>
{% endif %}
{% if address.Default == false %}
<button>Zatwierdź</button>
{% endif %}
</form>

 


 

EmailChange

Akcja odpowiadająca zmianie adresu e-mail.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • emailRepeat (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • password (string, pole obowiązkowe),
  • doNotChangeCompanyEmail (bool) – występuje tylko w wersji enterprise.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/EmailChange" />
<input type="hidden" name="__template" value="customer/profile-account.html" />
<input type="email" name="email" placeholder="* {{ translations.Prf_NewEmail }}" required />
<input type="email" name="emailRepeat" placeholder="* {{ translations.Prf_RepeatEmail }}" required />
<input type="password" name="password" placeholder="* {{ translations.Com_Password }}"
required />
<button>Zmień</button>
</form>

 


 

EmployeeAdd

Akcja odpowiada za dodanie pracownika.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Customer/EmployeeAdd" />
<input type="email" name="email" placeholder="" required />
<button>Zatwierdź</button>
</form>

 


 

EmployeeDelete

Akcja odpowiada za usunięcie pracownika.

Parametry:

  • id (int, pole obowiązkowe).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Customer/EmployeeDelete" />
<input type="number" name="id" placeholder="" required />
<button>Zatwierdź</button>
</form>

 


 

EmployeeLock

Akcja odpowiada za zablokowanie pracownika.

Parametry:

  • id (int, pole obowiązkowe).
<form method="POST"> <input type="hidden" name="__csrf" value="{{ page.CSRF }}"/> 
<input type="hidden" name="__action" value="Customer/EmployeeLock" /> 
<input type="number" name="id" placeholder="" required /> 
<button>Zatwierdź</button> 
</form>

 


 

EmployeeUnlock>

Akcja odpowiada za odblokowanie pracownika.

Parametry:

  • id (int, pole obowiązkowe).
<form method="POST"> <input type="hidden" name="__csrf" value="{{ page.CSRF }}"/> 
<input type="hidden" name="__action" value="Customer/EmployeeUnock" /> 
<input type="number" name="id" placeholder="" required /> 
<button>Zatwierdź</button> 
</form>

 


 

EmployeeUpdate

Akcja ta odpowiada za aktualizację danych pracowników w profilu.

Parametry:

  • name (string) – maksymalna długość to 50 znaków,
  • name2 (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków,
  • languageId (short lub null).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Customer/EmployeeUpdate" />
<input type="text" name="name" placeholder=" "/>
<input type="text" name="name2" placeholder=" " />
<input type="tel" name="phoneNo" placeholder=" " />
<button>Zatwierdź</button>
</form>

 


 

LanguageChange

Odpowiada za wybór i zmianę języka w sklepie.

Parametry:

  • languageId (short, pole obowiązkowe).
{% assign lngCount = config.Languages | Size -%}
{% if lngCount > 1 -%}
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/LanguageChange" />
<select name="languageId">
{% for lng in config.Languages -%}
<option value="{{ lng.Id }}" {% if page.LanguageId == lng.Id -%} selected {% endif -%}>{{ lng.Name }}</option>
{% endfor -%}
</select>
{% endif -%}
</form>

 


 

LanguageDefaultUpdate

Odpowiada za ustawienie domyślnego języka.

Parametry:

  • languageId (short, pole obowiązkowe).
{% assign lngCount = config.Languages | Size -%}
{% if lngCount > 1 -%}
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/LanguageDefaultUpdate" />
<select name="languageId">
{% for lng in config.Languages -%}
<option value="{{ lng.Id }}" {% if page.LanguageId == lng.Id -%} selected {% endif -%}>{{ lng.Name }}</option>
{% endfor -%}
</select>
{% endif -%}
</form>

 


 

Login

Akcja odpowiadająca za logowanie.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • password (string, pole obowiązkowe),
  • remember (bool).
<form method="POST">
<input type="hidden" name="__action" value="Customer/Login" />
<input type="email" name="email" value="{{ customer.Email }}"
{% if customer.Email == blank %} placeholder="* {{ translations.Com_EmailAddress }} "
{% endif %}
required autofocus />
<input type="password" name="password" placeholder="* {{ translations.Com_Password }}"
required />
<a href="{{ config.DefinedPages.PasswordReminder.Url }}" class="remind">{{ translations.Lgn_DontRememberPassword }}</a>
<button>Login</button>
</form>

 


 

Logout

Akcja ta odpowiada za wylogowanie zalogowanego użytkownika (Klienta).

<form action="{{ page.Url }}{{ page.QueryString | H}}" method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/Logout" />
<button>Wyloguj</button>
</form>

 


 

OldPasswordChange

Akcja odpowiadająca za zmianę hasła.

Parametry:

  • oldPassword (string, pole obowiązkowe),
  • password (string, pole obowiązkowe),
  • passwordRepeat (string, pole obowiązkowe).
<form method="POST">
<input type="hidden" name="__action" value="Customer/OldPasswordChange" />
<input type="hidden" name="__template" value="customer/profile-account.html" />
<input type="password" name="oldPassword" placeholder="" required />
<input type="password" name="password" placeholder=" " required />
<input type="password" name="passwordRepeat" placeholder=" " required />
<button>Zatwierdź</button>
</form>

 


 

PasswordChange

Akcja odpowiadająca za zmianę hasła (np. przy pomocy formularza ,,zapomniałem hasła”).

Parametry:

  • password (string, pole obowiązkowe),
  • passwordRepeat (string, pole obowiązkowe),
  • hash (string, pole obowiązkowe).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/PasswordChange" />
<input type="hidden" name="hash" value="{{ page.GET['hash'] }}" >
<input type="password" name="password" value="" required/>
<input type="password" name="passwordRepeat" value="" required/>
<button>Zatwierdź</button>
</form>

 


 

PasswordRecover

Akcja której zadaniem jest odzyskanie hasła.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/PasswordRecover" />
<input type="email" name="email" value="{{ customer.Email }}" required/>
<button>Zatwierdź</button>
</form>

 


 

Register

Akcja ta odpowiada za rejestrację użytkownika.

Parametry:

  • company (bool),
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • password (string, pole obowiązkowe),
  • passwordRepeat (string),
  • phoneNo (string) – maksymalna długość to 50 znaków,
  • name (string) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string) – maksymalna długość to 2 znaki,
  • zipCode  (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • tin (string) – maksymalna długość to 20 znaków,
  • ssn (string) – maksymalna długość to 20 znaków,
  • tos (int[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (int),
  • channelKey (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string),
  • vateu (string) – występuje tylko w wersji Enterprise, maksymalna długość to 2 znaki.
Uwaga
W przypadku użytkowników nie będących firmami pola obowiązkowe to jedynie mail oraz password, przykładowy kod dla takiego rozwiązania zawierałby jedynie te dwa pola.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/Register" />
<input type="hidden" name="company" value="{% if registerCompany %}1{% endif %}" />
{% if registerCompany == 0 %}
    <input type="email" name="email" value="{{ customer.Email }}" {% if customer.Email == blank %} placeholder=" " {% endif %} required autofocus />
    <input type="password" name="password" placeholder="* {{ translations.Com_Password }}" required />
    {% if registerCompany %}
        {% if config.ENTERPRISE %}
        <select name="vateu" class="small">
        {% for v in config.VATEU %}
            <option value="{{ v.Value }}">{{ v.Name }}</option>
        {% endfor %}
        </select>
    {% endif %}
    <input type="text" name="tin" class="small nm" placeholder=" " />
{% endif %}
{% if registerConf.AddressVisible %}
    <input type="text" name="name" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    <input type="text" name="name2" />
    <select name="countryCode" placeholder=" " {% if customerAddressRequired %} required {% endif %} >
    {% for c in config.Countries %}
        <option {% if config.DefaultCountry == c.ISOCode %} selected {% endif %} value="{{ c.ISOCode }}">{{ c.Name }}</option>
    {% endfor %}
    </select>
    <input type="text" name="street" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    <input type="text" name="streetNo" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    <input type="text" name="unitNo" placeholder=" " />
    <input type="text" name="zipCode" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    <input type="text" name="city" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    {% comment %}
    <input type="text" name="state" placeholder=" " {% if customerAddressRequired %} required {% endif %} />
    {% endcomment %}
{% endif %}
{% if registerConf.PhoneVisible %}
    <input type="tel" name="phoneNo" placeholder=" " {% if registerConf.PhoneRequired %} required {% endif %} />
{% endif %}
<div class="switch">
    {% for tos in config.TOS.Consents.Registration -%}
        {% if tos.Statement %}
            <label>{{tos.Text}}</label>
        {% else %}
            <input name="tos" id="tos{{ tos.Id }}" type="checkbox" value="{{ tos.Id }}" {% if tos.Required %} required {% endif %} />
            <label for="tos{{ tos.Id }}">{% if tos.Required %}*{% endif %} {{tos.Text}}</label>
        {% endif %}
    {% endfor -%}
</div>
<a href="{{ config.DefinedPages.Login.Url }}">{{ translations.Lgn_LoginB }}</a>
</form>

 


 

ReviewAuthorUpdate

Odpowiada za dodanie nicku dla użytkownika który dodaje opinie o produkcie.

Parametry:

  • author (string, pole obowiązkowe) – maksymalna długość to 50 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/ReviewAuthorUpdate" />
<input type="hidden" name="__template" value="customer/profile-account.html" />
<input type="text" name="author" value="{{ customer.ReviewAuthor }}"
placeholder=" " required />
<button>Zatwierdź</button>
</form>

 


 

Update

Akcja odpowiadająca za zmianę danych konta.

Parametry:

  • email (string, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • company (bool),
  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string, pole obowiązkowe) – maksymalna długość to 2 znaki,
  • zipCode (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków,
  • tin (string) – maksymalna długość to 20 znaków,
  • ssn (string) – maksymalna długość to 20 znaków,
  • invoice (bool),
  • vateu (string) – występuje tylko w wersji Enterprise, maksymalna długość to 2 znaki,
  • subtotalPrices (bool) – występuje tylko w wersji enterprise.
<form action="{{ page.Url }}{{ page.QueryString | H}}" method="post" novalidate>
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Customer/Update" />
<input type="hidden" name="__template" value="customer/profile-data.html" />
<input type="hidden" name="company" value="{% if customer.Company %}1{% endif %}" />
<input type="hidden" name="invoice" value="{% if customer.Invoice %}1{% endif %}" />
<div>
{% if customer.Address.Street <> "" %}
{% include 'customer/profile-data-address-pr.html' with -1 %}
{% if customer.Company %}
{% include 'customer/profile-data-compaddr-pr.html'%}
{% endif %}
{% else %}
{% include 'customer/profile-data-address.html' with -1 %}
{% if customer.Company %}
{% include 'customer/profile-data-compaddr.html'%}
{% endif %}
{% endif %}
</div>
<button>Zatwierdź</button>
{% if customer.Address.Street <> "" %}<button>Zatwierdź</button>{% endif %}<div>
{{ translations.Prf_AccountFor }}: {% if customer.Company == false %}{{ translations.Prf_RetailCustomer }}{%else%}{{ translations.Prf_Company }}{%endif%}
</div>
</form>

 


 

Accept

Umożliwia akceptację zamówienia w sytuacji, gdy mamy do czynienia z np. negocjowalnym kosztem transportu.

Parametry:

  • id (int, pole obowiązkowe),
  • hash (string).
<div class="form-js no-message-lq">
    <input type="hidden" name="__action" value="Order/Accept" />
    <input type="hidden" name="id" value="{{ order.Id }}" />
    <input type="hidden" name="hash" value="{{ order.Hash }}" />
    <button class="post-lq parent-container-reload-js">
        {{ translations.OrderAccept }}
    </button>
</div>

 


 

Add

Odpowiada za dodanie zamówienia.

Parametry:

  • tos (int[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (int),
  • channelKey (string[]) – może zotać przekazane wielokrotnie w ramach jednej akcji (string).
<div class="form-js adding-order-form-js tos-form-ui {% if settings.cartVersion == 'comfortable' -%} comfortable-tos-ui {% endif -%}">
    <input  aria-label="action-order-add" type="hidden" name="__action" value="Order/Add" />
    {% for tos in config.TOS.Consents.Order -%}
        {% assign channelsSize = tos.Channels | Size -%}
        {% if channelsSize > 0 -%}
            {% assign onlyEmail = false -%}
            {% if channelsSize == 1 and tos.Channels[0].Type == 1 -%}
                {% assign onlyEmail = true -%}
            {% endif -%}
            {% if onlyEmail == false -%}
                <span class="error-ui validation-info-js validation-channel-js hidden-js">{{ translations.ChooseOption }}</span>
            {% endif -%}
        {% endif -%}
        <div class="tos-container-js {% if tos.Statement -%} statement-ui statement-lq {% endif -%}" >
            {% if tos.Statement -%}
                {% unless channelsSize == 1 -%}
                    {% if tos.Required-%}<span class="required-ui">* </span>{% endif -%} {{tos.Text | Remove: '.' }} {{translations.Consents_InTheFormOf}}:
                {% endunless -%}
            {% else -%}
            <label class="checkbox-ui tos-js">
            {% if channelsSize == 1 -%}
                <input aria-label="tos" type="checkbox" name="tos" value="{{ tos.Id }}" {% if tos.Required -%} required {% endif -%} />
            {% elsif channelsSize > 0 -%}
                <input aria-label="tos" type="checkbox" name="tos" value="{{ tos.Id }}" {% if tos.Required -%} required {% endif -%} />
                <span>{% if tos.Required-%}<span class="required-ui">* </span>{% endif -%} {{tos.Text | Remove: '.' }} {{translations.Consents_InTheFormOf}}:</span>
                {% if tos.Required -%}
                    <span class="error-ui validation-info-js validation-required-js hidden-js">{{ translations.RequiredField }}</span>
                {% endif -%}
            {% else -%}
                <input  aria-label="tos" type="checkbox" name="tos" value="{{ tos.Id }}" {% if tos.Required -%} required {% endif -%} />
                <span class="label-ui">{% if tos.Required -%}<span class="required-ui">*</span> {% endif -%}{{ tos.Text }}</span>
                {% if tos.Required -%}
                    <span class="error-ui validation-info-js validation-required-js hidden-js">{{ translations.RequiredField }}</span>
                {% endif -%}
            {% endif -%}
            </label>
            {% endif -%}
            {% if channelsSize > 0 -%}
                {% if onlyEmail == false -%}
                    <span class="error-ui validation-info-js validation-channel-js hidden-js">{{ translations.ChooseOption }}</span>
                {% endif -%}
            {% endif -%}
            {% for channel in tos.Channels -%}
                <label class="checkbox-ui channel-ui {% if channelsSize > 0 -%} channel-js {% endif -%}">
                {% if tos.Statement -%}
                    {% if channelsSize == 1 -%}
                        <input aria-label="channelKey" type="hidden" name="channelKey" value="{{ channel.Key }}" checked />
                        <input aria-label="channelKey" type="checkbox" checked disabled />
                        <span class="statementLabel-ui">{% if tos.Required-%}<span class="required-ui">* </span>{% endif -%} {{tos.Text | Remove: '.' }} {{translations.Consents_InTheFormOf}} {% unless channel.Name == "SMS" -%} {{ channel.Name | Downcase }}. {% else -%} {{ channel.Name }}. {% endunless -%}</span>
                    {% elsif channelsSize > 0 -%}
                        <input aria-label="channelKey" type="checkbox" name="channelKey" value="{{ channel.Key }}" checked />
                        <span class="statementLabel-ui" >{{ channel.Name }}</span>
                    {% endif -%}
                {% else -%}
                    {% if channelsSize == 1 -%}
                        <input  aria-label="channelKey" type="checkbox" name="channelKey" value="{{ channel.Key }}" />
                        <span class="label-ui" style="margin-left: 0 !important;">{% if tos.Required-%}<span class="required-ui">* </span>{% endif -%} {{tos.Text | Remove: '.' }} {{translations.Consents_InTheFormOf}} {% unless channel.Name == "SMS" -%} {{ channel.Name | Downcase }}. {% else -%} {{ channel.Name }}. {% endunless -%}</span>
                    {% elsif channelsSize > 0 -%}
                        <input  aria-label="channelKey" type="checkbox" name="channelKey" value="{{ channel.Key }}" />
                        <span class="label-ui">{{ channel.Name }}</span>
                    {% endif -%}
                {% endif -%}
                </label>
            {% endfor -%}
        </div>
    {% endfor -%}
    <small class="mb10-ui block-ui"><span class="required-ui">*</span> {{ translations.RequiredFields }}</small>
    <div class="order-validation-lq hidden-js message-bar-ui warning-bar-ui">{{translations.ConfirmAll}}</div>
        {% if customer.CreditLimit and creditStatus == 2 -%}
            <div class="order-validation-lq credit-limit-error-ui message-bar-ui error-bar-ui">{{ translations.CreditLimitStatus_2 }}</div>
        {% elsif customer.CreditLimit and creditStatus == 1 -%}
            <div class="order-validation-lq credit-limit-error-ui message-bar-ui warning-bar-ui">{{ translations.CreditLimitStatus_1 }}</div>
        {% endif -%}
        {% if usr.Authenticated or notAuthWithData -%}
            <div class="summary-with-btn-js summary-with-btn-ui" {% if settings.cartVersion == "comfortable" -%} style="display: none;" {% endif -%}>
            <div class="clear-after-ui box-ui">
                <div class="f-left-ui half-ui total-amount-label-ui"><strong>{{ translations.AmountDue }}</strong></div>
                <div class="f-right-ui half-ui total-amount-ui">{{ order.OrderTotalValue | ToPrice }} {{ order.CurrencyExt }}</div>
            </div>
            <button aria-label="order-recalculate" class="order-button-ui parent-container-reload-js {% if creditStatus != 2 -%} add-order-lq {% endif -%}" {% if creditStatus == 2 -%}disabled{% endif -%}>
                {{translations.PayAndOrder}}
            </button>
    </div>
{% endif -%}
</div>

 


 

Cancel

Akcja ta odpowiada za anulowanie zamówienia.

Parametry:

  • id (int, pole obowiązkowe),
  • hash (string).
<div class="form-js form-into-data-lq" data-success="{{ translations.OrderCanceled }}">
    <input type="hidden" name="__action" value="Order/Cancel" />
    <input type="hidden" name="id" value="{{ order.Id }}" />
    <input type="hidden" name="hash" value="{{ order.Hash }}" />
    <button class="btn-gray-ui parent-container-reload-js cancel-order-lq">
        {{ translations.OrderCancel }}
    </button>
</div>

 


 

AttachmentAdd

Akcja odpowiada za dodawanie załącznika do zamówienia.

Parametry:

  • file – pole do wczytywania plików.
function processFilesList(fileInput, fileList) {
    var file = fileList.pop();
    if (file) {
        var fd = new FormData();
        fd.append('__csrf',__CSRF);
        fd.append('__action','Order/AttachmentAdd');
        fd.append('__template','order/attachements.html');
        fd.append('file', file);
        $.ajax({data: fd, processData: false, contentType: false, type: 'POST',
            success: function(data){
                fileInput.val('');
                if(data.action.Result){
                    $('.attachements-lq').html(data.template);
                } else {
                    if(window.AttachementsNotAdded == undefined){
                        window.AttachementsNotAdded = [];
                    }
                    var attachement = '<div style="padding: 20px;"><strong>'+file.name+'</strong>: '+data.action.Message+'</div>';
                    window.AttachementsNotAdded.push(attachement);
                }
                processFilesList(fileInput, fileList);
            }
        });

 


 

AttachmentDelete

Akcja odpowiada za usuwanie załącznika do zamówienia.

Parametry:

  • id (guid, pole obowiązkowe).
function removeAttachementInOrder(e) {
    $.post('', {__csrf: __CSRF, __action: 'Order/AttachmentDelete', id: $(e.currentTarget).data('id')}, function(result) {
        $(e.currentTarget).parents('.file-container-lq').remove();
    });
};

 


 

AttributesSet

Akcja odpowiada za ustawienie atrybutów zamówienia.

Parametry:

  • attribute (string[]) – może zotać przekazane wielokrotnie w ramach jednej akcji (string), maksymalna długość to 1000 znaków.
{% assign headerSize = config.Orders.AttributesCart.Header | Size -%}
    {% if headerSize > 0 and settings.cartVersion != "comfortable" -%}
        <div class="form-js header-attributes-set-form-js">
            <input  aria-label="action-order-attributesset" type="hidden" name="__action" value="Order/AttributesSet" />
            <div class="box-ui mt20-ui clear-after-ui address-ui">
                {% for headerAttr in config.Orders.AttributesCart.Header -%}
                    <div class="header-attribute-cart-ui">
                        <label>
                            {{ headerAttr.Name }}
                            {% if headerAttr.Required -%}
                                <span class="required-ui">*</span>
                            {% endif -%}
                        </label>
                        {% case headerAttr.Format -%}
                            {% when 1 -%}
                                <input  aria-label="attribute" type="text" name="attribute" value="" maxlength="50" {% if headerAttr.Required -%} required {% endif -%} {% if positionAttr.Editable -%} data-editable="true" {% endif -%} />
                            {% when 2 -%}
                                <input  aria-label="attribute" type="number" name="attribute" value="" maxlength="50" {% if headerAttr.Required -%} required {% endif -%} {% if positionAttr.Editable -%} data-editable="true" {% endif -%} />
                            {% when 3 -%}
                                <span class="select-background-ui">
                                    <select aria-label="attribute" name="attribute" {% if positionAttr.Editable -%} data-editable="true" {% endif -%}>
                                        {% for val in headerAttr.Values %}
                                            <option {% if val.ValueId == headerAttr.Values[0].ValueId -%} selected="selected" {% endif -%} value="{{ val.ValueId }}">{{ val.Value }}</option>
                                        {% endfor -%}
                                    </select>
                                </span>
                                <i class="ti-angle-down select-arrow-ui"></i>
                            {% when 4 -%}
                                <input aria-label="attribute" type="date" name="attribute" value="" placeholder="rrrr-mm-dd" {% if headerAttr.Required -%} required {% endif -%} {% if positionAttr.Editable -%} data-editable="true" {% endif -%} />
                        {% endcase -%}
                        <div class="error-ui validation-info-js validation-required-js hidden-js">
                            {{ translations.FillAttributeValue }}
                        </div>
                    </div>
                {% endfor -%}
            </div>
        </div>
    {% endif -%}

 


 

ComplaintAdd

Akcja odpowiada za dodanie reklamacji.

Parametry:

  • orderId (int, pole obowiązkowe),
  • no (int, pole obowiązkowe),
  • quantity (decimal) – może przyjąć wartość od 0.01 do 99999,
  • message (string) – maksymalna długość to 1000 znaków,
  • accountNumber (string) – maksymalna długość to 50 znaków,
  • defectId (int lub null),
  • requestId (int lub null),
  • defectDate (string, pole obowiązkowe, wyrażenie regularne),
  • files – pole do wczytywania plików.
<form method="POST">
    <input type="text" name="quantity" min="1" placeholder="{{translations.Com_Quantity}}" />
    {% if config.Complaints.Defects <> null -%}
        {% assign defectsSize = config.Complaints.Defects | Size -%}
        <select name="defectId">
        {% if defectsSize > 1 -%}
            <option value="">{% if defectsSize > 1 -%}* {% endif -%} {{translations.Prf_Defect}}</option>
        {% endif -%}
        {% for def in config.Complaints.Defects -%}
            <option value="{{def.Id}}">{{def.Name}}</option>
        {% endfor -%}
        </select>
    {% endif -%}
    <input type="date" name="defectDate" placeholder="RRRR-MM-DD" data-placeholder="year-month-day" value="{{config.Now | Date: "yyyy-MM-dd"}}" max="{{config.Now | Date: "yyyy-MM-dd"}}" min="{{order.Date | Date: "yyyy-MM-dd"}}"/>
    <textarea name="message" placeholder="{{translations.Com_AditionalInfo}}"></textarea>
    {% if config.Complaints.Requests <> null -%}{% assign requestsSize = config.Complaints.Requests | Size -%}
        <select name="requestId">
       {% if requestsSize > 1 -%}
           <option value="">{% if requestsSize > 1 -%}* {% endif %} {{translations.Prf_ComplainRequest}}</option>
       {% endif %}
       {% for req in config.Complaints.Requests -%}
           <option value="{{req.Id}}">{{req.Name}}</option>
       {% endfor -%}
       </select>
    {% endif -%}
    <input type="text" name="accountNumber" placeholder="{{translations.Crt_BankAccountNumber}}" />send
    <button>{{translations.Prf_SubmitAComplaint}}</button>
    <input type="hidden" name="no" value="{{ product.No }}"/>
    <input type="hidden" name="orderId" value="{{ order.Id }}"/>
    <input type="hidden" name="__action" value="Order/ComplaintAdd" />
    <input type="hidden" name="__CSRF" value="{{page.CSRF}}"/>
</form>

 


 

BuyerChange

Akcja odpowiedzialna za zmianę nabywcy.

Parametry:

  • buyer (bool).
{% if order.Customer.Buyer == null -%}
    <script>
        $.post('', {__action: 'Order/BuyerChange', buyer: true, __csrf: __CSRF});
    </script>
{% endif -%}

 


 

BuyerUpdate

Akcja odpowiedzialna za aktualizację danych nabywcy.

Parametry:

  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string, pole obowiązkowe) – maksymalna długość to 2 znaki,
  • zipCode (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków,
  • vateu (string) – maksymalna długość to 2 znaki,
  • tin (string),
  • ssn (string) – maksymalna długość to 20 znaków,
  • invoice (bool),
  • company (bool).
<form method="POST">  
   <input type="text" name="name" value="{% if customerDeliveryAddress.Name != "" -%}{{ customerDeliveryAddress.Name | H }}{% else -%}{{ customerAddress.Name | H }}{% endif -%}" required/> 
   <input type="text" name="street" value="{% if customerDeliveryAddress.Street != "" -%}{{ customerDeliveryAddress.Street | H }}{% else -%}{{ customerAddress.Street | H }}{% endif -%}" required/> 
   <input type="text" name="streetNo" value="{% if customerDeliveryAddress.StreetNo != "" -%}{{ customerDeliveryAddress.StreetNo }}{% else -%}{{ customerAddress.StreetNo }}{% endif -%}" required/> 
   <input type="text" name="countryCode" value="{% if customerDeliveryAddress.CountryCode != "" -%}{{ customerDeliveryAddress.CountryCode }}{% else -%}{{ customerAddress.CountryCode }}{% endif -%}" required/>
   <input type="text" name="unitNo" value="{% if customerDeliveryAddress.UnitNo != "" -%}{{ customerDeliveryAddress.UnitNo }}{% else -%}{{ customerAddress.UnitNo }}{% endif -%}"/> 
   <input type="text" name="zipCode" value="{% if customerDeliveryAddress.ZipCode != "" -%}{{ customerDeliveryAddress.ZipCode }}{% else -%}{{ customerAddress.ZipCode }}{% endif -%}" required/> 
   <input type="text" name="city" value="{% if customerDeliveryAddress.City != "" -%}{{ customerDeliveryAddress.City | H }}{% else -%}{{ customerAddress.City | H }}{% endif -%}" required/> 
   <input type="hidden" name="__csrf" value="{{ page.CSRF }}" /> 
   <input type="hidden" name="__action" value="Order/BuyerUpdate" /> 
</form>

 


 

ComplaintCancel

Akcja ta odpowiada za anulowanie reklamacji.

Parametry:

  • complaintId (int, pole obowiązkowe).
<div class="form-js form-into-data-lq">
	<input type="hidden" name="__action" value="Order/ComplaintCancel" />
	<input type="hidden" name="complaintId" value="{{ complaint.ComplaintId }}" />
	<button class="btn-gray-ui parent-container-reload-js cancel-complaint-lq">
   		{{ cancel }}
	</button>
</div>

 


 

Copy

Akcja odpowiadająca za kopiowanie zamówienia.

Parametry:

  • orderId (int, pole obowiązkowe),
  • hash (string).
async function copyToCart(trigger, changeToInquiry){
    document.getElementsByClassName('during-ajax-modal-js')[0].classList.remove('hidden-js');
    if(trigger.classList == undefined){
        var trigger = this;
    }
    const id = trigger.dataset.id;
    const hash = trigger.dataset.hash;
    const data = {
        orderId: id,
        hash: hash,
        __action: 'Order/Copy'
    };
    const result = await js.post(data);

 


 

CouponAdd

Akcja pozwalająca na dodanie kuponu.

Parametry:

  • code (string, pole obowiązkowe) – maksymalna długość to 40 znaków,
  • email (string, wyrażenie regularne) – maksymalna długość to 192 znaki.
<div class="form-js form-into-data-lq block-ui clear-after-ui {% if settings.cartVersion == 'comfortable' -%} comfortable-coupon-container-ui {% endif -%}">
    <input aria-label="action-order-couponadd" type="hidden" name="__action" value="Order/CouponAdd" />
    <div class="inputs-wrapper-ui clear-after-ui f-left-ui">
        <input aria-label="email" type="hidden" name="email" value="{{ customer.Email }}" />
        <div class="f-left-ui input-wrapper-ui full-ui">
            <span class="f-left-ui">{{ translations.DiscountCode }}</span>
            <input aria-label="code" type="text" class="f-left-ui no-email-ui" name="code" maxlength="50"/>
            <div class="error-ui validation-info-js validation-required-js hidden-js">{{ translations.FillDiscountCode }}</div>
        </div>
    </div>
    <button aria-label="add-coupon" class="add-coupon-lq enter-key-trigger-lq parent-container-reload-js add-coupon-ui f-right-ui">{{ translations.Calculate }}</button>
</div>

 


 

CouponDelete

Akcja umożliwiająca usunięcie kuponu.

<div class="form" id="coupon-delete">
    <button aria-label="deleteCouponButton" type="submit" class="coupon-delete-post"><span class="glyphicon glyphicon-remove"></span> {{translations.Crt_CouponDelete}}</button>
    <p>{{cart.Coupon}}</p>
    <input aria-label="action" type="hidden" name="__action" value="Order/CouponDelete"/>
</div>

 


 

DeliveryAddressUpdate

Akcja odpowiada za uaktualnienie adresu dostawy.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • zipCode (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków.
<form method="POST">
    <input type="email" name="email" value="{% if cart.Customer.Email != "" -%}{{ cart.Customer.Email }}{% else -%}{{ customer.Email }}{% endif -%}" required/>
    <input type="text" name="name" value="{% if customerDeliveryAddress.Name != "" -%}{{ customerDeliveryAddress.Name | H }}{% else -%}{{ customerAddress.Name | H }}{% endif -%}" required/>
    <input type="text" name="name2" value="{% if customerDeliveryAddress.Name != "" -%}{{ customerDeliveryAddress.Name2 | H }}{% else -%}{{ customerAddress.Name2 | H }}{% endif -%}"/>
    <input type="text" name="name3" value="{% if customerDeliveryAddress.Name != "" -%}{{ customerDeliveryAddress.Name3 | H }}{% else -%}{{ customerAddress.Name3 | H }}{% endif -%}"/>
    <input type="text" name="street" value="{% if customerDeliveryAddress.Street != "" -%}{{ customerDeliveryAddress.Street | H }}{% else -%}{{ customerAddress.Street | H }}{% endif -%}" required/>
    <input type="text" name="streetNo" value="{% if customerDeliveryAddress.StreetNo != "" -%}{{ customerDeliveryAddress.StreetNo }}{% else -%}{{ customerAddress.StreetNo }}{% endif -%}" required/>
    <input type="text" name="unitNo" value="{% if customerDeliveryAddress.UnitNo != "" -%}{{ customerDeliveryAddress.UnitNo }}{% else -%}{{ customerAddress.UnitNo }}{% endif -%}"/>
    <input type="text" name="zipCode" value="{% if customerDeliveryAddress.ZipCode != "" -%}{{ customerDeliveryAddress.ZipCode }}{% else -%}{{ customerAddress.ZipCode }}{% endif -%}" required/>
    <input type="text" name="city" value="{% if customerDeliveryAddress.City != "" -%}{{ customerDeliveryAddress.City | H }}{% else -%}{{ customerAddress.City | H }}{% endif -%}" required/>
    <input type="text" name="countryCode" value="{{ config.Countries[customerDeliveryAddress.Country].Name }}" readonly/>
    <input type="tel" name="phoneNo" value="{% if customerDeliveryAddress.PhoneNo != "" -%}{{ customerDeliveryAddress.PhoneNo }}{% else -%}{{ customerAddress.PhoneNo }}{% endif -%}" {% if cart.SelectedDelivery.PhoneRequired -%} required {% endif -%}/>
    <input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
    <input type="hidden" name="__action" value="Order/DeliveryAddressUpdate" />
</form>

 


 

DeliveryChange

Akcja odpowiedzialna za zmianę metody dostawy towaru.

Parametry:

  • id (int, pole obowiązkowe),
  • channel (string).
<div class="form-js no-message-lq delivery-form-js">
    <input aria-label="action-order-deliverychange" type="hidden" name="__action" value="Order/DeliveryChange" />
    <input aria-label="id" type="hidden" name="id" data-type="{{ order.SelectedDelivery.CollectionPointTypeId }}" value="{{order.SelectedDeliveryPaymentId}}" />
</div>

 


 

DeliveryCollectionPointChange

Pozwala na wybranie miejsca odbioru paczki (np. przy korzystaniu z paczkomatów).

Parametry:

  • id (int, pole obowiązkowe),
  • data (string).
function chooseCollectionPointOnList(e) {
    var id = $(e.currentTarget).data('id');
    $.post(null, {__csrf: __CSRF, __action: 'order/DeliveryCollectionPointChange', id: id});
    window.choosenCollectionPointId = true;
    window.pointChoosen = true;
    $('.choose-collection-point-lq').removeClass('grey-ui');
    $(e.currentTarget).addClass('grey-ui');
    app.replaceTemplate(e);
}

 


 

DeliveryCountryChange

Akcja odpowiedzialna za zmianę kraju dostawy.

Parametry:

  • countryCode (string).
<div class="{% if settings.cartVersion != 'comfortable' -%} f-left-ui golden-big-ui {% else -%} comfortable-country-ui {% endif -%} country-ui">
    <div class="form-js no-message-lq half-ui-with-space-ui choose-country-in-cart-ui">
    {% if settings.cartVersion == "comfortable" -%}
        <label class="label-ui">{{ translations.DelivCountry }}</label>
        <div>
    {% else -%}
        <span>{{ translations.DelivCountryInfo }}:</span>
        <span>
    {% endif -%}
    {% assign countriesSize = config.Countries | Size -%}
    {% if countriesSize > 1 -%}
        <span class="select-background-ui">
        <select  aria-label="change-delivery-country" class="change-delivery-country-lq parent-container-reload-js" name="countryCode">
            {% if order.Customer.DeliveryAddress.Country != '' -%}
                {% assign countryCode = order.Customer.DeliveryAddress.Country -%}
            {% elseif customer.Address.Country != '' -%}
                {% assign countryCode = customer.Address.Country -%}
            {% else -%}
                {% assign countryCode = config.DefaultCountry -%}
            {% endif -%}

            {% for country in config.Countries -%}
                <option class="parent-container-reload-js" {% if country.ISOCode == countryCode -%} selected="selected" {% endif -%} value="{{ country.ISOCode }}">
                    {{ config.Countries[country.ISOCode].Name }}
                </option>
            {% endfor -%}
        </select>
        </span>
        <i class="ti-angle-down select-arrow-ui"></i>
    {% else -%}
        {{ config.Countries[0].Name }}
        <input type="hidden" name="countryCode" value="{{config.Countries[0].ISOCode}}">
    {% endif -%}
    {% if settings.cartVersion == "comfortable" -%}
        </div>
    {% else -%}
        </span>
    {% endif -%}
    <input  aria-label="action-order-deliverycountrychange" type="hidden" name="__action" value="Order/DeliveryCountryChange" />
    </div>
</div>

 


 

DeliveryDateChange

Akcja odpowiada za zmianę terminu dostawy.

Parametry:

  • date (string, wyrażenie regularne).
<label class="mt20-ui labeui">{{ translations.ScheduledDeliveryDate }}</label>
<div class="form-lq delivery-date-change-form-lq">
  <input type="hidden" name="__action" value="Order/DeliveryDateChange" />
  <input type="{{type}}" name="date" min="{{minDate}}" max="{{maxDate}}" value="{{dateValue}}" />
 </div>
{% elseif order.SelectedDelivery.DateText != "" -%}
<label class="mt20ui labelui">{{ translations.ScheduledDeliveryDate }}</label>
    {{ order.SelectedDelivery.DateText }}
{% endif -%}

 


 

EmailSet

Akcja odpowiada za ustawienie adresu email.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki.
<form method="POST">
    <input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
    <input type="hidden" name="__action" value="Order/EmailSet" />
    <input id="email" type="text" name="email" />
    <button>Zatwierdź</button>
</form>

 


 

FastDeliveryCheck

Akcja ta odpowiada za sprawdzenie możliwości szybszej dostawy kurierskiej.

Parametry:

  • zipCode (string) – maksymalna długość to 50 znaków.
<div class="info-ui">
    <div class="mb30-ui">{{ translations.DeligooTextInCart }}</div>
    <div class="mb30-ui form-js form-js check-deligoo-availability-form-js">
        <label>{{ translations.ZipCode }} <span class="required-ui">*</span></label>
        <input aria-label="zipCode" type="text" name="zipCode" value="{{ order.Customer.DeliveryAddress.ZipCode }}" required maxlength="20" {% if order.Customer.DeliveryAddress.ZipCode != '' -%} readonly {% endif -%}/>
        <input aria-label="countryCode" type="hidden" name="countryCode" value="" data-zip-regex="^\d{2}-\d{3}$"/>
        <input aria-label="action" type="hidden" name="__action" value="Order/FastDeliveryCheck"/>
        <button class="check-deligoo-availability-ui check-deligoo-availability-js {% if deligooSelected and order.Customer.DeliveryAddress.ZipCode != '' -%} check-deligoo-when-enter-cart-js {% endif -%} {% if order.Customer.DeliveryAddress.ZipCode != '' -%} hidden-js {% endif -%}">{{ translations.Check }}</button>
        <i class="va-mid-ui ti-check deligoo-success-icon-ui deligoo-success-icon-js hidden-js"></i>
        <i class="va-mid-ui ti-close deligoo-error-icon-ui deligoo-error-icon-js hidden-js"></i>
        <div class="validation-info-js validation-required-js hidden-js register-login-validation-error-text-ui small-input-error-ui small-input-error-ui">
            {{ translations.FillZipCode }}
        </div>
        <div class="validation-info-js validation-zip-code-lq hidden-js register-login-validation-error-text-ui small-input-error-ui">
            {{ translations.FillProperZipCode }} XX-XXX
        </div>
    </div>
    <div class="deligoo-success-js hidden-js">{{ translations.DeligooSuccessInCart }}</div>
    <div class="deligoo-error-js hidden-js">{{ translations.DeligooErrorInCart }}</div>
</div>

 


 

InvoiceAddressUpdate

Akcja ta odpowiada za zmianę danych faktury.

Parametry:

  • name (string, pole obowiązkowe) – maksymalna długość to 64 znaki,
  • name2 (string) – maksymalna długość to 64 znaki,
  • name3 (string) – maksymalna długość to 250 znaków,
  • countryCode (string, pole obowiązkowe) – maksymalna długość to 2 znaki,
  • zipCode (string) – maksymalna długość to 20 znaków,
  • city (string) – maksymalna długość to 50 znaków,
  • street (string) – maksymalna długość to 150 znaków,
  • streetNo (string) – maksymalna długość to 20 znaków,
  • unitNo (string) – maksymalna długość to 20 znaków,
  • state (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 50 znaków,
  • tin (string),
  • ssn (string) – maksymalna długość to 20 znaków,
  • invoice (bool),
  • company (bool),
  • vateu (string) – występuje tylko w wersji Enterprise, maksymalna długość to 2 znaki.
<form id="invoice-address-data">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Order/InvoiceAddressUpdate" />
<input type="hidden" name="company-or-not" value="{% if customer.Company -%}company{% endif -%}" />
<input type="checkbox" name="invoice" {% if cart.Customer.Invoice == true -%}checked{% endif -%}/>
<input id="company" type="checkbox" name="company" {% if cart.Customer.Company -%} checked {% endif -%} />
<input type="hidden" name="company-change" />
<input type="text" name="tin" value="{{ cart.Customer.TIN }}" {% if cart.Customer.Company == false -%} class="hidden" required {% endif -%}/>
<input type="text" name="name" value="{{ cart.Customer.InvoiceAddress.Name | H }}" required/>
<input type="text" name="street" value="{{ cart.Customer.InvoiceAddress.Street | H }}" required/>
<input type="text" name="streetNo" value="{{ cart.Customer.InvoiceAddress.StreetNo }}" required/>
<input type="text" name="unitNo" value="{{ cart.Customer.InvoiceAddress.UnitNo }}"/>
<input type="text" name="zipCode" value="{{ cart.Customer.InvoiceAddress.ZipCode }}" required/>
<input type="text" name="city" value="{{ cart.Customer.InvoiceAddress.City | H }}" required/>
<input type="hidden" name="countryCode" value="{{ country.ISOCode }}" required/>
<select id="select-country">
{% for country in config.Countries -%}
{% if country.ISOCode == customerDeliveryAddress.Country -%}
<option selected="selected" name="countryCode" value="{{ country.ISOCode }}">{{ config.Countries[country.ISOCode].Name }}</option>
{% else -%}
<option name="countryCode" value="{{ country.ISOCode }}">{{ config.Countries[country.ISOCode].Name }}
</option>
{% endif -%}
{% endfor -%}
</select>
<button>Zatwierdź</button>
</form>

 


 

InvoiceChange

Akcja odpowiada za wybranie opcji wystawienia faktury.

Parametry:

  • invoice (bool).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Order/InvoiceChange" />
<input type="checkbox" name="invoice"/>
</form>

 


 

NoteAdd

Akcja odpowiada za dodanie wiadomości do zamówienia.

Parametry:

  • note (string) – maksymalna długość to 500 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Order/NoteAdd" />
<textarea name="note"></textarea>
</form>

 


 

PaymentMake

Akcja odpowiada za dokonywanie płatności.

Parametry:

  • id (int, pole obowiązkowe),
  • hash (string, pole obowiązkowe).
<form method="POST">
    <input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
    <input type="hidden" name="__action" value="Order/PaymentMake" />
    <input type="hidden" name="id" value="{{ order.Id }}" />
    <input type="hidden" name="hash" value="{{ customer-profile.Order.Hash }}" />
</form>

 


 

PointsUse

Akcja odpowiada za płacenie punktami.

<div class="flex-ui vertically-centered-ui">
   <p class="f-left-ui">{{translations.WantToUsePoints}}</p>
 <div class="form-lq no-message-lq block-ui">
<input type="hidden" name="__action" value="Order/PointsUse" />
<button class="post-lq parent-container-reload-lq f-right-ui wider-button-ui"><i class="ti-cup"></i> {{ translations.PayViaLoyaltyPoints }}</button>
 </div>
 </div>

 


 

RestorePayment

Akcja odpowiada za możliwość opłacenia zamówienia gdy wcześniej się to nie udało (np. w wyniku awarii internetu).

Parametry:

  • id (int, pole obowiązkowe),
  • hash (string).
<div class="form-lq form-into-data-lq">
    <input type="hidden" name="__action" value="Order/RestorePayment" />
    <input type="hidden" name="id" value="{{ order.Id }}" />
    <input type="hidden" name="hash" value="{{ order.Hash }}" />
    <button class="post-lq parent-container-reload-lq" data-url="{{ page.Url }}?{{ orderString | H }}={{ order.Id }}{% if tab -%}&tab={{tab}}{% endif -%}">
        {{ translations.Pay }}
    </button>
</div>

 


 

ReturnAdd

Akcja odpowiedzialna za zwrot.

Parametry:

  • orderID (int, pole obowiązkowe),
  • no (int, pole obowiązkowe),
  • quantity (decimal) – może przyjąć wartość od 0.01 do 99999,
  • message (string) – maksymalna długość to 1000 znaków,
  • accountNumber (string) – maksymalna długość to 50 znaków,
  • returnId (int lub null),
  • files – pole do wczytywania plików.
<form method="POST">
<input type="text" name="quantity" min="1" placeholder="{{translations.Com_Quantity}}"/> <span class="unit"></span>
{% assign returnTyppes = config.Complaints.Returns | Size -%}
{% if returnTyppes > 1 -%}
<select name="returnId" placeholder="{{ translations.Prf_ChooseReturn }}">
<option value="">* {{ translations.Prf_ChooseReturn }}</option>
{% for ret in config.Complaints.Returns -%}
<option value="{{ret.Id}}">{{ret.Name}}</option>
{% endfor -%}
</select>
<span class="cs-validation" data-field="returnId" data-validator="required">{{translations.Com_RequiredField}}</span>
{% endif -%}
<textarea name="message" placeholder="{{translations.Com_AditionalInfo}}"></textarea>
<span data-field="message" data-validator="maxLength" data-value="1000">{{translations.Com_MaxLenghtExceeded}}: 1000</span>
<input type="text" name="accountNumber" placeholder="{{translations.Crt_BankAccountNumber}}" />
<span data-field="accountNumber" data-validator="maxLength" data-value="50">{{translations.Com_MaxLenghtExceeded}}: 50</span>
<button>Zatwierdź</button>
<input type="hidden" name="no" value=""/>
<input type="hidden" name="orderId" value=""/>
<input type="hidden" name="__action" value="Order/ReturnAdd" />
<input type="hidden" name="__CSRF" value="{{page.CSRF}}"/>
</form>

 


 

StatusGet

Akcja odpowiedzialna za pobranie statusu zamówienia.

Parametry:

  • id (int, pole obowiązkowe),
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki.
<form>
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Order/StatusGet" />
<input type="hidden" name="id" value="{{ customer-profile.Order.Id }}" />
<input type="email" name="email" placeholder="" required />
<button>Zatwierdź</button>
</form>

 


 

TinUpdate

Akcja odpowiedzialna za aktualizację numeru TIN.

Parametry:

  • vateu (string) – maksymalna długość to 2 znaki,
  • tin (string),
  • ssn (string) – maksymalna długość to 20 znaków.
<form> 
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Order/TinUpdate" /> 
<input type="email" name="tin" value="{{ config.Shop.TIN }}"/>
<button>Zatwierdź</button> 
</form>

 


 

StepNext

Akcja odpowiedzialna za kolejny krok w przypadku składania zamówienia.

<div class="no-message-lq">
	<input type="hidden" name="__action" value="Order/StepNext" />
    <button class="post-lq parent-container-reload-lq">
        <i class="fa fa-angle-right"></i>
    </button>
</div>

 


 

StepPrev

Akcja odpowiedzialna za powrót do poprzedniego kroku podczas składania zamówienia.

<div class="no-message-lq">
	<input type="hidden" name="__action" value="Order/StepPrev" />
    <button class="post-lq parent-container-reload-lq">
        <i class="fa fa-angle-left"></i>
    </button>
</div>

 


 

Subscribe

Kod odpowiadający za subskrypcję do newslettera.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • tos (int[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (int),
  • channelKey (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string).
<form id="NewsletterSubscribeForm" action="{{ page.Url }}{{ page.QueryString | H}}" method="post" novalidate>
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Newsletter/Subscribe" />
<input type="email" name="email" value="{{ customer.Email }}"
{% if customer.Email == blank -%} placeholder="* {{ translations.Com_EmailAddress }}" {% endif -%} required />
<button title="{{ translations.Nls_NewsletterSubscribeTooltip }}">+</button>
<div class="switch ">
{% for tos in config.TOS.Consents.Newsletter -%}
{% if tos.Statement -%}
<label>{{tos.Text}}</label>
{% else -%}
<input name="tos" id="tos{{ tos.Id }}" type="checkbox" value="{{ tos.Id }}" {% if tos.Required -%} required {% endif -%} />
<label for="tos{{ tos.Id }}">{% if tos.Required -%}*{% endif -%} {{tos.Text}}</label>
{% endif -%}
{% endfor -%}
</div>
<span class="legend">* {{ translations.Reg_RequiredFieldsExp }} </span>
</form>

{% for channel in tos.Channels -%}
<label class="checkbox-ui channel-ui {% if onlyEmail == false -%} channel-lq {% endif -%} {% if tos.Statement == false -%} disabled-channel-lq {% endif -%}">
{% if onlyEmail == false -%}
<input type="checkbox" name="channelKey" value="{{ channel.Key }}" {% if tos.Statement == false -%} disabled {% endif -%} />
{% else -%}
<input type="hidden" name="channelKey" value="{{ channel.Key }}" checked />
<input type="checkbox" checked disabled />
{% endif -%}
<span class="label-ui">{{ channel.Name }}</span></label>
{% endfor -%}

 


 

Unsubscribe

Kod odpowiedzialny za wypisanie się z subskrypcji mailowej.

<form id="NewsletterUnsubscribeForm" action="{{ page.Url }}{{ page.QueryString | H}}" method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Newsletter/Unsubscribe" />
<input type="hidden" name="__template" value="customer/profile-account.html" />
<p>{{ customer.Email }}</p>
<button>Anuluj subskrypcję</button>
</form>

 


CollectionPointCities

Akcja odpowiada za pobranie miast, w których znajdują się punkty odbioru.

Parametry:

  • country (string) – maksymalna długość to 2 znaki,
  • typeId (short),
  • all (bool),
  • stockLevels (bool).
     $.get('', {__csrf:__CSRF, __action:'Get/CollectionPointCities', stockLevels: true}, function(res){
            window.CitiesWithPOO = res.action.Object;
            $('.show-shops-infos-lq').html('');
            var size = window.CitiesWithPOO.length;
            for(i=0; i<size; i++){
                $('.show-shops-infos-lq').append(''+window.CitiesWithPOO[i]+'');
            }
        });

 


 

CollectionPoints

Akcja odpowiada za pobranie punktów odbioru towarów.

Parametry:

  • country (string) – maksymalna długość to 2 znaki,
  • city (string) – maksymalna długość to 50 znaków,
  • typeId (short),
  • all (bool),
  • stockLevels (bool).
<div class="box-ui clear-after-ui"/>
{% if order.SelectedDelivery.CollectionPoint -%}
    <div class="f-left-ui cart-option-ui address-ui half-ui-with-space-ui collection-point-info-lq"/>
        <p/>
            {% if order.SelectedDelivery.CollectionPointTypeId == 2 -%}
                {{ translations.ChoosenInpostMachine }}
            {% else -%}
                {{ translations.ChoosenCollectionPoint }}
            {% endif -%}
        <p/>
        <div class="right-corner-ui">
            <button class="btn-pure-ui other-address-ui show-map-in-order-lq">
                  <i class="va-mid-ui ti-pencil"></i>
                  <span class="va-mid-ui line-height-1-ui"/<{{translations.Change}}</span>
             </button>
         </div >
         <div class="box-ui clear-after-ui">
  {% assign cp = order.SelectedDelivery.CollectionPoint -%}
            {% assign name = cp.Address | Split:',' | Last | Split:'(' | First -%}
            {% if name == '' or name == ' ' or name == '  ' -%}
                {% assign name = cp.Address | Split:'(' | Last | Remove:')' -%}
                {% capture name -%}{{name}}{% endcapture -%}
            {% endif -%}
<p><strong>{{name}}</strong></p>
<p>{{cp.Street}} {{cp.StreetNo}}{% if cp.UnitNo != null and cp.UnitNo != '' -%}/{{cp.UnitNo}}{% endif -%}</p>
<p>{{cp.ZipCode}} {{cp.City}}</p>
<p>{{cp.Country}}</p>


 


 

Groups

Pobiera grupy podrzędne dla wskazanej grupy. Akcja ta umożliwia zbudowanie dynamicznego menu czy breadcrumbs.

Parametry:

  • groupId (int),
  • languageId (short),
  • levels (int).
<script type="text/javascript">
 (function () {
$(function () {
 $('nav.breadcrumbs>ol>li').hover( 
 function () { 
 var t = $(this), gId = ('' + t.data('id')).split(',')[1]; 
 if (gId && t.find('ol').length == 0) { 
 $.get(null, { __action: 'Get/Groups', groupId: gId, languageId: __lngId }, function (d) { 
 var obj = d.action.Object; 
 if (obj.length) { 
 var ol = $('<ol></ol>'); 
 t.append(ol); 
 $.each(obj, function (i, el) { 
 var a = $('<a></a>').attr('href', el.Url).text(el.Title); 
 ol.append(a); 
 a.wrap('<li></li>') 
});
}
});
}
 else t.find('ol').show(); 
},
 function () { 
 $(this).find('ol').hide(); 
}
);
});
 })(jQuery); 
</script>

 


 

Search

Akcja odpowiada za wyszukiwarkę.

Parametry:

  • search (string, pole obowiązkowe) – maksymalna długość to 100 znaków.
<div class="form-js input-field-search-ui {{ noSearchOnMobile }} quick-search-form-js {% if settings.autofill == 'yes' %} autocomplete-form-js {% endif -%}">
    <input type="hidden" name="__action" aria-label="get/search-action" value="Get/Search" />
    <input placeholder="{{ translations.SearchArticleDots }}" aria-label="search" type="search" class="search-ui" value="" name="search" maxlength="100" {% if settings.autofill == 'yes' %} autocomplete="off" data-max-autocomplete-products="{{settings.autofillQuantity}}" {% endif -%} />
    <button class="ti-search search-btn-ui quick-search-js enter-key-trigger-lq" title="{{ translations.Search }}"></button>
</div>

 


 

SearchAdvanced

Akcja odpowiada za zaawansowaną wyszukiwarkę.

Parametry:

  • search (string) – maksymalna długość to 100 znaków,
  • searchAll (string) – maksymalna długość to 100 znaków,
  • searchAny (string) – maksymalna długość to 100 znaków,
  • searchWild (string) – maksymalna długość to 100 znaków,
  • fields (int) – przyjmuje jedną z podanych niżej wartości:
      • 2 – szukaj w opisie,
      • 4 – szukaj w atrybutach,
      • 8 – szukaj w kodzie produktu,
      • 128 – szukaj w symbolu,
      • 256 – szukaj w EAN,
      • 512 – szukaj w kodzie u producenta.
  • flags (int) – przyjmuje jedną z podanych niżej wartości:
      • 1 – ma zdjęcie,
      • 2 – nowość,
      • 4 – promocja,
      • 8 – produkt z gazetki,
      • 16 – produkt polecany,
      • 32 – wyprzedaż,
      • 64 – super jakość,
      • 128 – super cena,
      • 256 – najlepiej oceniany,
      • 512 – rekomendacja sprzedawcy.
      • 1024 – towar za punkty.
  • priceFrom (long lub null),
  • priceTo (long lub null),
  • groupId (int lub null),
  • manufactureId (int lub null),
  • brandId (int lub null).
Wskazówka
Flagi można sumować — wartość wpisana do metody to suma wartości poszczególnych flag. Jeżeli suma będzie równa np. 14, wyszukanie nastąpi po flagach:
  • nowość,
  • promocja,
  • produkt z gazetki.
<div class='element-attached-lq search-inputs-ui'>
    <input aria-label="action-searchAdvanced" type='hidden' name='__action' value='Get/SearchAdvanced' />
	<input aria-label="search" type='search' name='search' class='attach-on-mobile-lq advanced-search-input-ui advanced-search-input-lq' placeholder="{{translations.SearchPhrase}}" maxlength="100" />
	<select aria-label="groupId" name="groupId" class='groupId'>
		<option value="" >{{translations.AllCategories}}</option>
        {% for category in page.GroupNodes -%}
            {% assign t = category.Id | Split:',' %}
			<option value="{{ t[1] }}">{{category.Name}}</option>
		{% endfor -%}
	</select>
	<i class="ti-angle-down select-arrow-ui"></i>	   
	<button aria-label="advanced-search-button" class="attach-on-mobile-lq post-lq advanced-search-button-ui">
		<span>{{ translations.Search }}</span>
		<i class="ti-search"></i>
	</button>
</div>
<div class="categories-adv-search-mobile-ui">{{ translations.SearchIn }}</div>
<div class='price-and-phrase-container'>
	<label class="checkbox-ui control-ui control-radio-ui">
        <input aria-label="tos-search" name="tos" type="radio" class='search-radio-ui search-radio-lq' value='search' checked>
            {{translations.WithSequence}}
        <span class="control-indicator-ui"></span>
    </label>
    <label class="checkbox-ui control-ui control-radio-ui">
        <input aria-label="tos-searchall" name="tos" type="radio" class='search-radio-ui search-radio-lq' value="searchAll">
            {{ translations.WithAllWords }}
		<span class="control-indicator-ui"></span>
    </label>
	<label class="checkbox-ui control-ui control-radio-ui" >
        <input aria-label="tos-searchany" name="tos" type="radio" class='search-radio-ui search-radio-lq' value="searchAny">
            {{ translations.WithAnyWord }}
		<span class="control-indicator-ui"></span>
    </label>
	<label class="checkbox-ui control-ui control-radio-ui">
        <input aria-label="tos-searchwild" name="tos" type="radio" class='search-radio-ui search-radio-lq' value="searchWild" >
            {{ translations.WithPartOfWord }}
     	<span class="control-indicator-ui"></span>
    </label>
</div>

 


 

SearchAutocomplete

Akcja odpowiada za wyświetlanie podpowiedzi 5 towarów w trakcie wyszukiwania.

Parametry:

  • search (string, pole obowiązkowe) – maksymalna długość to 100 znaków.
function autocomplete(e) {
    let phrase = e.target.value.replace(/[*]*/gi, '');
    const maxAutocompleteProducts = e.target.dataset.maxAutocompleteProducts;
    if (phrase != '' && phrase.length > 1) {
        $.get(location.pathname, { __action: 'Get/SearchAutocomplete', search: phrase }).then(function (res) {
            if($(window).width() > 1279){
                var right = 'right: 50px';
            } else if($(window).width() > 680){
                var right = '';
            } else {
                var right = 'right: 61px';
            }
            var loader = '';
            $('.quick-search-form-js.autocomplete-form-js').append(loader);
            var url = res.action.Redirect302;
            $.get(url, {__collection:'products.Products|page.BaseHref|currencyExt.Symbol|config.Products.ShowCode'}, function(res) {
                $('.autocomplete-js').remove();
                var list = res.collection['products.Products'];
                var showCode = res.collection['config.Products.ShowCode'];
                if (list.length > 0){
                    if (list.length > maxAutocompleteProducts) {
                        var size = maxAutocompleteProducts;
                    } else {
                        var size = list.length;
                    }
                    var baseHref = res.collection['page.BaseHref'];
                    var currency = res.collection['currencyExt.Symbol'];

 


 

SearchFilters

Akcja odpowiada za zastosowanie filtrów wyszukiwania.

Parametry:

  • __skipParameter (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string).
<input type="hidden" name="__action" value="Get/SearchFilters">

<button class="selected-filter-item-ui selected-filter-item-js" data-field="all">
    <i class="ti-close filter-delete-ui"></i>
    <span>{{translations.ResetFilters}}</span>
</button>

{% unless customer.HidePrices -%}
    {% if products.FilteringOptions.PriceFrom != null and products.FilteringOptions.PriceFrom > 0 -%}
        <button class="selected-filter-item-ui selected-filter-item-js" data-field="$minPrice">
            <i class="ti-close filter-delete-ui"></i>
            <span>{{translations.PriceFrom}} <strong>{{products.FilteringOptions.PriceFrom}}</strong> {{customer.CurrencyExt}}</span>
        </button>
        <input aria-label="minPrice" name="$minPrice" type="hidden" value="{{products.FilteringOptions.PriceFrom}}" maxlength="12">
    {% endif -%}

    {% if products.FilteringOptions.PriceTo != null -%}
        <button class="selected-filter-item-ui selected-filter-item-js" data-field="$maxPrice">
            <i class="ti-close filter-delete-ui"></i>
            <span>{{translations.PriceTo}} <strong>{{products.FilteringOptions.PriceTo}}</strong> {{customer.CurrencyExt}}</span>
        </button>
        <input aria-label="maxPrice" name="$maxPrice" type="hidden" value="{{products.FilteringOptions.PriceTo}}" maxlength="12">
    {% endif -%}
{% endunless -%}

 


 

ProductId

Akcja ta pozwala na zwrócenie wartości ID towaru znajdującego się w bazie e-Sklepu na podstawie ID towaru w bazie systemu ERP (GIDNumber). Może być przydatna podczas pisania własnych dodatków dla Comarch e-Sklep Sync.

Parametry:

  • gidNumbers (int[], pole obowiązkowe).
<script type="text/javascript">
function getProductID(...gidNumbers) {
	jQuery.get(null, jQuery.param(
		{__action:'Get/ProductId', gidNumbers: gidNumbers}, true), 
		res => res.action.Object
	);
},
</script>
Uwaga
Akcja dostępna jest w sklepach B2B od wersji 2021.2.

 

AskForPrice

Akcja odpowiada za złożenie zapytania o cenę produktu.

Parametry:

  • productId (int, pole obowiązkowe),
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • phoneNo (string) – maksymalna długość to 20 znaków,
  • quantity (decimal, pole obowiązkowe) – może przyjąć wartość od 0.01 do 99999,
  • unitId (int lub null),
  • message (string) – maksymalna długość to 500 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Product/AskForPrice" />
<input type="hidden" name="productId" value="{{ product.Id }}" />
<input type="email" name="email" value="{{ customer.Email }}" required />
<input type="tel" name="phoneNo" value="{{ customer.Address.PhoneNo }}"/>
<input type="button" value="-" />
<input type="text" name="quantity" value="1" min="1" max="99999"/>
<input type="button" value="+" field='quantity'/>
{% if product.Units[1] -%}
{% for unit in product.Units -%}
<input type="button" value="{{ unit.Name }}"/>
<input type="hidden" value="{{ unit.Id }}" data-ratio="{{ unit.Ratio }}"/>
{% endfor -%}
{% endif -%}
{% for unit in product.Units -%}
{% if unit.Default == true or unit.Id == null -%}
<input name="unitId" type="hidden" value="{{ unit.Id }}"/>
{% endif -%}
{% endfor -%}
<textarea type="text" name="message" required></textarea>
<button>Zatwierdź</button>
</form>

 


 

CollectionPointsStockLevelsGet

Akcja odpowiada za pobieranie stanów magazynowych w salonach danego towaru.

Parametry:

  • products (string, pole obowiązkowe),
  • country (string) – maksymalna długość to 2 znaki,
  • city (string) – maksymalna długość to 50 znaków,
  • pointTypeId (short),
  • pointId (int lub null).
function showShopsInfos(e) {
    var city = $(e.currentTarget).val();
    if(city != ''){
        var productType = $('[name=productType]').val();
        if (productType == 'batch'){
            var productId = $('[data-product-id]').data('product-id');
            var supplyId = $('[data-supply-id].active-lq').data('supply-id');
        } else if (productType == 'clip'){
            var productId = $('[data-supply-id].active-lq').data('supply-id');
        } else {
            var productId = $('[data-product-id]').data('product-id');
        }
        var downloaded = false;
        var index = '';
        if(window.productsWithPOO){
            var size = window.productsWithPOO.length;
            for(i=0; i<size; i++){
                index = i;
                if(window.productsWithPOO[i].name == city+'-'+productId+'-'+supplyId){
                    downloaded = true;
                    index = i;
                    break;
                }
            }
            if(!downloaded){
                window.productsWithPOO.push({name: city+'-'+productId+'-'+supplyId});
                index = index + 1;
            }
        } else {
            window.productsWithPOO = [];
            window.productsWithPOO.push({name: city+'-'+productId+'-'+supplyId});
            index = 0;
        }
        if(!downloaded){
            $('.during-ajax-modal-lq').removeClass('hidden-lq');
            $.post(null, {__csrf:__CSRF, __action:'Product/CollectionPointsStockLevelsGet',city:city ,products:JSON.stringify([{ProductId:productId, SupplyId:supplyId}])},function(res){
                if(window.productsWithPOO[index].name == city+'-'+productId+'-'+supplyId){
                    window.productsWithPOO[index].shops = res.action.Object;
                    appendShopsInfos(window.productsWithPOO[index].shops);
                    $('.during-ajax-modal-lq').addClass('hidden-lq');
                }
            });
        } else {
            appendShopsInfos(window.productsWithPOO[index].shops);
        }
    }
};

 

Wskazówka
Jeżeli chcesz pokazać w e-Sklepie ilości towaru w podziale na magazyny (e-Sklepu i hurtowni), to można je pobrać akcją ’Product/StockLevelsGet’.

 


 

ComparisonToolAdd

Akcja odpowiadająca za dodanie produktu do porównania z innym produktem.

Parametry:

  • productId (int, pole obowiązkowe).
<form action="{{ page.Url }}{{ page.QueryString | H }}" method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Product/ComparisonToolAdd" />
<input type="hidden" name="productId" value="{{ productD.Id }}"/>
<input type="hidden" name="url" value="{{ page.BaseHref }}{{ config.DefinedPages.ProductComparisonTool.Url }}"/>
</form>

 


 

ComparisonToolDelete

Akcja odpowiada za usunięcie przedmiotu z porównania.

Parametry:

  • productId (int, pole obowiązkowe).
{% for product in comparer.Products -%}
<form action="{{ page.Url }}{{ page.QueryString | H }}" method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Product/ComparisonToolDelete" />
<input type="hidden" name="productId" value="{{ product.Id }}"/>
<button>Zatwierdź</button>
</form>
{% endfor -%}

 


 

DeliveryCostGet

Akcja odpowiada za pobranie najniższej ceny dostawy dla danego towaru.

Parametry:

  • id (int, pole obowiązkowe),
  • unitId (int lub null, pole obowiązkowe).
<p class="delivery hidden">{{translations.Com_DeliveryFrom}}: {{currency}}</p>
<script>
    Number.prototype.format = function(n, x, s, c) {
       var re = '\\d(?=(\\d{' + (x || 3) + '})+' + (n > 0 ? '\\D' : '$') + ')',
       num = this.toFixed(Math.max(0, ~~n));
       return (c ? num.replace('.', c) : num).replace(new RegExp(re, 'g'), '$&' + (s || ','));
    };
    Number.prototype.toPrice = function () {
       var decimalPlaces = __decimalPlacesPrice || 2;
       return this.format(decimalPlaces, 3, __decThoSep, __decSep);
    }
    $.get('', {__action:'Product/DeliveryCostGet', id: '{{_pd.Id}}' },function(res){
       if(res.action.Object.Cost > 0){
           $('.delivery').removeClass('hidden');
           $('.delivery-cost').text(res.action.Object.Cost.toPrice());
       }
    });
</script>

 


 

FastDeliveryCheck

Akcja odpowiadająca za sprawdzenie dostępności usługi szybkiej dostawy w podanej lokalizacji.

Parametry:

  • products (string, pole obowiązkowe),
  • country (string) – maksymalna długość to 2 znaki,
  • zipCode (string) – maksymalna długość to 50 znaków.
<form action="{{ page.Url }}{{ page.QueryString | H }}" method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input aria-label="action" type="hidden" name="__action" value="Product/FastDeliveryCheck" />
<input aria-label="zipCode" type="text" name="zipCode" value="{{ customer.Address.ZipCode }}" maxlength="50"/>
<input aria-label="country" type="hidden" name="country" value="" />
<input aria-label="products" type="hidden" name="products" value='[{"ProductId":{{ product.Id }}}]' />
<button>Zatwierdź</button>
</form>

 


 

NotifyAboutProductAvailability

Akcja odpowiadająca za złożenie zapytania odnośnie poinformowania użytkownika o ponownej dostępności towaru.

Parametry:

  • productId (int, pole obowiązkowe),
  • name (string, pole obowiązkowe) – maksymalna długość to 50 znaków,
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • phoneNo (string) – maksymalna długość to 20 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Product/NotifyAboutProductAvailability" />
<input type="hidden" name="productId" value="{{ product.Id }}" />
<input type="email" name="email" value="{{ customer.Email }}" required />
<input type="text" name="name" value="{{ customer.Address.Name }}" required />
<input type="tel" name="phoneNo" value="{{ customer.Address.PhoneNo }}"/>
<button>Zatwierdź</button>
</form>

 


 

ReviewAdd

Akcja odpowiadająca za dodanie opinii na temat produktu.

Parametry:

  • rating (short, pole obowiązkowe) – może przyjąć wartość od 1 do 5,
  • comment (string, pole obowiązkowe) – maksymalna długość to 4000 znaków,
  • author (string, pole obowiązkowe) – maksymalna długość to 50 znaków,
  • productId (int, pole obowiązkowe),
  • orderHash (string).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="Product/ReviewAdd" />
<input type="text" name="author" {% if customer.Authenticated == true -%}{% if customer.ReviewAuthor != "" -%} value="{{ customer.ReviewAuthor | H }}" {% else -%} value="{{ customer.Address.Name | H }}" {% endif -%}{% endif -%} required />
<textarea type="text" name="comment" required></textarea>
<input type="hidden" name="rating" value="5"/>
<input type="hidden" name="productId" value="{{ product.Id }}"/>
<input type="hidden" name="orderHash" value=""/>
<button>Zatwierdź</button>
</form>

 


 

StockLevelsGet

Akcja odpowiada za pobieranie stanów magazynowych z podziałem na magazyny (e-Sklepu i hurtowni).

Parametry:

  • id (int, pole obowiązkowe).
$.get(null, {__action:'Product/StockLevelsGet', id: product.Id}, function(res) {
   if(res.action.Object) {
      console.log(res.action.Object);
   }
});

Dla powyższej akcji zostanie zwrócony ten sam obiekt Stock (jak np. na szczegółach towaru), ale z dwoma dodatkowymi właściwościami:
> WarehouseId,
> WarehouseName.
Właściwości mogą być puste (null) – jeśli jest to stan z ERP, a nie z hurtowni.

 


 

WishListAdd

Akcja odpowiedzialna za dodanie produktu do listy życzeń.

Parametry:

  • productId (int, pole obowiązkowe),
  • quantity (decimal) – może przyjąć wartość od 1 do 99999,
  • note (string) – maksymalna długość to 500 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="product/WishListAdd" />
<input type="hidden" name="productId" value="{{ product.Id }}" required />
<input type="text" name="quantity" value="1"/>
<input type="button" value="+" field="quantity"/>
<textarea name="note"></textarea>
<button>Zatwierdź</button>
</form>

 


 

WishListCheck

Akcja odpowiedzialna za sprawdzenie czy produkt należy do listy życzeń.

Parametry:

  • products (int[]).
$.get(null, { __action: 'Product/WishListCheck', products: JSON.stringify([parseInt(productId)]) }, function (result) {
                if (result.action.Object != '') {
                    //Product in wishlist
                    if (!($('.productDetails-buttons--wishList').hasClass('wishListPopup-js'))) {
                        $('input[aria-label="wishListAdd"]').val('Product/WishListDelete');
                        $('.productDetails-buttons--wishList__removeProduct').removeClass('hidden');
                        $('.productDetails-buttons--wishList__addProduct').addClass('hidden');
                        $('.productDetails-buttons--wishList__svgIcon').html('<use xlink:href="css/img/icons-sprite.svg#heart-solid"></use>');
                        $('.productDetails-buttons--wishList').removeClass('productWishListAdd-js').addClass('productWishListRemove-js');
                    }
                } else {
                    //Product not in wishlist
                    if (!($('.productDetails-buttons--wishList').hasClass('wishListPopup-js'))) {
                        $('input[aria-label="wishListAdd"]').val('Product/WishListAdd');
                        $('.productDetails-buttons--wishList__removeProduct').addClass('hidden');
                        $('.productDetails-buttons--wishList__addProduct').removeClass('hidden');
                        $('.productDetails-buttons--wishList__svgIcon').html('<use xlink:href="css/img/icons-sprite.svg#heart-light"></use>');
                        $('.productDetails-buttons--wishList').removeClass('productWishListRemove-js').addClass('productWishListAdd-js');
                    }
                }
            });

 


 

WishListDelete

Akcja odpowiadająca za usuwanie przedmiotu z listy życzeń.

Parametry:

  • productId (int lub null).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="product/WishListDelete" />
<input type="hidden" name="productId" value="{{ product.Id }}" required />
<button>Zatwierdź</button>
</form>

 


 

WishListUpdate

Akcja odpowiada za ustawienie/zmianę daty na liście życzeń.

Parametry:

  • productId (int),
  • note (string) – maksymalna długość to 500 znaków,
  • notify (bool),
  • notifyDate (string, wyrażenie regularne).
function updateReminderDate(e) {
    var container = $('.after-adding-to-wishlist-popup-lq .after-adding-to-cart-popup-container-lq');
    var message = $(e.currentTarget).data('success');
    var productId = $(e.currentTarget).data('id');
    var inputVal = $(e.currentTarget).val();
    var data = {
        productId: productId,
        __csrf: __CSRF,
        __action: 'Product/WishListUpdate'
    };
    if(inputVal != ""){
        var date = inputVal + ' 06:00:00';
        data.notify = true;
        data.notifyDate = date;
    } else {
        data.notify = false;
    }
    $.post(null, data);
};

 


Add

Odpowiada za dodanie produktów do koszyka.

Parametry:

  • productId (int, pole obowiązkowe),
  • quantity (decimal) – może przyjąć wartość od 0.01 do 99999,
  • unitId (int lub null),
  • attributeId (long[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (long),
  • attributeEditable (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string),
  • supplyId (int lub null),
  • cartId (int lub null).
<form method="POST">
<input type="number" name="quantity" value="1" required/>
<input type="hidden" name="productId" value="{{productdetails.Product.Id}}" />
<input type="hidden" name="__CSRF" value="{{page.CSRF}}" />
<input type="hidden" name="__action" value="Cart/Add" />
<button type="submit">Dodaj do koszyka</button>
</form>

 


 

AttributesSet

Akcja odpowiada za ustawianie atrybutów na koszyku.

Parametry:

  • no (int lub null),
  • attribute (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string), maksymalna długość to 1000 znaków.
<form method="POST">
{% if page.PageId == config.DefinedPages.Order.Id -%}
        {% assign attributes = config.Orders.AttributesCart.Position -%}
	{% assign positionAttrSize = attributes | Size -%}
	{% assign showInCart = true -%}
	{% assign action = 'Cart/AttributesSet' -%}
{% endif %}
	<input type="hidden" name="__action" value="{{ action }}" />
	<input type="hidden" name="no" value="{{ product.No }}" />
</form>

 


 

Change

Akcja odpowiada za zmianę koszyka.

Parametry:

  • id (int, pole obowiązkowe).
<form method="POST">
{% if customer.Carts[1] -%}
            <input type="hidden" name="__action" value="Cart/Change" />
            <input type="hidden" name="id" />
            <ul>
                {% for cart in customer.Carts -%}
                    <li class="choose-cart-lq" data-id="{{ cart.Id }}" data-name="{{ cart.Name | H }}">{{ translations.Cart }} {{ cart.Name }}</li>
                {% endfor -%}
            </ul>
{% endif -%}
</form>

 


 

Create

Akcja odpowiada za utworzenie nowego koszyka.

Parametry:

  • inquiry (bool).
if(parameters && !validationError){
            var obj = {
                parameters: JSON.stringify(parameters),
                loadParent: loadParent,
                e: e,
                form: form
            };
            var activeInquiryId = window.app.getCookie('activeInquiryId');
            if((activeInquiryId == -1 || activeInquiryId == '') && $(e.currentTarget).hasClass('add-to-inquiry-lq')){
                $.post('', {__action: 'Cart/Create', inquiry: true, __csrf: __CSRF}, function(result) {
                    var inquiryId = result.action.Object.CartId;
                    for(var i=0; i<parameters.length; i++){
                        parameters[i].cartId = inquiryId;
                    }
                    obj.parameters = JSON.stringify(parameters);
                    js.addManyProductsToCart(obj, e);
                });
            } else {
                js.addManyProductsToCart(obj, e);
            }
        }

 


 

Delete

Akcja ta umożliwia usunięcie wszystkich produktów z koszyka.

<form method="POST">
<input type="hidden" name="__CSRF" value="{{page.CSRF}}" />
<input type="hidden" name="__action" value="Cart/Delete" />
<button type="submit">USUŃ</button>
</form>

 


 

ExternalAdd

Akcja dla konfiguratora produktów. Dodaje do koszyka zawartość zwróconą z sync.

Parametry:

  • id (int, pole obowiązkowe),
  • type (int).
if(a.Result && e.hasClass('sendCart-lq')){ 
                $('.set-price-lq').html('');
                $.post(null, {__CSRF:__CSRF, __action:'cart/externalAdd', id:a.Object.Id}, result => {
                    var cartId = window.app.getCookie('lastCartId');
                    $.get('', {__collection: 'customer.Cart.Count|customer.Cart.Value|customer.Cart.EditedOrderId|customer.CurrencyExt.Symbol'}, function (result) {
                        var cartCount = result.collection['customer.Cart.Count'];
                        var cartValue = result.collection['customer.Cart.Value'].toPrice();
                        var editedOrderId = result.collection['customer.Cart.EditedOrderId'];
                        if(editedOrderId != null && activeInquiryId == -1){
                            window.app.setCookie('lastCartId', -1);
                        }
                        $('.carts-change-popup-lq .selected-cart-ui').removeClass('selected-cart-ui');
                        $('.change-cart-link-js[data-id='+cartId+']').parent().addClass('selected-cart-ui');
                        $('.cart-count-lq').text(cartCount);
                        $('.counter-bg-lq').removeClass('hidden-js');
                        $('.cart-value-lq').text(cartValue);
                        $('.cart-value-with-currency-lq').text(cartValue+' '+result.collection['customer.CurrencyExt.Symbol']);
                        $('.load-cart-lq[data-cart-id]').attr('data-cart-id', cartId);
                    });

                    app.afterAddingToCart(e, result.action.message, null, result.template);
                }); 
            }

 


 

ImportCSV

Akcja odpowiada za importowanie koszyka z pliku.

Parametry:

  • file – pole do wczytywania plików,
  • separator (char lub null),
  • decimalSeparator (char lub null).
importCSV: function(e){
        $('.during-ajax-modal-lq').removeClass('hidden-lq');
        var file = $(e.currentTarget);
        file.addClass('prevent-double-change-lq');
        var fd = new FormData();
        fd.append('__csrf',__CSRF);
        fd.append('__action','Cart/ImportCSV');
        fd.append('file', e.currentTarget.files[0]);
        $.ajax({data: fd, processData: false, contentType: false, type: 'POST',
            success: function(data){
                file.val('');
                if(data.action.Multiple){
                    var results = data.action.Results;
                    var imported = true;
                    var validationArr = [];
                    for(var i=0; i<results.length; i++){
                        if(!results[i].Result){
                            imported = false;
                            var name = results[i].Object.NameNoHtml;
                            var message = results[i].Message
                            if(results[i].Description != null){
                                message += ' ' + results[i].Description;
                            }
                            validationArr.push({name:name, message:message});
                        }
                    }
                } else {
                    if(data.action.Result){
                        var imported = true;
                    } else {
                        var imported = false;
                    }
                }


 


 

NameSet

Akcja odpowiada za ustawienie nazwy wybranego koszyka.

Parametry:

  • id (int, pole obowiązkowe),
  • name (string) – maksymalna długość to 30 znaków.
$('body').on('change','.carts-change-popup-lq input',function(e){
        $.post(null,{__csrf:__CSRF,__action:'Cart/NameSet',id:$(this).data('id'),name:$(this).val()},function(){location.reload();});
    });

 


 

PositionDelete

Odpowiada za usuwanie danej pozycji z koszyka.

Parametry:

  • no (int, pole obowiązkowe),
  • position (bool).
<div class="form-js flr-ui no-message-lq">
    <input type="hidden" name="__action" value="Cart/PositionDelete" />
    <input type="hidden" name="no" value="{{ product.No }}" />
    {% if product.IsSetElement -%}
	<input type="hidden" name="position" value="true" />
    {% endif -%}
    <button class="remove-product-from-cart-lq parent-container-reload-js btn-pure-ui ti-trash {% if productsSize == 1 -%} last-product-lq {% endif -%}" title="{{ translations.Delete }}"></button>
    <span class="remove-product-from-cart-lq parent-container-reload-js mobile-ui {% if productsSize == 1 -%} last-product-lq {% endif -%}">{{ translations.Delete }}</span>
</div>

 


 

QuantityChange

Akcja powoduje zmianę ilości przedmiotu w koszyku.

Parametry:

  • quantity (decimal, pole obowiązkowe) – może przyjąć wartość od 0.01 do 99999,
  • no (int, pole obowiązkowe).
<form method="POST">
Produkt: {{cart.Products[forloop.index0].NameNoHtml}}<br/>
Ilość: {{cart.Products[forloop.index0].Quantity}}<br/>
<button>Zwiększ ilość o 1</button>
<input type="hidden" name="quantity" value="{{cart.Products[forloop.index0].Quantity | ToInt | Plus: 1}}"/>
<input type="hidden" name="no" value="{{cart.Products[forloop.index0].No}}"/>
<input type="hidden" name="__CSRF" value="{{page.CSRF}}" />
<input type="hidden" name="__action" value="cart/QuantityChange" />
</form>

 


 

Recalculate

Odpowiada za ponowne przeliczenie koszyka.

<form method="post">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="cart/Recalculate" />
<input type="hidden" name="__template" value="order/cart.html" />
<input type="hidden" name="__collection" value="customer.Cart.Value" />
</form>

 


 

SetAdd

Akcja obsługuje dodawanie zestawu produktów.

Parametry:

  • productId (int, pole obowiązkowe),
  • setId (int, pole obowiązkowe),
  • quantity (int) – może przyjąć wartość od 1 do 99,
  • attributeId (int[]) – może zotać przekazane wielokrotnie w ramach jednej akcji (int),
  • supplyId (int[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (int).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}"/>
<input type="hidden" name="__action" value="cart/SetAdd" />
<input type="hidden" name="productId" value="{{ product.Id }}" />
<input type="text" name="productId" value="{{set.SetId }}" required/>
<input type="text" name="setId" value="1"/>
<button>Zatwierdź</button>
</form>

 


 

SetExtAdd

Akcja obsługuje dodawanie nowego zestawu produktów.

Parametry:

  • setId (int, pole obowiązkowe),
  • quantity (int) – może przyjąć wartość od 1 do 99,
  • products (Object[], pole obowiązkowe) – jako argument przyjmuje tablicę obiektów zawierających dane produktów z zestawu.
if(form.hasClass('add-set-to-cart-lq')){
	var set = {setId:Number($(e.currentTarget).data('set-id')), quantity:1, products:[]};
    var setProducts = form.find('.set-product-lq');
    setProducts.each(function () {
		var setProduct = {
			setElementId: Number($(this).data('set-element-id')),
			setProductId: Number($(this).data('set-product-id'))
		};
		if($(this).find('[name=attributePolyvalent]').length > 0){
			var attributesPolyvalent = [];
			$(this).find('[name=attributePolyvalent]').each(function(){
				var attribute = {
					id: Number($(this).data('id')),
					valueId:  Number($(this).val())
				};
				attributesPolyvalent.push(attribute);
			});
			setProduct.attributesPolyvalent = attributesPolyvalent;
		}
		if($(this).find('[name=attributeEditable]').length > 0){
			var attributesEditable = [];
			$(this).find('[name=attributeEditable]').each(function(){
				var attribute = {
					id: Number($(this).data('id')),
					value:  $(this).val()
				};
				attributesEditable.push(attribute);
			});
			setProduct.attributesEditable = attributesEditable;
		}
		set.products.push(setProduct);
    });
	var data = [
		{name: "__csrf", value: __CSRF}, 
		{name: "__action", value: 'Cart/SetExtAdd'}, 
		{name: "set", value: JSON.stringify(set)}
	];
}

 


 

AskAboutProduct

Akcja pozwalająca na złożenie zapytania o produkt.

Parametry:

  • productId (int, pole obowiązkowe),
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • phoneNo (string) – maksymalna długość to 20 znaków,
  • name (string, pole obowiązkowe) – maksymalna długość to 50 znaków,
  • message (string, pole obowiązkowe) – maksymalna długość to 500 znaków,
  • copy (bool).
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Contact/AskAboutProduct" />
<input type="hidden" name="productId" value="{{ product.Id }}" />
<input type="email" name="email" value="{{ customer.Email }}" required />
<input type="text" name="name" value="{{ customer.Address.Name }}" required />
<input type="tel" name="phoneNo" value="{{ customer.Address.PhoneNo }}"/>
<textarea type="text" name="message" required></textarea>
<input type="checkbox" name="copy"/>
<button>Zatwierdź</button>
</form>

 


 

Send

Akcja odpowiadająca za wysłanie zawartości formularza kontaktowego.

Parametry:

  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • name (string) – maksymalna długość to 50 znaków,
  • phoneNo (string) – maksymalna długość to 20 znaków,
  • subject (string, pole obowiązkowe) – maksymalna długość to 50 znaków,
  • message (string, pole obowiązkowe) – maksymalna długość to 500 znaków,
  • copy (bool),
  • contactId (int lub null),
  • files – pole do wczytywania plików. Maksymalna ilość załączników jest określona w obiekcie config.Contact.AttachmentsMaxCount,
  • macro_xx (string) – pole zdefiniowane przez użytkownika. Może występować wiele razy. Napis xx jest edytowalny, ale przedrostek musi pozostać taki sam. Przykładem poprawnej nazwy jest: macro_Pole1.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Contact/Send" />
<input type="hidden" name="copy" value="1" />
<input type="email" name="email" value="{{ customer.Email }}"
{% if customer.Email == blank -%} placeholder="* {{ translations.Com_EmailAddress }}" {% endif -%}
required />
<input type="tel" name="phoneNo" value="{{ customer.Address.PhoneNo }}"
placeholder="{{ translations.Prf_Telephone }}" />
<input type="text" name="subject" placeholder="* {{ translations.Cfm_Subject }}" required autofocus />
<textarea type="text" name="message" placeholder="* {{ translations.Pps_Message }}" required /></textarea>
<input 
	type="file" 
	name="resume" 
	id="resume"  
	required 
	accept="{{ config.Contact.AttachmentExtensions }}" 
	data-file-size="{{ config.Contact.AttachmentMaxSize }}" 
	data-size-exceeded="{{ translations.Com_FileSizeExceeded | Format: maxSize }}"
	data-invalid-file="{{ translations.Com_InvalidFile | Format: config.Contact.AttachmentExtensions }}"
	data-not-added-info="{{translations.AttachementsNotAdded}}"
>
<button>Zatwierdź</button>
</form>

Przykład modyfikacji w szablonie Bursztyn z użytymi polami macro_xx:

<div class="contact-form {% if settings.googleMapsKey != '' and config.Shop.Address.Latitude != 0 and config.Shop.Address.Longitude != 0 -%} col-md-4 {% endif%} col-sm-12 col-xs-12">
			<div class="row">
				<div class="content form-content">
					<div class="title">{{ translations.Cff_WriteEmail }}</div>
					<form class="reg-form"
					id="ContactSendForm" action="{{ page.Url }}{{ page.QueryString | H}}" method="post">
						<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
						<input type="hidden" name="__action" value="Contact/Send" />
						<input type="hidden" name="copy" value="1" />

						<input type="email" name="email" value="{{ customer.Email }}" 
						{% if customer.Email == blank -%} placeholder="* {{ translations.Com_EmailAddress }}" {% endif -%} 
						required />	
						<input type="tel" name="phoneNo"  value="{{ customer.Address.PhoneNo }}" 
						placeholder="{{ translations.Prf_Telephone }}" />
						<input type="text" name="subject" placeholder="* {{ translations.Cfm_Subject }}" required autofocus />
						<textarea type="text" name="message" placeholder="* {{ translations.Pps_Message }}" required /></textarea>

						<input type="text" name="macro_Pole1" placeholder="* Pole1" required />
						<input type="text" name="macro_Pole2" placeholder="* Pole2" required />

						<span class="legend">* {{ translations.Reg_RequiredFieldsExp }} </span>
						<button class="primary-action">{{ translations.Com_Send }}</button>
					</form>
				</div>
			</div>
		</div>
		
		{% if settings.googleMapsKey != '' and config.Shop.Address.Latitude != 0 and config.Shop.Address.Longitude != 0 -%}
			<div id="map-canvas" class="col-md-8 col-xs-12"></div>
		{% endif %}
	</div>

Aby pola użytkownika były widoczne w mailu ze strony kontakt należy należy dodać w ich treści zdefiniowane pola.
Przykład dodania takich pól poniżej:

<div style="padding: 20px; margin: 20px; font-family: Arial, Helvetica, sans-serif; text-align: left; border: 1px solid #cc6600; font-size: 12pt;"><h2 style="color: #cc6600;">ZAPYTANIE ZE STRONY INTERNETOWEJ</h2><br />
<p>Nadawca: <a href="mailto:{{ customer.Email }}"><b>{{ customer.Email }}</b></a><br />Temat: <b>{{ subject }}</b></p>
<p>Treść wiadomości:<br /> {{ message }}</p> 

<pre>
  Pole 1 {{userFields.macro_Pole1}}
  Pole 2 {{userFields.macro_Pole2}}
</pre>

</div>

Tworzymy pomocniczą tablice zawierającą ścieżki do plików. Przykład:

 addAttachementInResume: function(e) {
        window.attachementsInResume = [];
        var filesArr = $(e.currentTarget).parents('.inputs-container-js').find('.addAttachementInResume-js');
        filesArr.each(function () {
            if(this.files.length > 0){
                var maxSize = $(this).data('file-size');
                if(this.files[0].size > maxSize){
                    var message = $('[data-not-added-info]').data('not-added-info') + '.

’ + this.files[0].name + ’

: ' + $(this).data('size-exceeded');
                    app.showTemporaryPopup(message, 'error', '', 8000);
                    $(this).val('');
                    $(this).next().hide();
                } else {
                    window.attachementsInResume.push(this.files[0]);
                    $(e.currentTarget).siblings('.fileInfo-js').html(this.files[0].name);
                }
            }
        });
    }

W celu przesłania ciała akcji najlepiej użyć FormData (JavaScript API), do której przekażemy kolejne pola. Pliki przekazujemy jako file0, file1, .. fileN. Przykład poniżej:

postResume: function(e) {
        if(app.validationBeforePost(e) != 'error'){
            var form = $(e.currentTarget).parents('.inputs-container-js');
            var dataFromHTML = form.find('input:not([disabled]), select:not([disabled]), textarea:not([disabled])').serializeArray();
            var fileList = window.attachementsInResume;
            if(fileList != undefined){
                var filesSize = fileList.length;
            }
            var fd = new FormData();
            fd.append('__csrf', __CSRF);
            for(var i=0; i<dataFromHTML.length; i++){ fd.append(dataFromHTML[i].name,dataFromHTML[i].value); } if (filesSize > 0) {
                window.AttachementsErrors = 0;
                function addAttachementError(file, message) {
                    if(window.AttachementsNotAdded == undefined){
                        window.AttachementsNotAdded = [];
                    }
                    var attachement = ' '+file.name+': '+message+' ';
                    window.AttachementsNotAdded.push(attachement);
                    window.AttachementsErrors += 1;
                };
                var input = form.find('[type=file]').eq(0);
                var extensions = input.attr('accept').split(', ');
                var fileSize = input.data('file-size');
                for (var i=0; i<filesSize; i++) {
                    var file = fileList.pop();
                    if(file.size < fileSize){
                        var extensionArr = file.name.split('.');
                        var extension = '.' + extensionArr[extensionArr.length - 1].toLowerCase();
                        var wrongExtension = true;
                        for(var j=0; j<extensions.length; j++){
                            if(extension == extensions[j]){
                               fd.append('file'+i, file);
                               var wrongExtension = false;
                            }
                        }
                        if(wrongExtension){
                           var message = input.data('invalid-file');
                           addAttachementError(file, message); 
                        }
                    } else {
                        var message = input.data('size-exceeded');
                        addAttachementError(file, message);
                    }
                }
                if(window.AttachementsNotAdded){
                    var message = $('[data-not-added-info]').data('not-added-info') + window.AttachementsNotAdded.join('');
                    app.showTemporaryPopup(message, 'error', '', 8000);
                    window.AttachementsNotAdded = undefined; window.AttachementsErrors = undefined;
                }
            }
            $.ajax({ data: fd, processData: false, contentType: false, type: 'POST', success: function (data) {
                $('.addAttachementInResume-js').val('');
                if (data.action.Result) {
                    var message = form.data('success-info');
                    app.showTemporaryPopup(message, 'success', '', 8000);
                    $('.clearFileInput-js').hide();
                    app.hidePopup(e);
                } else {
                    app.showTemporaryPopup(data.action.Description, 'error', '', 8000);
                }
            }};
            $('.fileInfo-js').html('');
        }
},

 


 

TellFriendAboutProduct

Akcja odpowiedzialna za wysłanie powiadomienia odnośnie danego produktu do innej osoby poprzez e-mail.

Parametry:

  • productId (int, pole obowiązkowe),
  • email (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • name (string) – maksymalna długość to 50 znaków,
  • message (string, pole obowiązkowe) – maksymalna długość to 500 znaków,
  • copy (bool),
  • friendEmail (string, pole obowiązkowe, wyrażenie regularne) – maksymalna długość to 192 znaki,
  • friendName (string) – maksymalna długość to 50 znaków.
<form method="POST">
<input type="hidden" name="__csrf" value="{{ page.CSRF }}" />
<input type="hidden" name="__action" value="Contact/TellFriendAboutProduct" />
<input type="hidden" name="productId" value="{{ product.Id }}" />
<input type="email" name="email" value="{{ customer.Email }}" required />
<input type="text" name="name" value="{{ customer.Address.Name }}" />
<input type="email" name="friendEmail" required />
<input type="text" name="friendName" />
<textarea type="text" name="message" required></textarea>
<button>Zatwierdź</button>
</form>

 


 

Accept

Akcja odpowiedzialna za wysłanie żądania o zastosowanie wszystkich zmian.

Parametry:

  • orderId (int, pole obowiązkowe).
 this.accept = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Accept',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        $('.during-ajax-modal-lq').addClass('hidden-lq');
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = false;
                    window.app.setCookie('lastCartId', -1);
                });
            }

 


 

AttributesSet

Akcja odpowiedzialna za edycję atrybutów odnoszących się bezpośrednio do zamówienia.

Parametry:

    • orderId (int, pole obowiązkowe),
    • attribute (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji (string), maksymalna długość to 1000 znaków.
<div class="remarks-ui">
    <div class="form-js header-attributes-set-form-js">
        <input type="hidden" name="__action" value="OrderEdit/AttributesSet" />
        <input type="hidden" name="orderId" value="{{ order.Id }}" />
        {% assign i = 0 -%}
        {% for headerAttr in config.Orders.AttributesEdit.Header -%}
            {% assign intId = headerAttr.Id | ToInt -%}
            {% unless headerAttr.Editable == false and order.Attributes[intId].Value == null -%}
                {% assign i = i | Plus: 1 -%}
                {% assign modulo = i | Modulo: 3 -%}
                {% if modulo == 1 -%}
                    <div class="order-info-row-ui">
                {% endif -%}
                <div class="order-info-item-ui">
                    <div class="name-ui">
                        {{ headerAttr.Name }}
                        {% if headerAttr.Required -%}
                            <span class="required-ui">*</span>
                        {% endif -%}
                    </div>
                    <div class="content-ui">
                        {% if headerAttr.Editable -%}
                            {% case headerAttr.Format -%}
                                {% when 1 -%}
                                    <input type="text" name="attribute" value="{{ order.Attributes[intId].Value }}" maxlength="50" {% if headerAttr.Required -%} required {% endif -%} />
                                {% when 2 -%}
                                    <input type="number" name="attribute" value="{{ order.Attributes[intId].Value }}" maxlength="50" {% if headerAttr.Required -%} required {% endif -%} />
                                {% when 3 -%}
                                    <span class="select-background-ui">
                                        <select name="attribute">
                                            {% for val in headerAttr.Values %}
                                                <option {% if val.ValueId == headerAttr.Values[0].ValueId or val.ValueId == order.Attributes[intId].ValueId -%} selected="selected" {% endif -%} value="{{ val.ValueId }}">{{ val.Value }}</option>
                                            {% endfor -%}
                                        </select>
                                    </span>
                                    <i class="ti-angle-down select-arrow-ui"></i>
                                    {% when 4 -%}
                                        <input type="date" name="attribute" value="{{ order.Attributes[intId].Value | Date:dateFormat }}" {% if headerAttr.Required -%} required {% endif -%} />
                            {% endcase -%}
                            <div class="error-ui validation-info-js validation-required-js hidden-js">
                                {{ translations.FillAttributeValue }}
                            </div>
                        {% else -%}
                            {{ order.Attributes[intId].Value }}
                        {% endif -%}
                    </div>
                </div>
                {% if modulo == 0 or i == ordAttrSize -%}
		    </div>
		{% endif -%}
	    {% endunless -%}
	{% endfor -%}
    </div>
    <div class="mt20-ui small-text-ui"><span class="required-ui">*</span> {{ translations.RequiredFields }}</div>
</div>

 


 

Cancel

Akcja odpowiedzialna za wysłanie żądania o anulowaniu wszystkich zmian.

Parametry:

    • orderId (int, pole obowiązkowe).
    this.cancel = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Cancel',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = false;
                    window.app.setCookie('lastCartId', -1);
                    if($('.escape-editing-lq').length > 0 ){
                        $('.escape-editing-lq').trigger('click');
                    }
                });
            }

 


 

CartCreate

Akcja odpowiedzialna za wysłanie żądania o utworzenie koszyka do edycji zamówienia.

    • orderId (int, pole obowiązkowe).
  this.cartCreate = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/CartCreate',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                    __collection: 'config.DefinedPages.Home.Url|customer-profile.OrderQueryGET'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    // check if cartId avalible, and put in cookies
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    } else {
                        window.app.setCookie('OrderQueryGET', res.collection['customer-profile.OrderQueryGET']);
                        window.app.newUrl(res.collection['config.DefinedPages.Home.Url']);
                    }
                });
            }

 


 

CartMerge

Akcja odpowiedzialna za wysłanie żądania o połączenie koszyka z edytowanym zamówieniem.

Parametry:

    • orderId (int lub null).
    this.cartMerge = function (messagesContainerSelector, aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/CartMerge',
                    __csrf: __CSRF,
                    __collection: 'config.DefinedPages.CustomerProfile.Url'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, null, function (res) {
                    if (res.action.Result) {
                        //temp order url - to change in future (when profile routing will be implemented)
                        var orderQueryGET = window.app.getCookie('OrderQueryGET');
                        window.app.setCookie('OrderQueryGET', '', -1);
                        if(orderQueryGET.indexOf('&tab=order-details') === -1){
                            window.app.newUrl(res.collection + '?' + orderQueryGET + '=' + thisRef.orderId + '&tab=order-details');
                        } else {
                            window.app.newUrl(res.collection + '?' + orderQueryGET + '=' + thisRef.orderId);
                        }
                    } else {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action));
                    }
                });
            }

 


 

Edit

Akcja odpowiedzialna za wysłanie żądania o rozpoczęcie procesu edycji.

    • orderId (int, pole obowiązkowe).
       this.edit = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Edit',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                    __collection: 'customer-profile.Order.RecalculationRequired'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = res.collection;
                });
            }

 


 

PositionAttributesSet

Akcja odpowiedzialna za edycję atrybutów poszczególnych towarów w zamówieniu.

Parametry:

    • orderId (int, pole obowiązkowe),
    • no (int, pole obowiązkowe),
    • attribute (string[]) – może zostać przekazane wielokrotnie w ramach jednej akcji, maksymalna długość to 1000 znaków.
<div class="form-js position-attributes-set-form-js">
    <input type="hidden" name="__action" value="OrderEdit/PositionAttributesSet" />
    <input type="hidden" name="no" value="{{ product.No }}" />
    {% if showInCustomerProfile -%}
	<input type="hidden" name="orderId" value="{{ order.Id }}" />
    {% endif -%}
    {% for positionAttr in attributes -%}
	{% assign intId = positionAttr.Id | ToInt -%}
	{% if nullAttributes != '' -%}
		{% assign isNull = false -%}
		{% for nullAttribute in nullAttributes -%}
			{% if nullAttribute == positionAttr.Id -%}
			        {% assign isNull = true -%}
				{% break -%}
			{% endif -%}
		{% endfor -%}
	{% else -%}
		{% assign isNull = false -%}
	{% endif -%}
	{% if isNull == false -%}
		{% assign mod = i | Modulo:5 -%}
		{% if mod == 0 -%}
			{% assign pageNo = pageNo | Plus:1 -%}
		{% endif -%}
  		<div class="div-table-cell-ui attributes-view-cell-ui {% if order.EditingAllowed -%} order-edit-active-ui {% endif -%} attributes-view-lq hidden-js page{{pageNo}}-lq">
			{% if positionAttr.Editable -%}
				<label class="mobile-ui">{{ positionAttr.Name }} {% if positionAttr.Required -%} <span class="required-ui"> *</span>{% endif -%}</label>
	  			{% case positionAttr.Format -%}
					{% when 1 -%}
		    	  			<input type="text" name="attribute" value="{{ product.Attributes[intId].Value }}" maxlength="50" {% if positionAttr.Required -%} required {% endif -%} />
					{% when 2 -%}
						<input type="number" name="attribute" value="{{ product.Attributes[intId].Value }}" maxlength="50" {% if positionAttr.Required -%} required {% endif -%} />
					{% when 3 -%}
				    		<span class="select-background-ui">
							<select name="attribute">
								{% for val in positionAttr.Values %}
									<option {% if val.ValueId == positionAttr.Values[0].ValueId or val.ValueId == product.Attributes[intId].ValueId -%} selected="selected" {% endif -%} value="{{ val.ValueId }}">{{ val.Value }}</option>
								{% endfor -%}
							</select>
				        	</span>
				        	<i class="ti-angle-down select-arrow-ui"></i>
					{% when 4 -%}
						<input type="date" name="attribute" value="{{ product.Attributes[intId].Value | Date:'yyyy-MM-dd' }}" placeholder="rrrr-mm-dd" {% if positionAttr.Required -%} required {% endif -%} />
				{% endcase -%}
				<div class="error-ui validation-info-js validation-required-js hidden-js">
			    		{{ translations.FillAttributeValue }}
				</div>
			{% else -%}
				{{ product.Attributes[intId].Value }}
			{% endif -%}
    		</div>
    		{% assign i = i | Plus:1 -%}
    	{% endif -%}
    {% endfor -%}
    {% assign mod = i | Modulo:5 -%}
    {% if mod != 0 -%}
    	{% for obj in (mod..4) -%}
		<div class="div-table-cell-ui attributes-view-cell-ui {% if order.EditingAllowed -%} order-edit-active-ui {% endif -%} attributes-view-lq hidden-js page{{pageNo}}-lq"></div>
	{% endfor -%}
    {% endif -%}
</div>

 


 

PositionDelete

Akcja odpowiedzialna za wysłanie żądania o usunięcie pozycji.

Parametry:

    • orderId (int, pole obowiązkowe),
    • no (int, pole obowiązkowe).
  this.positionDelete = function (posNo, aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/PositionDelete',
                    __csrf: __CSRF,
                    no: posNo,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                    __collection: 'customer-profile.Order.RecalculationRequired'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = res.collection;
                });
            }

 


 

PositionQuantityChange

Akcja odpowiedzialna za wysłanie żądania o zmianę ilości danej pozycji.

Parametry:

    • orderId (int, pole obowiązkowe),
    • no (int, pole obowiązkowe),
    • quantity (decimal, pole obowiązkowe) – może przyjąć wartość od 0.01 do 99999.
this.positionQuantityChange = function (posNo, quantity, messagesContainerSelector, aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/PositionQuantityChange',
                    __csrf: __CSRF,
                    no: posNo,
                    orderId: this.orderId,
                    quantity: quantity,
                    __template: this.orderTemplateUrl,
                    __collection: 'customer-profile.Order.RecalculationRequired'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                if(aditionalRequestData.orderDetPageId && thisRef.orderRequestUrl.indexOf('orderDetPageId='+aditionalRequestData.orderDetPageId) === -1){
                    if(thisRef.orderRequestUrl.indexOf('orderDetPageId') !== -1){
                        thisRef.orderRequestUrl = thisRef.orderRequestUrl.substring(0, thisRef.orderRequestUrl.indexOf('&orderDetPageId')) + '&orderDetPageId=' + aditionalRequestData.orderDetPageId;
                    } else {
                        thisRef.orderRequestUrl = thisRef.orderRequestUrl + '&orderDetPageId=' + aditionalRequestData.orderDetPageId;
                    }
                }

                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var container = $(messagesContainerSelector);
                        container.find('.error-msg-lq').remove();
                        var messageContainer = '<div class="quantity-error-ui error-msg-lq">'+res.action.Description+'</div>';
                        container.append(messageContainer);
                        container.find('.error-msg-lq').delay(3000).fadeOut(300, function(){
                            $(this).remove();
                        });
                    }
                    thisRef.recalculationRequired = res.collection;
                });
            }

 


 

PositionUndo

Akcja odpowiedzialna za wysłanie żądania o cofnięcie wszystkich zmian danej pozycji w zamówieniu.

Parametry:

    • orderId (int, pole obowiązkowe),
    • no (int, pole obowiązkowe).
 this.undo = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Undo',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                    __collection: 'customer-profile.Order.RecalculationRequired'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;

                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = res.collection;
                });
            }

 


 

Recalculate

Akcja odpowiedzialna za wysłanie żądania o przeliczenie zamówienia.

Parametry:

  • orderId (int, pole obowiązkowe).
     this.recalculate = function(aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Recalculate',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;
                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = false;
                });
            }

 


 

Undo

Akcja odpowiedzialna za wysłanie żądania o cofnięcie wszystkich zmian w zamówieniu.

Parametry:

    • orderId (int, pole obowiązkowe).
     this.undo = function (aditionalRequestData) {
                var data = {
                    __action: 'OrderEdit/Undo',
                    __csrf: __CSRF,
                    orderId: this.orderId,
                    __template: this.orderTemplateUrl,
                    __collection: 'customer-profile.Order.RecalculationRequired'
                };

                if (aditionalRequestData) {
                    data = $.extend(data, aditionalRequestData);
                }

                var thisRef = this;

                return window.UIFeatures.makePostRequest(data, thisRef.orderRequestUrl, function (res) {
                    window.UIFeatures.pureReplaceTemplate(thisRef.orderTemplateContainer, null, null, res.template, thisRef.orderRequestUrl);
                    if (!res.action.Result) {
                        var messagesContainer = $(messagesContainerSelector);
                        window.app.temporaryMessage(messagesContainer, window.UIFeatures.makeMessageHtml(res.action, 'warning'));
                    }
                    thisRef.recalculationRequired = res.collection;
                });
            }

 


 

FbAccountLink

Akcja odpowiedzialna za połączenie konta w sklepie z kontem na Facebooku.

Parametry:

  • userID (int).
    function connectFb(e) {
    if (fbLoginStatus.status === 'connected') {
        var userIdNum = fbLoginStatus.authResponse.userID;
        var data = {
            __csrf: __CSRF,
            __action: 'External/FbAccountLink',
            userID: userIdNum
        };
        $.post(null, data, function (result) {
            if (result.action.Result) {
                location.reload();
            } else {
                application.createMessage(result.action);
            }
        });
    } else {
        var loginMessage = $(e.currentTarget).data('error-msg');
        application.createMessage(loginMessage);
    }
}

 


 

FbAccountUnlink

Akcja odpowiedzialna za rozłączenie konta w sklepie z kontem na Facebooku.

function disconnectFb() {
    var data = {
        __csrf: __CSRF,
        __action: 'External/FbAccountUnlink'
    };
    $.post(null, data, function (result) {
        if (result.action.Result) {
            location.reload();
        } else {
            application.createMessage(result.action);
        }
    });
}

 


 

FbLogin

Akcja odpowiedzialna za zalogowanie.

Parametry:

    • response (string, pole obowiązkowe).
function connectToFb(response) {
    FB.api('/me', {
        fields: 'email,name'
    }, function (u) {
        response.user = u;
        $.post(null, {
            __csrf: __CSRF,
            __action: 'external/fblogin',
            response: JSON.stringify(response)
        }, function (result) {
            if (result.action.Result) {
                window.location.replace('');
            } else if (result.action.Code != 100) {
                application.createMessage(result.action);
            }
        });
    });
}

 


 

GoogleAccountLink

Akcja odpowiedzialna za połączenie konta w sklepie z kontem Google.

Parametry:

    • userID (int).
  $('#linkGoogleAccount').off().click(function(){
                bodyTag.style.cursor = 'wait';
                au.signIn().then(function(googleUser){
                    return googleUser.getBasicProfile().getId();
                }).then(function (value) {
                    setTimeout(function() {
                        $.post(null,{ __action: 'External/GoogleAccountLink', __csrf: __CSRF, userID: value },function(result){
                            if (result.action.Result) {
                                location.reload();
                            } else {
                                createMessage(result);
                                bodyTag.style.cursor = 'default';
                            }
                        });
                    }, 1000);
                });
            });

 


 

GoogleAccountUnlink

Akcja odpowiedzialna za rozłączenie konta w sklepie z kontem Google.

 $('#unlinkGoogleAccount').off().click(function(){
                $.post(null,{ __action: 'External/GoogleAccountUnlink', __csrf: __CSRF },function(result){
                    if (result.action.Result) {
                        location.reload();
                    } else {
                        createMessage(result);
                        bodyTag.style.cursor = 'default';
                    }
                });
            });

 


 

GoogleLogin

Akcja odpowiedzialna za zalogowanie.

Parametry:

  • id_token (int, pole obowiązkowe).
   $('#google-signin').off().click(function(){
                bodyTag.style.cursor = 'wait';
                au.signIn().then(function(googleUser){
                    return googleUser.getAuthResponse().id_token;
                }).then(function (value) {
                    setTimeout(function() {
                        $.post(null,{ __action: 'External/GoogleLogin', __csrf: __CSRF, id_token: value },function(result){
                            if (result.action.Result) {
                                window.location.replace('');
                            } else if (result.action.Code === 108) {
                                var errMsg = document.querySelector('#google-signin').dataset.errorMsg;
                                application.createMessage(errMsg);
                                bodyTag.style.cursor = 'default';
                            } else {
                                createMessage(result);
                                bodyTag.style.cursor = 'default';
                            }
                        });
                    }, 4000);
                });
            });

 


 

Exec

Akcja odpowiedzialna za pobieranie danych bezpośrednio z ERP.

Parametry:

  • message (string, pole obowiązkowe),
  • worker (string) – maksymalna długość to 32 znaki.
  var data = {
    __action: 'sync/exec',
    __CSRF: __CSRF,
    worker: 'erpData',
    message: JSON.stringify({
        command: 'CDN.eShop_GetOrders',
        parameters: { 
            DateFrom: '2019-01-01', 
            DateTo: '2019-12-31', 
            LanguageId: __lngId, 
            PageNo: '1'
       }
    }) 
};

function getData() {
  $.post(null, data, function (d) {
	 if (!d.action.Result) {  
		console.log(JSON.stringify(d));
		return;
	 } else {
		console.log(JSON.stringify(d));

		var res = d.action.Object[0];
		console.log(JSON.stringify(res));

		var res2 = d.action.Object[1];
		console.log(JSON.stringify(res2));

		var res3 = d.action.Object[2];
		console.log(JSON.stringify(res3));
	 }
  });
}

 


 

Add

Akcja odpowiedzialna za dodawanie zapytań ofertowych.

Parametry:

  • email (string, pole obowiązkowe) – maksymalna długość to 192 znaki,
  • phoneNo (string) – maksymalna długość to 20 znaków,
  • name (string, pole obowiązkowe) – maksymalna długość to 128 znaków,
  • message (string) – maksymalna długość to 2000 znaków,
  • tos (int),
  • channelKey (string).
<input aria-label="action-inquiry-add" type="hidden" name="__action" value="Inquiry/Add" />
{% for tos in config.TOS.Consents.Inquiries -%}
    <div class="tos-container-js {% if tos.Statement -%} statement-ui statement-lq {% endif -%}" >
        {% if tos.Statement -%}
            {{ tos.Text }}
        {% else -%}
            <label class="checkbox-ui tos-js">
                <input aria-label="tos" type="checkbox" name="tos" value="{{ tos.Id }}" {% if tos.Required -%} required {% endif -%} />
                <span class="label-ui">{% if tos.Required -%}<span class="required-ui">*</span> {% endif -%}{{ tos.Text }}</span>
                {% if tos.Required -%}
                    <span class="error-ui validation-info-js validation-required-js hidden-js">{{ translations.RequiredField }}</span>
                {% endif -%}
            </label>
        {% endif -%}
        {% assign channelsSize = tos.Channels | Size -%}
        {% if channelsSize > 0 -%}
            {% assign onlyEmail = false -%}
            {% if channelsSize == 1 and tos.Channels[0].Type == 1 -%}
                {% assign onlyEmail = true -%}
            {% endif -%}
            {% if onlyEmail == false -%}
                <span class="error-ui validation-info-js validation-channel-js hidden-js">{{ translations.ChooseOption }}</span>
            {% endif -%}
        {% endif -%}
        {% for channel in tos.Channels -%}
            <label class="checkbox-ui channel-ui {% if onlyEmail == false -%} channel-js {% endif -%} {% if tos.Statement == false -%} disabled-channel-js {% endif -%}">
                {% if onlyEmail == false -%}
                    <input aria-label="channelKey" type="checkbox" name="channelKey" value="{{ channel.Key }}" {% if tos.Statement == false -%} disabled {% endif -%} />
                {% else -%}
                    <input aria-label="channelKey" type="hidden" name="channelKey" value="{{ channel.Key }}" checked />
                    <input aria-label="channelKey" type="checkbox" checked disabled />
                {% endif -%}
                <span class="label-ui">{{ channel.Name }}</span>
            </label>
        {% endfor -%}
    </div>
{% endfor -%}
<small class="mb10-ui block-ui"><span class="required-ui">*</span> {{ translations.RequiredFields }}</small>
<button aria-label="inquiry-recalculate" class="order-button-ui parent-container-reload-js add-inquiry-js" data-products-quantity="{{order.Products | Size}}" data-date="{{config.Now | Date:dateFormat}}">
    {{translations.AddInquiry}}
</button>

 


 

CartMerge

Akcja odpowiedzialna za dodanie koszyka do zapytania ofertowego.

Parametry:

  • inquiryId (int, pole obowiązkowe).
function produceOffer(e) {
    var id = $(e.currentTarget).data('id');
    var url = $(e.currentTarget).data('redirect-url');
    var data = {
        __action: 'Inquiry/CartMerge',
        __csrf: __CSRF,
        inquiryId: id
    }
    $.post('', data, function(result) {
        if (result.action.Result) {
            app.replace(url);
        }
    });
};

 


 

Set

Akcja odpowiedzialna za ustawienie koszyka jako zapytanie.

Parametry:

  • inquiry (bool),
  • cartId (int lub null).
toggleCartType: async function() {
    const trigger = this;
    if(trigger.classList.contains('change-into-cart-js')){
        var inquiry = false;
        if(document.getElementsByClassName('last-inquiry-js').length > 0){
            window.app.setCookie('lastCartId', window.app.getCookie('activeInquiryId'));
            window.app.setCookie('activeInquiryId', -1);
        }
    } else {
        var inquiry = true;
        if(document.getElementsByClassName('last-cart-js').length > 0){
            window.app.setCookie('activeInquiryId', window.app.getCookie('lastCartId'));
            window.app.setCookie('lastCartId', -1);
        }
    }
    const message = trigger.dataset.message;
    const result = await js.post({__action: 'Inquiry/Set', inquiry: inquiry});
    document.body.innerHTML += '<div class="toggle-cart-type-succeed-js message-popup-background-ui">'+
                                    '<div class="message-popup-ui box-ui">'+
                                        '<div class="box-ui" style="padding: 50px">'+
                                            '<i class="va-mid-ui ti-check" style="margin-right: 10px; font-size: 30px; color: #7fba00"></i>'+
                                            '<span class="va-mid-ui line-height-1-ui" style="font-weight: 500; font-size: 18px">'+message+'</span>'+
                                        '</div>'+
                                    '</div>'+
                                '</div>'
},

 


 

Ping

Akcja odpowiada za podtrzymanie sesji użytkownika korzystającego z e-Sklepu. Domyślnie czas bezczynności sesji użytkownika wynosi 15 minut, po upływie których jest usuwana, zaś w szablonach Comarch sesja ta jest podtrzymywana. Poniżej znajduje się przykładowy skrypt, który należy odpowiednio zaimplementować w swoim szablonie, w jednym z plików js. Przykład implementacji akcji Ping w szablonach Comarch znajduje się w artykule: Podtrzymanie sesji użytkownika.

setInterval(() => fetch(document.baseURI + 'xhr?__action=svc/ping'), 600000);

Czy ten artykuł był pomocny?