{# FreeTheme 'Product specifications' on product pages Create container and add product specifications type: buy-box @Storefront/storefront/theme/product-detail/ft-product-specifications.html.twig #} {# @TODO: Add some blocks... #} {# ---------------- START: SET TEMPLATE VARS ---------------- #} {# FreeTheme: Set theme variables #} {% set ftProductSpecifications = theme_config('ft-product-specifications') %} {% if 'availablestock' in ftProductSpecifications %} {% set ftProductDetailAvailablestockShow = true %} {% endif %} {% if 'deliverytime' in ftProductSpecifications %} {% set ftProductDetailDeliverytimeShow = true %} {% endif %} {% if 'ean' in ftProductSpecifications %} {% set ftProductDetailEanShow = true %} {% endif %} {% if 'height' in ftProductSpecifications %} {% set ftProductDetailHeightShow = true %} {% endif %} {% if 'length' in ftProductSpecifications %} {% set ftProductDetailLengthShow = true %} {% endif %} {% if 'manufacturernumber' in ftProductSpecifications %} {% set ftProductDetailManufacturernumberShow = true %} {% endif %} {% if 'maxpurchase' in ftProductSpecifications %} {% set ftProductDetailMaxpurchaseShow = true %} {% endif %} {% if 'minpurchase' in ftProductSpecifications %} {% set ftProductDetailMinpurchaseShow = true %} {% endif %} {% if 'manufacturer' in ftProductSpecifications %} {% set ftProductDetailManufacturerShow = true %} {% endif %} {% if 'stock' in ftProductSpecifications %} {% set ftProductDetailStockShow = true %} {% endif %} {% if 'weight' in ftProductSpecifications %} {% set ftProductDetailWeightShow = true %} {% endif %} {% if 'width' in ftProductSpecifications %} {% set ftProductDetailWidthShow = true %} {% endif %} {# ---------------- END: SET TEMPLATE VARS ---------------- #} {# ---------------- START: SET VARS ---------------- #} {# Get ISO code for the number format #} {% set isoCode = context.saleschannel.languages.first.translationCode.code|split('-') %} {% set language = isoCode[0] %} {% set country = isoCode[1] %} {# Countries that (according to Wikipedia) use a comma (,) as a decimal separator (Komma-Länder) #} {% set decimalComma = ['AL', 'AD', 'AM', 'AO', 'AR', 'AT', 'AZ', 'BA', 'BE', 'BG', 'BO', 'BR', 'BY', 'CL', 'CM', 'CO', 'CR', 'CU', 'CY', 'CZ', 'DE', 'DK', 'DZ', 'EC', 'EE', 'ES', 'FI', 'FO', 'FR', 'GE', 'GL', 'GR', 'HR', 'HT', 'HU', 'ID', 'IS', 'IT', 'KZ', 'LT', 'LU', 'LV', 'MA', 'MD', 'MK', 'MN', 'NA', 'NI', 'NL', 'NO', 'PE', 'PL', 'PT', 'PY', 'RO', 'RS', 'RU', 'SE', 'SI', 'SK', 'SM,TR', 'UA', 'UY', 'VE', 'VN', 'XK', 'ZA', 'ZW'] %} {# ---------------- END: SET VARS ---------------- #} {# FreeTheme: Product specifications in buy-box #} {% block ft_product_specifications %} {# FreeTheme: Product specifications => "General information" / "Allgemeine Informationen" ---------------------- #} {# Check if specifications should be shown #} {% if page.product.manufacturer and ftProductDetailManufacturerShow == true %} {% set showManufacturer = true %} {% endif %} {# Check if section is empty #} {% set generalIsEmpty = true %} {% if showManufacturer %} {% set generalIsEmpty = false %} {% endif %} {# Product number @SW #}