Commit 334ff1fa authored by Dirk Wildt's avatar Dirk Wildt

8.15.0

parent fd46bf7b
......@@ -3,6 +3,31 @@ TODO
* 161115: Bug in context with variants: In case of update the quantity by caddy, limits won't respected!
* jquery.t3caddy-4.0.0.js: possible lang is en and de only!
8.15.0
18-12-19
Feature
* #i0278: mini-caddy with counter only. Optimised for menues
Flexform:
* New display mode: [Quantity]
Affected files:
* Classes/Plugins/pi3/class.tx_caddy_pi3.php
* Configuration/FlexForms/Pi3/flexform_sheet_sDEF.xml
* Configuration/TypoScript
* Basis/Plugin/TxCaddyPi1/_constants/templates.ts
* Bootstrap
* 3x/constants.txt
* 4x/constants.txt
* Foundation/5x/constants.txt
New files:
* Resources/Private/Templates
* 2.0.0/caddymini.html
* Bootstrap
* 3x/caddymini.html
* 4x/caddymini.html
* Foundation
* 4x/caddymini.html
* 5x/caddymini.html
8.14.4
18-12-18
Improvement
......
......@@ -33,10 +33,13 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
* @package TYPO3
* @subpackage org
* @author Dirk Wildt <http://wildt.at.die-netzmacher.de>
* @version 8.15.0
* @since 8.7.0
*/
class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
public $ContentObjectRenderer;
public $MarkerBasedTemplateService;
/**
......@@ -52,6 +55,8 @@ class AbstractPlugin extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
parent::__construct();
$this->MarkerBasedTemplateService = GeneralUtility::makeInstance( \Netzmacher\Refresh\Compatibility\Core\Service\MarkerBasedTemplateService::class );
// #i0278, 181219, dwildt, 1+
$this->ContentObjectRenderer = GeneralUtility::makeInstance( \Netzmacher\Refresh\Compatibility\Frontend\ContentObject\ContentObjectRenderer::class );
}
......
......@@ -29,7 +29,7 @@
* @author Dirk Wildt <http://wildt.at.die-netzmacher.de>
* @package TYPO3
* @subpackage tx_caddy
* @version 8.7.4
* @version 8.15.0
* @since 2.0.2
*/
class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
......@@ -126,7 +126,7 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
*
* @return string $content : mini caddy in case of products
* @access private
* @version 2.0.2
* @version 8.15.0
* @since 2.0.2
*/
private function caddyWiProductsItems()
......@@ -136,6 +136,9 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
switch( true )
{
case( $sdefCaddyMode == 'quantity' ):
$tmpl = $this->caddyWiProductsQuantity();
break;
case( $sdefCaddyMode == 'woItems' ):
$tmpl = $this->caddyWiProductsItemsWoItems();
break;
......@@ -150,6 +153,43 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
return $tmpl;
}
/**
* caddyWiProductsQuantity( ) :
*
* @return string $content :
* @access private
* @version 8.15.0
* @since 8.15.0
*/
private function caddyWiProductsQuantity()
{
$tmpl = $this->tmpl[ 'caddyminiquantity' ];
$markerArray[ '###QUANTITY###' ] = $this->caddyWiProductsQuantityTypolink();
$content = $this->MarkerBasedTemplateService->substituteMarkerArrayCached( $tmpl, $markerArray );
return $content;
}
/**
* caddyWiProductsQuantityTypolink( ) :
*
* @return string $content :
* @access private
* @version 8.15.0
* @since 8.15.0
*/
private function caddyWiProductsQuantityTypolink()
{
$method = 'TEXT';
$conf = [
'value' => $this->zz_quantity(),
'typolink.' => [
'parameter'=> $this->conf[ 'pid' ],
]
];
$content = $this->ContentObjectRenderer->cObjGetSingle( $this->local_cObj, $method, $conf );
return $content;
}
/**
* caddyWiProductsItemsWiItems( ) :
*
......@@ -221,10 +261,36 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
*
* @return string $content : mini caddy in case of no products
* @access private
* @version 2.0.2
* @version 8.15.0
* @since 2.0.2
*/
private function caddyWoProducts()
{
$sdefCaddyMode = $this->flexform->sdefCaddyMode;
switch( true )
{
case( $sdefCaddyMode == 'quantity' ):
$content = $this->caddyWoProductsQuantity();
break;
case( $sdefCaddyMode == 'woItems' ):
case( $sdefCaddyMode == 'wiItems' ):
default:
$content = $this->caddyWoProductsItems();
break;
}
return $content;
}
/**
* caddyWoProductsItems( ) :
*
* @return string $content : mini caddy in case of no products
* @access private
* @version 8.15.0
* @since 2.0.2
*/
private function caddyWoProductsItems()
{
$content = $this->tmpl[ 'caddyminiempty' ];
$this->dynamicMarkers->scriptRelPath = $this->scriptRelPath;
......@@ -233,6 +299,20 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
return $content;
}
/**
* caddyWoProductsQuantity( ) :
*
* @return string $content :
* @access private
* @version 8.15.0
* @since 8.15.0
*/
private function caddyWoProductsQuantity()
{
$content = $this->tmpl[ 'caddyminiquantityempty' ];
return $content;
}
/* * *********************************************
*
* Init
......@@ -313,7 +393,7 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
// #i0226, 180312, dwildt, ~
$this->drs = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \Netzmacher\Caddy\Utility\Debug\Drs::class );
// #i0061, 141129, dwildt, 2-/3+
// #i0061, 141129, dwildt, 2-/3+
//$this->drs->pObj = $this;
//$this->drs->row = $this->cObj->data;
$this->drs->setExtConf( $this->arr_extConf );
......@@ -332,7 +412,6 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
// #i0226, 180312, dwildt, ~
$this->session = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \Netzmacher\Caddy\Lib\Session::class );
$this->session->setParentObject( $this );
}
/**
......@@ -373,26 +452,12 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
// DIE : $row is empty
}
/**
* initPowermail( )
*
* @return void
* @access private
* @internal #45915
* @version 2.0.0
* @since 2.0.0
*/
private function initPowermail()
{
$this->powermail->init( $this->cObj->data );
}
/**
* initTemplate( )
*
* @return void
* @access private
* @version 8.7.0
* @version 8.15.0
* @since 2.0.0
*/
private function initTemplate()
......@@ -404,7 +469,6 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
//$template = $this->cObj->fileResource( $fileRessource );
$absFileName = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName( $fileRessource );
$template = file_get_contents( $absFileName );
$markerAll = $this->conf[ 'templates.' ][ 'html.' ][ 'caddymini.' ][ 'marker.' ][ 'all' ];
$markerItem = $this->conf[ 'templates.' ][ 'html.' ][ 'caddymini.' ][ 'marker.' ][ 'item' ];
......@@ -412,6 +476,11 @@ class tx_caddy_pi3 extends \Netzmacher\Caddy\AbstractPlugin
$this->tmpl[ 'items' ] = $this->MarkerBasedTemplateService->getSubpart( $this->tmpl[ 'caddymini' ], $markerItem );
$marker = '###CADDYMINIEMPTY###';
$this->tmpl[ 'caddyminiempty' ] = $this->MarkerBasedTemplateService->getSubpart( $template, $marker );
// #i0278, 181219, dwildt, 4+
$marker = '###CADDYMINIQUANTITY###';
$this->tmpl[ 'caddyminiquantity' ] = $this->MarkerBasedTemplateService->getSubpart( $template, $marker );
$marker = '###CADDYMINIQUANTITYEMPTY###';
$this->tmpl[ 'caddyminiquantityempty' ] = $this->MarkerBasedTemplateService->getSubpart( $template, $marker );
}
/**
......
......@@ -35,6 +35,10 @@
<numIndex index="0">LLL:EXT:caddy/Resources/Private/Language/FlexForms/Pi3/locallang_flexform.xml:sdefCaddyModeWoItems</numIndex>
<numIndex index="1">woItems</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">LLL:EXT:caddy/Resources/Private/Language/FlexForms/Pi3/locallang_flexform.xml:sdefCaddyModeQuantity</numIndex>
<numIndex index="1">quantity</numIndex>
</numIndex>
</items>
<default>woItems</default>
<maxitems>1</maxitems>
......
......@@ -5,7 +5,7 @@ plugin.caddy {
# cat=caddy - templates//201; type=string; label= HTML caddy: Path to the HTML template file, which is used in HTML pages for the caddy (i.e. EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html or caddy_wo_options.html, caddy_wo_options_wo_fee.html)
templates.html.caddy = EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html
# cat=caddy - templates//202; type=string; label= HTML caddy mini: Path to the HTML template file, which is used in HTML pages for the mini caddy (i.e. EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html or caddy_wo_options.html, caddy_wo_options_wo_fee.html)
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/2.0.0/caddymini.html
# cat=caddy - templates//203; type=string; label= HTML caddy sum: Path to the HTML template file, which is used in HTML pages for the caddy sum (i.e. EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html or EXT:caddy/files/templates/caddysum.html)
templates.html.caddysum = EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html
# cat=caddy - templates//301; type=string; label= PDF delivery order: Path to the HTML template file, which is used in the delivery order - a PDF attachment (i.e. EXT:caddy/Resources/Private/Templates/2.0.0/caddy.html or caddy_wo_options.html, caddy_wo_options_wo_fee.html)
......
......@@ -17,5 +17,5 @@ plugin.caddy {
html.powermail.classes.tab =
templates.html.caddy = EXT:caddy/Resources/Private/Templates/Bootstrap/3x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Bootstrap/3x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Bootstrap/3x/caddymini.html
}
\ No newline at end of file
......@@ -17,5 +17,5 @@ plugin.caddy {
html.powermail.classes.tab =
templates.html.caddy = EXT:caddy/Resources/Private/Templates/Bootstrap/4x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Bootstrap/4x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Bootstrap/4x/caddymini.html
}
\ No newline at end of file
......@@ -4,5 +4,5 @@ plugin.caddy {
html.minicaddy.classes.column.2 = small-5 columns caddy-right
templates.html.caddy = EXT:caddy/Resources/Private/Templates/Foundation/5x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Foundation/5x/caddy.html
templates.html.caddymini = EXT:caddy/Resources/Private/Templates/Foundation/5x/caddymini.html
}
\ No newline at end of file
......@@ -15,6 +15,10 @@
<source>Display mode</source>
<target>Anzeigeformat</target>
</trans-unit>
<trans-unit id="sdefCaddyModeQuantity" xml:space="preserve" approved="yes">
<source>Quantity</source>
<target>Menge</target>
</trans-unit>
<trans-unit id="sdefCaddyModeWiItems" xml:space="preserve" approved="yes">
<source>Items and sum</source>
<target>Artikel und Summe</target>
......
......@@ -3,23 +3,33 @@
<file source-language="en" datatype="plaintext" original="messages" date="2018-02-09T18:46:56Z" product-name="caddy">
<header/>
<body>
<trans-unit id="sdef" xml:space="preserve">
<trans-unit id="sdef" xml:space="preserve" approved="yes">
<source>Caddy</source>
<target>Caddy</target>
</trans-unit>
<trans-unit id="sdefDrs" xml:space="preserve">
<trans-unit id="sdefDrs" xml:space="preserve" approved="yes">
<source>DRS: You will get a report in the Developer Log</source>
<target>DRS: Du bekommst einen Bericht im Developer Log</target>
</trans-unit>
<trans-unit id="sdefCaddyMode" xml:space="preserve">
<trans-unit id="sdefCaddyMode" xml:space="preserve" approved="yes">
<source>Display mode</source>
<target>Anzeigeformat</target>
</trans-unit>
<trans-unit id="sdefCaddyModeWiItems" xml:space="preserve">
<trans-unit id="sdefCaddyModeQuantity" xml:space="preserve" approved="yes">
<source>Quantity</source>
<target>Menge</target>
</trans-unit>
<trans-unit id="sdefCaddyModeWiItems" xml:space="preserve" approved="yes">
<source>Items and sum</source>
<target>Artikel und Summe</target>
</trans-unit>
<trans-unit id="sdefCaddyModeWoItems" xml:space="preserve">
<trans-unit id="sdefCaddyModeWoItems" xml:space="preserve" approved="yes">
<source>Sum only (default)</source>
<target>Nur die Summe (Standard)</target>
</trans-unit>
<trans-unit id="sdefPidCaddy" xml:space="preserve">
<trans-unit id="sdefPidCaddy" xml:space="preserve" approved="yes">
<source>Page with the Caddy</source>
<target>Seite mit dem Warenkorb</target>
</trans-unit>
</body>
</file>
......
......@@ -436,7 +436,6 @@ INDEX
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
......@@ -446,6 +445,17 @@ INDEX
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIITEMSAMOUNT### begin -->
<div class="caddymini">
###ITEMSAMOUNT###
</div>
<!-- ###CADDYMINIITEMSAMOUNT### end -->
<!-- ###CADDYMINIITEMSAMOUNTEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIITEMSAMOUNTEMPTY### end -->
<!-- ###CADDYSUM### begin -->
<div class="caddysum">
......
<!-- ###CADDYMINI### begin -->
<div class="caddymini">
<!-- ###ITEMS### beginn -->
###ITEM###
<!-- ###ITEMS### end -->
###SUM###
###_HTMLMARKER_LINKTOCADDY###
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
###_LOCAL_LANG_CADDYMINIEMPTY###
</div>
###_HTMLMARKER_LINKTOSHOP###
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIQUANTITY### begin -->
<div class="caddymini">
###QUANTITY###
</div>
<!-- ###CADDYMINIQUANTITY### end -->
<!-- ###CADDYMINIQUANTITYEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIQUANTITYEMPTY### end -->TY### end -->
\ No newline at end of file
<!-- ###CADDYMINI### begin -->
<div class="caddymini">
<!-- ###ITEMS### beginn -->
###ITEM###
<!-- ###ITEMS### end -->
###SUM###
###_HTMLMARKER_LINKTOCADDY###
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
###_LOCAL_LANG_CADDYMINIEMPTY###
</div>
###_HTMLMARKER_LINKTOSHOP###
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIQUANTITY### begin -->
<div class="caddymini">
###QUANTITY###
</div>
<!-- ###CADDYMINIQUANTITY### end -->
<!-- ###CADDYMINIQUANTITYEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIQUANTITYEMPTY### end -->
\ No newline at end of file
<!-- ###CADDYMINI### begin -->
<div class="caddymini">
<!-- ###ITEMS### beginn -->
###ITEM###
<!-- ###ITEMS### end -->
###SUM###
###_HTMLMARKER_LINKTOCADDY###
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
###_LOCAL_LANG_CADDYMINIEMPTY###
</div>
###_HTMLMARKER_LINKTOSHOP###
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIQUANTITY### begin -->
<div class="caddymini">
###QUANTITY###
</div>
<!-- ###CADDYMINIQUANTITY### end -->
<!-- ###CADDYMINIQUANTITYEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIQUANTITYEMPTY### end -->
\ No newline at end of file
<!-- ###CADDYMINI### begin -->
<div class="caddymini">
<!-- ###ITEMS### beginn -->
###ITEM###
<!-- ###ITEMS### end -->
###SUM###
###_HTMLMARKER_LINKTOCADDY###
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
###_LOCAL_LANG_CADDYMINIEMPTY###
</div>
###_HTMLMARKER_LINKTOSHOP###
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIQUANTITY### begin -->
<div class="caddymini">
###QUANTITY###
</div>
<!-- ###CADDYMINIQUANTITY### end -->
<!-- ###CADDYMINIQUANTITYEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIQUANTITYEMPTY### end -->
\ No newline at end of file
<!-- ###CADDYMINI### begin -->
<div class="caddymini">
<!-- ###ITEMS### beginn -->
###ITEM###
<!-- ###ITEMS### end -->
###SUM###
###_HTMLMARKER_LINKTOCADDY###
</div>
<!-- ###CADDYMINI### end -->
<!-- ###CADDYMINIEMPTY### begin -->
<div class="caddymini caddyminiempty">
<div class="empty">
###_LOCAL_LANG_CADDYMINIEMPTY###
</div>
###_HTMLMARKER_LINKTOSHOP###
</div>
<!-- ###CADDYMINIEMPTY### end -->
<!-- ###CADDYMINIQUANTITY### begin -->
<div class="caddymini">
###QUANTITY###
</div>
<!-- ###CADDYMINIQUANTITY### end -->
<!-- ###CADDYMINIQUANTITYEMPTY### begin -->
<div class="caddymini empty">
0
</div>
<!-- ###CADDYMINIQUANTITYEMPTY### end -->
\ No newline at end of file
......@@ -5,7 +5,7 @@ $EM_CONF[$_EXTKEY] = array(
'description' => 'Caddy - TYPO3 responsive Shopping Cart. Optimised for desktops, tablets and smartphones. Ready-to-use templates for both responsive frameworks: bootstrap and foundation. E-payment with credit cards, debit, paypal and sepa by paymill. E-commerce for small budget and small-scale enterprises. Ready-to-use by Launch Quick Shop! (launchquickshop).',
'category' => 'plugin',
'shy' => 0,
'version' => '8.14.4',
'version' => '8.15.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
......
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