{% extends "_market/_layouts/main" %} {% set title = 'Holiday Mode'|t('market') %} {% set breadcrumbs = [ { url: url('market/settings'), label: 'Settings'|t('market') }, { url: url('market/settings/holiday'), label: title } ] %} {% block main %}
{% include '_market/settings/_nav.html' %} {# Activate / deactivate alert panel #}

Going on holiday?

Put your shop into holiday mode - this will deactivate purchasing on all your products, but leave them visible and active on the site.

{{ csrfInput() }} {{ actionInput('market/vendors/save-vendor') }} {% if craft.app.getIsMultiSite() %}{{ hiddenInput('siteId', currentVendor.siteId) }}{% endif %} {{ hiddenInput('vendorId', currentVendor.id) }} {{ hiddenInput('code', currentVendor.code) }} {{ hiddenInput('userId', currentVendor.userId) }} {{ hiddenInput('profilePictureId', currentVendor.profilePictureId) }} {% if currentVendor.holidayMode %} {{ hiddenInput('successMessage', 'Holiday mode deactivated.'|hash) }} {{ hiddenInput('failMessage', 'Couldn’t deactivate holiday mode.'|hash) }} {{ hiddenInput('fields[holidayMode]', '0') }}
{# Heroicon name: solid/sun #}

Holiday mode is active

Customers cannot currently purchase any of your products, use the button below to reactivate all purchasing on your shop.

{% else %} {{ hiddenInput('successMessage', 'Holiday mode activated.'|hash) }} {{ hiddenInput('failMessage', 'Couldn’t activate holiday mode.'|hash) }} {{ hiddenInput('fields[holidayMode]', '1') }}
{# Heroicon name: solid/moon #}

Holiday mode is inactive

Customers can currently purchase your products, use the button below to stop all purchasing on your shop.

{% endif %}
{# Message form #}
{{ csrfInput() }} {{ actionInput('market/vendors/save-vendor') }} {% if craft.app.getIsMultiSite() %}{{ hiddenInput('siteId', currentVendor.siteId) }}{% endif %} {{ hiddenInput('vendorId', currentVendor.id) }} {{ hiddenInput('code', currentVendor.code) }} {{ hiddenInput('userId', currentVendor.userId) }} {{ hiddenInput('profilePictureId', currentVendor.profilePictureId) }} {{ hiddenInput('successMessage', 'Holiday message updated.'|hash) }} {{ hiddenInput('failMessage', 'Couldn’t update holiday message.'|hash) }}

Holiday message

You can also add an optional message that will be output on the product detail pages in place of the add to cart button.

{% set field = craft.app.fields.getFieldByHandle('holidayModeMessage') %} {% include '_market/_includes/fields/richtext.html' with { element: currentVendor, field: field, heightClass: 'h-56', showLabel: false } only %}
{% endblock %}