Reusable text snippets for product descriptions in Shopware 6.6 - 6.7 with automatic placeholder replacement, multi-language support, and caching.
Problem: You have standard text blocks (warranty info, shipping notices, format disclaimers) that appear in many product descriptions. When you need to update this text, you have to edit every product manually.
Solution: Create a snippet once, use it everywhere with a simple placeholder. Update the snippet, and all products are automatically updated.
| Feature | Description |
|---|---|
| Admin UI | Manage snippets directly in Shopware Admin |
| Multi-Language | Full translation support |
| Placeholder Syntax | Simple {{snippet:identifier}} syntax |
| Automatic Replacement | Plugin templates handle replacement |
| Caching | Optimized performance |
| Twig Integration | Filter and function for custom templates |
Installation via the Shopware Store is recommended. After purchase, you can install the plugin directly from the backend.
composer require mmd/product-snippets
bin/console plugin:install --activate MmdProductSnippets
bin/console cache:clear
Navigate to Content > Product Snippets in the Shopware Admin.
warranty-info)
Use the language switcher in the Admin to add translations:
The correct language version is automatically used based on the storefront language.
Add the placeholder to any product description:
{{snippet:warranty-info}}
Or use the German alias:
{{textbaustein:warranty-info}}
| Syntax | Description |
|---|---|
{{snippet:identifier}} |
Standard syntax |
{{textbaustein:identifier}} |
German alternative |
{{ snippet:identifier }} |
Whitespace allowed |
The plugin automatically replaces placeholders in:
No manual template changes required.
warranty-info<div class="warranty-notice">
<strong>2-Year Warranty</strong>
<p>This product includes a 2-year manufacturer warranty covering defects in materials and workmanship.</p>
</div>
Input:
<h2>Premium Widget</h2>
<p>High-quality widget for professional use.</p>
{{snippet:warranty-info}}
{{snippet:shipping-notice}}
Rendered Output:
<h2>Premium Widget</h2>
<p>High-quality widget for professional use.</p>
<div class="warranty-notice">
<strong>2-Year Warranty</strong>
<p>This product includes a 2-year manufacturer warranty...</p>
</div>
<p>Ships within 1-2 business days.</p>
For custom template needs, use the Twig filter or function.
|mmd_snippetsReplaces all placeholders in a string:
{{ myContent|mmd_snippets|raw }}
mmd_snippet('identifier')Returns a single snippet's content:
{{ mmd_snippet('warranty-info') }}
Note: The function only works in Twig templates, not in database content (product descriptions). For product descriptions, use the placeholder syntax.
If you need to apply snippets to other content areas:
{% sw_extends '@Storefront/storefront/component/product/description.html.twig' %}
{% block component_product_description_content_text %}
<div class="product-detail-description-text" itemprop="description">
{{ product.translated.description|mmd_snippets|raw }}
</div>
{% endblock %}
{{snippet:format-disclaimer}}
{{snippet:download-info}}
{{snippet:license-terms}}
{{snippet:shipping-info}}
{{snippet:return-policy}}
{{snippet:warranty-info}}
{{snippet:holiday-shipping}}
{{snippet:sale-notice}}
bin/console cache:clearbin/console cache:clearbin/build-administration.shThe plugin uses Shopware's caching system:
MIT License - Free for personal and commercial use.
For questions and support:
Markus Michalski
Email: support@markus-michalski.net