sschreier / sschreierhtmlcssjstwigcodeelementforshoppingexperiences
html and twig code element for the shopping experiences
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Twig
Type:shopware-platform-plugin
Requires
- shopware/core: ~6.6.0
- shopware/storefront: ~6.6.0
This package is auto-updated.
Last update: 2025-04-13 07:16:05 UTC
README
The extension provides a cms block and a cms element for html, css, js and twig code under the block category HTML within a layout.
If required, the cms element can be used at any cms block as usual using the corresponding icon.
After enabling the twig compilation, you can also use twig variables and snippets in the fields.
This makes it possible to personalize content in the shopping experiences or to display customer, category or product data.
Display of the greeting from the sidebar of the customer account in a shopping experience
- Place the cms block in the layout
- Activate the switch enable twig compiling for all fields
- Insert the following content into the field html code:
{% if context.customer %}
<p class="welcome">
{{ 'account.greetings'|trans|sw_sanitize }}
{% if context.customer.salutation and context.customer.salutation.salutationKey != 'not_specified' %}
{{ context.customer.salutation.translated.displayName }}
{% endif %}
{% if context.customer.title %}
{{ context.customer.title }}
{% endif %}
{{ context.customer.firstName }} {{ context.customer.lastName }}
</p>
{% endif %}
How to install the extension
via zip and console (recommended)
- Download the latest SschreierHtmlCssJsTwigCodeElementForShoppingExperiences-master.zip.
- Unzip the zip file and rename the folder to SschreierHtmlCssJsTwigCodeElementForShoppingExperiences.
- Move the folder to the project folder custom/plugins/ .
- Connect to the console via ssh:
bin/console plugin:refresh
bin/console plugin:install --activate SschreierHtmlCssJsTwigCodeElementForShoppingExperiences
via composer
- Add the repository URL to the composer.json of the project
"repositories": [
...,
{
"type": "vcs",
"url": "https://github.com/sschreier/SschreierHtmlCssJsTwigCodeElementForShoppingExperiences"
}
],
- Connect to the console via ssh and install the plugin via the command
composer require sschreier/sschreierhtmlcssjstwigcodeelementforshoppingexperiences
bin/console plugin:refresh
bin/console plugin:install --activate SschreierHtmlCssJsTwigCodeElementForShoppingExperiences
via https://packagist.org
- Connect to the console via ssh and install the plugin via the command
composer require sschreier/sschreierhtmlcssjstwigcodeelementforshoppingexperiences
bin/console plugin:refresh
bin/console plugin:install --activate SschreierHtmlCssJsTwigCodeElementForShoppingExperiences
via zip upload
- Download the latest SschreierHtmlCssJsTwigCodeElementForShoppingExperiences-master.zip.
- Unzip the zip file and rename the folder to SschreierHtmlCssJsTwigCodeElementForShoppingExperiences.
- Zip the folder to SschreierHtmlCssJsTwigCodeElementForShoppingExperiences.zip.
- Upload the zip in the Shopware Administration.
- Install & Activate the extension.
extension update (zip)
- Download the latest SschreierHtmlCssJsTwigCodeElementForShoppingExperiences-master.zip.
- Unzip the zip file and rename the folder to SschreierHtmlCssJsTwigCodeElementForShoppingExperiences.
- Zip the folder to SschreierHtmlCssJsTwigCodeElementForShoppingExperiences.zip.
- Upload the zip in the Shopware Administration.
- Update the extension.