.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../Includes.txt .. _typoscript-configuration: Configuration via TypoScript ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Include Static-Template ----------------------- Please include the static typoscript first! .. figure:: ../../Images/ForAdministrators/px_shopware_ts-root-template-integration.png :alt: Include static typoscript :width: 800px .. :align: center | To include the TS directly in your TypoScript please use the following code: | ```` | ```` | If the TypoScript configuration is missing the px_shopware toolbar will display a warning! .. figure:: ../../Images/ForAdministrators/px_shopware_ts-error.png :alt: Configuration error in toolbar :width: 300px .. :align: left TypoScript Values ----------------- The following settings could be done via TypoScript. ====================================== ========== =============================================================================================================================== ==================================================== TypoScript value Data type Description Default ====================================== ========== =============================================================================================================================== ==================================================== settings.api.url string The Shopware-API url (e.g. http://www.my-online-shop.com/api/) settings.api.username string The Shopware API user settings.api.key string The API-Key of the API user settings.api.languageToShopware array The language to shop mapping configuration for sys_language_uid to the specific shop_id in Shopware 0 { shop_id = 1 sys_language_uid = 0 } ... settings.cacheLifeTime int The cache lifetime in seconds 3600 settings.noImage.path string The path to the default image (if no article image was given) EXT:px_shopware/Resources/Public/Images/ settings.noImage.filename string name of the default image no_image_available.jpg view.templateRootPaths array Will be used to configure different paths for templates. Will be overriden in reversed order 0 = EXT:px_shopware/Resources/Private/Templates/ view.partialRootPaths array Will be used to configure different paths for partials. Will be overriden in reversed order 0 = EXT:px_shopware/Resources/Private/Partials/ view.layoutRootPaths array Will be used to configure different paths for layouts. Will be overriden in reversed order 0 = EXT:px_shopware/Resources/Private/Layouts/ ====================================== ========== =============================================================================================================================== ==================================================== Examples -------- **Add new language** :: plugin.tx_pxshopware { settings { api { # shop to locale mapping configuration for correct localization of resources languageToShopware { # german (default) 0 { shop_id = 1 parentCategory = 2 sys_language_uid = 0 } # english 1 { shop_id = 2 parentCategory = 463 sys_language_uid = 1 } # italian 2 { shop_id = 3 parentCategory = 4198 sys_language_uid = 3 } } } } } Now all API-Calls will be appended with ``?language=3`` if the italian frontend in TYPO3 will called (e.g.: ``?L=3``). This will result in the italian translation for the given resource (@see https://developers.shopware.com/developers-guide/rest-api/api-resource-article/#optional-parameters for details) .. note:: Articles will be also translated in TYPO3 backend for preview in page mode or during auto suggest in plugin flexform configuration. **Override partial for articles** :: plugin.tx_pxshopware { view { partialRootPaths { 20 = EXT:foo_bar/Resources/Private/Partials/ } } } foo_bar/Resources/Private/Partials/Article/Item.html ::
{article.name}
{article.description -> f:format.raw()}
{article.name} **Override partial for categories** foo_bar/Resources/Private/Partials/Category/Item.html ::
{category.name}