-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8513996
Showing
10 changed files
with
872 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Private files | ||
# The following files contain your database credentials and other personal data. | ||
|
||
config/settings.*.php | ||
|
||
# Cache, temp and generated files | ||
# The following files are generated by PrestaShop. | ||
|
||
admin-dev/autoupgrade/ | ||
/cache/* | ||
!/cache/index.php | ||
!/cache/*/ | ||
/cache/*/* | ||
!/cache/cachefs/index.php | ||
!/cache/purifier/index.php | ||
!/cache/push/index.php | ||
!/cache/sandbox/index.php | ||
!/cache/smarty/index.php | ||
!/cache/tcpdf/index.php | ||
config/xml/*.xml | ||
/log/* | ||
*sitemap.xml | ||
themes/*/cache/ | ||
modules/*/config*.xml | ||
|
||
# Site content | ||
# The following folders contain product images, virtual products, CSV's, etc. | ||
|
||
admin-dev/backups/ | ||
admin-dev/export/ | ||
admin-dev/import/ | ||
download/ | ||
/img/* | ||
upload/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# pittica/prestashop-features | ||
|
||
![License](https://img.shields.io/github/license/pittica/prestashop-features) | ||
![Release](https://img.shields.io/github/v/release/pittica/prestashop-features) | ||
|
||
Product features module for [PrestaShop](https://github.com/prestashop/prestashop). | ||
|
||
This module sorts and organizes the product features. | ||
|
||
## Requirements | ||
|
||
[PrestaShop](https://github.com/prestashop/prestashop) version 1.7 or newer. | ||
|
||
## Copyright | ||
|
||
(c) 2020, Pittaca S.r.l.s. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* 2007-2020 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (AFL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <[email protected]> | ||
* @copyright 2007-2020 PrestaShop SA | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*/ | ||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); | ||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); | ||
|
||
header('Cache-Control: no-store, no-cache, must-revalidate'); | ||
header('Cache-Control: post-check=0, pre-check=0', false); | ||
header('Pragma: no-cache'); | ||
|
||
header('Location: ../'); | ||
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
} | ||
], | ||
"settings": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
/** | ||
* 2020 Pittica S.r.l.s. | ||
* | ||
* @author Lucio Benini <[email protected]> | ||
* @copyright 2020 Pittica S.r.l.s. | ||
* @license http://opensource.org/licenses/LGPL-3.0 The GNU Lesser General Public License, version 3.0 ( LGPL-3.0 ) | ||
*/ | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
exit; | ||
} | ||
|
||
class PitticaFeatures extends Module | ||
{ | ||
protected $config_form = false; | ||
|
||
public function __construct() | ||
{ | ||
$this->name = 'pitticafeatures'; | ||
$this->tab = 'front_office_features'; | ||
$this->version = '1.0.0'; | ||
$this->author = 'Pittica'; | ||
$this->need_instance = 1; | ||
|
||
parent::__construct(); | ||
|
||
$this->displayName = $this->l('Features'); | ||
$this->description = $this->l('Sort and organize product features.'); | ||
|
||
$this->ps_versions_compliancy = array( | ||
'min' => '1.7', | ||
'max' => _PS_VERSION_ | ||
); | ||
} | ||
|
||
public function install() | ||
{ | ||
return parent::install() && $this->registerHook('filterProductContent'); | ||
} | ||
|
||
public function hookFilterProductContent($params) | ||
{ | ||
$features = array(); | ||
|
||
if (!empty($params['object']['features'])) { | ||
foreach ($params['object']['features'] as $feature) { | ||
if (empty($features[$feature['id_feature']])) { | ||
$features[$feature['id_feature']] = $feature; | ||
} else { | ||
$features[$feature['id_feature']]['value'] = implode(', ', array( | ||
$features[$feature['id_feature']]['value'], | ||
$feature['value'] | ||
)); | ||
} | ||
} | ||
} | ||
|
||
$params['object']['features'] = $features; | ||
|
||
return $params; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* 2007-2020 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (AFL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <[email protected]> | ||
* @copyright 2007-2020 PrestaShop SA | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*/ | ||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); | ||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); | ||
|
||
header('Cache-Control: no-store, no-cache, must-revalidate'); | ||
header('Cache-Control: post-check=0, pre-check=0', false); | ||
header('Pragma: no-cache'); | ||
|
||
header('Location: ../'); | ||
exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
global $_MODULE; | ||
$_MODULE = array(); | ||
$_MODULE['<{pitticafeatures}prestashop>pitticafeatures_98f770b0af18ca763421bac22b4b6805'] = 'Caratteristiche'; | ||
$_MODULE['<{pitticafeatures}prestashop>pitticafeatures_68dfb48cc3e263bcef7557fcd0962345'] = 'Ordina e organizza le caratteristiche prodotto.'; |