Umieszczenie przycisków iLeasing oraz iRaty na szczegółach towaru
W tym artykule dowiesz się, jak w łatwy sposób dodać przyciski iLeasing oraz iRaty na szczegółach towaru w e-Sklepie. W pliku product/product-presentation-data.html wyszukaj frazę {% if canBuy -%}, gdzie znajduje się przycisk dodawania do koszyka. Bezpośrednio pod tą linijką wklej kod: W pliku partials/product/product-popup.html wyszukaj frazę Pro_addToCart. To etykieta przycisku dodawania do koszyka w szablonie Agat. Linijkę niżej znajduje się domknięcie przycisku czyli (/span). Wklej pod tym zamknięciem fragment kodu z przyciskami (pierwszy przycisk to iRaty, drugi to iLeasing): Sklep w wersji Light lub Standard: Sklep w wersji Enterprise lub B2B: W pliku productdetails.html wyszukaj frazę Com_AskForPrice. To etykieta przycisku zapytania o cenę. Linijkę niżej znajduje się domknięcie przycisku: (/div). Wklej pod tym zamknięciem fragment kodu z przyciskami (pierwszy przycisk to iRaty, drugi to iLeasing): Sklep w wersji Light lub Standard: Sklep w wersji Enterprise lub B2B: W pliku elements/product/product-details-1.html wyszukaj frazę {% include 'partials/common/after-adding-to-cart-popup.html’ %}. Bezpośrednio nad nią wklej fragment kodu z przyciskami (pierwszy przycisk to iRaty, drugi to iLeasing): W pliku elements/product/product-details-2.html wyszukaj frazę {% include 'partials/common/after-adding-to-cart-popup.html’ %}. Bezpośrednio nad nią wklej fragment kodu z przyciskami (pierwszy przycisk to iRaty, drugi to iLeasing):
1. Szafir
{% if customer.Authenticated and customer.Company -%}
{% assign tempVat = 100 | Plus: product.VAT | DividedBy: 100 -%}
{% assign totalPrice = product.Price | Times: tempVat -%}
{% assign subtotalPrice = product.Price -%}
{% else -%}
{% assign totalPrice = product.Price -%}
{% assign tempVat = 100 | Plus: product.VAT | DividedBy: 100 -%}
{% assign subtotalPrice = product.Price | DividedBy: tempVat -%}
{% endif -%}2. Agat
{% if customer.Authenticated and customer.Company -%}
{% assign tempVat = 100 | Plus: product.VAT | DividedBy: 100 -%}
{% assign totalPrice = product.Price | Times: tempVat -%}
{% assign subtotalPrice = product.Price -%}
{% else -%}
{% assign totalPrice = product.Price -%}
{% assign tempVat = 100 | Plus: product.VAT | DividedBy: 100 -%}
{% assign subtotalPrice = product.Price | DividedBy: tempVat -%}
{% endif -%}
3. Bursztyn lub Opal
{% if customer.Authenticated and customer.Company -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign totalPrice = _pd.Price | Times: tempVat -%}
{% assign subtotalPrice = _pd.Price -%}
{% else -%}
{% assign totalPrice = _pd.Price -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign subtotalPrice = _pd.Price | DividedBy: tempVat -%}
{% endif -%}
4. Topaz
Wersja product-details-1
{% if customer.Authenticated and customer.Company -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign totalPrice = _pd.Price | Times: tempVat -%}
{% assign subtotalPrice = _pd.Price -%}
{% else -%}
{% assign totalPrice = _pd.Price -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign subtotalPrice = _pd.Price | DividedBy: tempVat -%}
{% endif -%}
Wersja product-details-2
{% if customer.Authenticated and customer.Company -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign totalPrice = _pd.Price | Times: tempVat -%}
{% assign subtotalPrice = _pd.Price -%}
{% else -%}
{% assign totalPrice = _pd.Price -%}
{% assign tempVat = 100 | Plus: _pd.VAT | DividedBy: 100 -%}
{% assign subtotalPrice = _pd.Price | DividedBy: tempVat -%}
{% endif -%}