Skip to content

Commit

Permalink
Merge pull request #318 from Nosto/revert-317-revert-316-hotfix/3.9.2
Browse files Browse the repository at this point in the history
Revert "Revert "Show correct price based on include_tax""
  • Loading branch information
olsi-qose authored Apr 23, 2021
2 parents 94216eb + 0b49197 commit f29bc50
Show file tree
Hide file tree
Showing 11 changed files with 466 additions and 272 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.3'
tools: composer, prestissimo
extensions: ast
coverage: none
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.3'
tools: composer, prestissimo
extensions: ast
coverage: none
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.3'
tools: composer, prestissimo
extensions: ast
coverage: none
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '7.3'
tools: composer, prestissimo
extensions: ast
coverage: none
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/phan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: composer, prestissimo, pecl
php-version: '7.3'
tools: composer:v2, prestissimo, pecl
coverage: none
extensions: ast, bcmath, gd, pdo_mysql, zip, soap

#https://github.com/actions/cache/blob/master/examples.md#php---composer
- name: Cache composer packages
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning(http://semver.org/).

## 3.9.2
- Set correct price to variation based on tax include configuration

### 3.9.1
- Add PHPStorm Inspections as a CI build step

Expand Down
2 changes: 1 addition & 1 deletion classes/helpers/NostoHelperPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static function getProductPriceForGroup(
NostoHelperContext::getCurrencyId(),
$groupId,
2,
true,
Group::getPriceDisplayMethod($groupId) == PS_TAX_INC,
$decimals,
false,
$useReduction,
Expand Down
5 changes: 5 additions & 0 deletions classes/helpers/NostoHelperVariation.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public static function getGroupsBeingUsedInSpecificPrices()
$groupIds[] = 0;
}

//make sure it always has 'visitor'
if (!in_array(1, $groupIds, false)) {
$groupIds[] = 1;
}

/** @noinspection PhpParamsInspection */
// @phan-suppress-next-line PhanTypeMismatchArgument
Cache::store($cacheKey, $groupIds);
Expand Down
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
"AFL-3.0"
],
"require": {
"nosto/php-sdk": "5.1.*",
"ext-json": "*",
"ext-dom": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
"ext-posix": "*"
"nosto/php-sdk": "5.3.*"
},
"require-dev": {
"phan/phan": "^2.6",
Expand Down
Loading

0 comments on commit f29bc50

Please sign in to comment.