Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

3.0.5

  • Loading branch information...
commit 4ab5fec4455353a13fe16fbfdf6c975faf95c340 1 parent 65c526b
Kris Thom White authored
Showing with 155 additions and 139 deletions.
  1. +1 −1  _index.php
  2. +31 −15 core/protected/components/Controller.php
  3. +11 −3 core/protected/components/ShoppingCart.php
  4. +7 −0 core/protected/components/helpers.php
  5. +2 −2 core/protected/config/wscomponents.php
  6. +3 −3 core/protected/config/wsver.php
  7. +2 −2 core/protected/controllers/CartController.php
  8. +1 −1  core/protected/controllers/InstallController.php
  9. +1 −1  core/protected/controllers/LegacysoapController.php
  10. +6 −5 core/protected/controllers/SearchController.php
  11. +5 −61 core/protected/controllers/SiteController.php
  12. +1 −1  core/protected/extensions/wspayment/moneris/models/monerisAdminForm.php
  13. +2 −2 core/protected/extensions/wspayment/moneris/moneris.php
  14. +6 −2 core/protected/extensions/wspayment/moneris/mpgClasses.php
  15. +7 −3 core/protected/models/Cart.php
  16. +54 −16 core/protected/models/Configuration.php
  17. +4 −2 core/protected/modules/admin/components/AdminBaseController.php
  18. +1 −1  core/protected/modules/admin/controllers/DefaultController.php
  19. +1 −0  core/protected/modules/admin/views/custompage/edit.php
  20. +2 −0  core/protected/views-cities/cart/checkout.php
  21. +1 −0  custom/extensions/payment/README.md
  22. +1 −0  custom/extensions/shipping/README.md
  23. +1 −1  index.php
  24. +4 −17 install.php
View
2  _index.php
@@ -6,7 +6,7 @@
if(!file_exists($config))
{
- header("Location: install.php");
+ die("Web Store is not installed");
exit;
}
View
46 core/protected/components/Controller.php
@@ -49,24 +49,16 @@ class Controller extends CController
public $gridProductsRows;
public $custom_page_content;
+
/**
* Load anything we need globally, such as items we're going to use in our main.php template.
* If you create init() in any other controller, you need to run parent::init() too or this
* will be skipped.
*/
- public function init() {
+ public function init()
+ {
- if (Yii::app()->params['STORE_OFFLINE']>0 || Yii::app()->params['INSTALLED'] != '1')
- {
- if (isset($_GET['offline']))
- Yii::app()->session['STORE_OFFLINE'] = _xls_number_only($_GET['offline']);
-
- if (Yii::app()->session['STORE_OFFLINE'] != Yii::app()->params['STORE_OFFLINE'] || Yii::app()->params['INSTALLED'] != '1')
- {
- $this->render('/site/offline');
- Yii::app()->end();
- }
- }
+ Yii::app()->setViewPath(Yii::getPathOfAlias('application')."/views-cities");
$this->logoutUrl = $this->createUrl("site/logout");
@@ -93,6 +85,26 @@ public function init() {
die("you have no theme set");
}
+
+ if (Yii::app()->params['STORE_OFFLINE']>0 || Yii::app()->params['INSTALLED'] != '1')
+ {
+ if (isset($_GET['offline']))
+ Yii::app()->session['STORE_OFFLINE'] = _xls_number_only($_GET['offline']);
+
+ if (Yii::app()->session['STORE_OFFLINE'] != Yii::app()->params['STORE_OFFLINE'] || Yii::app()->params['INSTALLED'] != '1')
+ {
+ $this->render('/site/offline');
+ Yii::app()->end();
+ }
+ }
+
+ $this->logoutUrl = $this->createUrl("site/logout");
+
+ $strViewset = "cities";
+ if(!empty($strViewset)) Yii::app()->setViewPath(Yii::getPathOfAlias('application')."/views-".$strViewset);
+
+
+
if ( Yii::app()->theme && file_exists('webroot.themes.'.Yii::app()->theme->name.'.layouts.column2'))
$this->layout='webroot.themes.'.Yii::app()->theme->name.'.layouts.column2';
@@ -108,13 +120,14 @@ public function init() {
$this->getUserLanguage();
$this->pageTitle =
- Yii::app()->name = _xls_get_conf('STORE_NAME', 'LightSpeed Web Store');
+ Yii::app()->name = _xls_get_conf('STORE_NAME', 'LightSpeed Web Store')." : ".
+ _xls_get_conf('STORE_TAGLINE');
$this->pageCanonicalUrl = $this->getCanonicalUrl();
$this->pageDescription = _xls_get_conf('STORE_TAGLINE');
$this->pageImageUrl ='';
$this->pageHeaderImage = CHtml::link(CHtml::image(Yii::app()->baseUrl._xls_get_conf('HEADER_IMAGE')), array('site/index'));
- Yii::app()->clientScript->registerMetaTag("LightSpeed Web Store ".XLSWS_VERSION,'generator');
+
try {
@@ -141,6 +154,8 @@ public function init() {
if(_xls_facebook_login())
$this->getFacebookLogin();
+ Yii::app()->clientScript->registerMetaTag(
+ "LightSpeed Web Store ".XLSWS_VERSION,'generator',null,array(),'generator');
}
/**
@@ -326,4 +341,5 @@ protected function afterRender($view, &$output) {
return true;
}
-}
+}
+
View
14 core/protected/components/ShoppingCart.php
@@ -68,13 +68,19 @@ public function getModel()
} else {
$objCart = Cart::model()->findByPk($intCartId);
- if (!$objCart || $objCart->cart_type != CartType::cart) {
+ if (!($objCart instanceof Cart))
+ {
//something has happened to the database object
Yii::log("Could not find cart ".$intCartId.", creating new one.", 'error', 'application.'.__CLASS__.".".__FUNCTION__);
$objCart = Cart::InitializeCart();
Yii::app()->user->setState('cartid',$objCart->id);
}
-
+ elseif($objCart->cart_type != CartType::cart && $objCart->cart_type != CartType::awaitpayment)
+ {
+ Yii::log("Found cart ".$intCartId." but ".$objCart->cart_type." is not editable type, so generate a new one", 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ $objCart = Cart::InitializeCart();
+ Yii::app()->user->setState('cartid',$objCart->id);
+ }
}
$this->_model = $objCart;
@@ -141,6 +147,8 @@ public function loginMerge($objCartToMerge = null)
$objProduct = Product::model()->findbyPk($objItem->product_id);
//we strip any discount from another cart usu. promo code
$retVal = $this->model->AddProduct($objProduct, $objItem->qty, $objItem->cart_type, $objItem->wishlist_item, $objItem->description,$objItem->sell,0);
+ if($objItem->wishlist_item>0)
+ WishlistItem::model()->updateByPk($objItem->wishlist_item,array('cart_item_id'=>$retVal));
if(is_null($objCartToMerge)) $objItem->delete();
}
@@ -488,7 +496,7 @@ public function getIsTaxIn()
if($this->model->id>0)
{
- if($this->model->taxCode->IsNoTax()) return false;
+ if(is_object($this->model->taxCode) && $this->model->taxCode->IsNoTax()) return false;
if (Yii::app()->params['TAX_INCLUSIVE_PRICING']) return true;
return false;
View
7 core/protected/components/helpers.php
@@ -1509,12 +1509,19 @@ function _xls_check_version($releasenotes = false)
$strThemeVersion="noupdate";
}
+ if(isset($_SERVER['SERVER_SOFTWARE']))
+ $serversoftware=$_SERVER['SERVER_SOFTWARE'];
+ else
+ $serversoftware="";
+
$data['webstore'] = array(
'version' => XLSWS_VERSIONBUILD,
'customer' => $storeurl,
'type' => (_xls_get_conf('LIGHTSPEED_HOSTING')==1 ? "hosted" : "self"),
'track' => (_xls_get_conf('AUTO_UPDATE_TRACK','0')==1 ? "beta" : "release"),
+ 'autoupdate' => (_xls_get_conf('AUTO_UPDATE','1')==1 ? "1" : "0"),
'theme' => $strTheme,
+ 'serversoftware'=> $serversoftware,
'releasenotes' => $releasenotes,
'themeversion' => $strThemeVersion,
'schema' => _xls_get_conf('DATABASE_SCHEMA_VERSION')
View
4 core/protected/config/wscomponents.php
@@ -17,8 +17,8 @@ function searchForComponents()
foreach (glob(dirname(__FILE__).'/../extensions/wsshipping/*', GLOB_ONLYDIR) as $moduleDirectory)
$arr[basename($moduleDirectory)] = array('class'=>'ext.wsshipping.'.basename($moduleDirectory).'.'.basename($moduleDirectory));
- if (file_exists(dirname(__FILE__).'/wslogging.php'))
- $arr['log']=require(dirname(__FILE__).'/wslogging.php');
+ if (file_exists(dirname(__FILE__).'/../../../config/wslogging.php'))
+ $arr['log']=require(dirname(__FILE__).'/../../../config/wslogging.php');
else
$arr['log']=array(
'class'=>'CLogRouter',
View
6 core/protected/config/wsver.php
@@ -1,5 +1,5 @@
<?php
-define('XLSWS_VERSION', '3.0.4');
-define('XLSWS_VERSIONBUILD', 3040);
-define('XLSWS_BUILDDATE', '2013-08-28 16:14:01');
+define('XLSWS_VERSION', '3.0.5');
+define('XLSWS_VERSIONBUILD', 3050);
+define('XLSWS_BUILDDATE', '2013-10-02 12:18:39');
View
4 core/protected/controllers/CartController.php
@@ -438,7 +438,7 @@ public function actionCheckout()
if(_xls_get_conf('LIGHTSPEED_HOSTING','0') == '1' && _xls_get_conf('LIGHTSPEED_HOSTING_SHARED_SSL','0') == '1')
$this->verifySharedSSL();
- $this->pageTitle=Yii::app()->name . ' - Checkout';
+ $this->pageTitle=_xls_get_conf('STORE_NAME') . ' : Checkout';
//Set breadcrumbs
$this->breadcrumbs = array(
Yii::t('global','Edit Cart')=>array('/cart'),
@@ -904,7 +904,7 @@ public function actionCheckout()
Yii::app()->clientScript->registerScript('payment',
'$(document).ready(function(){
- changePayment(\''.$objPaymentModule->id.'\')
+ changePayment(\''.$model->paymentProvider.'\')
});');
}
} else $model->paymentProvider=null;
View
2  core/protected/controllers/InstallController.php
@@ -18,7 +18,7 @@ class InstallController extends Controller
protected $online;
public function init() {
-
+ Yii::app()->setViewPath(Yii::getPathOfAlias('application')."/views-cities");
set_time_limit(300);
//We override init() to keep our system from trying to autoload stuff we haven't finished converting yet
}
View
2  core/protected/controllers/LegacysoapController.php
@@ -13,7 +13,7 @@ class LegacySoapController extends Controller
{
public function init() {
-
+ Yii::app()->setViewPath(Yii::getPathOfAlias('application')."/views-cities");
if(Yii::app()->params['INSTALLED'] != '1') die(); //No soap when not installed (or partially installed)
//do nothing since we don't need a PHP session created for SOAP transactions
View
11 core/protected/controllers/SearchController.php
@@ -150,13 +150,14 @@ public function actionBrowse() {
if (_xls_get_conf('INVENTORY_OUT_ALLOW_ADD') == Product::InventoryMakeDisappear)
- $criteria->addCondition('inventory_avail>0');
+ $criteria->addCondition('(inventory_avail>0 OR inventoried=0)');
if (!_xls_get_conf('CHILD_SEARCH') || empty($strQ))
$criteria->addCondition('Product.parent IS NULL');
$criteria->addCondition('web=1');
+ $criteria->addCondition('current=1');
$criteria->order = 'Product.'._xls_get_sort_order();
@@ -288,7 +289,7 @@ protected function BuildCommand($formModel,$intLimit = null, $intOffset = null)
$arrBind = array(':query'=>$strQ);
if (_xls_get_conf('INVENTORY_OUT_ALLOW_ADD') == Product::InventoryMakeDisappear)
- $strInv .= " AND inventory_avail>0 ";
+ $strInv .= " AND (inventory_avail>0 OR inventoried=0) ";
if (!_xls_get_conf('CHILD_SEARCH'))
$strInv .= " AND parent IS NULL ";
@@ -358,7 +359,7 @@ protected function BuildCommand($formModel,$intLimit = null, $intOffset = null)
$objCommand->leftJoin('xlsws_product_tags t2', 't2.product_id = t.id');
$objCommand->leftJoin('xlsws_tags t3', 't2.tag_id = t3.id');
$objCommand->from('xlsws_product t');
- $objCommand->where('(' . $strWhere . ') ' . $strInv . ' AND web=1');
+ $objCommand->where('(' . $strWhere . ') ' . $strInv . ' AND web=1 AND current=1');
//If we have passed a category, append it to the search here
if(isset($formModel['cat']) && $formModel['cat']>0)
@@ -369,7 +370,7 @@ protected function BuildCommand($formModel,$intLimit = null, $intOffset = null)
$intIdArray = array_merge($intIdArray, $objCategory->GetBranchPath());
unset($arrBind[':cat']);
$objCommand->leftJoin('xlsws_product_category_assn t4', 't4.product_id = t.id');
- $objCommand->where(array('AND', '(' . $strWhere . ') ' . $strInv . ' AND web=1', array('in', 'category_id', $intIdArray)));
+ $objCommand->where(array('AND', '(' . $strWhere . ') ' . $strInv . ' AND web=1 AND current=1', array('in', 'category_id', $intIdArray)));
}
@@ -379,7 +380,7 @@ protected function BuildCommand($formModel,$intLimit = null, $intOffset = null)
{
if ($intLimit==-1) {
//This means we're just running a count, so we don't need all aspects of this query
- $objCommand->select(' count(t.id) ');
+ $objCommand->select(' count(DISTINCT t.id) ');
$objCommand->group(null);
$objCommand->order(null);
}
View
66 core/protected/controllers/SiteController.php
@@ -14,26 +14,6 @@ class SiteController extends Controller
{
public $layout='//layouts/column2';
-
- /**
- * Declares class-based actions.
- */
- public function actions()
- {
- return array(
- // captcha action renders the CAPTCHA image displayed on the contact page
- 'captcha'=>array(
- 'class'=>'CCaptchaAction',
- 'backColor'=>0xFFFFFF,
- ),
- // page action renders "static" pages stored under 'protected/views/site/pages'
- // They can be accessed via: index.php?r=site/page&view=FileName
- 'page'=>array(
- 'class'=>'CViewAction',
- ),
- );
- }
-
/**
* This is the default 'index' action that is invoked
* when an action is not explicitly requested by users.
@@ -49,46 +29,7 @@ public function actionIndex()
break;
case "*products":
-
- $criteria = new CDbCriteria();
-
- if (_xls_get_conf('INVENTORY_OUT_ALLOW_ADD') == Product::InventoryMakeDisappear)
- $criteria->addCondition('current=1 AND web=1 AND parent IS NULL AND inventory_avail>0');
- else
- $criteria->condition = 'current=1 AND web=1 AND parent IS NULL';
-
- if (Product::HasFeatured())
- $criteria->addCondition('featured=1');
- $criteria->order = _xls_get_sort_order();
-
- $item_count = Product::model()->count($criteria);
-
- $pages = new CPagination($item_count);
- $pages->setPageSize(Yii::app()->params['listPerPage']);
- $pages->applyLimit($criteria);
-
- $model = Product::model()->findAll($criteria);
-
- $model = $this->createBookends($model);
-
- $this->pageTitle=_xls_get_formatted_page_title(
- null,_xls_get_conf('SEO_HOMEPAGE_TITLE','{storename} : {storetagline}')
- );
-
-
- //We leech off the grid file from search
- if (Yii::app()->theme && file_exists('themes/'.Yii::app()->theme->name.'/views/search/grid.php'))
- $gridFile = 'webroot.themes.'.Yii::app()->theme->name.'.views.search.grid';
- else $gridFile = "application.views.search.grid";
-
- $this->render($gridFile,array(
- 'model'=> $model, // must be the same as $item_count
- 'item_count'=>$item_count,
- 'page_size'=>Yii::app()->params['listPerPage'],
- 'items_count'=>$item_count,
- 'pages'=>$pages,
- ));
-
+ $this->forward("search/browse");
break;
default:
@@ -135,7 +76,10 @@ public function actionMap()
*/
public function actionError()
{
- $this->layout='//layouts/errorlayout';
+ $strPath = Yii::app()->getViewPath();
+ if(substr($strPath,-5)=="views")
+ Yii::app()->setViewPath(Yii::getPathOfAlias('application')."/views-cities");
+ $this->layout='//layouts/errorlaout';
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
View
2  core/protected/extensions/wspayment/moneris/models/monerisAdminForm.php
@@ -68,7 +68,7 @@ public function getAdminForm()
'live'=>array(
'type'=>'dropdownlist',
'items'=>array('live'=>'Live','test'=>'Sandbox'),
- 'title'=>"To use (TEST MODE) in your regular account, leave this as Live and instead set Test Mode in your Authorize.net account settings on their site. Sandbox should only be used with Authorize.net Sandbox testing servers.",
+ 'title'=>"To use TEST MODE set to Sandbox.",
'hint'=>"Hover over field for instructions",
),
'restrictcountry'=>array(
View
4 core/protected/extensions/wspayment/moneris/moneris.php
@@ -29,7 +29,7 @@ public function run()
$type='purchase';
$cust_id='';
- $order_id=$this->objCart->id_str;
+ $order_id=$this->objCart->id_str.date("YmdHis");
$amount=number_format(round($this->objCart->total,2),2, '.', '');
$pan=_xls_number_only($this->CheckoutForm->cardNumber);
$expiry_date=$this->CheckoutForm->cardExpiryMonth.substr($this->CheckoutForm->cardExpiryYear,2,2);
@@ -114,7 +114,7 @@ public function run()
/***************************** HTTPS Post Object *****************************/
- $mpgHttpPost =new mpgHttpsPost($store_id,$api_token,$mpgRequest);
+ $mpgHttpPost =new mpgHttpsPost($store_id,$api_token,$mpgRequest,$this->config);
/******************************* Response ************************************/
View
8 core/protected/extensions/wspayment/moneris/mpgClasses.php
@@ -8,7 +8,7 @@ class mpgGlobals
var $Globals=array(
'MONERIS_PROTOCOL' => 'https',
- 'MONERIS_HOST' => 'esqa.moneris.com',
+ 'MONERIS_HOST' => 'www3.moneris.com',
'MONERIS_PORT' =>'443',
'MONERIS_FILE' => '/gateway2/servlet/MpgRequest',
'API_VERSION' =>'PHP - 2.5.3',
@@ -22,6 +22,7 @@ function mpgGlobals()
function getGlobals()
{
+
return($this->Globals);
}
@@ -37,7 +38,7 @@ class mpgHttpsPost
var $mpgRequest;
var $mpgResponse;
- function mpgHttpsPost($store_id,$api_token, $mpgRequestOBJ)
+ function mpgHttpsPost($store_id,$api_token, $mpgRequestOBJ,$config)
{
$this->store_id=$store_id;
@@ -51,6 +52,9 @@ function mpgHttpsPost($store_id,$api_token, $mpgRequestOBJ)
$g=new mpgGlobals();
$gArray=$g->getGlobals();
+ if($config['live']=="test")
+ $gArray['MONERIS_HOST']='esqa.moneris.com';
+
$url=$gArray['MONERIS_PROTOCOL']."://".
$gArray['MONERIS_HOST'].":".
$gArray['MONERIS_PORT'].
View
10 core/protected/models/Cart.php
@@ -102,7 +102,9 @@ public static function InitializeCart() {
$objCart->datetime_cre = new CDbExpression('NOW()');;
$objCart->datetime_due = new CDbExpression('now() + INTERVAL '._xls_get_conf('CART_LIFE', 7).' DAY');
$objCart->ResetTaxIncFlag();
- $objCart->save();
+ if(!$objCart->save())
+ Yii::log("Error initializing cart ".print_r($objCart->getErrors(),true),
+ 'error', 'application.'.__CLASS__.".".__FUNCTION__);
return $objCart;
@@ -317,6 +319,8 @@ public function SetIdStr() {
public function UpdateItemQuantity($objItem, $intQuantity) {
if ($intQuantity <= 0) {
+ if($objItem->wishlist_item>0)
+ WishlistItem::model()->updateByPk($objItem->wishlist_item,array('cart_item_id'=>null));
$objItem->delete();
return true;
}
@@ -856,14 +860,14 @@ public function AddProduct($objProduct,
* @return
*/
public function ResetTaxIncFlag(){
- $this->tax_inclusive = false;
+ $this->tax_inclusive = 0;
if (_xls_get_conf('TAX_INCLUSIVE_PRICING', '0') == 1) {
$objTaxCode = TaxCode::GetDefault();
if ($objTaxCode instanceof TaxCode)
{
$this->tax_code_id = $objTaxCode->lsid;
- $this->tax_inclusive = true;
+ $this->tax_inclusive = 1;
}
}
}
View
70 core/protected/models/Configuration.php
@@ -74,26 +74,55 @@ public static function exportConfig()
if ($objLangCode instanceof Configuration)
$lang = $objLangCode->key_value; else $lang = "en";
- $fp = fopen(YiiBase::getPathOfAlias('config')."/wsconfig.php","w");
-
- fwrite($fp,"<?php
-return
- array(
- 'theme'=>'".$theme."',
- 'language'=>'".$lang."',
- 'params'=>array(
-");
+ //Create temporary file
+ $randName = _xls_seo_url(_xls_truncate(md5(date("YmdHis")),10,'')).".php";
- foreach ($objConfig as $oConfig)
- fwrite($fp,"\t\t'".$oConfig->key_name."'=>'".str_replace('\'','\\\'',$oConfig->key_value)."',".chr(13));
+ $strConfigArray =
+ "return array(\n".
+ "\t\t'theme'=>'".$theme."',\n".
+ "\t\t'language'=>'".$lang."',\n".
+ "\t\t'params'=>array(\n";
- fwrite($fp," ),
-);");
- fclose($fp);
+ foreach ($objConfig as $oConfig) {
+ $keyvalue = str_replace('"','\"',$oConfig->key_value);
+ $strConfigArray .= "\t\t\t'".$oConfig->key_name."'=>\"".$keyvalue."\",\n";
+ }
+
+ $strConfigArray .= "));";
+
+ $success = false;
+ $x = null;
+ try {
+ @$x = eval($strConfigArray);
+ if(is_array($x)) $success=true;
+ } catch (Exception $objExc) {
+ //our config wasn't successful
+ Yii::log('generating wsconfig array failed '.$strConfigArray, 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ $success = false;
+ }
+
+ if($success){
+ $str = "<?php"."\n".$strConfigArray;
+ //Yii::log('config being defined as '.YiiBase::getPathOfAlias('config'), 'info', 'application.'.__CLASS__.".".__FUNCTION__);
+ $result = file_put_contents(YiiBase::getPathOfAlias('config')."/".$randName,$str);
+ if($result === false) {
+ Yii::log('error file_put_contents to '.YiiBase::getPathOfAlias('config')."/".$randName, 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ return false;
+ }
+
+ if(file_exists(YiiBase::getPathOfAlias('config')."/wsconfig.php"))
+ unlink(YiiBase::getPathOfAlias('config')."/wsconfig.php");
+
+ rename(YiiBase::getPathOfAlias('config')."/".$randName,YiiBase::getPathOfAlias('config')."/wsconfig.php");
+
+ return true;
+ } else {
+ Yii::log('error writing wsconfig.php', 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ return false;
+ }
- return true;
}
public static function exportLogging()
@@ -468,9 +497,18 @@ protected function beforeValidate() {
return parent::beforeValidate();
}
+ protected function beforeSave()
+ {
+ if ($this->key_name=="STORE_TAGLINE")
+ $this->key_value = str_replace('"',"",$this->key_value);
+
+ return parent::beforeSave();
+ }
+
protected function afterSave()
{
- Configuration::exportConfig();
+ $retVal = Configuration::exportConfig();
+ if(!$retVal) return $retVal;
if ($this->key_name=="DEBUG_LOGGING")
Configuration::exportLogging();
View
6 core/protected/modules/admin/components/AdminBaseController.php
@@ -110,14 +110,16 @@ public function actionEdit()
if ($item->options=="PASSWORD") $item->key_value=_xls_encrypt($item->key_value);
if (!$item->save())
Yii::app()->user->setFlash('error',print_r($item->getErrors(),true));
- else
+ else {
+ Yii::app()->user->setFlash('success',Yii::t('admin','Configuration updated on {time}.',array('{time}'=>date("d F, Y h:i:sa"))));
$item->postConfigurationChange();
+ }
if($item->key_name=='EMAIL_TEST' && $item->key_value==1)
$this->sendEmailTest();
}
- Yii::app()->user->setFlash('success',Yii::t('admin','Configuration updated on {time}.',array('{time}'=>date("d F, Y h:i:sa"))));
+
View
2  core/protected/modules/admin/controllers/DefaultController.php
@@ -164,7 +164,7 @@ public function actionSidebar()
if (!$model->save())
Yii::app()->user->setFlash('error',print_r($model->getErrors(),true));
- Yii::app()->user->setFlash('success',Yii::t('admin','Configuration updated on {time}.',array('{time}'=>date("d F, Y h:i:sa"))));
+ else Yii::app()->user->setFlash('success',Yii::t('admin','Configuration updated on {time}.',array('{time}'=>date("d F, Y h:i:sa"))));
} else Yii::app()->user->setFlash('error',print_r($model->getErrors(),true));
}
View
1  core/protected/modules/admin/views/custompage/edit.php
@@ -72,6 +72,7 @@
'width'=> '500',
'height'=> '400',
'autoresize'=>false,
+ 'convertDivs'=>false,
),
));
?>
View
2  core/protected/views-cities/cart/checkout.php
@@ -468,9 +468,11 @@
savedTotalScenarios = data.totals;
savedShippingPriorities = data.priority;
savedCartScenarios = data.cartitems;
+ savedPickedModule = $("#' . CHtml::activeId( $model, 'paymentProvider') .'").val();
$("#' . CHtml::activeId( $model, 'shippingProvider') .'").html(data.provider);
$("#' . CHtml::activeId( $model, 'shippingPriority') .'").html(data.priority);
$("#' . CHtml::activeId( $model, 'paymentProvider') .'").html(data.paymentmodules);
+ $("#' . CHtml::activeId( $model, 'paymentProvider') .'").val(savedPickedModule);
$("#shippingSpinner").hide();
$("#shippingProvider_0").click();
}',
View
1  custom/extensions/payment/README.md
@@ -0,0 +1 @@
+This directory is for custom extensions. If you want to use third party extensions for your Web Store customization, such as ones you have downloaded from http://www.yiiframework.com/extension/, you can place them here. Web Store has been set up to look both here and the Web Store program folder.
View
1  custom/extensions/shipping/README.md
@@ -0,0 +1 @@
+This directory is for custom extensions. If you want to use third party extensions for your Web Store customization, such as ones you have downloaded from http://www.yiiframework.com/extension/, you can place them here. Web Store has been set up to look both here and the Web Store program folder.
View
2  index.php
@@ -6,7 +6,7 @@
if(!file_exists($config))
{
- header("Location: install.php");
+ die("Web Store is not installed");
exit;
}
View
21 install.php
@@ -43,9 +43,6 @@
//(This is because command line php may differ from Apache server php)
if(isset($arg['help'])) showCommandLine();
- if(file_exists("config/main.php")) die("\nENTER 1 OR 2 FOR INSTRUCTIONS (ENTER 2 TO PAGE)\n\nENTER SEED NUMBER
-INITIALIZING...\n\nYOU MUST DESTROY 17 KINGONS IN 30 STARDATES WITH 3 STARBASES\n\n-=--=--=--=--=--=--=--=-\n
- *\n STARDATE 2100\n * * CONDITION GREEN\n <*> QUADRANT 5,2\n * SECTOR 5,4\n ENERGY 3000\n SHIELDS 0\n * PHOTON TORPEDOES 10\n-=--=--=--=--=--=--=--=-\nCOMMAND\n\nHey, ensign Wesley, Web Store is already installed!\n\n");
if(isset($arg['dbupdate']) && $arg['dbupdate']==1)
{
//This is command line for applying any database updates
@@ -53,6 +50,10 @@
runYii('www.example.com','/install.php',49);
die();
}
+ if(file_exists("config/main.php")) die("\nENTER 1 OR 2 FOR INSTRUCTIONS (ENTER 2 TO PAGE)\n\nENTER SEED NUMBER
+INITIALIZING...\n\nYOU MUST DESTROY 17 KINGONS IN 30 STARDATES WITH 3 STARBASES\n\n-=--=--=--=--=--=--=--=-\n
+ *\n STARDATE 2100\n * * CONDITION GREEN\n <*> QUADRANT 5,2\n * SECTOR 5,4\n ENERGY 3000\n SHIELDS 0\n * PHOTON TORPEDOES 10\n-=--=--=--=--=--=--=--=-\nCOMMAND\n\nHey, ensign Wesley, Web Store is already installed!\n\n");
+
$arrRequired = array('dbhost','dbuser','dbpass','dbname','url');
foreach($arrRequired as $item)
@@ -1008,19 +1009,6 @@ function zipAndFolders()
}
-
-function makeSymbolicLink()
-{
-
- $symfile = "core/protected/views";
- $strOriginal = "views-cities";
-
- @unlink($symfile);
- $retVal = symlink($strOriginal, $symfile);
- if (!$retVal)
- die("cannot create symbolic link 'views' to point to 'views-cities'");
-}
-
/**
* This is actually a copy of our zip.php from Web store from Florian
* This violates our DRY principle but we need everything in the installer
@@ -1157,7 +1145,6 @@ function runInstall($db,$sqlline = 0)
case 3:
zipAndFolders();
- makeSymbolicLink();
$tag = "Applying pre-3.0 changes. Line #".$sqlline;
return json_encode(array('result'=>"success",
'tag'=>$tag,'line'=>$sqlline,'total'=>$total,'upgrade'=>$upgrade));
Please sign in to comment.
Something went wrong with that request. Please try again.