This changelog references changes done in Shopware 5.6 patch versions.
View all changes from v5.6.9...v5.6.10
View all changes from v5.6.8...v5.6.9
- Changed bot detection to not recognize Huawei devices as bot
View all changes from v5.6.7...v5.6.8
- Added new method
\Shopware\Models\Customer\Customer::setLanguageId - Added new option
disableScrollBarUpdatetoswMenuScroller
- Changed
\Shopware\Components\CacheManagerto ensure cache clearing happens correctly - Changed cookies
lastCheckSubscriptionDateandSHOPWAREBACKENDto be secure, when requested with https - Changed composer.json to be compatible with Composer 2
- Changed
\Shopware\Components\Theme\LessCompiler\Oyejorgeto set custom less functions after reset - Changed csrf protection javascript plugin to work with punnycode on Internet Explorer 11
- Changed
\Shopware\Bundle\ContentTypeBundle\Services\DatabaseContentTypeSynchronizerto consider also user created content types - Changed Symfony version to 3.4.43
View all changes from v5.6.6...v5.6.7
- Added "albumId" to the Article API resource. This way you can determine in which album a product image is saved when creating or updating a product via REST API
- Added
Shopware_CronJob_ErrorandShopware_CronJob_Finishedevents to support all crojobs- Example:
public static function getSubscribedEvents() { return [ 'Shopware_CronJob_Error' => 'onCronJobError', 'Shopware_CronJob_Finished' => 'onCronJobFinal' ]; } public function onCronJobError(\Enlight_Event_EventArgs $args) { /** @var \Shopware_Components_Cron_CronJob $job */ $job = $args->get('job'); $action = $job->getAction(); // Your code here } public function onCronJobFinal(\Enlight_Event_EventArgs $args) { /** @var \Shopware_Components_Cron_CronJob $job */ $job = $args->get('job'); $action = $job->getAction(); // Your code here }
- Example:
- Changed Symfony library to version 3.4.39
- Changed jQuery library to version 3.5.1
- Changed
\Shopware_Controllers_Backend_AttributeDatato support translating attribute store values- Example:
$crudService->update( 's_articles_attributes', 'my_column', 'combobox', [ 'displayInBackend' => true, 'arrayStore' => [ ['key' => 1, 'value' => 'Value 1'], ], ] );
- Translation
[en_GB] s_articles_attributes_my_column_options_store_1 = "Item 1 EN" [de_DE] s_articles_attributes_my_column_options_store_1 = "Item 1 DE"
- Example:
- Changed cookie consent manager to work correctly when accepting all cookies
- Renamed duplicated smarty block
frontend_listing_box_article_badgesin the filesfrontend/listing/product-box/box-basic.tplandfrontend/listing/product-box/box-emotion.tpl - Changed tinymce to fix issues with
readOnlyis not resetting - Changed sExport to set correct customer group in the shop context
View all changes from v5.6.5...v5.6.6
- Changed
\Shopware\Components\DependencyInjection\Compiler\PluginResourceCompilerPassto work correctly with multiple plugins
View all changes from v5.6.4...v5.6.5
- Added PHP 7.4 support
- Added new option
metaOptionsto S3 Adapter to set S3 options - Added a filter event 'Shopware_Modules_Basket_AddVoucher_FilterSqlParams' to
sBasket::sAddVoucherto modify sql params - Added a notify event 'Shopware_Modules_Basket_AddVoucher_Inserted' to
sBasket::sAddVoucherto execute code after a voucher was inserted - Added new product fields to product exports:
metaTitle,pseudosales,notification,available_from,available_to,pricegroupActive,pricegroupID - Added
intlextension to required php extensions - Added unique index to
s_attribute_configurationwith columnstable_nameandcolumn_name - Added new Argon2 password encoder
- Added attributes to the following API resources
CustomerGroupMediaCountry
- Added new config option to also show technical urls in hreflang
- Added new less function
swhashto get file hash for cache busting - Added new event
Shopware_Modules_Admin_SaveRegister_BeforeRegisterto cancel customer registration - Added new property to plugin base class
$autoloadViewswhich allows pre registration of template folder- Its still required on backend extensions to call
extendsTemplate
- Its still required on backend extensions to call
- The
\Shopware\Components\StateTranslatorServiceworks case insensitive now - Changed
Shopware.apps.Emotion.view.components.Baseto properly handle a checkbox default value - Changed
\Shopware_Controllers_Backend_Base::getPaymentsActionto optionally list all payment methods - Changed
\Shopware\Components\Cart\CartPersistServiceto also persist cart item attributes - Changed blog statistics to work also with active http cache
- Changed
\Shopware\Components\Routing\Router::assembleand\Shopware\Components\Routing\Router::matchdefault implementation handling arrays and encoded stringsShopware\Components\Routing\Generators\DefaultGenerator::generatewill encode arrays as strings withhttp_build_query; objects result in an user error in 5.6 and Exception in 5.7Shopware\Components\Routing\Matchers\DefaultMatcher::matchwill try to convert encoded string values back to array representation
- Changed
Shopware.form.field.SingleSelectionto forwardenableanddisablecalls - Changed the following templates to include the
custom_captcha.tpltemplate, if any other captcha method than "legacy" is active:themes/Frontend/Bare/frontend/forms/form-elements.tpl
- Removed usage of column
basepriceinengine/Shopware/Bundle/SearchBundleDBAL/ListingPriceHelper.php
- Deprecated following methods of class
\Shopware\Components\CacheManagergetCoreCachegetDirectoryInfoencodeSize
View all changes from v5.6.3...v5.6.4
- Changed status of SLT-cookie from 'Comfort' feature to 'Technically required' when feature is active
View all changes from v5.6.2...v5.6.3
- Added customer attribute risk rules to risk management
- Added interface
ArrayAccesstoShopware\Bundle\StoreFrontBundle\Struct\Attribute - Added
attributeto struct data after being converted by theShopware\Components\Compatibility\LegacyStructConverter - Added method
clearBodytoEnlight_Components_Mailto clear the plain and html body - Added interfaces for all services in AttributeBundle
- Added
AllowInvalidArrayTypeto Doctrine to fix deserialization error on mail sending - Added missing template for
\Shopware\Bundle\ContentTypeBundle\Field\ComboboxField - Added jQuery event
plugin/swCookiePermission/onAcceptButtonClickandplugin/swCookiePermission/onDeclineButtonClick - Added option
__options_detailsto order api update to toggle order position replace mode - Added setter and is methods for json renderer
formatDateTimevariable. - Added multiple Smarty blocks to
frontend/plugins/index/delivery_informations.tpl - Added new Smarty block
frontend_detail_index_data_pricespecificationtofrontend/detail/content/buy_container.tpl - Added new Smarty blocks
frontend_includes_emotion,frontend_includes_emotion_inner,frontend_includes_emotion_templateandfrontend_includes_emotion_template_innertofrontend/_includes/emotion.tpl - Added new Smarty blocks
frontend_index_left_categories_wrapperandfrontend_index_left_subcategory_configtofrontend/index/sidebar.tpl - Added
Shopware\Bundle\CookieBundle, which takes care of the new cookie consent manager. If you're using cookies in your plugin, make sure to read this documentation!
- Changed aria-label in
themes/Frontend/Bare/frontend/_includes/privacy.tplto remove html tags - Changed
sAdmin::sRiskATTRISto allow any product attribute - Changed
Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\GraduatedPricesGatewayto consider minimum purchase quantity - Changed
\Shopware_Controllers_Frontend_Address::handleExtraDatato splitsessionKeycorrectly - Changed
StateManager.getScrollBarSizeto lazily get the size of the scrollbar - Changed missing german translation in
snippets/backend/article_list/main.ini - Changed the
\Shopware\Models\Shop\Repository::getBaseListQueryBuilder,\Shopware\Models\Shop\Repository::getBaseListQueryand\Shopware\Models\Shop\Repository::getMainListQueryBuildermethods. Added a boolean$orderByShopPositionAsDefaultthat can be set to true to filter by shop position instead of shop name - Changed the Smarty block
frontend_detail_data_delivery, added availability meta tags for the pre selected configurator products for configurator types 'Selection' and 'Image' - Changed the path value of following cookies, so they correctly consider the shop's base path
session-<shopId>partnersUniqueID
- Changed
unitizemixin to only output rem values - Changed
Shopware\Models\Customer\Customer, set correct return type forgetregisterOptInId - Changed the
TemplateMail_CreateMail_MailContextfilter to work correctly. - Changed
ProductServiceInterfaceto extend fromListProductServiceInterface - Changed additionAddressLine1 in
themes/Frontend/Bare/frontend/register/shipping_fieldset.tplto fix a typo - Changed
\sArticles::sGetArticlePicturesto correctly return image thumbnail URLs again
- Removed the smarty blocks
frontend_blog_bookmarks_deliciousandfrontend_blog_bookmarks_diggand their content from `themes/Frontend/Bare/frontend/blog/bookmarks.tpl - Removed unnecessary
extendsActionfromShopware_Controllers_Backend_ExtJs - Removed 'p' parameter and its alias 'sPage' from "NoIndex queries" configuration
- Removed controller action
Shopware_Controllers_Backend_SwagUpdate::saveFtpAction - Removed ExtJS model
engine/Shopware/Plugins/Default/Backend/SwagUpdate/Views/backend/swag_update/model/ftp.js - Removed ExtJS view
engine/Shopware/Plugins/Default/Backend/SwagUpdate/Views/backend/swag_update/view/ftp.js - Removed ExtJS controller method
engine/Shopware/Plugins/Default/Backend/SwagUpdate/Views/backend/swag_update/controller/main.js::onSaveFtp
- Deprecated class
\Shopware\Components\OpenSSLEncryption. It will be removed in 5.7, use own implementation instead - Deprecated parameter
$orderByShopPositionAsDefaultfor methodsgetBaseListQuery,getBaseListQueryBuilderandgetMainListQueryBuilderinengine/Shopware/Models/Shop/Repository.php - Deprecated following methods in class
\Shopware\Models\Partner\RepositorygetCustomerForMappingQuerygetCustomerForMappingQueryBuilder
View all changes from v5.6.1...v5.6.2
- Added a title to the base price declaration shown in the product box (
themes/Frontend/Bare/frontend/listing/product-box/product-price-unit.tpl), so users may view the full text by hovering, in case the declaration was truncated - Added a filter event 'Shopware_Plugins_AdvancedMenu_CacheKey' to
\Shopware_Plugins_Frontend_AdvancedMenu_Bootstrap::getAdvancedMenu - Added all global defined attachments to the order document mail sending
- Added example HSTS configuration in the htaccess file
- Added the same context variables to
sREGISTERCONFIRMATIONwhen the mail is sent after a DOI eMail compared to when it is sent directly - Added some values to the context of eMails
sOPTINREGISTERandsOPTINREGISTERACCOUNTLESSto include the same values as eMailsREGISTERCONFIRMATION, these are:customer_typeandadditional.customer_typeaccountmodeemailandsMAILstreetzipcodecitycountrystate
- Added
db.timezonesection toconfig.phpto configure a custom timezone for the database connection
- Changed the base price declaration shown in the product box (
themes/Frontend/Bare/frontend/listing/product-box/product-price-unit.tpl), so that an ellipsis is shown when the text is truncated - Changed
Shopware_Controllers_Widgets_Listing::convertProductsResultto consider use short description configuration - Changed
Shopware\Models\Analytics\Repository::createAmountBuilderto join withleft joininsteadinner join - Changed the block of the registration verification alert
- Changed the
x-robotsheader tox-robots-tag - Changed HTML minification to exclude
checkoutcontroller due to performance issues with many items in the cart - Changed
Shopware\Models\Analytics\Repository::createAmountBuilderto join withleft joininsteadinner join - Changed default value of
Shopware\Models\Article\Image::$mainto 2 - Changed the label of the config form
ServicetoMaintenance - Changed
s_mail_logforeign keys to set null on delete - Changed
Item by salesto consider only products - Changed systeminfo to consider mariadb installations
- Changed
Zend_Cache_Backend_Redisto make it compatible with PhpRedis 5.0.0 - Changed
Listingcontroller to prevent it from accessing categories of subshops - Changed jquery plugins
ajax-product-navigation,infinite-scrollingandlisting-actionsto work with invalid query strings - Changed the context variables of eMail
sREGISTERCONFIRMATIONto contain the same variables when the mail is sent after a DOI eMail compared to when it is sent directly - Changes how the IP of the client get's determined when an order is being stored
- Changed the context variables of eMails
sOPTINREGISTERandsOPTINREGISTERACCOUNTLESSto include the same values as eMailsREGISTERCONFIRMATION, these are:- The already existing variables:
sConfirmLinkfirstnamelastnamesalutation
- New are the variables:
customer_typeandadditional.customer_typeaccountmodeemailandsMAILstreetzipcodecitycountrystate
- The already existing variables:
- Changed PHPStan to 0.11.16
- Changed a call to the
flatpickr'sformatDate()method, so that it now reflects the current parameter order
- Removed the
UNIQUE-Constraint from\Shopware\Models\Mail\Contact::$mailAddress
View all changes from v5.6.0...v5.6.1
- Added new config checkbox for applying stock on chosen variants while applying standard data
- Added new smarty block
frontend_global_messages_icon_remove - Added new div class
is--content-typeto all content type pages - Added fallback for missing widget label translation
- Added path
/trackingtorobots.txt
- Changed the meta property
og:typein the listing fromproducttoproduct.group - Changed password recovery form to also work with invalid customer objects
- Changed
Shopware\Bundle\StoreFrontBundle\Gateway\BlogGatewayto consider blog translations - Changed the SEO meta tags in the blog listing
- Changed
Shopware_Components_Translationto work with missing payment or dispatch entries - Changed
sAdminto save cart after logout - Changed
Shopware\Components\DependencyInjection\Compiler\LegacyApiResourcesPassto work correctly - Changed the calculation of the date in the affiliate marketing statistics
- Changed
Enlight_Controller_Response_ResponseHttp::isRedirectto not consider http response code 201 - Changed content type pages to display the off canvas menu in mobile view
- Changed
sAdmin::sGetCountryListto use CountryService - Changed the pagesize for the snippets module
- Changed the handling of browser notifications to support browsers without notifications
- Changed
themes/Frontend/Bare/frontend/_includes/emotion.tplto also work with emotion preview - Changed dependency
beberlei/assertto version 2.9.9 to fix issues with PHP 7.3
View all changes from v5.5.10...v5.6.0
- Added support for Shopping Worlds without AJAX requests, configurable in theme settings
- Added configuration to define the format of a valid order number. See [Custom validation of order numbers (SKU)](###Custom validation of order numbers (SKU)) for more details
- Added controller registration by DI-tag. See Controller See [Controller Registration using DI-Tag](###Controller Registration using DI-Tag) for more details
- Added autowiring of controller action parameters. See [Autowire of controller actions parameters](###Autowire of controller actions parameters) for more details
- Added better ExtJS file auto-loading. See [Improved ExtJS auto-loading](###Improved ExtJS auto-loading) for more details
- Added new
Shopware\Components\Cart\PaymentTokenServiceto improve handling of payment callbacks. See [Payment Token](###Payment Token) for more details - Added specific logger service for each plugin. See [Plugin specific logger](###Plugin specific logger) for more details
- Added support for HTTP2 server push. See [HTTP2 Server Push Support](###HTTP2 Server Push Support) for more details
- Added Symfony
RequestStackto Enlight's request cycle - Added new config option to allow restoring of old cart items
- Added new config option to enable sharing of session between language shops
- Added support for SVG files in the frontend
- Added means to translate document types, dispatch and payment methods
- Added definition signature
getAttributeRawFieldtoShopware\Bundle\ESIndexingBundle\TextMappingInterfaceto reduce info request of Elasticsearch and added method implementation to TextMappingsShopware\Bundle\ESIndexingBundle\TextMapping\TextMappingES2::getAttributeRawFieldShopware\Bundle\ESIndexingBundle\TextMapping\TextMappingES5::getAttributeRawFieldShopware\Bundle\ESIndexingBundle\TextMapping\TextMappingES6::getAttributeRawField - Added new privilege for Plugin Manager and Updater notifications
- Added product review widget
- Added plugin migrations
- Migrations are loaded from folder
SwagTestPlugin/Resources/migrations - The migration file can be generated using
./bin/console sw:generate:migration added-something-new -p SwagTestPlugin
- Migrations are loaded from folder
- Added new theme configuration to disable ajax loading for emotions
- Added signature
supportstoShopware\Bundle\ESIndexingBundle\SynchronizerInterfaceto reduce wrong typed backlog sync request- Added method implementation to
Shopware\Bundle\ESIndexingBundle\Property\PropertySynchronizer::supportsShopware\Bundle\ESIndexingBundle\Product\ProductSynchronizer::supports
- Added method implementation to
- Added service
\Doctrine\Common\Annotations\Readerasmodels.annotations_reader - Added
shopware.controller.blacklisted_controllersparameter to the DI container to blacklist controllers for dispatching - Added Doctrine's default table options to config, can now be modified
- Added configuration to show the voucher field on checkout confirm page
- Added information text to detail page of category filter
- Added
stringtype cast in return statement of methodsOrder::sGetOrdernumber - Added configuration to decide whether user basket should be cleared after logout or not
- Added the following new models and repositories to enable e-mail logging
\Shopware\Models\Mail\Log\Shopware\Models\Mail\Contact\Shopware\Models\Mail\LogRepository
- Added the following new services to enable e-mail logging
Shopware\Bundle\MailBundle\Service\LogEntryBuilderShopware\Bundle\MailBundle\Service\LogEntryMailBuilderShopware\Bundle\MailBundle\Service\LogServiceShopware\Bundle\MailBundle\Service\Filter\AdministrativeMailFilterShopware\Bundle\MailBundle\Service\Filter\NewsletterMailFilter
- Added the
MailLogCleanupcron job which clears old entries from the e-mail log - Added new basic settings in the mailer section
mailLogActivemailLogCleanupMaximumAgeInDays
- Added the
associationsproperty toEnlight_Components_Mail - Added option symbols for
{include file="frontend/_includes/rating.tpl"}to hide rating symbols - Added new controller
Shopware\Controllers\Backend\Logger - Added Ace editor in the backend where
Codemirrorwas used before: in email and shopping world templates, shipping cost calculation and product exports. - Added server response tab to extjs error reporter to show errors in javascript code
- Added new backend module
mail_log - Added new backend controllers:
MailLogMailLogContact
- Added function to rename or overwrite if esd file already exists
- Added
beberlei/DoctrineExtensionsas requirement. - Added ExtJs developer mode, to provide better warnings and errors to developers
- Added
Enlight_Hook_Exception. It will be thrown when the HookManger gets a class name which not implementsEnlight_Hookin 5.8 - Added new events in
sBasket::getPricesForItemUpdates() - Added an option to use a datepicker for birthday instead of the single select-fields
- Added additional information to the address verification. You can now give more feedback during the form validation.
- Added
--indexoption tosw:es:index:populate. It can be used to reindex single or multiple index. If it is not defined, every index will be reindexed.bin/console sw:es:index:populate --index propertybin/console sw:es:index:populate --index property --index product - Added the Product Number as a new method to sort your results
- Added support for Elasticsearch 7
- Added a last password change date to customers
- Added new foreign key to
s_order_details,orderIDnow referencess_order.id - Added new config option to set batch size of backlog indexing for elasticsearch backend implementation
- Added listener for new orders, to add them in the elasticsearch backend backlog
- Added logging for exceptions that may occur during migrations
- Added command
sw:es:backend:backlog:clearto clear the backlog - Added alias command
sw:es:backend:backlog:synctosw:es:backend:sync - Added paging to more lists in the backend
- Added a new configuration to a blog for limiting the blog to shops
- Added browser notifications in the backend, which are shown when a growl message is created and the current tab is inactive
- Added new block
frontend_listing_box_article_badges_innertothemes/Frontend/Bare/frontend/listing/product-box/product-badges.tpl - Added event
Shopware_Models_Order_Document_Filter_Configto modify config settings for document creation - Added
_configproperty to classShopware_Models_Document_Orderto make it usable while model creation - Added new parameter to prevent certain exceptions from cluttering your logs. See [Disable logging of specific exceptions](###Disable logging of specific exceptions) for more details
- Added a
Symfony\Component\HttpKernel\Bundle\Bundleclass to all Shopware bundles and moved all service.xml files to a correspondingDependencyInjectiondirectory - Added
es.index_settingsandes.backend.index_settingssection toconfig.phpto allow custom elasticsearch settings - Added getter and setter to Config/Form model
- Added new event
Shopware_Controllers_Order_SendMail_PreparetoShopware_Controllers_Backend_Order::sendMailAction - Added
Shopware\Components\CacheSubscriberto clear config cache, when plugin config changes
- Changed minimum required PHP version to 7.2.0
- Changed minimum required MySQL version to 5.7.0
- Changed minimum Elasticsearch version to 6.6.0
- Changed Symfony library to version 3.4.30
- Changed doctrine/orm to 2.6.3
- Changed mpdf/mpdf to 7.1.9
- Changed elasticsearch/elasticsearch to 6.7.1
- Changed ongr/elasticsearch-dsl to 6.0.3
- Changed jQuery to 3.4.1
- Changed PHPStan to 0.11.12
- Changed id of login password form in
frontend/account/login.tplfrompassworttopassword - Changed plugin initialization to alphabetical order by default
- Changed all DIC service ids to lowercase as a preparation for a switch to Symfony 4 in the future
- Changed the generation of the Robots.txt. See [Improved Robots.txt](###Improved Robots.txt) for more details
- Changed cookie
x-ua-deviceto besecureif the shop runs on SSL - Changed the following cart actions to redirect the request to allow customers to press reload:
Shopware_Controllers_Frontend_Checkout::addArticleActionShopware_Controllers_Frontend_Checkout::addAccessoriesActionShopware_Controllers_Frontend_Checkout::deleteArticleAction - Changed browser cache handling in backend to cache javascript
indexandloadactions. Caching will be disabled when...- the template cache is disabled
$this->Response()->setHeader('Cache-Control', 'private', true);is used in the controller
- Changed mapping of Elasticsearch fields:
- Fields previously handled as
notAnalyzedFieldsare now treated askeywordfields, meaning they are only searchable completely, not in parts instead of not searchable. Examples of these fields are:- EAN
- SKU
- ZIP codes
- transaction Ids
- Phone numbers
- .raw fields
- and some more
- Fields previously handled as
- Changed the manufacturer image to appropriate thumbnails
- Changed
Shopware\Components\Plugin\CachedConfigReaderto cache intoZend_Cache_Core - Changed
plugin.xsdto make pluginName inrequiredPluginsrequired - Changed
Shopware\Components\DependencyInjection\Containerto trigger InitResource and AfterInitResource events for alias services, introduced by decorations - Changed the
Regex-Constraint on\Shopware\Models\Article\Detail::$numberto a newOrderNumber-Constraint to be more configurable - Changed interface
Shopware\Bundle\SearchBundleDBAL\VariantHelperInterfaceto contain new methodjoinVariants(QueryBuilder $query)which was already a necessary part of the default implementation - Changed
typeoflogMailAddressconfig ins_core_config_elementstotextarea - Changed mail error handler to consider multiple recipient addresses
- Changed
Shopware_Controllers_Frontend_Noteforwards to redirects - Changed display mode of voucher field on the shopping cart page into a configurable display mode
- Changed symfony form request handler to
Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler - Changed
.htaccess-file to no longer contain references to PHP5 - Changed following tables to varchar limit of 15 for customer group key
s_core_customergroupss_article_configurator_template_pricess_articles_pricess_campaigns_mailings
- Changed backend customer login to start with a fresh session
- Changed
Shopware_Controllers_Backend_Applicationto be an abstract class - Changed
sExport::sGetArticleCategoryPathto allow various attributes in category path - Changed
Shopware_Controllers_Backend_Applicationto be abstract - Changed
Ext.ClassManagerto show better error messages on missing alias or class - Changed
Shopware_Controllers_Backend_Applicationto abstract - Changed
Shopware_Controllers_Backend_ExtJsto abstract - Changed internal validation of
Shopware\Bundle\StoreFrontBundle\Struct\Attribute - Changed the blog seo meta details to be saveable after being over the max length of the global max length
- Changed shipping calculation in off canvas to work correctly with country states
- Changed the input of filters in the backend to prevent grammar error
- Changed
Shopware\Bundle\ESIndexingBundle\ShopIndexerInterface::index. Added optional$indexNamesargument - Changed Bare Template to improve accessibility by adding aria labels
- Changed product module split view mode to work correctly with properties
- Changed product search to work correctly on MySQL 8
- Changed last seen products productLimit to work correctly
- Changed product-feed export to refresh context while exporting multiple feeds
- Changed
Shopware\Models\Shop\Shop::registerResourcesto extract the code in a new serviceshopware.components.shop_registration_service - Changed the offcanvas basket to now display shipping costs also when the user is logged in
- Changed
\Shopware\Components\Privacy\PrivacyServiceto run more efficiently - Changed the logging to not have critical or error logging for CSRF-Tokens and 404-pages
- Changed the error message if a customer enters an invalid birthday in the registration
- Changed product list in Elasticsearch to consider show variants option
- Changed Hook generation to work correctly with
voidreturn type - Changed column
s_order_documents.IDtos_order_documents.id(if it wasn't already changed due to MySQL 8 being used) - Changed padding on hidden cookie-permission banner
- Changed partner cookie durations slightly to make them more accurate. Added more available intervals
- Changed grunt configuration to also take the plugin directory
custom/projectinto account - Changed advanced menu javascript to throw less events
- Changed the ShopContext to be elegantly decoratable
- Changed method name
Shopware\Components\Plugin::getNamespacetoShopware\Components\Plugin::getPluginNamespaceto supportgetNamespacemethod from Symfony bundles. - Changed
Shopware\Components\Pluginclass to extend fromSymfony\Component\HttpKernel\Bundle\Bundle - Changed
Shopware\Components\Plugin::registerCommandsparameter typehint fromShopware\Components\Console\ApplicationtoSymfony\Component\Console\Application - Changed Elasticsearch backend implementation to use an index prefix
- Changed
sBasket::getAdditionalInfoForUpdateProductto add additional text fields for variants as well - Changed the emotion detail window to be resizable
- Changed the generation of
.tmpfiles for compiled theme cache - Changed the
Shopware_Components_Configto use Doctrine DBAL instead of Zend_Db - Changed ajax-search to cancel ajax request, when submit button is pressed
- Changed elasticsearch backend backlog to write variant backlogs correctly
- Changed the attribute entity selection for
\Shopware\Models\Order\Detail - Changed the first parameter in
Shopware\Components\Model\ModelEntity:setOneToManyto allow iterables
- Removed the following classes without replacement
Shopware\Bundle\FormBundle\Extension\EnlightRequestExtensionShopware\Bundle\FormBundle\EnlightRequestHandlerShopware\Components\Compatibility\LegacyDocumentIdConverterShopware\Components\Compatibility\MigrateMysql8CommandShopware\Bundle\ESIndexingBundle\DependencyInjection\Factory\CompositeSynchronizerFactoryShopware\Bundle\ESIndexingBundle\CompositeSynchronizer
- Removed the following deprecated classes
Shopware_Controllers_Frontend_SitemapMobileXmlShopware\Components\SitemapXMLRepositoryShopware_Components_Benchmark_PointShopware_Components_Benchmark_ContainerShopware_Controllers_Backend_Deprecated
- Removed
s_articles_attributes.articleIDwhich was not set for new article variants anymore since Shopware 5.2.0 - Removed global
$Shopwaretemplate variable - Removed following classes, use
Shopware\Components\Plugin\XmlReader\*insteadShopware\Components\Plugin\XmlPluginInfoReaderShopware\Components\Plugin\XmlConfigDefinitionReaderShopware\Components\Plugin\XmlCronjobReaderShopware\Components\Plugin\XmlMenuReader
- Removed
storeType phpfrom Plugin config.xml - Removed the unspecific request params assignment to view in
Shopware_Controllers_Widgets_Listing::productsActionandShopware_Controllers_Widgets_Listing::streamAction. Use a *PostDispatchEvent to assign necessary variables in a plugin - Removed voucher field from additional feature
- Removed checkbox show in all categories on the category filter detail page
- Removed category filter facet from filter listing in category settings
- Removed category filter from category page in frontend
- Removed deprecated
Shopwareconstants- Removed
Shopware::VERSIONuse the DIC-Parametershopware.release.versioninstead - Removed
Shopware::VERSION_TEXTuse the DIC-Parametershopware.release.version_textinstead - Removed
Shopware::REVISIONuse the DIC-Parametershopwqare.release.REVISIONinstead
- Removed
- Removed deprecated
Kernelconstants- Removed
Kernel::VERSIONuse the DIC-Parametershopware.release.versioninstead - Removed
Kernel::VERSION_TEXTuse the DIC-Parametershopware.release.version_textinstead - Removed
Kernel::REVISIONuse the DIC-Parametershopware.release.revisioninstead
- Removed
- Removed deprecated
$legacyGroupsinShopware\Components\SitemapXMLRepository - Removed deprecated older
Shopware\Models\Order\Document\Document - Removed deprecations of
Shopware\Components\Api\Resource\Article - Removed deprecations of
Shopware\Components\Api\Resource\Variant - Removed unused
Shopware\Bundle\SearchBundleES\DependencyInjection\CompilerPassSearchHandlerCompilerPasswhich was not used at all - Removed method
Enlight_Controller_Response_ResponseHttp::insert - Removed method
Shopware\Kernel::transformEnlightResponseToSymfonyResponse - Removed following methods from class
Enlight_Controller_Dispatcher_DefaultaddControllerDirectory, use setModules insteadaddModuleDirectory, use addModule insteadsetControllerDirectory, use setModules insteadgetControllerDirectory, use getModules insteadremoveControllerDirectory, use setModules instead
- Removed the
CodeMirrorJavaScript editor, useAceinstead - Removed
ext-all-debug.js
- Deprecated the implicit conversion of strings to
DateTimeobjects in Doctrine entities, it will be removed in Shopware 5.7. Relying on this conversion will throw a deprecation warning till then, please only insertDateTimeobjects - Deprecated
Shopware\Bundle\ESIndexingBundle\TextMappingInterface::getNotAnalyzedField. It will be removed in 5.7, use the getKeywordField instead - Deprecated
Shopware\Bundle\ESIndexingBundle\TextMappingInterface::getAttributeRawField. It will be removed in 5.7, use the getKeywordField instead - Deprecated
Shopware\Bundle\ESIndexingBundle\Product\ProductProviderInterface. It will be removed in 5.7, use theShopware\Bundle\ESIndexingBundle\ProviderInterfaceinstead - Deprecated
Shopware\Bundle\ESIndexingBundle\Property\PropertyProviderInterface. It will be removed in 5.7, use theShopware\Bundle\ESIndexingBundle\ProviderInterfaceinstead - Deprecated
Shopware\Components\Model\ModelRepository::queryAll. It will be removed in 5.7, use findBy([], null, $limit, $offset) instead - Deprecated
Shopware\Components\Model\ModelRepository::queryBy. It will be removed in 5.7, use findBy instead - Deprecated
Shopware\Bundle\ESIndexingBundle\EsClientLogger. UseShopware\Bundle\ESIndexingBundle\EsClientinstead. - Deprecated
shopware_elastic_search.client.logger. Useshopware_elastic_search.clientinstead. - Deprecated
Shopware\Models\Article\Article::getAttributeRawField. It will be removed in 5.7, , useShopware\Models\Article\Detail::getAttributeRawField - Deprecated
Shopware\Models\Article\Article::setLastStock. It will be removed in 5.7, , useShopware\Models\Article\Detail::setLastStock - Deprecated
Shopware\Models\Article\Article::lastStock. It will be removed in 5.8, useShopware\Models\Article\Detail::lastStock - Deprecated
EsSearch::addFilter. UseEsSearch::addQuery(BuilderInterface, BoolQuery::FILTER)instead - Deprecated
EsSearch::getFilters. UseEsSearch::getQueries(BuilderInterface, BoolQuery::FILTER)instead - Deprecated
Enlight_Controller_Response_ResponseHttp::setRawHeader - Deprecated
Enlight_Controller_Response_ResponseHttp::clearRawHeader - Deprecated
Enlight_Controller_Response_ResponseHttp::clearRawHeaders - Deprecated
Enlight_Controller_Response_ResponseHttp::outputBody - Deprecated
Shopware_Controllers_Backend_Log::createLogAction. It will be removed in 5.7, use\Shopware\Controllers\Backend\Logger::createLogActioninstead - Deprecated
Enlight_Event_EventHandler. It will be removed in 5.8, useEnlight_Event_Handler_DefaultorSubscriberInterface::getSubscribedEventsinstead - Deprecated
Shopware\Bundle\SearchBundle\ConditionInterface\RegisteredInShopCondition. It will be removed in 5.7 without replacement - Deprecated
Shopware\Bundle\BenchmarkBundle\Commands\ReceiveStatisticsCommand::MAX_BATCH_SIZE. It will be removed in 5.7 without replacement - Deprecated
Shopware\Bundle\SearchBundle\ConditionInterface\RegisteredInShopCondition. It will be removed in 5.7 without replacement - Deprecated
Shopware\Bundle\CustomerSearchBundleDBAL\ConditionHandler\RegisteredInShopConditionHandler. It will be removed in 5.7 without replacement - Deprecated
Shopware\Bundle\CustomerSearchBundleDBAL\Indexing\CronJobSubscriber\CronJobProgressHelper. It will be removed in 5.7. Use theCronJobProgressHelperinstead. - Deprecated
Shopware\Bundle\CustomerSearchBundleDBAL\Indexing\SearchIndexerInterface::clearIndex. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\CustomerSearchBundleDBAL\Indexing\SearchIndexerInterface::cleanupIndex. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\EmotionBundle\Exception\ComponentHandlerNotFoundException. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\EsBackendBundle\EsAwareSearcher. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\ESIndexingBundle\Product\ProductQueryFactoryInterface::createPriceIdQuery,::createVoteIdQuery,::createVariantIdQuery,::createProductCategoryQuery. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\ESIndexingBundle\Product\ProductQueryFactory::createPriceIdQuery,::createVoteIdQuery,::createVariantIdQuery,::createProductCategoryQuery. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\ESIndexingBundle\Product\ProductQueryFactoryInterface::createPriceIdQuery,::createVoteIdQuery,::createVariantIdQuery,::createProductCategoryQuery. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\ESIndexingBundle\LastIdQuery::getQuery. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\PluginInstallerBundle\Context\PluginLicenceRequest. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\PluginInstallerBundle\Service\PluginStoreService::getPluginLicence. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\PluginInstallerBundle\Struct\SubscriptionStateStruct. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\SearchBundle\Condition\SimpleCondition. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\SearchBundle\Facet\SimpleFacet. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\SearchBundle\Sorting\SimpleSorting. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\StoreFrontBundle\Common\StructHelper. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Bundle\StoreFrontBundle\Struct\LocationContext. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Components\Auth\Adapter\Default::rehash. It will be private in 5.7 without replacement. - Deprecated
Shopware\Components\DependencyInjection\Compiler\TagReplaceTrait. It will be removed in 5.8 without replacement. - Deprecated
Shopware\Components\DependencyInjection\ProxyFactory. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Components\Emotion\Preset\PresetInstallerInterface. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Components\Log\Handler\DoctrineDBALHandler. It will be removed in 5.7 without replacement. - Deprecated
Shopware\Components\CsvIterator::setFieldmark. It will be removed in 5.7 without replacement. - Deprecated
Shopware_Controllers_Backend_Article::getArticleCategories,::getArticleSimilars,::getArticleRelatedProductStreams,::getArticleRelated,::getArticleImages,::getArticleLinks,::getArticleDownloads,::getArticleCustomerGroups,::getArticleConfiguratorSet,::getArticleDependencies,::getFreeSerialCount,:getChartData:. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Blog::getCategoryRepository,::getArticleRepository,::getRepository,::getBlogCommentRepository. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Category::getRepository,::getCategoryComponent,::getPathByQuery,::saveDetail. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Login::getPlugin. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Newsletter::initMailing,::initTemplate,::getMailing,::getMailingDetails,::getMailingVoucher,::getMailingEmails,::getVoucherCode,::getMailingUserByEmail,::preFilter,::outputFilter,::altFilter,::trackFilter,::createHash. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_NewsletterManager,::getCampaignsRepository,::getPreviewNewslettersQuery. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_NewsletterManager,::getCampaignsRepository,::getPreviewNewslettersQuery. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Performance,::saveConfigData,::prepareDataForSaving. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Shipping,::deleteCostMatrix,::saveCostMatrix. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Supplier::getAllSupplier. It will removed in 5.7, without any replacement. - Deprecated
Shopware_Controllers_Frontend_Blog,::getDateFilterData,::getAuthorFilterData,::getTagsFilterData,::getCategoryBreadcrumb. It will be private in 5.8. - Deprecated
Shopware_Controllers_Frontend_Blog::acceptBlogCommentAction. It will be removed in 5.7 without replacement. - Deprecated
Shopware_Controllers_Frontend_Checkout,::flagPaymentBlocked,::getUserData,::saveTemporaryOrder,::saveOrder,::getInstockInfo,::getAvailableStock,::getShippingCosts,::getBasket,::getTaxRates,::getSimilarShown,::getBoughtToo,::getMinimumCharge,::getDispatchNoOrder,::getPremiums,::getEsdNote,::getInquiry,::getInquiryLink,::getCountryList,::getDispatches,::getPayments,::getSelectedCountry,getSelectedState,::getSelectedPayment,::getSelectedDispatch. It will protected in 5.8. - Deprecated
Shopware_Controllers_Frontend_Forms::commitForm. It will be private in 5.8. - Deprecated
Shopware_Controllers_Frontend_Listing::getBreadcrumb. It will be private in 5.8. - Deprecated
Shopware_Controllers_Frontend_Tracking::$testRepository. It will be removed in 5.7 without replacement. - Deprecated
Shopware_Controllers_Widgets_Campaign::getEmotions. It will be removed in 5.7 without replacement. - Deprecated
sArticles::sGetArticleTaxById,::sGetCheapestPrice,::sGetSupplierById,::sGetArticlesBySupplier,::sFillUpComparisonArticles,::sGetComparisonProperties. It will be removed in 5.7 without replacement. - Deprecated
sArticles::sFillUpComparisonArticles. It will be removed in 5.7. Use thesArticlesComparisons::sFillUpComparisonArticlesinstead. - Deprecated
sArticles::sGetComparisonProperties. It will be removed in 5.7. Use thesArticlesComparisons::sGetComparisonPropertiesinstead. - Deprecated
sArticles::getArticleListingCover. It will be removed in 5.7. Use thesArticles::sGetArticlePicturesinstead. - Deprecated
sArticles::sGetTranslations. It will be removed in 5.7. UsesArticle::sGetTranslationinstead. - Deprecated
sCategories::$sSYSTEMIt will be removed in 5.7 without replacement. - Deprecated
sExport::$sDB,::$sApi,::$sPath,::$sTemplates,::sGetDispatchIt will be removed in 5.7 without replacement. - Deprecated
sOrder::$paymentObject. It will be removed in 5.7 without replacement. - Deprecated
sRewriteTable::getData. It will be removed in 5.7 without replacement. - Deprecated
Shopware_Components_AlsoBought::getOrderTime. It will be removed in 5.7 without replacement. - Deprecated
Shopware_Controllers_Backend_SimilarShown::SimilarShown. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_TopSeller::TopSeller. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Seo::SeoIndex,::RewriteTable. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Analytics::getShopRepository. It will be private in 5.8. - Deprecated
Shopware_Controllers_Backend_Snippet::prefixProperties. It will be removed in 5.8 without replacement. - Deprecated
Shopware_Controllers_Backend_Order::getDocumentRepository. It will be removed in 5.8 without replacement. - Deprecated
Shopware_Controllers_Backend_Article::$configuratorPriceVariationRepository,::$configuratorGroupRepository,::getConfiguratorGroupRepository,::getDependencyByOptionId,::getViolationFields. It will be removed in 5.8 without an replacement - Deprecated
Shopware_Components_Translation::filterText. It will be removed in 5.7 without an replacement - Deprecated
Shopware\Components\Api\Resource\ApiProgressHelper. It will be removed in 5.7 without an replacement. - Deprecated
Shopware\Components\Api\Resource\Cache::getRequest. It will be removed in 5.7 without an replacement. - Deprecated
Shopware\Components\Api\Resource\Article::isVariantImageExist. It will be removed in 5.7 without an replacement. - Deprecated
Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\Hydrator\Hydrator::getFields. It will be removed in 5.7 without an replacement. - Deprecated
Shopware\Components\Model\Query\Mysql\IfElsein 5.6, will be removed with 5.7. Please useDoctrineExtensions\Query\Mysql\IfElseinstead. - Deprecated
Shopware\Components\Model\Query\Mysql\DateFormatin 5.6, will be removed with 5.7. Please useDoctrineExtensions\Query\Mysql\DateFormatinstead. - Deprecated
Shopware\Components\Model\Query\Mysql\IfNullin 5.6, will be removed with 5.7. Please useDoctrineExtensions\Query\Mysql\IfNullinstead. - Deprecated
Shopware\Components\Model\Query\Mysql\RegExpin 5.6, will be removed with 5.7. Please useDoctrineExtensions\Query\Mysql\RegExpinstead. - Deprecated
Shopware\Components\Model\Query\Mysql\Replacein 5.6, will be removed with 5.7. Please useDoctrineExtensions\Query\Mysql\Replaceinstead. - Deprecated
Shopware\Components\Model\DBAL\Types\DateTimeStringTypein 5.6, will be removed with 5.7. Please useDoctrine\DBAL\Types\DateTimeTypeinstead. - Deprecated
Shopware\Components\Model\DBAL\Types\AllowInvalidArrayTypein 5.6, will be removed with 5.7. Please useDoctrine\DBAL\Types\ArrayTypeinstead. - Deprecated
Shopware\Components\Model\DBAL\Types\DateTimeStringTypein 5.6, will be removed with 5.7. Please useDoctrine\DBAL\Types\DateTimeTypeinstead. - Deprecated
Shopware\Components\Api\Manager::getResource. It will be removed in 5.8, inject resources instead - Deprecated usage of
shopware.apiDI prefix without tagshopware.api_resource - Deprecated
Shopware\Models\Shop\Shop::registerResources. It will be removed in 5.8, useShopware\Components\ShopRegistrationServiceinstead. - Deprecated
Shopware\Components\DependencyInjection\Compiler\LegacyApiResourcesPass. It will be removed in 5.8, use the tagshopware.api_resourceinstead.
Previous to Shopware 5.6, only ExtJS files from the Shopware.apps.Base were loaded globally, so you can use them globally in your apps.
Additional to that, when loading up a module like e.g. "ProductStream", all files from Shopware.apps.ProductStream were loaded on top.
Using files from others apps, such as Shopware.apps.Article inside of the Shopware.apps.ProductStream application, required you to implement some special code in order to do so.
Also, when using an ExtJS store in your plugin configuration, you were only able to use stores from Shopware.apps.Base, none of the other stores.
We've improved our auto-loading of ExtJS files, so you don't have to worry about this anymore. Instead of failing, because you used files of an application, that didn't get loaded yet, we're simply loading the missing application now. This way you don't have to worry about using others applications files anymore, as well as worrying about which stores can be used in your plugin configuration.
Controllers can be now registered using the DI tag shopware.controller. This DI tag needs attributes module and controller. These controllers are also lazy-loaded.
<service id="SwagExample\Controller\Frontend\SwagTest">
<argument type="service" id="dbal_connection"/>
<tag name="shopware.controller" module="frontend" controller="swagTest"/>
</service><?php
namespace SwagExample\Controller\Frontend;
use Doctrine\DBAL\Connection;
class SwagTest extends \Enlight_Controller_Action
{
private $connection;
public function __construct(Connection $connection)
{
$this->connection = $connection;
parent::__construct();
}
public function indexAction()
{
// Do something with $this->connection
}
public function detailAction(int $productNumber = null, ListProductServiceInterface $listProductService, ContextServiceInterface $contextService)
{
if (!$productNumber) {
throw new \RuntimeException('No product number provided');
}
$this->View()->assign('product', $listProductService->getList([$productNumber], $contextService->getShopContext()));
}
}The new controllers tagged with shopware.controller tag, can now have parameters in action methods. Possible parameters are
- Services (e.g
ListProductService $listProductService) - $request (e.g
Request $request) - $requestParameters (e.g
int $limit = 0,/action?limit=5)
Enlight_Controller_Request_RequestHttp is now extending Symfony\Component\HttpFoundation\Request and Enlight_Controller_Response_ResponseHttp extends Symfony\Component\HttpFoundation\Response. This is a first move to switch to Symfony Controllers and Request/Responses completely in a future release.
Up to now, the validation of order numbers (or SKUs) was done in form of a Regex-Assertion in the Doctrine model at Shopware\Models\Article\Detail::$number. That solution was not flexible and didn't allow any modifications of said regex, let alone a complete custom implementation of a validation.
Now, a new constraint Shopware\Components\Model\DBAL\Constraints\OrderNumber is used instead, which is a wrapper around \Shopware\Components\OrderNumberValidator\RegexOrderNumberValidator.
This way you can either change the regex which is being used for validation by defining one yourself in the config.php:
<?php
return [
'product' => [
'orderNumberRegex' => '/^[a-zA-Z0-9-_.]+$/' // This is the default
],
'db' => [...],
]Or you can create your own implementation of the underlying interface Shopware\Components\OrderNumberValidator\OrderNumberValidatorInterface and use it for the validation by simply decorating the current service with id shopware.components.ordernumber_validator and e.g. query some API.
It is now possible to define the MySQL version being used in the config.php as part of the Doctrine default configuration.
The version can be determined by running the SQL query SELECT version(), the result needs to be provided in the db.serverVersion config:
<?php
return [
...
'db' => [
...
'serverVersion' => '5.7.24',
],
];Providing this value via config makes it unnecessary for Doctrine to figure the version out by itself, thus reducing the number of database calls Shopware makes per request by one.
If you are running a MariaDB database, you should suffix the serverVersion with -MariaDB (e.g.: 10.3.18-MariaDB).
Some internet security software packages open a new clean browser without cookies for payments.
After returning from the payment provider, the customer will be redirected to the home page, because the new browser instance does not contain the previous session.
For this reason there is now a service to generate a token, which can be added to the returning url (e.g /payment_paypal/return?paymentId=test123&swPaymentToken=abc123def).
This parameter will be resolved in the PreDispatch.
If the user is not logged in, but the URL contains a valid token, he will get back his former session and will be redirected to the original URL, but without the token
Example implementation:
<?php
use \Shopware\Components\Cart\PaymentTokenService;
class MyPaymentController extends Controller {
public function gatewayAction()
{
// Do some payment things
$token = $this->get(\Shopware\Components\Cart\PaymentTokenService::class)->generate();
$returnParamters = [
'controller' => 'payment_paypal',
'action' => 'return',
PaymentTokenService::TYPE_PAYMENT_TOKEN => $token
];
$returnLink = $this->router->assemble($returnParamters);
$redirectUrl = $this->paymentProviderApi->createPayment($cart, $returnLink);
$this->redirect($redirectUrl);
}
}Codemirror has been replaced with Ace-Editor. For compatibility reason, Ace-Editor supports all xtypes / classes from Codemirror. Following modes are available * css * html * javascript * json * less * mysql * php * sass * scss * smarty * sql * text * xml * xquery
robots.txt shows now all links from all language shops.
To remove or add entries overwrite the blocks frontend_robots_txt_disallows_output, frontend_robots_txt_allows_output and call methods setAllow, setDisallow, removeAllow, removeDisallow
Example:
{block name="frontend_robots_txt_disallows_output"}
{$robotsTxt->removeDisallow('/ticket')}
{$smarty.block.parent}
{/block}There is a new logger service for each plugin.
The service id is a combination of the plugin's service prefix (lower camel case plugin name) and .logger.
For example: when a plugin's name is SwagPlugin the specific logger can be accessed via swag_plugin.logger.
This logger will now write into the logs directory using a rotating file pattern like the other logger services.
The settings for the logger can be configured using the DI parameters swag_plugin.logger.level(defaults to shopware default logging level) and swag_plugin.logger.max_files (defaults to 14 like other shopware loggers).
In this case the logger would write into a file like var/log/swag_plugin_production-2019-03-06.log.
Support for easier log message writing is enabled:
<?php
$logger->fatal("An error is occured while requesting {module}/{controller}/{action}", $controller->Request()->getParams());Products in a category can be now sorted "by hand". This specific sorting can also be created using the categories API resource.
They will be applied when the associated sorting has been selected in the storefront. Not manually sorted products will use the configured normal fallback sorting.
HTTP2 Server Push allows Shopware to push certain resources to the browser without it even requesting them. To do so, Shopware creates Link-headers for specified resources, informing Apache or Nginx to push these files to the browser. Server Push is supported since Apache 2.4.18 and nginx 1.13.9.
These resources are only pushed on the very first request of a client. After that, the files should be cached in the browser and don't need to be transmitted anymore. The presence of a session-cookie is used to determine if a push is necessary.
The Smarty function {preload} is used to define in the template which resource are to be pushed and as what.
Example for CSS:
<link href="{preload file={$stylesheetPath} as="style"}" media="all" rel="stylesheet" type="text/css" />Example for Javascript:
<script src="{preload file={link file='somefile.js'} as="script"}"></script>Server Push can be enabled in the Various section of the Cache/Performance settings. Please do not enable Server Push support if you are using Google's Pagespeed module: It creates custom CSS and Javascript files for the browser, replacing the ones Shopware contains in the HTML. So pushing the original files to the browser leads to an unnecessary overhead.
Extjs error reporter shows now also the server response and lints the code to show errors.
ExtJs developer mode loads a developer-version file of ExtJs to provide code documentation, warnings and better error messages. This mode can be enabled using this snippet in the config.php
'extjs' => [
'developer_mode' => true
]Content Types are something similar to attributes, but you can create your own simple entity with defined fields using using xml or the backend.
Example XML:
<?xml version="1.0" encoding="utf-8"?>
<contentTypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../engine/Shopware/Bundle/ContentTypeBundle/Resources/contenttypes.xsd">
<types>
<type>
<typeName>store</typeName>
<name>Stores</name>
<fieldSets>
<fieldSet>
<field name="name" type="text">
<label>Name</label>
<showListing>true</showListing>
</field>
<field name="address" type="text">
<label>Address</label>
<showListing>false</showListing>
</field>
<field name="country" type="text">
<label>Country</label>
<showListing>false</showListing>
</field>
</fieldSet>
</fieldSets>
</type>
</types>
</contentTypes>Each type gets its own
- backend controller
- frontend controller, if enabled
- API controller for all CRUD operations (Customtype_name e.g. CustomStore)
- backend menu icon
- table with
s_custom_prefix - repository service with shopware.bundle.content_type.type_name
They are also accessible in template using new smarty function fetchContent
Example
{fetchContent type=store assign=stores filter=[['property' => 'country', 'value' => 'Germany']]}
{foreach $stores as $store}
{$store.name}
{/foreach}The backend fields and titles can be translated using snippet namespace backend/customYOURTYPE/main.
You can find more information and details (e.g. regarding available field types) in the Developer Docs.
Starting with Shopware 5.6, new services will have their Fully Qualified Class Names (FQCN) as their service id in the DIC.
Classes that implement an interface will normally use that interface as their FQCN, though exemptions may occur if an
interface is implemented multiple times (e.g. the SubscriberInterface).
For the moment, all existing legacy service ids will be converted to lowercase and should be used in lowercase in plugins as well. Since the Shopware DIC is case-insensitive, this is no problem in existing plugins or older Shopware installations.
This change is being made as a first arrangement for a future switch to Symfony 4, where the DIC is case sensitive and FQCNs are the default.
Sometimes you are aware that exceptions occur, but you're not interested in them being logged since there is nothing you
can do about them and their occurring isn't harmful to the system or your business. One example might be a
CSRFTokenValidationException being thrown by visiting bots.
To prevent those exceptions from cluttering up your log, you are now able to disable logging of those exceptions. To do so,
add the class name of the exceptions your want to exempt from being logged to your config.php:
'errorHandler' => [
'ignoredExceptionClasses' => [
\Shopware\Components\CSRFTokenValidationException::class,
\Shopware\Components\Api\Exception\CustomValidationException::class
]
]By default, these exceptions are now longer being logged:
\Shopware\Components\Api\Exception\BatchInterfaceNotImplementedException::class,
\Shopware\Components\Api\Exception\CustomValidationException::class,
\Shopware\Components\Api\Exception\NotFoundException::class,
\Shopware\Components\Api\Exception\OrmException::class,
\Shopware\Components\Api\Exception\ParameterMissingException::class,
\Shopware\Components\Api\Exception\PrivilegeException::class,
\Shopware\Components\Api\Exception\ValidationException::class,