Compare commits

..

14 Commits

6 changed files with 627 additions and 927 deletions

View File

@ -1,19 +1,19 @@
# D³ Content Tabs für OXID eShop # D³ Content Tabs für OXID eShop
Erweiterung der Produktdetailsseite mit weiteren "Tabs". Erweiterung der Produktdetailsseite mit weiteren "Tabs".
Dies ermöglicht es, viele Produktionformationen sauber und übersichtlich aufzulisten. Dies ermöglicht es, viele Produktionformationen sauber und übersichtlich aufzulisten.
[![](https://img.shields.io/badge/Dokumentation-online-brightgreen.svg)](https://docs.oxidmodule.com/Content_Tabs/) [![](https://img.shields.io/badge/Dokumentation-online-brightgreen.svg)](https://docs.oxidmodule.com/Content_Tabs/)
## Systemanforderungen: ## Systemanforderungen:
- installierter OXID eShop - installierter OXID eShop
- PHP-Version, für die Installationspakete verfügbar sind - PHP-Version, für die Installationspakete verfügbar sind
- Installation via Composer - Installation via Composer
- ionCubeLoader - ionCubeLoader
- D3 Modul Connector - D3 Modul Connector
Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen
Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes. Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes.
## Installation: ## Installation:
Eine detaillierte Installationsanleitung finden Sie im docs-Verzeichnis dieses Pakets. Eine detaillierte Installationsanleitung finden Sie im docs-Verzeichnis dieses Pakets.

View File

@ -32,7 +32,7 @@
} }
}, },
"require": { "require": {
"php": "5.6 - 7.0", "ext-ionCube-Loader": "*", "php": "7.1 - 7.4", "ext-ionCube-Loader": "*",
"oxid-esales/oxideshop-ce": "6.0 - 6.5", "oxid-esales/oxideshop-ce": "6.0 - 6.5",
"d3/modcfg": "^5.3.0.000" "d3/modcfg": "^5.3.0.000"
}, },

File diff suppressed because it is too large Load Diff

View File

@ -1,39 +1,19 @@
<?php //006eb <?php //006eb
// This Software is the property of D³ Data Development and is protected by copyright law - it is NOT Freeware. Any unauthorized use of this software without a valid license key is a violation of the license agreement and will be prosecuted by civil and criminal law. Inhaber: Thomas Dartsch Alle Rechte vorbehalten @package ContentTabs @version 4.1.1.0 PHP56 (16.10.2020) @author Daniel Seifert support@shopmodule.com @copyright (C) 2020, D3 Data Development @see http://www.shopmodule.com // This Software is the property of D³ Data Development and is protected by copyright law - it is NOT Freeware. Any unauthorized use of this software without a valid license key is a violation of the license agreement and will be prosecuted by civil and criminal law. Inhaber: Thomas Dartsch Alle Rechte vorbehalten @package ContentTabs @version 4.1.1.0 PHP71 (16.10.2020) @author Daniel Seifert support@shopmodule.com @copyright (C) 2020, D3 Data Development @see http://www.shopmodule.com
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo("Site error: the ".(php_sapi_name()=='cli'?'ionCube':'<a href="http://www.ioncube.com">ionCube</a>')." PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking.\n\nPlease visit ".(php_sapi_name()=='cli'?'get-loader.ioncube.com':'<a href="http://get-loader.ioncube.com">get-loader.ioncube.com</a>')." for install assistance.\n\n");exit(199); if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo("Site error: the ".(php_sapi_name()=='cli'?'ionCube':'<a href="http://www.ioncube.com">ionCube</a>')." PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking.\n\nPlease visit ".(php_sapi_name()=='cli'?'get-loader.ioncube.com':'<a href="http://get-loader.ioncube.com">get-loader.ioncube.com</a>')." for install assistance.\n\n");exit(199);
?> ?>
HR+cPnN3OWzpBLSX2d7tB1eF7eaMSHkVMVrUpE5aS7XLFJIQQjrDBdYygZ/bI9MyamrcDIUbegZc HR+cP+fW8cPyo9P9UTQtHT/46HTkOReJd4JW7Em770958Wn4sBgmvH1AlRGvybwGEWJITPr8v5Xu
iBWB7+iMn+7twt3EtfFRvPAw/S1vfFQoEr8ErZ9FlfRNBZ0dapzF7gquKfq8Xjn6zvDDyVuNmzBW WzaAf4dZamgYx/Pb6TMh/ufPULmgsyyQbbtjK6lMK8n+DGX2XRgvw68ufCjOTGSdNpIaXbBpzxtG
QTLlHh/qivQNkktPM9RsAOLJs5u/XvCKqHIVeYrs4BesJz72NvsO8vYDxWUG1Px8LajTG4o9Lnr7 /Z0oewxINiLATUZxk9PA1/08s+GRXZf3TyXSXl4I2W5J6A3EapyRAOSUBXZjqH/gYOpkpdIjQi3+
xb+TYb4ir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1+izWJTW7XRfn+7OPJz4DU95f
YHp8frjBNbqOyWVwGIZH0crF9RIZGzfkwDMydrHDjm==

View File

@ -1,52 +0,0 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Contenttabs\Modules\Application\Component\Widget;
/**
* Class d3_oxwarticledetails_contenttabs
*/
use D3\Contenttabs\Application\Model\contentTabs as TabsModel;
use D3\Contenttabs\Modules\Application\Model\d3_oxarticle_longtexts;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
class d3_oxwarticledetails_contenttabs extends d3_oxwarticledetails_contenttabs_parent
{
/**
* @return array|null
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
*/
public function d3GetTabs()
{
/** @var d3_oxarticle_longtexts $oArticle */
$oArticle = $this->getProduct();
/** @var TabsModel $oTabs */
$oTabs = oxNew(TabsModel::class, $oArticle);
return $oTabs->getTabs();
}
}

View File

@ -1,260 +0,0 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Contenttabs\Modules\Application\Model;
use D3\Contenttabs\Application\Model\contentTabs as TabsModel;
use D3\Contenttabs\Application\Model\contentTabs;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Field;
/**
* extends Article manager with content tab functionality
*/
class d3_oxarticle_longtexts extends d3_oxarticle_longtexts_parent
{
protected $_aD3ContentTabsSkipSaveFields = array();
private $_sModId = 'd3contenttabs';
/**
* @param string $sOXID
*
* @return bool
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
*/
public function load($sOXID)
{
$blReturn = parent::load($sOXID);
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
/** @var contentTabs $oContentTabs */
$oContentTabs = oxNew( contentTabs::class, $this );
$oContentTabs->addTabFields();
}
return $blReturn;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function save()
{
$blRet = parent::save();
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
/** @var contentTabs $oContentTabs */
$oContentTabs = oxNew( contentTabs::class, $this );
$oContentTabs->saveTabFields();
}
return $blRet;
}
/**
* Deletes record and other information related to this article such as images from DB,
* also removes variants. Returns true if entry was deleted.
*
* @param string $sOXID Article id
*
* @throws \Exception
*
* @return bool
*/
public function delete($sOXID = null)
{
if (!$sOXID) {
$sOXID = $this->getId();
}
if (d3_cfg_mod::get($this->_sModId)->isActive() && $sOXID) {
oxNew( TabsModel::class, $this )->deleteAllLongtexts( $sOXID );
}
return parent::delete($sOXID);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
protected function _skipSaveFields()
{
parent::_skipSaveFields();
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
$this->_aSkipSaveFields = array_merge( $this->_aSkipSaveFields, $this->_aD3ContentTabsSkipSaveFields );
}
}
/**
* @return array
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function getFieldNames()
{
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
/** @var contentTabs $oContentTabs */
$oContentTabs = oxNew( contentTabs::class, $this );
foreach ( $oContentTabs->getNewArticleFields(false == $this->_blEmployMultilanguage) as $sFieldName ) {
$this->_addField( $sFieldName, (int) $oContentTabs->isMultilingualField( $oContentTabs->getTableFieldNameFromArticleField( $sFieldName ) ) );
if ( ! in_array( $sFieldName, $this->_aD3ContentTabsSkipSaveFields ) ) {
$this->_aD3ContentTabsSkipSaveFields[] = $sFieldName;
}
}
}
return parent::getFieldNames();
}
public function getSelectFields($forceCoreTableUsage = null)
{
$sFieldList = parent::getSelectFields();
$viewName = $this->getViewName($forceCoreTableUsage);
$aFieldList = explode(', ', $sFieldList);
foreach ($this->_aD3ContentTabsSkipSaveFields as $sTabField) {
if ($viewName) {
$searchField = "`$viewName`.`$sTabField`";
} else {
$searchField = ".`$sTabField`";
}
$index = array_search($searchField, $aFieldList);
if (false !== $index) {
unset( $aFieldList[ $index ] );
}
}
return implode(', ', $aFieldList);
}
/**
* @return contentTabs
*/
public function d3GetContentTabs()
{
return oxNew(contentTabs::class, $this);
}
/**
* Get article long description
*
* @return object $oField field object
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function getLongDescription()
{
if (false === d3_cfg_mod::get($this->_sModId)->isActive() || $this->d3CanShowTab(1)) {
return parent::getLongDescription();
}
return oxNew(Field::class);
}
/**
* @param $iTab
*
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function d3CanShowTab($iTab)
{
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
return $this->d3GetContentTabs()->canGetLongDescription( $iTab );
}
return false;
}
/**
* @param $iTab
*
* @return mixed|object|Field|string
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function d3GetLongDescriptionTitle($iTab)
{
return $this->d3GetContentTabs()->getLongDescriptionTitleFromArticleObject($iTab);
}
/**
* @param $iTab
*
* @return mixed|object|Field
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function d3GetLongDescription($iTab)
{
if ($iTab == 1) {
return $this->getLongDescription();
}
return $this->d3GetContentTabs()->getLongDescriptionFromArticleObject($iTab);
}
}