Skip to content

Commit e3fa0b7

Browse files
committed
#3420 added rootpath to seo api call
1 parent da6989f commit e3fa0b7

File tree

1 file changed

+11
-1
lines changed
  • app/code/community/Styla/Connect/Model/Styla/Api/Request/Type

1 file changed

+11
-1
lines changed

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
}

0 commit comments

Comments
 (0)