Skip to content

Commit

Permalink
Sending pluging version while making request to queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Mojtaba Sarooghi committed Nov 16, 2018
1 parent 008575c commit ba062c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/code/community/Queueit/Knownuser/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class Queueit_Knownuser_Model_Observer
{
const MAGENTO_SDK_VERSION = "1.2.0";
/**
* Temporary storage of the cookie value, easier for validation.
*
Expand Down Expand Up @@ -54,15 +55,14 @@ public function handleRequest(Mage_Core_Controller_Request_Http $request, Mage_C

if ($result->doRedirect()) {
$response = $action->getResponse();

if(!$result->isAjaxResult)
{
$response->setRedirect($result->redirectUrl);
$response->setRedirect($result->redirectUrl .'&mg1sdkver='.Queueit_Knownuser_Model_Observer::MAGENTO_SDK_VERSION);
}
else
{
$response->setHeader('HTTP/1.0', 200, true);
$response->setHeader($result->getAjaxQueueRedirectHeaderKey() , $result->getAjaxRedirectUrl());
$response->setHeader($result->getAjaxQueueRedirectHeaderKey() , $result->getAjaxRedirectUrl(). urlencode('&mg1sdkver='.Queueit_Knownuser_Model_Observer::MAGENTO_SDK_VERSION));
}

$response->setHeader('Expires', 'Fri, 01 Jan 1990 00:00:00 GMT');
Expand Down
2 changes: 1 addition & 1 deletion src/app/code/community/Queueit/Knownuser/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Queueit_Knownuser>
<version>1.0.1</version>
<version>1.2.0</version>
</Queueit_Knownuser>
</modules>
<global>
Expand Down

0 comments on commit ba062c8

Please sign in to comment.