Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
3.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
James Pickard committed Mar 3, 2015
1 parent dde5e86 commit a9c91f5
Show file tree
Hide file tree
Showing 99 changed files with 7,982 additions and 145 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Please note that this is a public repo designed to aid developers on what has ch

This repo only receives one commit per version which is a combined (squashed) commit of changes from the prior version.

Developers are welcome to post Issues here, but please be advised this forum is not considered part of our active support (although we do monitor it and try to update as time allows). Immediate technical support should always go through http://my.lightspeedretail.com. Issues posted here should be very specific to the code, not general support.
Developers are welcome to post Issues here, but please be advised this forum is not considered part of our active support (although we do monitor it and try to update as time allows). Immediate technical support should always go through http://my.lightspeedpos.com. Issues posted here should be very specific to the code, not general support.

5 changes: 4 additions & 1 deletion core/protected/components/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ public static function getCheckoutJSOptions()
{
return CJSON::encode(array(
'applyButtonLabel' => Yii::t('checkout', 'Apply'),
'removeButtonLabel' => Yii::t('checkout', 'Remove')
'removeButtonLabel' => Yii::t('checkout', 'Remove'),
'applyPromoCodeEndpoint' => Yii::app()->createUrl('cart/applypromocodemodal'),
'removePromoCodeEndpoint' => Yii::app()->createUrl('cart/removepromocodemodal'),
'clearCartEndpoint' => Yii::app()->createUrl('cart/clearcart')
));
}

Expand Down
10 changes: 5 additions & 5 deletions core/protected/components/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function initParams()
//We should never see this, this means our cloud cache file is bad
$strHostfile = realpath(dirname(__FILE__)).'/../../../config/cloud/'.$_SERVER['HTTP_HOST'].".php";
@unlink($strHostfile);
Yii::app()->request->redirect('/');
Yii::app()->request->redirect(Yii::app()->createUrl('site/index'));
}


Expand All @@ -133,7 +133,7 @@ public function init()
if(!downloadTheme(DEFAULT_THEME))
die("missing ".DEFAULT_THEME);
else
$this->redirect("/");
$this->redirect(Yii::app()->createUrl("site/index"));
}
if(!Yii::app()->theme)
{
Expand All @@ -147,7 +147,7 @@ public function init()
'error',
'application.' . __CLASS__ . "." . __FUNCTION__
);
$this->redirect("/");
$this->redirect(Yii::app()->createUrl('site/index'));

} else
die("you have no theme set");
Expand Down Expand Up @@ -456,14 +456,14 @@ protected function getFacebookLogin()
{
//we've lost our authentication, user may have revoked
Yii::app()->facebook->destroySession();
$this->redirect(array("/site"));
$this->redirect(Yii::app()->createUrl("site/index"));
}
$identity=new FBIdentity($results['email'],$userid); //we user userid in the password field
$identity->authenticate();
if($identity->errorCode===UserIdentity::ERROR_NONE)
{
Yii::app()->user->login($identity,0);
$this->redirect(array("/site"));
$this->redirect(Yii::app()->createUrl("site/index"));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions core/protected/config/wsver.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

define('XLSWS_VERSION', '3.2.3');
define('XLSWS_VERSIONBUILD', 300200300);
define('XLSWS_BUILDDATE', 'webstore-2015-02-19-1602');
define('XLSWS_VERSION', '3.2.4');
define('XLSWS_VERSIONBUILD', 300200400);
define('XLSWS_BUILDDATE', 'webstore-2015-02-27-1523');
40 changes: 22 additions & 18 deletions core/protected/controllers/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function actionUpdateCart()
);
}

$this->redirect(array('/cart'));
$this->redirect(Yii::app()->createUrl('cart'));
}

/**
Expand Down Expand Up @@ -195,7 +195,7 @@ public function actionReceipt()
$strLink = Yii::app()->getRequest()->getQuery('getuid');
if (empty($strLink))
{
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
}

//Use our class variable which is accessible from the view
Expand All @@ -211,10 +211,8 @@ public function actionReceipt()

if (Yii::app()->theme->info->advancedCheckout === true)
{
// For the thankyou page, we don't want to go through createUrl
// since generally speaking /checkout routes are passed through
// commonssl. We don't want to do that here. See WS-3285.
$this->redirect('/checkout/thankyou/' . $strLink);
$url = Yii::app()->createUrl('checkout/thankyou', array('linkid' => $strLink));
$this->redirect($url);
}

// If we have a document that supersedes our cart, then let's copy some
Expand Down Expand Up @@ -260,7 +258,7 @@ public function actionShare()
$strLink = Yii::app()->getRequest()->getQuery('code');
if (empty($strLink))
{
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
}

//Use our class variable which is accessible from the view
Expand All @@ -277,11 +275,11 @@ public function actionShare()

Yii::app()->user->setFlash('success', Yii::t('cart', 'The shared cart items have been added to your cart.'));
//And go to cart view
Yii::app()->controller->redirect(array('/cart'));
Yii::app()->controller->redirect(Yii::app()->createUrl('cart'));
} else {
Yii::app()->user->setFlash('error', Yii::t('cart', 'Cart not found or has already been checked out.'));
//Go to home page
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
}
}

Expand All @@ -293,13 +291,13 @@ public function actionQuote()
$strLink = Yii::app()->getRequest()->getQuery('code');
if (empty($strLink))
{
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
}

if (Yii::app()->shoppingcart->totalItemCount > 0)
{
Yii::app()->user->setFlash('error', Yii::t('cart', 'You have items in your cart already. A quote cannot be merged with an existing shopping cart. Please complete your checkout or clear your cart and try again.'));
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
return;
}

Expand Down Expand Up @@ -334,11 +332,11 @@ public function actionQuote()
}

//And go to cart view
Yii::app()->controller->redirect(array('/cart'));
Yii::app()->controller->redirect(Yii::app()->createUrl('cart'));
} else {
Yii::app()->user->setFlash('error', Yii::t('cart', 'Quote not found.'));
//Go to home page
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
}
}

Expand Down Expand Up @@ -381,7 +379,8 @@ public function actionRestore($errorMessage = null)

if (empty($strLink))
{
Yii::app()->controller->redirect(_xls_site_url());
$url = Yii::app()->createAbsoluteUrl('site/index');
Yii::app()->controller->redirect($url);
}

//Use our class variable which is accessible from the view
Expand Down Expand Up @@ -446,11 +445,11 @@ public function actionRestore($errorMessage = null)
}

//And go back to checkout
Yii::app()->controller->redirect(array('cart/checkout'));
Yii::app()->controller->redirect(Yii::app()->createUrl('cart/checkout'));
}

//In all other cases, just go home
Yii::app()->controller->redirect(array('/site'));
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));
} else {
self::redirectToReceipt($strLink);
}
Expand Down Expand Up @@ -1108,9 +1107,10 @@ public function actionCheckout()
{
//somehow we're logged in without a valid Customer object
Yii::app()->user->logout();
$this->redirect(array("/site"));

$url = Yii::app()->createUrl('site/index');
$this->redirect($url);
}

$model->contactFirstName = $objCustomer->first_name;
$model->contactLastName = $objCustomer->last_name;
$model->contactPhone = $objCustomer->mainphone;
Expand Down Expand Up @@ -2063,6 +2063,10 @@ public function actionGetShippingRates()
Shipping::saveCartScenariosToSession($arrCartScenario);
MultiCheckoutForm::saveToSession($checkoutForm);

// Save to the database.
$objShipping = CartShipping::getOrCreateCartShipping();
$objShipping->updateShipping();

return $this->renderJSON(
array(
'result' => 'success',
Expand Down
20 changes: 9 additions & 11 deletions core/protected/controllers/CommonsslController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function actionLogin()

$identity = new SharedIdentity(null, null);
$identity->sharedId = $arrItems[0];

if ($identity->authenticate() && $identity->errorCode === UserIdentity::ERROR_NONE)
{
Yii::log("Login authentication passed ", 'info', 'application.'.__CLASS__.".".__FUNCTION__);
Expand All @@ -51,12 +52,8 @@ public function actionLogin()
Yii::app()->user->setState('cartid', $arrItems[1]);
$this->redirect($this->createUrl("/site"));
}
else
{
die("error transferring");
}

$this->redirect("http://www.copper.site");
die("error transferring");
}


Expand Down Expand Up @@ -92,7 +89,7 @@ public function actionCartCheckout()
/**
* Checkout actions land here instead, before progressing
* Still under normal URL at this point
* Pass along cartID, UserID
* Pass along cartID, UserID, linkID
*/

public function actionCheckout()
Expand All @@ -103,6 +100,7 @@ public function actionCheckout()
$action = Yii::app()->getRequest()->getQuery('action');
$orderID = Yii::app()->getRequest()->getQuery('orderId');
$errorNote = Yii::app()->getRequest()->getQuery('errorNote');
$linkid = Yii::app()->getRequest()->getQuery('linkid');

if (empty($userID))
{
Expand All @@ -114,7 +112,7 @@ public function actionCheckout()
$action = 'index';
}

$strIdentity = $userID . ',' . $cartID . ',' . $controller . ',' . $action;
$strIdentity = $userID . ',' . $cartID . ',' . $controller . ',' . $action . ',' . $linkid;
if (isset($orderID) && isset($errorNote))
{
$strIdentity .= ',' . $orderID . ',' . $errorNote;
Expand Down Expand Up @@ -158,15 +156,15 @@ public function actionSharedSSLReceive()
$cartID = $arrItems[1];
$controller = $arrItems[2];
$action = $arrItems[3];
if (isset($arrItems[5]))
if (isset($arrItems[6]))
{
$arrParams['orderId'] = $arrItems[4];
$arrParams['errorNote'] = $arrItems[5];
$arrParams['orderId'] = $arrItems[5];
$arrParams['errorNote'] = $arrItems[6];
}

elseif (isset($arrItems[4]))
{
$arrParams['getuid'] = $arrItems[4];
$arrParams['linkid'] = $arrItems[4];
}

//If our session was previously logged in on this side of SSL, we overwrite, otherwise log out
Expand Down
16 changes: 0 additions & 16 deletions core/protected/controllers/MyaccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@ class MyaccountController extends Controller
public $giftRegistries;
public $repairs;

public function beforeAction($action)
{
// if (_xls_get_conf('ENABLE_SSL')==1)
// {
// if(Yii::app()->isCommonSSL)
// $this->verifyCommonSSL();
//
// if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') {
// $this->redirect(Yii::app()->createAbsoluteUrl('myaccount/'.$action->Id,array(),'https'));
// Yii::app()->end();
// }
// }

return parent::beforeAction($action);
}

public function actionIndex()
{

Expand Down
4 changes: 2 additions & 2 deletions core/protected/controllers/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function actionSendemail()
*/
public function actionContact()
{
$this->redirect("/custompage/contact");
$this->redirect(Yii::app()->createUrl("custompage/contact"));
}

/**
Expand All @@ -382,6 +382,6 @@ public function actionRobots()

public function actionSystemcheck()
{
$this->redirect("/systemcheck.php");
$this->redirect(Yii::app()->createUrl("/systemcheck.php"));
}
}
4 changes: 2 additions & 2 deletions core/protected/controllers/SroController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function actionView()

$strLink = Yii::app()->getRequest()->getQuery('code');
if (empty($strLink))
Yii::app()->controller->redirect(_xls_site_url());
Yii::app()->controller->redirect(Yii::app()->createUrl('site/index'));

//Use our class variable which is accessible from the view
$model = Sro::model()->findByAttributes(array('linkid'=>$strLink));
Expand All @@ -57,4 +57,4 @@ public function actionView()

}

}
}
Loading

0 comments on commit a9c91f5

Please sign in to comment.