Skip to content

Commit

Permalink
New EU Consumer Rights Directive: Changes added according to the guid…
Browse files Browse the repository at this point in the history
…elines
  • Loading branch information
MantasVaitkunas authored and oxidci committed Jun 5, 2014
1 parent 6304ac4 commit c7347d7
Show file tree
Hide file tree
Showing 18 changed files with 620 additions and 413 deletions.
32 changes: 18 additions & 14 deletions source/admin/category_main.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package admin
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package admin
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

/**
Expand Down Expand Up @@ -109,7 +113,7 @@ public function getSortableFields()
, "OXQUESTIONEMAIL", "OXISSEARCH", "OXISCONFIGURABLE", "OXBUNDLEID", "OXFOLDER", "OXSUBCLASS"
, "OXREMINDACTIVE", "OXREMINDAMOUNT", "OXVENDORID", "OXMANUFACTURERID", "OXSKIPDISCOUNTS"
, "OXBLFIXEDPRICE", "OXICON", "OXVARSELECT", "OXAMITEMID", "OXAMTASKID", "OXPIXIEXPORT", "OXPIXIEXPORTED", "OXSORT"
, "OXUPDATEPRICE", "OXUPDATEPRICEA", "OXUPDATEPRICEB", "OXUPDATEPRICEC", "OXUPDATEPRICETIME", "OXISDOWNLOADABLE"
, "OXUPDATEPRICE", "OXUPDATEPRICEA", "OXUPDATEPRICEB", "OXUPDATEPRICEC", "OXUPDATEPRICETIME", "OXISDOWNLOADABLE", "OXSHOWCUSTOMAGREEMENT"
);
$aSkipFields = array_merge($aSkipFields, oxShopMetaData::getInstance()->getShopFields());

Expand Down
50 changes: 37 additions & 13 deletions source/core/oxarticle.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package core
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package core
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

// defining supported link types
Expand Down Expand Up @@ -4649,4 +4653,24 @@ public function hasAmountPrice()

return self::$_blHasAmountPrice;
}

/**
* Returns if article has intangible agreement with which customer will have to agree.
*
* @return bool
*/
public function hasIntangibleAgreement()
{
return $this->oxarticles__oxshowcustomagreement->value && $this->oxarticles__oxnonmaterial->value && !$this->hasDownloadableAgreement();
}

/**
* Returns if article has downloadable agreement with which customer will have to agree.
*
* @return bool
*/
public function hasDownloadableAgreement()
{
return $this->oxarticles__oxshowcustomagreement->value && $this->oxarticles__oxisdownloadable->value;
}
}
68 changes: 55 additions & 13 deletions source/core/oxbasket.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package core
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package core
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

/**
Expand Down Expand Up @@ -2751,4 +2755,42 @@ public function hasDownloadableProducts()
return $this->_blDownloadableProducts;
}

/**
* Returns whether there are any articles in basket with intangible products agreement enabled.
*
* @return bool
*/
public function hasArticlesWithIntangibleAgreement()
{
$blHasArticlesWithIntangibleAgreement = false;
/** @var oxOrderArticle $oOrderArticle */
foreach ($this->_aBasketContents as $oOrderArticle) {
if ($oOrderArticle->getArticle() && $oOrderArticle->getArticle()->hasIntangibleAgreement()) {
$blHasArticlesWithIntangibleAgreement = true;
break;
}
}
return $blHasArticlesWithIntangibleAgreement;
}

/**
* Returns whether there are any articles in basket with downloadable products agreement
enabled.
*
* @return bool
*/
public function hasArticlesWithDownloadableAgreement()
{
$blHasArticlesWithIntangibleAgreement = false;
/** @var oxOrderArticle $oOrderArticle */
foreach ($this->_aBasketContents as $oOrderArticle) {
if ($oOrderArticle->getArticle() && $oOrderArticle->getArticle()->hasDownloadableAgreement()) {
$blHasArticlesWithIntangibleAgreement = true;
break;
}
}

return $blHasArticlesWithIntangibleAgreement;
}

}
36 changes: 23 additions & 13 deletions source/out/admin/de/help_lang.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

/**
Expand Down Expand Up @@ -622,4 +626,10 @@
'HELP_SHOP_RDFA_FNC' => 'Wählen Sie hier die geschäftliche Funktion der Artikel. Werden diese beispielsweise verkauft, vermietet oder repariert?',
'HELP_SHOP_RDFA_COSTUMER' => 'Gibt den Kundentypen an, dem die Artikel des Shops gelten (Endverbraucher, Wiederverkäufer, Unternehmen/Gewerbe und/oder Öffentliche Einrichtungen).',
'HELP_SHOP_RDFA_DURATION_OFFERINGS' => 'Diese Eigenschaft kennzeichnet den Gültigkeitszeitraum von Artikeln, beispielsweise 1 Tag, 1 Woche oder 1 Monat.',
'HELP_ARTICLE_EXTEND_SHOWCUSTOMAGREEMENT' => 'Ist diese Option aktiviert, müssen Benutzer die AGB für diesen Artikel
im vierten Bestellschritt bestätigen. Bitte stellen Sie sicher, dass diese Option auch in den Grundeinstellungen aktiviert ist und dass es
sich um einen immateriellen oder Downloadartikel handelt.',
'HELP_SHOP_CONFIG_ENABLE_INTANGIBLE_PRODUCTS_AGREEMENT' => 'Ist diese Option aktiviert, müssen Benutzer die AGB
für immaterielle oder Downloadartikel im vierten Bestellschritt bestätigen. Bitte aktivieren Sie diese Option auch für die spezifischen
Produkte!'
);
33 changes: 19 additions & 14 deletions source/out/admin/de/lang.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

$sLangName = 'Deutsch';
Expand Down Expand Up @@ -2104,7 +2108,8 @@
'INFO_MODULES_MOVED_TO_EXTENSIONS' => 'Die Einstellungen für Themes und Module finden Sie im neuen Menü "Erweiterungen"',
'EXCEPTION_THEME_SHOULD_BE_ONLY_IN_DATABASE' => 'Theme darf nicht in config.inc.php definiert sein',
'PACKAGE_FILE_NAME' => 'pkg.info',

'ARTICLE_EXTEND_SHOWCUSTOMAGREEMENT' => 'AGB bestätigen',
'SHOP_CONFIG_ENABLE_INTANGIBLE_PRODUCTS_AGREEMENT' => 'Benutzer müssen die AGB für immaterielle und Downloadartikel im Check-out bestätigen'
);

/*
Expand Down
32 changes: 19 additions & 13 deletions source/out/admin/en/help_lang.php
@@ -1,24 +1,28 @@
<?php
/**
* This file is part of OXID eShop Community Edition.
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
* OXID eShop Community Edition 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 3 of the License, or
* (at your option) any later version.
*
* OXID eShop Community Edition 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.
* OXID eShop Community Edition 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.
*
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (C) OXID eSales AG 2003-2014
* @version OXID eShop CE
* @version OXID eShop CE
*
* @link http://www.oxid-esales.com
* @package lang
* @copyright (c) OXID eSales AG 2003-#OXID_VERSION_YEAR#
* @version SVN: $Id$
*/

/**
Expand Down Expand Up @@ -617,4 +621,6 @@
'HELP_SHOP_RDFA_FNC' => 'Select the business function of the products here. For example, are they offered to sell, to lease or to repair?',
'HELP_SHOP_RDFA_COSTUMER' => 'The types of customers for which shop products are valid (End user, Reseller, Business and/or Public).',
'HELP_SHOP_RDFA_DURATION_OFFERINGS' => 'This property specifies the time of the validity of the products, e.g. 1 day, 1 week or 1 month.',
'HELP_ARTICLE_EXTEND_SHOWCUSTOMAGREEMENT' => 'If this option is activated, users have to confirm terms and conditions in the fourth step of the check-out process for this specific item. Please make sure the general option is activated as well and the product item is intangible or downloadable.',
'HELP_SHOP_CONFIG_ENABLE_INTANGIBLE_PRODUCTS_AGREEMENT' => 'If this option is activated, users have to confirm terms and conditions for intangible or downloadable products in the fourth step of the check-out process. Please make sure this option is enabled for the specific item as well!'
);

0 comments on commit c7347d7

Please sign in to comment.