{% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
{% block layout_head_inner %}
{% set metaInformation = page.metaInformation %}
{% set basicConfig = config('core.basicInformation') %}
{% set maxLength = config('seo.descriptionMaxLength') %}
{% set metaDescription = metaInformation.metaDescription|striptags|trim|u.truncate(maxLength ?? 255, '…') %}
{% set metaTitle = metaInformation.metaTitle|striptags|trim %}
{% set metaKeywords = metaInformation.metaKeywords|striptags|trim %}
{# Plugin: CampitRobots START #}
{% set campitRobotsConfig = config('CampitRobots.config') %}
{% set enable = campitRobotsConfig.enable %}
{% set metaTag = campitRobotsConfig.metaTag %}
{% if(metaTag !== 'shopware_default') %}
{% set activeRouteStatus = metaTag %}
{% else %}
{% set routeMap = {
'frontend.detail.page': page.product.translated.customFields.campit_robots_meta_tag,
'frontend.navigation.page': page.header.navigation.active.translated.customFields.campit_robots_meta_tag,
} %}
{% set activeRouteStatus = routeMap[activeRoute] ?: 'default' %}
{% endif %}
{% set metaRobotsMap = {
'index_nofollow': 'index, nofollow',
'noindex_follow': 'noindex, follow',
'noindex_nofollow': 'noindex, nofollow',
'shopware_default': page.metaInformation.robots,
'default': page.metaInformation.robots,
} %}
{% set metaRobots = metaRobotsMap[activeRouteStatus] %}
{# Plugin: CampitRobots END #}
<head>
{% block layout_head_meta_tags %}
{% block layout_head_meta_tags_charset %}
<meta charset="utf-8">
{% endblock %}
{% block layout_head_title %}
<title itemprop="name">{% apply spaceless %}
{% block layout_head_title_inner %}
{{ metaTitle }}
{% endblock %}
{% endapply %}</title>
{% endblock %}
{% block layout_head_meta_tags_general %}
<meta name="description"
content="{% block layout_head_meta_tags_description %}{{ metaDescription }}{% endblock %}"/>
{# <meta name="author" #}
{# content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/> #}
{# <meta name="robots" #}
{# content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/> #}
{# <meta name="revisit-after" #}
{# content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/> #}
{% if metaKeywords %}
<meta name="keywords"
content="{% block layout_head_meta_tags_keywords %}{{ metaKeywords }}{% endblock %}"/>
{% endif %}
{% endblock %}
{% block layout_head_meta_tags_opengraph %}
<meta property="og:url"
content="{% block layout_head_meta_tags_url_og %}{{ (page.metaInformation.canonical is defined) ? page.metaInformation.canonical : app.request.uri }}{% endblock %}"/>
<meta property="og:title"
content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
<meta property="og:description"
content="{% block layout_head_meta_tags_description_og %}{{ metaDescription }}{% endblock %}"/>
<meta property="og:image"
content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
<meta property="og:type"
content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
<meta property="og:site_name"
content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
<meta name="twitter:site"
content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
<meta name="twitter:card"
content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
<meta name="twitter:title"
content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
<meta name="twitter:description"
content="{% block layout_head_meta_tags_description_twitter %}{{ metaDescription }}{% endblock %}"/>
<meta name="twitter:image"
content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
{% endblock %}
{# Product meta is missing #}
{# <meta property="product:product_link" content="https://mueldorf.i0378.danubius.de/Premium-Spezial-Daunen-Kopfkissen/PSKK5080"> #}
{# <meta property="product:price:amount" content="179"> #}
{# <meta property="product:price:currency" content="EUR"> #}
{% block layout_head_meta_tags_schema_webpage %}
<meta itemprop="isFamilyFriendly"
content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
<meta itemprop="image"
content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
{# <meta itemprop="copyrightHolder" #}
{# content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/> #}
{# <meta itemprop="copyrightYear" #}
{# content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/> #}
{# <meta name="robots" content="noindex, nofollow"> #}
{% endblock %}
{% block layout_head_meta_tags_viewport %}
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% endblock %}
{% if page.product.customFields.dan_product_settings_noindex_nofollow or activeRoute == "frontend.search.page" or app.request.requestUri == "/search" %}
<meta name="robots" content="nofollow, noindex" />
{% else %}
<meta name="robots" content="{% block layout_head_meta_tags_robots %}nofollow, noindex{% endblock %}"/>
{# <meta name="robots" content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/>#}
{# <meta name="robots" content="{% block layout_head_meta_tags_robots %}{{ metaRobots }}{% endblock %}"/> #}{# Plugin: CampitRobots #}
{% endif %}
{# {% block layout_head_canonical %} #}
{# {% if page.metaInformation.canonical %} #}
{# <link rel="canonical" href="{{ page.metaInformation.canonical }}" /> #}
{# {% endif %} #}
{# {% endblock %} #}
{# {% block layout_head_meta_tags_hreflangs %} #}
{# {% for link in hrefLang %} #}
{# <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" /> #}
{# {% endfor %} #}
{# {% endblock %} #}
{% block layout_head_meta_tags_hreflangs %}
{# {% for link in hrefLang %} #}
{# {% set isoCode = link.locale|lower|split('-') %} #}
{# #}{# @deprecated tag:v6.5.0 - Remove else cases, to maintain correct split of isoCode #}
{# {% set flagLanguage = feature('v6.5.0.0') ? isoCode[0] : isoCode[1] %} #}
{# {% set flagCountry = feature('v6.5.0.0') ? isoCode[1] : isoCode[0] %} #}
{# {% set domain = app.request.get('sw-sales-channel-absolute-base-url') %} #}
{# {% set lang_url = link.url|replace({(domain): ''}) %} #}
{# {% if lang_url starts with "/de" %} #}
{# {% set lang_url = lang_url[3:] %} #}
{# {% if lang_url is empty %} #}
{# {% set lang_url = "/" %} #}
{# {% endif %} #}
{# {% endif %} #}
{# <link rel="alternate" hreflang="{{ flagLanguage }}" href="{{ lang_url }}"/> #}
{# {% endfor %} #}
{% for dan_language in page.header.extensions.dan_languages.getVars() %}
{% if dan_language.language_id is same as(page.header.activeLanguage.id) %}
<link rel="canonical" href="{{ dan_language.url }}"/>
{% endif %}
{% endfor %}
{% for dan_language in page.header.extensions.dan_languages.getVars() %}
{% set isoCode = dan_language.language_code|lower|split('-') %}
{# @deprecated tag:v6.5.0 - Remove else cases, to maintain correct split of isoCode #}
{% set flagLanguage = feature('v6.5.0.0') ? isoCode[0] : isoCode[1] %}
{% set flagCountry = feature('v6.5.0.0') ? isoCode[1] : isoCode[0] %}
<link rel="alternate" hreflang="{{ flagCountry }}" href="{{ dan_language.url }}"/>
{% endfor %}
{% endblock %}
{% endblock %}
{% block layout_head_android %}
{# @deprecated tag:v6.5.0 - Use the block above, "layout_head_apple", instead #}
{% endblock %}
{# <link rel="preload" as="style" href="/theme/95435b5a8e98befe2c222480c1de3fee/css/all.css?1728371804445627"> #}
<link href="/bundles/emzplatformrubytheme/font/Inter-Regular.woff2" rel="preload" as="font" type="font/woff">
<link href="/bundles/emzplatformrubytheme/font/Inter-SemiBold.woff2" rel="preload" as="font" type="font/woff2">
<link href="/bundles/emzplatformrubytheme/font/Inter-Bold.woff2" rel="preload" as="font" type="font/woff">
{% block layout_head_stylesheet %}
{% if isHMRMode %}
{# CSS will be loaded from the JS automatically #}
{% else %}
{% set assets = theme_config('assets.css') %}
{% for file in assets %}
<link rel="preload" as="style" href="{{ asset(file, 'theme') }}">
<link rel="stylesheet" href="{{ asset(file, 'theme') }}">
{% endfor %}
{% endif %}
{% endblock %}
{% block layout_head_apple %}
{# {% if theme_config('sw-logo-share') %} #}
{# <link rel="apple-touch-icon" #}
{# sizes="180x180" #}
{# href="{{ theme_config('sw-logo-share') }}"> #}
{# {% endif %} #}
{% endblock %}
{# {% block layout_head_favicon %} #}
{# <link rel="shortcut icon" #}
{# href="{{ theme_config('sw-logo-favicon') }}"> #}
{# {% endblock %} #}
{% block layout_head_favicon %}
{# <link rel="icon" href="{{ theme_config('sw-logo-favicon') }}"> #}
<link rel="icon" sizes="16x16" href="/favicon-16x16.png" type="image/png">
<link rel="icon" sizes="32x32" href="/favicon.ico" type="image/x-icon">
<link rel="icon" sizes="32x32" href="/favicon-32x32.png" type="image/png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" type="image/png">
<link rel="apple-touch-icon" sizes="152x152" href="/ipad-152x152.png" type="image/png">
<link rel="apple-touch-icon" sizes="167x167" href="/ipad-retina-167x167.png" type="image/png">
<link rel="apple-touch-icon" sizes="180x180" href="/iphone-retina-180x180.png" type="image/png">
<link rel="icon" sizes="192x192" href="/favicon-192x192.png" type="image/png">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
{% endblock %}
{% block layout_head_javascript_feature %}
{% sw_include "@Storefront/storefront/component/feature.html.twig" %}
{% endblock %}
{# Block for tracking scripts which are required to include in the `head` section of the document #}
{% block layout_head_javascript_tracking %}
{% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
{% block campit_matomo_layout_head_javascript_tracking %}
{# {% sw_include '@Storefront/storefront/component/campit-matomo-data.html.twig' %}#}
{% endblock %}
{% endblock %}
{% block layout_head_javascript_recaptcha %}
{% sw_include "@Storefront/storefront/component/recaptcha.html.twig" %}
{% endblock %}
{% block layout_head_javascript_token %}
{% endblock %}
{% if config('core.basicInformation.useDefaultCookieConsent') %}
{% block layout_head_javascript_cookie_state %}
<script>
window.useDefaultCookieConsent = true;
</script>
{% endblock %}
{% endif %}
{% if feature('FEATURE_NEXT_15917') %}
{% block layout_head_javascript_router %}
{# Register all routes that will be needed in JavaScript to the window.router object #}
<script>
window.activeNavigationId = '{{ page.header.navigation.active.id }}';
window.router = {
'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
'frontend.cms.page': '{{ path('frontend.cms.page') }}',
'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
{# @deprecated tag:v6.5.0 - Route frontend.csrf.generateToken will be removed. #}
'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
};
{# @deprecated tag:v6.5.0 - storeApiProxyToken will be removed. #}
window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
</script>
{% endblock %}
{% block layout_head_javascript_breakpoints %}
{# Register the available viewport breakpoints the window.breakpoints object #}
<script>
{% set breakpoint = {
'xs': theme_config('breakpoint.xs'),
'sm': theme_config('breakpoint.sm'),
'md': theme_config('breakpoint.md'),
'lg': theme_config('breakpoint.lg'),
'xl': theme_config('breakpoint.xl')
} %}
window.breakpoints = {{ breakpoint|json_encode()|raw }};
</script>
{% endblock %}
{# @deprecated tag:v6.5.0 - Block layout_head_javascript_csrf will be removed. #}
{% block layout_head_javascript_csrf %}
<script>
window.csrf = {
'enabled': '{{ shopware.csrfEnabled }}',
'mode': '{{ shopware.csrfMode }}'
}
</script>
{% endblock %}
{% if config('core.cart.wishlistEnabled') %}
{% block layout_head_javascript_wishlist_state %}
<script>
window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
</script>
{% endblock %}
{% endif %}
{# @internal tag:v6.5.0 - jQuery will be removed from the core. This block can be used to add jQuery as a `<script>`. #}
{% block layout_head_javascript_jquery %}
{% endblock %}
{% block layout_head_javascript_hmr_mode %}
{% if isHMRMode %}
<script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
<script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
<script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
<script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
{# The storefront entry is a combined entry point which contains all plugins & themes #}
<script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
{% else %}
{% for file in theme_config('assets.js') %}
<link rel="preload" href="{{ asset(file, 'theme') }}" as="script">
<script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
{% endfor %}
{% endif %}
{% endblock %}
{% endif %}
<link rel="preload" href="{{ asset("/js/all.js", 'theme') }}" as="script" >
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
console.log("DanMuehldorferPlugin loaded")
const customUserGroup = document.querySelector('select[name="CustomUserGroup"]');
const billingAddress = document.querySelector('select[name="billingAddress[countryId]"]');
const shippingAddress = document.querySelector('select[name="shippingAddress[countryId]"]');
const webseiteLabel = document.querySelector('label[for="Webseite_0e809d5f2c5c49e9a1431a97dfc04749"]');
const webseiteInput = document.getElementById('Webseite_0e809d5f2c5c49e9a1431a97dfc04749');
const vatLabel = document.querySelector('label[for="Umsatzsteuer-ID_4d44617639334e46b943e3424ce9a1d1"]');
const vatInput = document.getElementById('Umsatzsteuer-ID_4d44617639334e46b943e3424ce9a1d1');
const allowedValues = ["69ba8ffad7094019a360d5e90f7705fe", "5d1a4b2db37e483fb6180b0fc44b8dcb"];
function updateFields() {
const selectedOption = customUserGroup.value;
const containsHotel = selectedOption.includes("Hotel");
if (containsHotel) {
// Disable/hide options except allowedValues
[billingAddress, shippingAddress].forEach(select => {
Array.from(select.options).forEach(option => {
if (!allowedValues.includes(option.value)) {
option.disabled = true;
option.style.display = 'none';
} else {
option.disabled = false;
option.style.display = '';
}
});
// Select the first enabled option
select.value = Array.from(select.options).find(option => !option.disabled)?.value || '';
});
// Show the label and input for Webseite
if (webseiteLabel) webseiteLabel.style.display = '';
if (webseiteInput) webseiteInput.style.display = '';
if (vatLabel) vatLabel.style.display = '';
if (vatInput) vatInput.style.display = '';
} else {
// Enable/show all options
[billingAddress, shippingAddress].forEach(select => {
Array.from(select.options).forEach(option => {
option.disabled = false;
option.style.display = '';
});
// Select the first enabled option
select.value = Array.from(select.options).find(option => !option.disabled)?.value || '';
});
// Hide the label and input for Webseite and set input value to "n.a."
if (webseiteLabel) webseiteLabel.style.display = 'none';
if (webseiteInput) {
webseiteInput.style.display = 'none';
webseiteInput.value = 'n.a.';
}
// Hide the label and input for Webseite and set input value to "n.a."
if (vatLabel) vatLabel.style.display = 'none';
if (vatInput) {
vatInput.style.display = 'none';
vatInput.value = 'n.a.';
}
}
}
// Attach change event to CustomUserGroup
if (customUserGroup) {
customUserGroup.addEventListener('change', updateFields);
}
});
</script>
</head>
{% endblock %}