Skip to content

Commit 8171512

Browse files
authored
Merge pull request #35 from styladev/release
Release
2 parents cd01180 + 8c17e9c commit 8171512

File tree

8 files changed

+26
-9
lines changed

8 files changed

+26
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
* 0.2.1.1 (2019-03-12)
2+
* moved seo content in div container
3+
* improved error message on connect failure
4+
* updated cdn.styla.com to client-scripts.styla.com
5+
16
* 0.2.1.0 (2018-12-18)
27
* added support for multiple paths
38
* added support for bundle and grouped products

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Styla Connect (v 0.2.1.0)
1+
# Styla Connect (v 0.2.1.1)
22
---
33

44
Requires:

app/code/community/Styla/Connect/Helper/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Styla_Connect_Helper_Data extends Mage_Core_Helper_Abstract
1919
protected $_apiVersion;
2020

2121
const URL_SEO_PROD = 'http://seo.styla.com/';
22-
const URL_ASSETS_PROD = '//cdn.styla.com/';
22+
const URL_ASSETS_PROD = '//client-scripts.styla.com/';
2323

2424
const URL_PART_JS = 'scripts/clients/%s.js?v=%s';
2525
const URL_PART_CSS = 'styles/clients/%s.css?v=%s';

app/code/community/Styla/Connect/Model/Styla/Api/Oauth/Connector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ public function sendRegistrationRequest($loginData, $consumer, $token)
153153
if (!$apiResponse->isOk()) {
154154
throw new Exception(
155155
"Couldn't connect to Styla API. Error result: " . $apiResponse->getHttpStatus()
156-
. ($apiResponse->getError() ? ' - ' . $apiResponse->getError() : '')
156+
. ($apiResponse->getError() ? ' - ' . $apiResponse->getError() : '') .
157+
". Please check the Email and password used and try connecting one more time. In case still no success, contact Styla."
157158
);
158159
}
159160

app/code/community/Styla/Connect/Model/Styla/Api/Request/Type/Seo.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function getApiUrl()
2323
$apiBaseUrl = $this->getHelper()->getApiSeoUrl();
2424
$clientName = $this->getHelper()->getClientName();
2525

26-
$requestPath = $this->getRequestPath();
26+
$requestPath = $this->getPath();
2727

2828
if (strlen($requestPath) > 1) {
2929
$requestPath = rtrim($requestPath, '/');
@@ -33,4 +33,14 @@ public function getApiUrl()
3333

3434
return $apiUrl;
3535
}
36+
37+
public function getPath()
38+
{
39+
$helper = Mage::helper('styla_connect');
40+
$magazine = $helper->getCurrentMagazine();
41+
$requestPath = $this->getRequestPath();
42+
$fullPath = '/' . $magazine->getFrontName() . '/' . $requestPath;
43+
$cleanedPath = preg_replace('#/+#','/', $fullPath);
44+
return $cleanedPath;
45+
}
3646
}

app/code/community/Styla/Connect/etc/config.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config>
33
<modules>
44
<Styla_Connect>
5-
<version>0.2.1.0</version>
5+
<version>0.2.1.1</version>
66
</Styla_Connect>
77
</modules>
88

@@ -110,7 +110,7 @@
110110
</frontend>
111111
<developer>
112112
<override_seo_url>http://seo.styla.com/</override_seo_url>
113-
<override_cdn_url>//cdn.styla.com/</override_cdn_url>
113+
<override_cdn_url>//client-scripts.styla.com/</override_cdn_url>
114114
<override_api_url>http://live.styla.com/</override_api_url>
115115
</developer>
116116

app/code/community/Styla/Connect/etc/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115

116116
<override_cdn_url translate="label">
117117
<label>Override Url for CDN/Assets</label>
118-
<comment>If filled, use this url instead of the automatically-acquired one. Eg. //cdn.styla.com/</comment>
118+
<comment>If filled, use this url instead of the automatically-acquired one. Eg. //client-scripts.styla.com/</comment>
119119
<frontend_type>text</frontend_type>
120120
<show_in_default>1</show_in_default>
121121
<show_in_website>1</show_in_website>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php /** @var $this Styla_Connect_Block_Magazine_Content */ ?>
22

33
<?php $page = $this->getPage(); ?>
4-
<?php echo $this->getNoscript() ?>
54

65
<div id="stylaMagazine"
76
data-language="<?php echo $page->getLanguageCode() ?>"
8-
data-pluginversion="<?php echo $this->getPluginVersion()?>"></div>
7+
data-pluginversion="<?php echo $this->getPluginVersion()?>">
8+
<?php echo $this->getNoscript() ?>
9+
</div>
910
<script src="<?php echo $page->getScriptUrl()?>" async></script>
1011
<link rel="stylesheet" type="text/css" href="<?php echo $page->getCssUrl() ?>">

0 commit comments

Comments
 (0)