Commit 4537130b authored by Administrator's avatar Administrator
Browse files

Add basic stuff

parents
Pipeline #225 failed with stages
in 52 seconds
<?php
namespace MEDIAESSENZ\Spreadshop;
/***************************************************************
* Copyright notice
*
* (c) 2019 Alexander Grein <alexander.grein@gmail.com>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Last Modified:
* Date: 2019-04-30
* Time: 12:52
*/
class Constants
{
const PLATFORMS = [
'EU',
'NA',
];
const LOCALES = [
'EU' => [
'Region' => '',
'Danmark' => 'da_DK',
'Europe' => 'en_EU',
'Ireland' => 'en_IE',
'United Kingdom ' => 'en_GB',
'Deutschland' => 'de_DE',
'Österreich' => 'de_AT',
'Schweiz (Deutsch)' => 'de_CH',
'Suisse (Francais)' => 'fr_CH',
'Svizzera (Italiano) ' => 'it_CH',
'Espana' => 'es_ES',
'Suomi' => 'fi_FI',
'France' => 'fr_FR',
'Belgique (Francais)' => 'fr_BE',
'Italia' => 'it_IT',
'Belgie (Nederlands)' => 'nl_BE',
'Nederland' => 'nl_NL',
'Norge' => 'no_NO',
'Polska' => 'pl_PL',
'Sverige' => 'sv_SE',
],
'NA' => [
'Region' => '',
'United States ' => 'en_US',
'Canada (English)' => 'en_CA',
'Canada (Francais)' => 'fr_CA',
'Australia' => 'en_AU',
],
];
}
<?php
namespace MEDIAESSENZ\Spreadshop\Controller;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
class ShopController extends ActionController
{
public function showAction()
{
}
}
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<main>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:spreadshop/Resources/Private/Language/locallang_shop.xlf:flexform.sheets.main</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>LLL:EXT:spreadshop/Resources/Private/Language/locallang_shop.xlf:flexform.sheets.main.view</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:spreadshop/Resources/Private/Language/locallang_shop.xlf:flexform.sheets.main.view.1</numIndex>
<numIndex index="1">Shop->show</numIndex>
</numIndex>
</items>
<maxitems>1</maxitems>
<size>1</size>
<default>0</default>
</config>
</TCEforms>
</switchableControllerActions>
</el>
</ROOT>
</main>
</sheets>
</T3DataStructure>
<?php
defined('TYPO3_MODE') || die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('spreadshop', 'Configuration/TypoScript', 'Spreadshop');
<?php
defined('TYPO3_MODE') || die();
call_user_func(function () {
// register confirmation plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'MEDIAESSENZ.Spreadshop',
'Shop',
'Spreadshop',
'EXT:spreadshop/Resources/Public/Icons/Extension.svg'
);
// add FlexForm for article plugin
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['getaccess_confirmation'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'spreadshop_shop',
'FILE:EXT:spreadshop/Configuration/FlexForms/Shop.xml');
});
plugin.tx_spreadshop {
view {
# cat=plugin.tx_spreadshop/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:spreadshop/Resources/Private/Templates/
# cat=plugin.tx_spreadshop/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:spreadshop/Resources/Private/Partials/
# cat=plugin.tx_spreadshop/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:spreadshop/Resources/Private/Layouts/
}
settings {
# cat=plugin.tx_spreadshop//a; type=options[de, net, ie, dk, pl, fi, at, fr, ch, be, co.uk, nl, it, no, se, es]; label=Shop url tld; https://shop.spreadshirt.tld
tld = de
# cat=plugin.tx_spreadshop//a; type=string; label=Shop name / URL Slug
name =
# cat=plugin.tx_spreadshop//a; type=options[EU=https://shop.spreadshirt.net/js/shopclient.nocache.js, US=https://shop.spreadshirt.com/js/shopclient.nocache.js]; label=Shop script
script = https://shop.spreadshirt.net/js/shopclient.nocache.js
# cat=plugin.tx_spreadshop//a; type=options[da_DK, en_EU, en_GB, en_IE, de_DE, de_AT, de_CH, es_ES, fi_FI, fr_BE, fr_CH, fr_FR, it_CH, it_IT, nl_BE, nl_NL, no_NO, pl_PL, sv_SE, en_US, en_CA, en_AU, fr_CA]; label=Locale
tld = de_DE
# cat=plugin.tx_spreadshop//a; type=boolean; label=Update metadata; Automatically change SEO relevant meta data in page header
updateMetadata = 1
# cat=plugin.tx_spreadshop//a; type=boolean; label=Disable Hashbang Parameters (#!/mens+t-shirt?q=bla); needs special htaccess rules if activated
usePushState = 0
# cat=plugin.tx_spreadshop//a; type=string; label=Path to a page in your shop, which should be displayed as start page
startToken =
# cat=plugin.tx_spreadshop//a; type=boolean; label=If you already use a burger menu to navigate your embedded shop, you can disable the Spreadshop burger menu with this parameter and use a swipe menu. Set the parameter to true.
swipeMenu = 0
}
}
page.includeJSFooter {
spreadshirt = {$plugin.tx_spreadshop.settings.script}
spreadshirt.external = 1
spreadshirt.excludeFromConcatenation = 1
spreadshirt.async = 1
}
plugin.tx_spreadshop {
features {
skipDefaultArguments = 1
}
view {
layoutRootPaths {
0 = EXT:spreadshop/Resources/Private/Layouts/
10 = {$plugin.tx_spreadshop.view.layoutRootPath}
}
templateRootPaths {
0 = EXT:spreadshop/Resources/Private/Templates/
10 = {$plugin.tx_spreadshop.view.templateRootPath}
}
partialRootPaths {
0 = EXT:spreadshop/Resources/Private/Partials/
10 = {$plugin.tx_spreadshop.view.partialRootPath}
}
}
settings {
tld = {$plugin.tx_spreadshop.settings.tld}
name = {$plugin.tx_spreadshop.settings.name}
tld = {$plugin.tx_spreadshop.settings.tld}
updateMetadata = {$plugin.tx_spreadshop.settings.updateMetadata}
usePushState = {$plugin.tx_spreadshop.settings.usePushState}
startToken = {$plugin.tx_spreadshop.settings.startToken}
swipeMenu = {$plugin.tx_spreadshop.settings.swipeMenu}
}
}
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0"><file source-language="en" datatype="plaintext" original="messages" date="2013-10-17T10:31:42Z" product-name="spreadshop">
<header/>
<body>
<trans-unit id="flexform.sheets.main">
<source>Shop</source>
</trans-unit>
<trans-unit id="flexform.sheets.main.view">
<source>View</source>
</trans-unit>
<trans-unit id="flexform.sheets.main.view.1">
<source>Show</source>
</trans-unit>
</body>
</file>
</xliff>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>Extension</title><rect width="32" height="32" style="fill:#16b8a9"/><path d="M21.1,3.8,16,9,10.9,3.9,1.3,13.5,16,28.2,30.8,13.5ZM16,23.7,5.7,13.4l5.1-5.1L16,13.5l5-5.1,5.1,5.1Z" style="fill:#fff"/></svg>
\ No newline at end of file
{
"name": "mediaessenz/spreadshop",
"description": "Integrate a spreadshop",
"type": "typo3-cms-extension",
"keywords": [
"TYPO3 CMS",
"plugin",
"spreadshop",
"spreadshirt",
"shop"
],
"homepage": "https://www.typo3-webagentur.com",
"license": "GPL-2.0+",
"support": {
"issues": "https://gitlab.typo3-webagentur.com/mediaessenz/spreadshop/issues"
},
"replace": {
"spreadshop": "self.version",
"typo3-ter/spreadshop": "self.version"
},
"autoload": {
"psr-4": {
"MEDIAESSENZ\\Spreadshop\\": "Classes"
}
}
}
<?php
/***************************************************************
* Extension Manager/Repository config file for ext "spreadshop".
*
* Auto generated 30-04-2019 12:27
*
* Manual updates:
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/
$EM_CONF[$_EXTKEY] = [
'title' => 'Spreadshop',
'description' => 'Integrate a spreadshop',
'category' => 'plugin',
'version' => '0.0.1',
'dependencies' => 'cms',
'state' => 'alpha',
'author' => 'Alexander Grein',
'author_email' => 'alexander.grein@gmail.com',
'author_company' => 'MEDIA::ESSENZ',
'constraints' => [
'depends' => [
'typo3' => '9.5.0-9.5.99',
],
'conflicts' => [
],
'suggests' => [
],
],
'autoload' => [
'psr-4' => [
'MEDIAESSENZ\\Spreadshop\\' => 'Classes'
]
],
];
<?php
defined('TYPO3_MODE') || die();
call_user_func(function ($extensionKey) {
// register plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'MEDIAESSENZ.spreadshop',
'Shop',
[
'Shop' => 'show',
]
);
// register namespace "ss" for fluid
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['ss'][] = 'MEDIAESSENZ\\Spreadshop\\ViewHelpers';
}, 'spreadshop');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment