Skip to content

Commit

Permalink
Merge pull request #143 from Nosto/hotfix/release-2.0.2
Browse files Browse the repository at this point in the history
Fix Array Attribution in Frontend Controller
  • Loading branch information
supercid authored Apr 11, 2018
2 parents e618faf + 2357bea commit 3c74dbf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
class Shopware_Plugins_Frontend_NostoTagging_Bootstrap extends Shopware_Components_Plugin_Bootstrap
{
const PLATFORM_NAME = 'shopware';
const PLUGIN_VERSION = '2.0.1';
const PLUGIN_VERSION = '2.0.2';
const MENU_PARENT_ID = 23; // Configuration
const NEW_ENTITY_MANAGER_VERSION = '5.0.0';
const NEW_ATTRIBUTE_MANAGER_VERSION = '5.2.0';
Expand Down
6 changes: 5 additions & 1 deletion 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/).

## [2.0.2]
- Fix PHP backwards compatibility

## [2.0.1]
- Fix builder deleting composer autoloader

Expand Down Expand Up @@ -151,7 +154,8 @@ recommendations
- Initial beta-release


[unreleased]: https://github.com/nosto/nosto-shopware-plugin/compare/2.0.1...develop
[unreleased]: https://github.com/nosto/nosto-shopware-plugin/compare/2.0.2...develop
[2.0.2]: https://github.com/nosto/nosto-shopware-plugin/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/nosto/nosto-shopware-plugin/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/nosto/nosto-shopware-plugin/compare/1.2.6...2.0.0
[1.2.6]: https://github.com/nosto/nosto-shopware-plugin/compare/1.2.5...1.2.6
Expand Down
12 changes: 6 additions & 6 deletions Controllers/frontend/NostoTagging.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ public function oauthAction()
'module' => 'backend',
'controller' => 'index',
'action' => 'index',
'openNosto' => $shop->getId(),
'messageType' => '',
'messageCode' => ''
'openNosto' => $shop->getId()
);

if (!is_null($code)) {
Expand Down Expand Up @@ -164,7 +162,7 @@ public function oauthAction()
Shopware()->Plugins()->Frontend()->NostoTagging()->getLogger()->error($logMessage);
$redirectParams['messageType'] = Nosto::TYPE_ERROR;
$redirectParams['messageCode'] = Nosto::CODE_ACCOUNT_CONNECT;
$redirectParams[] = ['messageText' => $errorDescription];
$redirectParams['messageText'] = $errorDescription;
$this->redirect($redirectParams, array('code' => 302));
} else {
throw new Zend_Controller_Action_Exception('Not Found', 404);
Expand Down Expand Up @@ -280,10 +278,12 @@ private function getAuthenticatedToken(Shopware\Models\Shop\DetachedShop $shop,
$oauthClient = new AuthorizationCode($meta);
$token = $oauthClient->authenticate($code);

if (empty($token->getAccessToken())) {
$accessToken = $token->getAccessToken();
if (empty($accessToken)) {
throw new NostoException('No access token found when trying to sync account from Nosto');
}
if (empty($token->getMerchantName())) {
$merchantName = $token->getMerchantName();
if (empty($merchantName)) {
throw new NostoException('No merchant name found when trying to sync account from Nosto');
}
return $token;
Expand Down
3 changes: 3 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@
<delete file="${buildsrc}/${vendordir}/nosto/php-sdk/package.json"/>
<delete file="${buildsrc}/${vendordir}/nosto/php-sdk/composer.json"/>
<delete file="${buildsrc}/${vendordir}/nosto/php-sdk/src/.env.example"/>
<delete file="${buildsrc}/${vendordir}/nosto/php-sdk/phan.php"/>
<delete file="${buildsrc}/composer.json"/>
<delete file="${buildsrc}/composer.lock"/>
<delete file="${buildsrc}/Dockerfile"/>
<delete file="${buildsrc}/Jenkinsfile"/>
</target>

<target name="updatedependencies">
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": [
"BSD-3-Clause"
],
"version": "2.0.1",
"version": "2.0.2",
"require": {
"php": ">=5.5.0",
"nosto/php-sdk": "3.3.1"
Expand Down

0 comments on commit 3c74dbf

Please sign in to comment.