Skip to content

Commit

Permalink
Merge pull request #5201 from anhredweb/3.0
Browse files Browse the repository at this point in the history
Release redSHOP 3.0
  • Loading branch information
anhredweb authored Mar 3, 2020
2 parents fe63e70 + 1902950 commit eb86df7
Show file tree
Hide file tree
Showing 891 changed files with 42,515 additions and 39,504 deletions.
29 changes: 15 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pipeline:
- mv /opt/cache/redSHOP/node_modules .
- touch tests/.cache.npm.tmp
# Joomla CMS
- mv /opt/cache/joomla-cms tests
- touch tests/.cache.joomla-cms.tmp
# - mv /opt/cache/joomla-cms tests
# - touch tests/.cache.joomla-cms.tmp

00-setup:
group: 00-setup
Expand Down Expand Up @@ -62,8 +62,8 @@ pipeline:
# Codeception setup
- cp tests/acceptance.suite.yml.dist.drone tests/acceptance.suite.yml
# Test setup
- while [ ! -f tests/.cache.joomla-cms.tmp ]; do sleep 1; done # Comment if not using Joomla CMS cache
# - vendor/bin/robo tests:site-preparation 0 0
# - while [ ! -f tests/.cache.joomla-cms.tmp ]; do sleep 1; done # Comment if not using Joomla CMS cache
- vendor/bin/robo tests:site-preparation 0 0
# Ownership for uid 82
- chown -R www-data:www-data .
# Touching temp file to start the setup of each installation (in each PHP version - via services)
Expand Down Expand Up @@ -122,6 +122,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g02 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g03 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g04 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g13 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/uninstall 0 0'

02-Group2:
Expand Down Expand Up @@ -167,8 +168,8 @@ pipeline:
# Waits until Chromedriver is up and running
- while ! nc -z localhost 9515; do sleep 1; done
# Performs test
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g15/Product_Price 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g05 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g06 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g07 0 0'

04-Group4:
Expand All @@ -192,7 +193,6 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g08 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g10 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g11 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g13 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/Oder_Backend 0 0'

05-Group5:
Expand All @@ -213,7 +213,7 @@ pipeline:
# Waits until Chromedriver is up and running
- while ! nc -z localhost 9515; do sleep 1; done
# Performs test
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g15/Product_Price 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g06 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g09 0 0'

06-Group6:
Expand All @@ -237,7 +237,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/install/extension 0 0'

07-Group7:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand All @@ -258,7 +258,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g15 0 0'

08-Group8:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand All @@ -279,7 +279,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g16 0 0'

09-Group9:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand All @@ -300,7 +300,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g11 0 0'

10-Group10:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand All @@ -322,7 +322,7 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g17 0 0'

11-Group11:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand All @@ -339,11 +339,12 @@ pipeline:
# Waits until Chromedriver is up and running
- while ! nc -z localhost 9515; do sleep 1; done
# Performs test
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g17/Plugins 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g17/Plugins/payment 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g17/Plugins/Shipping 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g17/Category 0 0'

12-Group12:
group: 02-tests
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
environment:
- tests_user=admin
Expand Down
45 changes: 26 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
redSHOP 2.x
redSHOP 3.x
==========

[![Build Status](https://travis-ci.com/redCOMPONENT-COM/redSHOP.svg?token=exSzjzLhFrzHef99DDg1&branch=develop)](https://travis-ci.com/redCOMPONENT-COM/redSHOP) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/redCOMPONENT-COM/redSHOP/badges/quality-score.png?b=develop&s=f945d89ef335953761803d0e0f0e37d5fecf0b62)](https://scrutinizer-ci.com/g/redCOMPONENT-COM/redSHOP/?branch=develop)

redSHOP 3.x is a major release and breaking change version, including a lot of enhancement in core and bugs fixes. The new version is opened for people to contribute new features, bugs fixes, improvements.

## Requirement
- For redSHOP version **<= 2.1.4**: PHP Version: **>= 5.6**
- For redSHOP version **>= 2.1.5**: PHP Version: **>= 7.0**
Expand Down Expand Up @@ -36,6 +38,12 @@ There are an MySQL Workbench DB Model file in src/db/redshop.mwb. When need some

> SET SQL_MODE=@OLD_SQL_MODE;
## Twig template engine support

- Twig library is ready and embeded into redSHOP.
- Almost tags system of redSHOP using Twig template instead of PHP inline
- Remaining layouts, views of redSHOP is moving to Twig and PHP Inline will be deprecated soon.

## Release process for redSHOP
Please follow the next steps in order to release a new version of redSHOP.

Expand All @@ -50,6 +58,17 @@ Before you can run any Gulp command you need to:
- install Gulp: `npm install --save gulp-install`
- install joomla-gulp-release: `sudo npm install --save-dev joomla-gulp-release`

## Using NodeJS version >= 10 on redSHOP

- download and install NodeJS https://nodejs.org/download/. If you need to update NodeJS do as bellow:
- install: `npm install -g n`
- update Node to version you want, example NodeJS 2: `sudo n 12`
- npm install: `npm install --save-dev`
- rebuild node-sass: `npm rebuild node-sass`

## Gulp 4 support

- we will support gulp task rewritten in version 4 very soon. Currently, all gulp script are executed properly with version 3.9
### Following tasks and switches are available:
#### Setup gulp config file. Copy and rename `gulp-config.sample.json` file into `gulp-config.json`

Expand All @@ -63,25 +82,11 @@ Before you can run any Gulp command you need to:

#### To Release `modules` and create `.zip` file

gulp release:modules
gulp release:module

#### To Release `plugins` and create `.zip` file

gulp release:plugins

#### To Release `packages` and create `.zip` file

gulp release:packages

_or_

gulp release:packages --folder ./individual_package_dir


This command is to release the extensions.

gulp release:extensions

gulp release:plugin

This command will read the base directory and create zip files for each of the folder.

Expand Down Expand Up @@ -163,6 +168,8 @@ _Or Compare across versions_
- Create the release: https://github.com/redCOMPONENT-COM/redSHOP/releases
- Add a description to the release with the changelog information that you generated in the previous step


# Testing
See: [testing redSHOP1](./tests/README.md)
See: [testing redSHOP](./tests/README.md)

# redSHOP Road map
Will be updated here soon.
4 changes: 2 additions & 2 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Or do: $ composer update, and afterwards you will be able to execute robo like $ php vendor/bin/robo
*
* @see http://robo.li/
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
require_once 'vendor/autoload.php';
Expand Down Expand Up @@ -64,7 +64,7 @@ public function testsSitePreparation($use_htaccess = 1, $cleanUp = 1)
* When joomla Staging branch has a bug you can uncomment the following line as a tmp fix for the tests layer.
* Use as $version value the latest tagged stable version at: https://github.com/joomla/joomla-cms/releases
*/
$version = '3.9.14';
$version = '3.9.15';

$this->_exec("git clone -b $version --single-branch --depth 1 https://github.com/joomla/joomla-cms.git tests/joomla-cms");
$this->say("Joomla CMS ($version) site created at tests/joomla-cms");
Expand Down
20 changes: 11 additions & 9 deletions component/admin/controllers/accountgroup_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ public function __construct($default = array())
$this->registerTask('add', 'edit');
}

/**
* Edit
*
* @return void
*/
public function edit()
/**
* @param bool $cachable
* @param array $urlparams
*/
public function edit($cachable = false, $urlparams = [])
{
$this->input->set('view', 'accountgroup_detail');
$this->input->set('layout', 'default');
$this->input->set('hidemainmenu', 1);
parent::display();

parent::display($cachable, $urlparams);
}

/**
Expand Down Expand Up @@ -79,7 +79,8 @@ public function save($apply = 0)

if ($apply == 1)
{
$this->setRedirect('index.php?option=com_redshop&view=accountgroup_detail&task=edit&cid[]=' . $row->accountgroup_id, $msg);
$this->setRedirect('index.php?option=com_redshop&view=accountgroup_detail&task=edit&cid[]='
. $row->accountgroup_id, $msg);
}
else
{
Expand All @@ -94,7 +95,8 @@ public function save($apply = 0)
*/
public function cancel()
{
$this->setRedirect('index.php?option=com_redshop&view=accountgroup', JText::_('COM_REDSHOP_ACCOUNTGROUP_DETAIL_EDITING_CANCELLED'));
$this->setRedirect('index.php?option=com_redshop&view=accountgroup',
JText::_('COM_REDSHOP_ACCOUNTGROUP_DETAIL_EDITING_CANCELLED'));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions component/admin/controllers/addorder_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ public function changeshippingaddress()
{
$shippingadd_id = $this->input->getInt('shippingadd_id', 0);
$user_id = $this->input->getInt('user_id', 0);
$is_company = $this->input->getInt('is_company', 0);
$isCompany = $this->input->getInt('is_company', 0);

/** @var RedshopModelAddorder_detail $model */
$model = $this->getModel('addorder_detail');

$htmlshipping = $model->changeshippingaddress($shippingadd_id, $user_id, $is_company);
$htmlshipping = $model->changeshippingaddress($shippingadd_id, $user_id, $isCompany);

echo $htmlshipping;

Expand Down
18 changes: 10 additions & 8 deletions component/admin/controllers/attribute_set_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ public function property_more_img()
{
$model->property_more_img($post, $main_img, $sub_img);
?>
<script language="javascript" type="text/javascript">
window.parent.SqueezeBox.close();
</script>
<script language="javascript" type="text/javascript">
window.parent.SqueezeBox.close();
</script>
<?php
}
}
Expand Down Expand Up @@ -337,9 +337,9 @@ public function subattribute_color()
$model->subattribute_color($post, $sub_img);

?>
<script language="javascript" type="text/javascript">
window.parent.SqueezeBox.close();
</script>
<script language="javascript" type="text/javascript">
window.parent.SqueezeBox.close();
</script>
<?php
}

Expand Down Expand Up @@ -383,20 +383,22 @@ public function saveAttributeStock()

/** @var RedshopModelAttribute_set_detail $model */
$model = $this->getModel('attribute_set_detail');
$type = '';

if ($model->SaveAttributeStockroom($post))
{
$msg = JText::_('COM_REDSHOP_STOCKROOM_ATTRIBUTE_XREF_SAVE');
}
else
{
$msg = JText::_('COM_REDSHOP_ERROR_SAVING_STOCKROOM_ATTRIBUTE_XREF');
$type = 'error';
$msg = JText::_('COM_REDSHOP_ERROR_SAVING_STOCKROOM_ATTRIBUTE_XREF');
}

$link = "index.php?tmpl=component&option=com_redshop&view=product_detail&section_id="
. $post['section_id'] . "&cid=" . $post['cid'] . "&layout=productstockroom&property=" . $post['section'];

$this->setRedirect($link, $msg);
$this->setRedirect($link, $msg, $type);
}

public function copy()
Expand Down
10 changes: 8 additions & 2 deletions component/admin/controllers/attributeprices_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function save()

$cid = $this->input->post->get('cid', array(0), 'array');
$post ['price_id'] = $cid [0];
$type = '';

/** @var RedshopModelAttributeprices_detail $model */
$model = $this->getModel('attributeprices_detail');
Expand All @@ -54,10 +55,15 @@ public function save()
}
else
{
$msg = JText::_('COM_REDSHOP_ERROR_SAVING_PRICE_DETAIL');
$type = 'error';
$msg = /** @scrutinizer ignore-deprecated */ $model->/** @scrutinizer ignore-call */ getError();

if (empty($msg)) {
$msg = JText::_('COM_REDSHOP_ERROR_SAVING_PRICE_DETAIL');
}
}

$this->setRedirect('index.php?tmpl=component&option=com_redshop&view=attributeprices&section=' . $section . '&section_id=' . $section_id, $msg);
$this->setRedirect('index.php?tmpl=component&option=com_redshop&view=attributeprices&section=' . $section . '&section_id=' . $section_id, $msg, $type);
}

public function remove()
Expand Down
2 changes: 1 addition & 1 deletion component/admin/controllers/attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package RedSHOP.Backend
* @subpackage Controller
*
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion component/admin/controllers/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package RedSHOP.Backend
* @subpackage Controller
*
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion component/admin/controllers/country.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package RedSHOP.Backend
* @subpackage Controller
*
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion component/admin/controllers/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package RedSHOP.Backend
* @subpackage Controller
*
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion component/admin/controllers/mass_discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package RedSHOP.Backend
* @subpackage Controller
*
* @copyright Copyright (C) 2008 - 2019 redCOMPONENT.com. All rights reserved.
* @copyright Copyright (C) 2008 - 2020 redCOMPONENT.com. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
Loading

0 comments on commit eb86df7

Please sign in to comment.