Skip to content

Commit

Permalink
Merge pull request #5289 from anhredweb/master
Browse files Browse the repository at this point in the history
redSHOP release 3.0.1
  • Loading branch information
anhredweb authored Apr 6, 2020
2 parents eb86df7 + abc7b1b commit d60a96a
Show file tree
Hide file tree
Showing 381 changed files with 24,980 additions and 28,734 deletions.
58 changes: 20 additions & 38 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:

00-setup:
group: 00-setup
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
pull: true
commands:
# Composer setup
Expand All @@ -41,6 +41,9 @@ pipeline:

# npm setup
- while [ ! -f tests/.cache.npm.tmp ]; do sleep 1; done # Comment if not using npm cache
- npm install --save-dev
- npm rebuild node-sass

# - npm install gulp # Uncomment if not using npm cache
- npm audit fix
- composer config -g repo.packagist composer https?://packagist.jp
Expand All @@ -54,7 +57,7 @@ pipeline:
- vendor/bin/robo tests:paid-extensions-for-integration-tests
- cd tests/extension/paid-extensions
- mv gulp-config.sample.json gulp-config.json
- npm install
- npm install --save-dev
- gulp composer
- gulp release --skip-version
- cd ../../..
Expand All @@ -71,7 +74,7 @@ pipeline:

00-setup-73:
group: 00-setup
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
pull: true
environment:
- tests_user=admin
Expand Down Expand Up @@ -101,7 +104,7 @@ pipeline:

01-Group1:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=01-Group1
Expand All @@ -127,7 +130,7 @@ pipeline:

02-Group2:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=02-Group2
Expand All @@ -152,7 +155,7 @@ pipeline:

03-Group3:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=03-Group3
Expand All @@ -174,7 +177,7 @@ pipeline:

04-Group4:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=04-Group4
Expand All @@ -190,14 +193,14 @@ 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/Oder_Backend 0 0'
- 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/Oder_Backend 0 0'

05-Group5:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=05-Group5
Expand All @@ -218,7 +221,7 @@ pipeline:

06-Group6:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=06-Group6
Expand All @@ -238,7 +241,7 @@ pipeline:

07-Group7:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=07-Group7
Expand All @@ -259,7 +262,7 @@ pipeline:

08-Group8:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=08-Group8
Expand All @@ -280,7 +283,7 @@ pipeline:

09-Group9:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=09-Group9
Expand All @@ -301,7 +304,7 @@ pipeline:

10-Group10:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=10-Group10
Expand All @@ -323,7 +326,7 @@ pipeline:

11-Group11:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=11-Group11
Expand All @@ -345,7 +348,7 @@ pipeline:

12-Group12:
group: 01-tests
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_user=admin
- tests_suite=12-Group12
Expand All @@ -364,27 +367,6 @@ pipeline:
- su www-data -c 'vendor/bin/robo tests:run acceptance/integration/g17/Module 0 0'
- su www-data -c 'vendor/bin/robo tests:run acceptance/administrator/g15/Wishlist 0 0'

slack:
image: plugins/slack
webhook: https://hooks.slack.com/services/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
channel: redshop-builds
when:
status: [ success, failure ]
template: >
{{#success build.status}}
{{repo.name}} PR #{{build.pull}} succeeded in {{since build.started}}. Good job {{build.author}}! Here is the build log: {{build.link}}. Link to the PR: https://github.com/{{repo.owner}}/{{repo.name}}/pull/{{build.pull}}
{{else}}
{{repo.name}} PR #{{build.pull}} failed in {{since build.started}}. Fix me please {{build.author}}! Here is the build log: {{build.link}}. Link to the PR: https://github.com/{{repo.owner}}/{{repo.name}}/pull/{{build.pull}}
{{/success}}
error-report:
image: redwebaps/testbox-chromedriver:79.0
commands:
- if [ -z "${CI_PULL_REQUEST}" ]; then export CI_PULL_REQUEST=1; fi
- vendor/bin/robo send:build-report-error-slack redcomponent 365447364384436 Q94UM5kjZkZIrau8MIL93m0dN6U "$CI_REPO" "$CI_PULL_REQUEST" "https://hooks.slack.com/services/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" "#redshop-builds" "$CI_BUILD_URL"
when:
status: [ failure ]

services:
db:
image: mysql/mysql-server:5.7
Expand All @@ -401,7 +383,7 @@ services:
- JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK=1

setup-stages:
image: redwebaps/testbox-chromedriver:79.0
image: redwebaps/testbox-chromedriver:79.0-n12
environment:
- tests_suite=00-setup
- tests_db=setup
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Before you can run any Gulp command you need to:

## 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
- Currently, redSHOP support GULP 4 with all updated dependencies.
### Following tasks and switches are available:
#### Setup gulp config file. Copy and rename `gulp-config.sample.json` file into `gulp-config.json`

Expand Down
2 changes: 1 addition & 1 deletion RoboFile.php
Original file line number Diff line number Diff line change
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.15';
$version = '3.9.16';

$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
2 changes: 2 additions & 0 deletions component/admin/config/config.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,4 +753,6 @@ class RedshopConfig
public $INLINE_EDITING = '1';

public $WISHLIST_LIST = '1';

public $ENABLE_PERFORMANCE_MODE = '0';
}
2 changes: 1 addition & 1 deletion component/admin/controllers/addquotation_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function displayOfflineSubProperty()

foreach ($propertiesId as $propertyId)
{
$response .= $model->replaceSubPropertyData($productId, $accessoryId, $attributeId, $propertyId, $uniqueId);
$response .= $model->replaceSubPropertyData($productId, $accessoryId, $attributeId, $propertyId, $uniqueId, true);
}

echo $response;
Expand Down
22 changes: 17 additions & 5 deletions component/admin/controllers/rating_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,26 @@ public function edit()
parent::display();
}

public function apply()
{
$this->save(1);
}

public function save()
{
$post = $this->input->post->getArray();
$comment = $this->input->post->get('comment', '', 'raw');
$post["comment"] = $comment;
$task = $post['task'];
$cid = $this->input->post->get('cid', 0);

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

$post ['rating_id'] = $cid [0];
$post['rating_id'] = $cid;

/** @var RedshopModelRating_detail $model */
$model = $this->getModel('rating_detail');
$row = $model->store($post);

if ($model->store($post))
if ($row)
{
$msg = JText::_('COM_REDSHOP_RATING_DETAIL_SAVED');
}
Expand All @@ -55,7 +61,13 @@ public function save()
$msg = JText::_('COM_REDSHOP_ERROR_SAVING_RATING_DETAIL');
}

$this->setRedirect('index.php?option=com_redshop&view=rating', $msg);
if ($task == 'rating_detail.apply') {
$ratingId = max((int)$cid, (int)$row['rating_id']);

$this->setRedirect('index.php?option=com_redshop&view=rating_detail&layout=edit&cid=' . $ratingId, $msg);
} else {
$this->setRedirect('index.php?option=com_redshop&view=rating', $msg);
}
}

public function remove()
Expand Down
3 changes: 2 additions & 1 deletion component/admin/controllers/stockroom_listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function saveStock()
$model->storeStockroomQuantity($stockroom_type, $sid[$i], $pid[$i], $quantity[$i], $preorder_stock[$i], $ordered_preorder[$i]);
}

$this->setRedirect('index.php?option=com_redshop&view=stockroom_listing&id=0&stockroom_type=' . $stockroom_type);
$msg = JText::_('COM_REDSHOP_INVENTORY_SAVE_SUCCESSFULLY');
$this->setRedirect('index.php?option=com_redshop&view=stockroom_listing&id=0&stockroom_type=' . $stockroom_type, $msg);
}

public function ResetPreorderStock()
Expand Down
14 changes: 13 additions & 1 deletion component/admin/language/en-GB/en-GB.com_redshop.ini
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ COM_REDSHOP_TOOLTIP_EXPAND_ALL_LBL="Expand All"
COM_REDSHOP_TOOLTIP_EXPAND_ALL="Do you want to expand all?"
COM_REDSHOP_ACCESSORY_THUMB_WIDTH_LBL="Width/height of main accessory thumbnail"
COM_REDSHOP_ACCESSORY_THUMB_WIDTH_LBL_TWO="Width/height of accessory thumbnail #2"
COM_REDSHOP_TOOLTIP_ACCESSORY_THUMB_WIDTH_LBL_TWO="Enter width/height in pixel."
COM_REDSHOP_TOOLTIP_ACCESSORY_THUMB_WIDTH_LBL_TWO="Enter width/height in pixel #2."
COM_REDSHOP_ACCESSORY_THUMB_WIDTH_LBL_THREE="Width/height of accessory thumbnail #3"
COM_REDSHOP_TOOLTIP_CART_THUMB_WIDTH_LBL="Enter width/height in pixel."
COM_REDSHOP_CART_THUMB_WIDTH_LBL="Width/height of Product Thumb in Cart"
Expand Down Expand Up @@ -2664,6 +2664,10 @@ COM_REDSHOP_ACCESS_LEVEL_SAVED="Access Level Saved."
COM_REDSHOP_ERROR_ACCESS_LEVEL_SAVED="Error in access level saved."
COM_REDSHOP_ACCESS_LEVEL_CANCEL="Access Level Cancelled."
COM_REDSHOP_ABOUT="About"
COM_REDSHOP_PERFORMANCE="Performance"
COM_REDSHOP_PERFORMANCE_SETTING="Performance Settings"
COM_REDSHOP_TOOLTIP_PERFORMANCE_SETTING="Performance Settings"
COM_REDSHOP_ENABLE_PERFORMANCE_MODE="Enable Performance Mode"
COM_REDSHOP_BACKWARD_COMPATIBLE="Backward compatible"
COM_REDSHOP_BACKWARD_COMPATIBLE_JS_SCRIPT="Javascript backward compatible"
COM_REDSHOP_BACKWARD_COMPATIBLE_JS_SCRIPT_TOOLTIP="Enable load JS backward compatible for defined variables."
Expand Down Expand Up @@ -3592,6 +3596,7 @@ COM_REDSHOP_TEMPLATE_TAG_CATEGORY_NAME="{category_name} %s category name"
COM_REDSHOP_TEMPLATE_TAG_CATEGORY_DESCRIPTION="{category_description} %s category description"
COM_REDSHOP_TEMPLATE_TAG_CATEGORY_SHORT_DESC="{category_short_desc} %s category short description"
COM_REDSHOP_TEMPLATE_TAG_CATEGORY_THUMB_IMAGE="{category_thumb_image} %s category thumb image"
COM_REDSHOP_TEMPLATE_TAG_CATEGORY_BACK_THUMB_IMAGE="{category_back_thumb_image} %s category back thumb image"
COM_REDSHOP_TEMPLATE_TAG_CATEGORY_INCLUDE_PRODUCT_IN_SUB_CAT="{include_product_in_sub_cat} %s Include products from sub-categories of this category"
COM_REDSHOP_TEMPLATE_TAG_PRODUCT_PRICE_LBL="{product_price_lbl} %s Product Price Label"
COM_REDSHOP_TEMPLATE_TAG_PRODUCT_PRICE_SLIDER="{product_price_slider} %s Product Price Slider"
Expand Down Expand Up @@ -4459,6 +4464,13 @@ COM_REDSHOP_ATTRIBUTE_IMAGE="Attribute Image"
COM_REDSHOP_UPDATE_REDSHOPUPDATE211_FIXCALENDARFORMFIELD="Fix calendar form field"
COM_REDSHOP_UPDATE_REDSHOPUPDATE211_CLEANOLDFILES="Clean unused files and folders"

;redSHOP 3.0.1
COM_REDSHOP_INVENTORY_SAVE_SUCCESSFULLY="Inventory save successfully"
COM_REDSHOP_PLEASE_ENTER_COUNTRY="Please enter country"
COM_REDSHOP_CHOOSE_SELECTION="Please first make a selection from the list"
COM_REDSHOP_TOOLTIP_ACCESSORY_THUMB_WIDTH_LBL="Enter width/height in pixel."
COM_REDSHOP_TOOLTIP_ACCESSORY_THUMB_WIDTH_LBL_THREE="Enter width/height in pixel #3."

; HTML Grid
COM_REDSHOP_GRID_SLIDERTEXT_MORE="More"
COM_REDSHOP_GRID_SLIDERTEXT_LESS="Less"
Expand Down
10 changes: 5 additions & 5 deletions component/admin/layouts/templates/template_tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
?>
<h3><?php echo JText::_('COM_REDSHOP_TEMPLATE_TAG_CATEGORY_HINT'); ?></h3>
{if subcats} {category_main_description} {category_main_short_desc} {category_main_name} {category_main_thumb_image} {subproductlimit:X} {subcats end if} <br />
{category_loop_start} {category_loop_end} {category_name} {category_description} {category_short_desc} {category_thumb_image} <br />
{category_loop_start} {category_loop_end} {category_name} {category_description} {category_short_desc} {category_thumb_image} {category_back_thumb_image} {category_thumb_image} <br />
{product_price_lbl} {product_price_slider} {include_product_in_sub_cat} {product_loop_start} {product_loop_end} {product_name} {product_price} {product_rating_summary} {product_s_desc} <br />
{pagination} {perpagelimit:X} {product_display_limit} {show_all_products_in_category} {order_by} {if product_on_sale} {product_on_sale end if} {price_excluding_vat} <br />
{more_documents} {product_id_lbl} {product_id} {product_number_lbl} {product_number} {product_discount_price} {product_old_price} {product_price_saving} {product_price_saving_percentage} {with_vat} {without_vat} {filter_by} <br />
Expand All @@ -141,7 +141,7 @@
case 'category_product':
?>
<b><?php echo JText::_('COM_REDSHOP_TEMPLATE_TAG_CATEGORY_PRODUCT_HINT'); ?></b><br /><br />
{print} {filter_by_lbl} {filter_by} {order_by_lbl} {order_by} {category_frontpage_introtext} {template_selector_category} {template_selector_category_lbl} {category_loop_start} {category_thumb_image} {category_name} {category_description} {category_thumb_image_2} {category_thumb_image_3} {category_readmore} {category_short_desc} {category_total_product_lbl} {category_total_product} {product_loop_start} {product_thumb_image} {product_name} {product_price} {read_more} {attribute_template:attributes} {form_addtocart:add_to_cart1} {product_id_lbl} {product_id} {product_thumb_image_3} {product_thumb_image_2} {product_number_lbl} {product_number} {product_size} {product_length} {product_width} {product_height} {read_more_link} {product_s_desc} {product_desc} {product_rating_summary} {manufacturer_link} {manufacturer_name} {manufacturer_product_link} {if product_userfield} {product_userfield end if} {product_loop_end} {category_loop_end} {pagination}
{print} {filter_by_lbl} {filter_by} {order_by_lbl} {order_by} {category_frontpage_introtext} {template_selector_category} {template_selector_category_lbl} {category_loop_start} {category_thumb_image} {category_back_thumb_image} {category_name} {category_description} {category_thumb_image_2} {category_thumb_image_3} {category_readmore} {category_short_desc} {category_total_product_lbl} {category_total_product} {product_loop_start} {product_thumb_image} {product_name} {product_price} {read_more} {attribute_template:attributes} {form_addtocart:add_to_cart1} {product_id_lbl} {product_id} {product_thumb_image_3} {product_thumb_image_2} {product_number_lbl} {product_number} {product_size} {product_length} {product_width} {product_height} {read_more_link} {product_s_desc} {product_desc} {product_rating_summary} {manufacturer_link} {manufacturer_name} {manufacturer_product_link} {if product_userfield} {product_userfield end if} {product_loop_end} {category_loop_end} {pagination}
<?php
break;
case 'change_cart_attribute':
Expand Down Expand Up @@ -200,7 +200,7 @@
case 'frontpage_category':
?>
<b><?php echo JText::_('COM_REDSHOP_TEMPLATE_TAG_FRONTPAGE_CATEGORY_HINT'); ?></b><br /><br />
{category_frontpage_introtext} {category_frontpage_loop_start} {category_thumb_image} {category_name} {category_frontpage_loop_end} {pagination} {print} {category_thumb_image_2} {category_thumb_image_3} {category_readmore} {category_description} {category_short_desc} {category_total_product} {category_total_product_lbl}
{category_frontpage_introtext} {category_frontpage_loop_start} {category_thumb_image} {category_back_thumb_image} {category_name} {category_frontpage_loop_end} {pagination} {print} {category_thumb_image_2} {category_thumb_image_3} {category_readmore} {category_description} {category_short_desc} {category_total_product} {category_total_product_lbl}
<?php
break;
case 'giftcard':
Expand Down Expand Up @@ -467,9 +467,9 @@
case 'wishlist':
?>
<b><?php echo JText::_('COM_REDSHOP_TEMPLATE_TAG_WISHLIST_HINT'); ?></b><br /><br />
{if product_userfield} {product_userfield end if} {all_cart} {attribute_template:attributes} {product_loop_start} {product_loop_end} {mail_link} {product_price} {remove_product_link} <br />
{if product_userfield} {product_userfield end if} {all_cart} {product_loop_start} {product_loop_end} {mail_link} {product_price} {remove_product_link} <br />
{product_thumb_image} {product_name} {back_link} {product_thumb_image_2} {product_thumb_image_3} <br />
{price_excluding_vat} {product_price_table} {product_old_price} {product_price_saving} {product_price_saving_percentage} {accessory_template:templatename} {product_s_desc} {read_more} {read_more_link}
{price_excluding_vat} {product_price_table} {product_old_price} {product_price_saving} {product_price_saving_percentage} {product_s_desc} {read_more} {read_more_link}
<?php
break;
case 'wishlist_mail':
Expand Down
11 changes: 8 additions & 3 deletions component/admin/models/addquotation_detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public function getUserData($user_id = 0, $billing = "", $user_info_id = 0)
}


public function replaceSubPropertyData($productId = 0, $accessoryId = 0, $attributeId = 0, $propertyId = 0, $uniqueid = "")
public function replaceSubPropertyData($productId = 0, $accessoryId = 0, $attributeId = 0, $propertyId = 0, $uniqueid = "", $isTripTags = false)
{

$subproperty = array();
Expand Down Expand Up @@ -576,9 +576,14 @@ public function replaceSubPropertyData($productId = 0, $accessoryId = 0, $attrib
{
$attributes_subproperty_vat = RedshopHelperProduct::getProducttax($productId, $subproperty[$i]->subattribute_color_price);
$subproperty [$i]->subattribute_color_price += $attributes_subproperty_vat;
$subpropertyPrice = RedshopHelperProductPrice::formattedPrice($subproperty [$i]->subattribute_color_price);

if ($isTripTags) {
$subpropertyPrice = strip_tags($subpropertyPrice);
}

$subproperty [$i]->text = urldecode($subproperty [$i]->subattribute_color_name)
. " (" . $subproperty [$i]->oprand
. RedshopHelperProductPrice::formattedPrice($subproperty [$i]->subattribute_color_price) . ")";
. " (" . $subproperty [$i]->oprand . $subpropertyPrice . ")";
}
else
{
Expand Down
Loading

0 comments on commit d60a96a

Please sign in to comment.